Compare commits

..

1 Commits

Author SHA1 Message Date
dependabot[bot] 3d9b1505dc Bump @actions/cache from 5.0.1 to 5.0.3
Bumps [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache) from 5.0.1 to 5.0.3.
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/cache)

---
updated-dependencies:
- dependency-name: "@actions/cache"
  dependency-version: 5.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-13 20:14:30 +00:00
16 changed files with 597 additions and 1514 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
---
name: "@actions/cache"
version: 5.1.0
version: 5.0.5
type: npm
summary: Actions cache lib
homepage: https://github.com/actions/toolkit/tree/main/packages/cache
-11
View File
@@ -1,11 +0,0 @@
---
name: "@nodable/entities"
version: 2.2.0
type: npm
summary: Entity parser for XML, HTML, External entites with security and NCR control
homepage:
license: mit
licenses:
- sources: README.md
text: MIT
notices: []
-35
View File
@@ -1,35 +0,0 @@
---
name: anynum
version: 1.0.0
type: npm
summary: Normalize all Unicode decimal digits (Devanagari, Arabic, Thai, etc.) to
ASCII numerals. Zero dependencies, performance-first.
homepage:
license: mit
licenses:
- sources: LICENSE
text: |
MIT License
Copyright (c) 2026 Natural Intelligence
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
- sources: README.md
text: MIT
notices: []
+1 -1
View File
@@ -1,6 +1,6 @@
---
name: fast-xml-builder
version: 1.2.0
version: 1.1.4
type: npm
summary: Build XML from JSON without C/C++ based libraries
homepage:
+1 -1
View File
@@ -1,6 +1,6 @@
---
name: fast-xml-parser
version: 5.8.0
version: 5.5.11
type: npm
summary: Validate XML, Parse XML, Build XML without C/C++ based libraries
homepage:
+1 -1
View File
@@ -1,6 +1,6 @@
---
name: path-expression-matcher
version: 1.5.0
version: 1.4.0
type: npm
summary: Efficient path tracking and pattern matching for XML/JSON parsers
homepage: https://github.com/NaturalIntelligence/path-expression-matcher#readme
@@ -1,6 +1,6 @@
---
name: semver
version: 7.8.5
version: 7.7.3
type: npm
summary: The semantic version parser used by npm.
homepage:
+1 -1
View File
@@ -1,6 +1,6 @@
---
name: strnum
version: 2.4.0
version: 2.2.3
type: npm
summary: Parse String to Number based on configuration
homepage:
+1 -1
View File
@@ -1,6 +1,6 @@
---
name: undici
version: 6.27.0
version: 6.24.1
type: npm
summary: An HTTP/1.1 client, written from scratch for Node.js
homepage: https://undici.nodejs.org
-12
View File
@@ -1,12 +0,0 @@
---
name: xml-naming
version: 0.1.0
type: npm
summary: Validates XML name productions — Name, NCName, QName, NMToken, NMTokens —
for XML 1.0 and 1.1
homepage:
license: mit
licenses:
- sources: README.md
text: MIT
notices: []
-155
View File
@@ -1,155 +0,0 @@
import * as cache from '@actions/cache';
import * as core from '@actions/core';
import fs from 'fs';
import {run} from '../src/cache-save';
import * as cacheUtils from '../src/cache-utils';
import {State} from '../src/constants';
describe('cache-save', () => {
const primaryKey = 'primary-key';
let primaryKeyValue: string;
let matchedKeyValue: string;
let getBooleanInputSpy: jest.SpyInstance;
let getStateSpy: jest.SpyInstance;
let infoSpy: jest.SpyInstance;
let warningSpy: jest.SpyInstance;
let debugSpy: jest.SpyInstance;
let setFailedSpy: jest.SpyInstance;
let saveCacheSpy: jest.SpyInstance;
let getCacheDirectoryPathSpy: jest.SpyInstance;
let existsSpy: jest.SpyInstance;
beforeEach(() => {
primaryKeyValue = primaryKey;
matchedKeyValue = 'matched-key';
getBooleanInputSpy = jest.spyOn(core, 'getBooleanInput');
getBooleanInputSpy.mockReturnValue(true);
getStateSpy = jest.spyOn(core, 'getState');
getStateSpy.mockImplementation((key: string) => {
if (key === State.CachePrimaryKey) {
return primaryKeyValue;
}
if (key === State.CacheMatchedKey) {
return matchedKeyValue;
}
return '';
});
infoSpy = jest.spyOn(core, 'info');
infoSpy.mockImplementation(() => undefined);
warningSpy = jest.spyOn(core, 'warning');
warningSpy.mockImplementation(() => undefined);
debugSpy = jest.spyOn(core, 'debug');
debugSpy.mockImplementation(() => undefined);
setFailedSpy = jest.spyOn(core, 'setFailed');
setFailedSpy.mockImplementation(() => undefined);
saveCacheSpy = jest.spyOn(cache, 'saveCache');
saveCacheSpy.mockImplementation(() => Promise.resolve(0));
getCacheDirectoryPathSpy = jest.spyOn(cacheUtils, 'getCacheDirectoryPath');
getCacheDirectoryPathSpy.mockImplementation(() =>
Promise.resolve(['cache_directory_path', 'cache_directory_path'])
);
existsSpy = jest.spyOn(fs, 'existsSync');
existsSpy.mockImplementation(() => true);
});
afterEach(() => {
jest.restoreAllMocks();
});
it('does not save cache when the cache input is false', async () => {
getBooleanInputSpy.mockReturnValue(false);
await run();
expect(saveCacheSpy).not.toHaveBeenCalled();
expect(warningSpy).not.toHaveBeenCalled();
expect(setFailedSpy).not.toHaveBeenCalled();
});
it('does not save cache when there are no cache folders on the disk', async () => {
existsSpy.mockImplementation(() => false);
await run();
expect(warningSpy).toHaveBeenCalledWith(
'There are no cache folders on the disk'
);
expect(saveCacheSpy).not.toHaveBeenCalled();
expect(setFailedSpy).not.toHaveBeenCalled();
});
it('does not save cache when the primary key was not generated', async () => {
primaryKeyValue = '';
await run();
expect(infoSpy).toHaveBeenCalledWith(
'Primary key was not generated. Please check the log messages above for more errors or information'
);
expect(saveCacheSpy).not.toHaveBeenCalled();
expect(setFailedSpy).not.toHaveBeenCalled();
});
it('does not save cache when a cache hit occurred on the primary key', async () => {
matchedKeyValue = primaryKey;
await run();
expect(infoSpy).toHaveBeenCalledWith(
`Cache hit occurred on the primary key ${primaryKey}, not saving cache.`
);
expect(saveCacheSpy).not.toHaveBeenCalled();
expect(setFailedSpy).not.toHaveBeenCalled();
});
it('saves cache when the primary key differs from the matched key', async () => {
await run();
expect(saveCacheSpy).toHaveBeenCalled();
expect(infoSpy).toHaveBeenCalledWith(
`Cache saved with the key: ${primaryKey}`
);
expect(warningSpy).not.toHaveBeenCalled();
expect(setFailedSpy).not.toHaveBeenCalled();
});
it('save with -1 cacheId , should not fail workflow', async () => {
saveCacheSpy.mockImplementation(() => Promise.resolve(-1));
await run();
expect(saveCacheSpy).toHaveBeenCalled();
expect(debugSpy).toHaveBeenCalledWith(
`Cache was not saved for the key: ${primaryKey}`
);
expect(infoSpy).not.toHaveBeenCalledWith(
`Cache saved with the key: ${primaryKey}`
);
expect(warningSpy).not.toHaveBeenCalled();
expect(setFailedSpy).not.toHaveBeenCalled();
});
it('saves with error from toolkit, should not fail workflow', async () => {
saveCacheSpy.mockImplementation(() =>
Promise.reject(new Error('Unable to reach the service'))
);
await run();
expect(saveCacheSpy).toHaveBeenCalled();
expect(warningSpy).toHaveBeenCalledWith('Unable to reach the service');
expect(setFailedSpy).not.toHaveBeenCalled();
});
});
+120 -358
View File
File diff suppressed because one or more lines are too long
+133 -462
View File
File diff suppressed because one or more lines are too long
+332 -465
View File
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "setup-go",
"version": "6.5.0",
"version": "6.2.0",
"private": true,
"description": "setup go action",
"main": "lib/setup-go.js",
@@ -28,7 +28,7 @@
"author": "GitHub",
"license": "MIT",
"dependencies": {
"@actions/cache": "^5.1.0",
"@actions/cache": "^6.0.0",
"@actions/core": "^2.0.3",
"@actions/exec": "^2.0.0",
"@actions/glob": "^0.5.1",
@@ -39,10 +39,10 @@
},
"devDependencies": {
"@types/jest": "^29.5.14",
"@types/node": "^25.9.3",
"@types/node": "^24.1.0",
"@types/semver": "^7.7.1",
"@typescript-eslint/eslint-plugin": "^8.61.0",
"@typescript-eslint/parser": "^8.61.0",
"@typescript-eslint/eslint-plugin": "^8.31.1",
"@typescript-eslint/parser": "^8.35.1",
"@vercel/ncc": "^0.38.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^10.1.8",
-4
View File
@@ -81,10 +81,6 @@ const cachePackages = async () => {
const cacheId = await cache.saveCache(cachePaths, primaryKey);
if (cacheId === -1) {
// saveCache returns -1 without throwing when the cache was not saved, e.g.
// a reserve collision or a read-only token (fork PR). @actions/cache has
// already logged the reason at the appropriate severity, so just trace it.
core.debug(`Cache was not saved for the key: ${primaryKey}`);
return;
}
core.info(`Cache saved with the key: ${primaryKey}`);