Support Nodejs.24 - Merge pull request #2110 from actions/salmanmkc/node24

Support Node.js 24
This commit is contained in:
Salman Chishti authored and GitHub committed 2025-10-16 16:25:47 +01:00
commit 16165527c6
3 files changed
+572 -810

No files matched your search

+7 -1
View File
@@ -242,6 +242,13 @@ test('save with server error should fail', async () => {
})
)
// Mock the FinalizeCacheEntryUpload to succeed (since the error should happen in saveCache)
jest
.spyOn(CacheServiceClientJSON.prototype, 'FinalizeCacheEntryUpload')
.mockReturnValue(
Promise.resolve({ok: true, entryId: '4', message: 'Success'})
)
const createTarMock = jest.spyOn(tar, 'createTar')
// Mock the saveCache call to throw a server error
@@ -274,7 +281,6 @@ test('save with server error should fail', async () => {
)
expect(saveCacheMock).toHaveBeenCalledTimes(1)
expect(getCompressionMock).toHaveBeenCalledTimes(1)
expect(getCompressionMock).toHaveBeenCalledTimes(1)
// Restore the getCacheServiceVersion mock to its original state
getCacheServiceVersionMock.mockRestore()
+559 -807
View File
File diff suppressed because it is too large. Load diff
+6 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@actions/cache",
"version": "4.1.0",
"version": "5.0.0",
"preview": true,
"description": "Actions cache lib",
"keywords": [
@@ -49,9 +49,13 @@
"semver": "^6.3.1"
},
"devDependencies": {
"@types/node": "^22.13.9",
"@types/node": "^24.1.0",
"@types/semver": "^6.0.0",
"@protobuf-ts/plugin": "^2.9.4",
"typescript": "^5.2.2"
},
"overrides": {
"uri-js": "npm:uri-js-replace@^1.0.1",
"node-fetch": "^3.3.2"
}
}