Compare commits

...

5 Commits

Author SHA1 Message Date
Alex Dunae
6fcbc09dff Merge d23de777e0 into 22c0e7494f 2025-03-13 09:36:44 +11:00
dependabot[bot]
22c0e7494f Bump @vercel/ncc from 0.38.1 to 0.38.3 (#1203)
Some checks failed
Basic validation / Basic validation (push) Failing after 2s
Check dist / Check dist/ (push) Failing after 2s
CodeQL analysis / CodeQL analysis (push) Failing after 2s
e2e-cache / Test pnpm (Node 18, ubuntu-latest) (push) Failing after 39s
e2e-cache / Test pnpm (Node 20, ubuntu-latest) (push) Failing after 29s
e2e-cache / Test pnpm (Node 22, ubuntu-latest) (push) Failing after 35s
e2e-cache / Test yarn 1 (Node 18, ubuntu-latest) (push) Failing after 16s
e2e-cache / Test yarn 1 (Node 20, ubuntu-latest) (push) Failing after 12s
e2e-cache / Test yarn 3 (Node 18, ubuntu-latest) (push) Failing after 11s
e2e-cache / Test yarn 3 (Node 20, ubuntu-latest) (push) Failing after 41s
e2e-cache / Test yarn 3 (Node 22, ubuntu-latest) (push) Failing after 13s
e2e-cache / Test yarn subprojects (18) (push) Failing after 17s
e2e-cache / Test yarn subprojects (20) (push) Failing after 14s
e2e-cache / Test yarn subprojects (22) (push) Failing after 14s
e2e-cache / Test yarn subprojects all locally managed (18) (push) Failing after 19s
e2e-cache / Test yarn subprojects all locally managed (20) (push) Failing after 14s
e2e-cache / Test yarn subprojects all locally managed (22) (push) Failing after 15s
e2e-cache / Test yarn subprojects some locally managed (18) (push) Failing after 17s
e2e-cache / Test yarn subprojects some locally managed (20) (push) Failing after 17s
e2e-cache / Test yarn subprojects some locally managed (22) (push) Failing after 15s
e2e-cache / Test yarn subprojects managed by git (18) (push) Failing after 15s
e2e-cache / Test yarn subprojects managed by git (20) (push) Failing after 16s
e2e-cache / Test yarn subprojects managed by git (22) (push) Failing after 15s
Licensed / Licensed (push) Failing after 2s
proxy / test-proxy (push) Failing after 9s
proxy / test-bypass-proxy (push) Failing after 37s
versions / local-cache (18, ubuntu-latest) (push) Successful in 18s
versions / local-cache (20, ubuntu-latest) (push) Successful in 17s
e2e-cache / Test npm (Node 18, ubuntu-latest) (push) Successful in 9m43s
e2e-cache / Test npm (Node 20, ubuntu-latest) (push) Successful in 9m42s
e2e-cache / Test npm (Node 22, ubuntu-latest) (push) Successful in 9m40s
versions / local-cache (22, ubuntu-latest) (push) Successful in 19s
versions / lts-syntax (lts/*, ubuntu-latest) (push) Failing after 14s
versions / lts-syntax (lts/-1, ubuntu-latest) (push) Failing after 16s
versions / lts-syntax (lts/dubnium, ubuntu-latest) (push) Failing after 15s
versions / lts-syntax (lts/erbium, ubuntu-latest) (push) Failing after 16s
versions / v8-canary-syntax (20.0.0-v8-canary, ubuntu-latest) (push) Successful in 21s
versions / v8-canary-syntax (20-v8-canary, ubuntu-latest) (push) Successful in 23s
versions / v8-canary-syntax (20.0.0-v8-canary20221101e50e45c9f8, ubuntu-latest) (push) Successful in 16s
versions / lts-syntax (lts/fermium, ubuntu-latest) (push) Failing after 38s
versions / nightly-syntax (18.0.0-nightly, ubuntu-latest) (push) Successful in 16s
versions / nightly-syntax (21-nightly, ubuntu-latest) (push) Successful in 15s
versions / nightly-syntax (20-nightly, ubuntu-latest) (push) Successful in 22s
versions / rc-syntax (18.0.0-rc.2, ubuntu-latest) (push) Successful in 16s
versions / rc-syntax (19.0.0-rc.0, ubuntu-latest) (push) Successful in 17s
versions / rc-syntax (20.0.0-rc.1, ubuntu-latest) (push) Successful in 16s
versions / manifest (18.20.0, ubuntu-latest) (push) Successful in 23s
versions / manifest (20.10.0, ubuntu-latest) (push) Successful in 18s
versions / manifest (22.0.0, ubuntu-latest) (push) Successful in 18s
versions / check-latest (18, ubuntu-latest) (push) Successful in 16s
versions / check-latest (20, ubuntu-latest) (push) Successful in 16s
versions / version-file (.nvmrc, ubuntu-latest) (push) Successful in 19s
versions / check-latest (22, ubuntu-latest) (push) Successful in 26s
versions / version-file (.tool-versions, ubuntu-latest) (push) Successful in 20s
versions / version-file (.tool-versions-node, ubuntu-latest) (push) Successful in 18s
versions / version-file-volta (ubuntu-latest) (push) Successful in 17s
versions / version-file (package.json, ubuntu-latest) (push) Successful in 19s
versions / version-file-volta-extends (ubuntu-latest) (push) Successful in 15s
versions / node-dist (17, ubuntu-latest) (push) Successful in 20s
versions / node-dist (19, ubuntu-latest) (push) Successful in 19s
versions / old-versions (ubuntu-latest) (push) Successful in 15s
versions / node-latest-aliases (current, ubuntu-latest) (push) Successful in 20s
versions / node-latest-aliases (latest, ubuntu-latest) (push) Successful in 15s
versions / node-latest-aliases (node, ubuntu-latest) (push) Successful in 12s
e2e-cache / Test npm (Node 18, macos-13) (push) Has been cancelled
e2e-cache / Test npm (Node 18, macos-latest) (push) Has been cancelled
e2e-cache / Test npm (Node 18, windows-latest) (push) Has been cancelled
e2e-cache / Test npm (Node 20, macos-13) (push) Has been cancelled
e2e-cache / Test npm (Node 20, macos-latest) (push) Has been cancelled
e2e-cache / Test npm (Node 20, windows-latest) (push) Has been cancelled
e2e-cache / Test npm (Node 22, macos-13) (push) Has been cancelled
e2e-cache / Test npm (Node 22, macos-latest) (push) Has been cancelled
e2e-cache / Test npm (Node 22, windows-latest) (push) Has been cancelled
e2e-cache / Test pnpm (Node 18, macos-13) (push) Has been cancelled
e2e-cache / Test pnpm (Node 18, macos-latest) (push) Has been cancelled
e2e-cache / Test pnpm (Node 18, windows-latest) (push) Has been cancelled
e2e-cache / Test pnpm (Node 20, macos-13) (push) Has been cancelled
e2e-cache / Test pnpm (Node 20, macos-latest) (push) Has been cancelled
e2e-cache / Test pnpm (Node 20, windows-latest) (push) Has been cancelled
e2e-cache / Test pnpm (Node 22, macos-13) (push) Has been cancelled
e2e-cache / Test pnpm (Node 22, macos-latest) (push) Has been cancelled
e2e-cache / Test pnpm (Node 22, windows-latest) (push) Has been cancelled
e2e-cache / Test yarn 1 (Node 18, macos-13) (push) Has been cancelled
e2e-cache / Test yarn 1 (Node 18, macos-latest) (push) Has been cancelled
e2e-cache / Test yarn 1 (Node 18, windows-latest) (push) Has been cancelled
e2e-cache / Test yarn 1 (Node 20, macos-13) (push) Has been cancelled
e2e-cache / Test yarn 1 (Node 20, macos-latest) (push) Has been cancelled
e2e-cache / Test yarn 1 (Node 20, windows-latest) (push) Has been cancelled
e2e-cache / Test yarn 3 (Node 18, macos-13) (push) Has been cancelled
e2e-cache / Test yarn 3 (Node 18, macos-latest) (push) Has been cancelled
e2e-cache / Test yarn 3 (Node 18, windows-latest) (push) Has been cancelled
e2e-cache / Test yarn 3 (Node 20, macos-13) (push) Has been cancelled
e2e-cache / Test yarn 3 (Node 20, macos-latest) (push) Has been cancelled
e2e-cache / Test yarn 3 (Node 20, windows-latest) (push) Has been cancelled
e2e-cache / Test yarn 3 (Node 22, macos-13) (push) Has been cancelled
e2e-cache / Test yarn 3 (Node 22, macos-latest) (push) Has been cancelled
e2e-cache / Test yarn 3 (Node 22, windows-latest) (push) Has been cancelled
versions / local-cache (18, macos-13) (push) Has been cancelled
versions / local-cache (18, macos-latest) (push) Has been cancelled
versions / local-cache (18, windows-latest) (push) Has been cancelled
versions / local-cache (20, macos-13) (push) Has been cancelled
versions / local-cache (20, macos-latest) (push) Has been cancelled
versions / local-cache (20, windows-latest) (push) Has been cancelled
versions / local-cache (22, macos-13) (push) Has been cancelled
versions / local-cache (22, macos-latest) (push) Has been cancelled
versions / local-cache (22, windows-latest) (push) Has been cancelled
versions / lts-syntax (lts/*, macos-13) (push) Has been cancelled
versions / lts-syntax (lts/*, windows-latest) (push) Has been cancelled
versions / lts-syntax (lts/-1, macos-13) (push) Has been cancelled
versions / lts-syntax (lts/-1, windows-latest) (push) Has been cancelled
versions / lts-syntax (lts/dubnium, macos-13) (push) Has been cancelled
versions / lts-syntax (lts/dubnium, windows-latest) (push) Has been cancelled
versions / lts-syntax (lts/erbium, macos-13) (push) Has been cancelled
versions / lts-syntax (lts/erbium, windows-latest) (push) Has been cancelled
versions / lts-syntax (lts/fermium, macos-13) (push) Has been cancelled
versions / lts-syntax (lts/fermium, windows-latest) (push) Has been cancelled
versions / v8-canary-syntax (20-v8-canary, macos-13) (push) Has been cancelled
versions / v8-canary-syntax (20-v8-canary, macos-latest) (push) Has been cancelled
versions / v8-canary-syntax (20-v8-canary, windows-latest) (push) Has been cancelled
versions / v8-canary-syntax (20.0.0-v8-canary, macos-13) (push) Has been cancelled
versions / v8-canary-syntax (20.0.0-v8-canary, macos-latest) (push) Has been cancelled
versions / v8-canary-syntax (20.0.0-v8-canary, windows-latest) (push) Has been cancelled
versions / v8-canary-syntax (20.0.0-v8-canary20221101e50e45c9f8, macos-13) (push) Has been cancelled
versions / v8-canary-syntax (20.0.0-v8-canary20221101e50e45c9f8, macos-latest) (push) Has been cancelled
versions / v8-canary-syntax (20.0.0-v8-canary20221101e50e45c9f8, windows-latest) (push) Has been cancelled
versions / nightly-syntax (18.0.0-nightly, macos-13) (push) Has been cancelled
versions / nightly-syntax (18.0.0-nightly, macos-latest) (push) Has been cancelled
versions / nightly-syntax (18.0.0-nightly, windows-latest) (push) Has been cancelled
versions / nightly-syntax (20-nightly, macos-13) (push) Has been cancelled
versions / nightly-syntax (20-nightly, macos-latest) (push) Has been cancelled
versions / nightly-syntax (20-nightly, windows-latest) (push) Has been cancelled
versions / nightly-syntax (21-nightly, macos-13) (push) Has been cancelled
versions / nightly-syntax (21-nightly, macos-latest) (push) Has been cancelled
versions / nightly-syntax (21-nightly, windows-latest) (push) Has been cancelled
versions / rc-syntax (18.0.0-rc.2, macos-13) (push) Has been cancelled
versions / rc-syntax (18.0.0-rc.2, macos-latest) (push) Has been cancelled
versions / rc-syntax (18.0.0-rc.2, windows-latest) (push) Has been cancelled
versions / rc-syntax (19.0.0-rc.0, macos-13) (push) Has been cancelled
versions / rc-syntax (19.0.0-rc.0, macos-latest) (push) Has been cancelled
versions / rc-syntax (19.0.0-rc.0, windows-latest) (push) Has been cancelled
versions / rc-syntax (20.0.0-rc.1, macos-13) (push) Has been cancelled
versions / rc-syntax (20.0.0-rc.1, macos-latest) (push) Has been cancelled
versions / rc-syntax (20.0.0-rc.1, windows-latest) (push) Has been cancelled
versions / manifest (18.20.0, macos-13) (push) Has been cancelled
versions / manifest (18.20.0, macos-latest) (push) Has been cancelled
versions / manifest (18.20.0, windows-latest) (push) Has been cancelled
versions / manifest (20.10.0, macos-13) (push) Has been cancelled
versions / manifest (20.10.0, macos-latest) (push) Has been cancelled
versions / manifest (20.10.0, windows-latest) (push) Has been cancelled
versions / manifest (22.0.0, macos-13) (push) Has been cancelled
versions / manifest (22.0.0, macos-latest) (push) Has been cancelled
versions / manifest (22.0.0, windows-latest) (push) Has been cancelled
versions / check-latest (18, macos-13) (push) Has been cancelled
versions / check-latest (18, macos-latest) (push) Has been cancelled
versions / check-latest (18, windows-latest) (push) Has been cancelled
versions / check-latest (20, macos-13) (push) Has been cancelled
versions / check-latest (20, macos-latest) (push) Has been cancelled
versions / check-latest (20, windows-latest) (push) Has been cancelled
versions / check-latest (22, macos-13) (push) Has been cancelled
versions / check-latest (22, macos-latest) (push) Has been cancelled
versions / check-latest (22, windows-latest) (push) Has been cancelled
versions / version-file (.nvmrc, macos-13) (push) Has been cancelled
versions / version-file (.nvmrc, macos-latest) (push) Has been cancelled
versions / version-file (.nvmrc, windows-latest) (push) Has been cancelled
versions / version-file (.tool-versions, macos-13) (push) Has been cancelled
versions / version-file (.tool-versions, macos-latest) (push) Has been cancelled
versions / version-file (.tool-versions, windows-latest) (push) Has been cancelled
versions / version-file (.tool-versions-node, macos-13) (push) Has been cancelled
versions / version-file (.tool-versions-node, macos-latest) (push) Has been cancelled
versions / version-file (.tool-versions-node, windows-latest) (push) Has been cancelled
versions / version-file (package.json, macos-13) (push) Has been cancelled
versions / version-file (package.json, macos-latest) (push) Has been cancelled
versions / version-file (package.json, windows-latest) (push) Has been cancelled
versions / version-file-volta (macos-13) (push) Has been cancelled
versions / version-file-volta (macos-latest) (push) Has been cancelled
versions / version-file-volta (windows-latest) (push) Has been cancelled
versions / version-file-volta-extends (macos-13) (push) Has been cancelled
versions / version-file-volta-extends (macos-latest) (push) Has been cancelled
versions / version-file-volta-extends (windows-latest) (push) Has been cancelled
versions / node-dist (17, macos-13) (push) Has been cancelled
versions / node-dist (17, macos-latest) (push) Has been cancelled
versions / node-dist (17, windows-latest) (push) Has been cancelled
versions / node-dist (19, macos-13) (push) Has been cancelled
versions / node-dist (19, macos-latest) (push) Has been cancelled
versions / node-dist (19, windows-latest) (push) Has been cancelled
versions / old-versions (macos-13) (push) Has been cancelled
versions / old-versions (windows-latest) (push) Has been cancelled
versions / arch (push) Has been cancelled
versions / node-latest-aliases (current, macos-13) (push) Has been cancelled
versions / node-latest-aliases (current, macos-latest) (push) Has been cancelled
versions / node-latest-aliases (current, windows-latest) (push) Has been cancelled
versions / node-latest-aliases (latest, macos-13) (push) Has been cancelled
versions / node-latest-aliases (latest, macos-latest) (push) Has been cancelled
versions / node-latest-aliases (latest, windows-latest) (push) Has been cancelled
versions / node-latest-aliases (node, macos-13) (push) Has been cancelled
versions / node-latest-aliases (node, macos-latest) (push) Has been cancelled
versions / node-latest-aliases (node, windows-latest) (push) Has been cancelled
* Bump @vercel/ncc from 0.38.1 to 0.38.3

Bumps [@vercel/ncc](https://github.com/vercel/ncc) from 0.38.1 to 0.38.3.
- [Release notes](https://github.com/vercel/ncc/releases)
- [Commits](https://github.com/vercel/ncc/compare/0.38.1...0.38.3)

---
updated-dependencies:
- dependency-name: "@vercel/ncc"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix for check failures

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aparna Jyothi <aparnajyothi-y@github.com>
2025-03-12 12:42:27 -05:00
Alex Dunae
d23de777e0 Add output cache-matched-key 2025-01-15 12:03:24 -08:00
Alex Dunae
82af78e9c4 Add dist 2025-01-14 10:46:08 -08:00
Alex Dunae
870d3d8e13 Add cache-key as output 2025-01-14 10:40:03 -08:00
9 changed files with 3276 additions and 3184 deletions

View File

@@ -131,6 +131,7 @@ describe('cache-restore', () => {
])(
'restored dependencies for %s',
async (packageManager, toolVersion, fileHash) => {
const expectedCacheKey = `node-cache-${platform}-${arch}-${packageManager}-${fileHash}`;
getCommandOutputSpy.mockImplementation((command: string) => {
if (command.includes('version')) {
return toolVersion;
@@ -142,12 +143,20 @@ describe('cache-restore', () => {
await restoreCache(packageManager, '');
expect(hashFilesSpy).toHaveBeenCalled();
expect(infoSpy).toHaveBeenCalledWith(
`Cache restored from key: node-cache-${platform}-${arch}-${packageManager}-${fileHash}`
`Cache restored from key: ${expectedCacheKey}`
);
expect(infoSpy).not.toHaveBeenCalledWith(
`${packageManager} cache is not found`
);
expect(setOutputSpy).toHaveBeenCalledWith('cache-hit', true);
expect(setOutputSpy).toHaveBeenCalledWith(
'cache-key',
expectedCacheKey
);
expect(setOutputSpy).toHaveBeenCalledWith(
'cache-matched-key',
expectedCacheKey
);
}
);
});
@@ -161,6 +170,7 @@ describe('cache-restore', () => {
])(
'dependencies are changed %s',
async (packageManager, toolVersion, fileHash) => {
const expectedCacheKey = `node-cache-${platform}-${arch}-${packageManager}-${fileHash}`;
getCommandOutputSpy.mockImplementation((command: string) => {
if (command.includes('version')) {
return toolVersion;
@@ -176,10 +186,72 @@ describe('cache-restore', () => {
`${packageManager} cache is not found`
);
expect(setOutputSpy).toHaveBeenCalledWith('cache-hit', false);
expect(setOutputSpy).toHaveBeenCalledWith(
'cache-key',
expectedCacheKey
);
expect(setOutputSpy).toHaveBeenCalledWith(
'cache-matched-key',
undefined
);
}
);
});
describe('Cache key output', () => {
const packageManager = 'npm';
const cacheDependencyPath = 'package-lock.json';
const primaryKey = `node-cache-${platform}-${arch}-${packageManager}-${npmFileHash}`;
const cacheKey = `node-cache-${platform}-${arch}-${packageManager}-abc123`;
beforeEach(() => {
getCommandOutputSpy.mockImplementation(command => {
if (command.includes('npm config get cache')) return npmCachePath;
});
});
it('sets the cache-key output', async () => {
restoreCacheSpy.mockResolvedValue(cacheKey);
await restoreCache(packageManager, cacheDependencyPath);
expect(setOutputSpy).toHaveBeenCalledWith('cache-key', primaryKey);
});
it('sets the cache-hit output to true when cache is found', async () => {
restoreCacheSpy.mockResolvedValue(cacheKey);
await restoreCache(packageManager, cacheDependencyPath);
expect(setOutputSpy).toHaveBeenCalledWith('cache-hit', true);
});
it('sets the cache-hit output to false when cache is not found', async () => {
restoreCacheSpy.mockResolvedValue(undefined);
await restoreCache(packageManager, cacheDependencyPath);
expect(setOutputSpy).toHaveBeenCalledWith('cache-hit', false);
});
it('sets the cache-matched-key output when cache is found', async () => {
(cache.restoreCache as jest.Mock).mockResolvedValue(cacheKey);
await restoreCache(packageManager, cacheDependencyPath);
expect(core.setOutput).toHaveBeenCalledWith(
'cache-matched-key',
cacheKey
);
});
it('sets the cache-matched-key output to undefined when cache is not found', async () => {
(cache.restoreCache as jest.Mock).mockResolvedValue(undefined);
await restoreCache(packageManager, cacheDependencyPath);
expect(core.setOutput).toHaveBeenCalledWith(
'cache-matched-key',
undefined
);
});
});
afterEach(() => {
jest.resetAllMocks();
jest.clearAllMocks();

View File

@@ -27,6 +27,7 @@ describe('run', () => {
let setFailedSpy: jest.SpyInstance;
let getStateSpy: jest.SpyInstance;
let saveCacheSpy: jest.SpyInstance;
let setOutputSpy: jest.SpyInstance;
let getCommandOutputSpy: jest.SpyInstance;
let hashFilesSpy: jest.SpyInstance;
let existsSpy: jest.SpyInstance;
@@ -53,6 +54,8 @@ describe('run', () => {
saveCacheSpy = jest.spyOn(cache, 'saveCache');
saveCacheSpy.mockImplementation(() => undefined);
setOutputSpy = jest.spyOn(core, 'setOutput');
// glob
hashFilesSpy = jest.spyOn(glob, 'hashFiles');
hashFilesSpy.mockImplementation((pattern: string) => {
@@ -228,6 +231,7 @@ describe('run', () => {
expect(infoSpy).toHaveBeenLastCalledWith(
`Cache saved with the key: ${npmFileHash}`
);
expect(core.setOutput).toHaveBeenCalledWith('cache-key', npmFileHash);
expect(setFailedSpy).not.toHaveBeenCalled();
});
@@ -258,6 +262,7 @@ describe('run', () => {
expect(infoSpy).toHaveBeenLastCalledWith(
`Cache saved with the key: ${npmFileHash}`
);
expect(core.setOutput).toHaveBeenCalledWith('cache-key', npmFileHash);
expect(setFailedSpy).not.toHaveBeenCalled();
});
@@ -288,6 +293,7 @@ describe('run', () => {
expect(infoSpy).toHaveBeenLastCalledWith(
`Cache saved with the key: ${yarnFileHash}`
);
expect(core.setOutput).toHaveBeenCalledWith('cache-key', yarnFileHash);
expect(setFailedSpy).not.toHaveBeenCalled();
});
@@ -297,9 +303,9 @@ describe('run', () => {
key === State.CachePackageManager
? inputs['cache']
: key === State.CacheMatchedKey
? pnpmFileHash
? 'no-match'
: key === State.CachePrimaryKey
? npmFileHash
? pnpmFileHash
: key === State.CachePaths
? '["/foo/bar"]'
: 'not expected'
@@ -316,8 +322,9 @@ describe('run', () => {
);
expect(saveCacheSpy).toHaveBeenCalled();
expect(infoSpy).toHaveBeenLastCalledWith(
`Cache saved with the key: ${npmFileHash}`
`Cache saved with the key: ${pnpmFileHash}`
);
expect(core.setOutput).toHaveBeenCalledWith('cache-key', pnpmFileHash);
expect(setFailedSpy).not.toHaveBeenCalled();
});

View File

@@ -30,6 +30,10 @@ inputs:
outputs:
cache-hit:
description: 'A boolean value to indicate if a cache was hit.'
cache-key:
description: 'The key used for the cache.'
cache-matched-key:
description: 'The key used for the cache that resulted in a cache hit.'
node-version:
description: 'The installed node version.'
runs:

2837
dist/cache-save/index.js vendored

File diff suppressed because one or more lines are too long

3517
dist/setup/index.js vendored

File diff suppressed because one or more lines are too long

9
package-lock.json generated
View File

@@ -26,7 +26,7 @@
"@types/semver": "^7.5.8",
"@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0",
"@vercel/ncc": "^0.38.0",
"@vercel/ncc": "^0.38.3",
"eslint": "^8.57.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-jest": "^27.9.0",
@@ -2132,10 +2132,11 @@
"dev": true
},
"node_modules/@vercel/ncc": {
"version": "0.38.1",
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.1.tgz",
"integrity": "sha512-IBBb+iI2NLu4VQn3Vwldyi2QwaXt5+hTyh58ggAMoCGE6DJmPvwL3KPBWcJl1m9LYPChBLE980Jw+CS4Wokqxw==",
"version": "0.38.3",
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.3.tgz",
"integrity": "sha512-rnK6hJBS6mwc+Bkab+PGPs9OiS0i/3kdTO+CkI8V0/VrW3vmz7O2Pxjw/owOlmo6PKEIxRSeZKv/kuL9itnpYA==",
"dev": true,
"license": "MIT",
"bin": {
"ncc": "dist/ncc/cli.js"
}

View File

@@ -42,7 +42,7 @@
"@types/semver": "^7.5.8",
"@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0",
"@vercel/ncc": "^0.38.0",
"@vercel/ncc": "^0.38.3",
"eslint": "^8.57.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-jest": "^27.9.0",

View File

@@ -45,6 +45,7 @@ export const restoreCache = async (
core.debug(`primary key is ${primaryKey}`);
core.saveState(State.CachePrimaryKey, primaryKey);
core.setOutput('cache-key', primaryKey);
const isManagedByYarnBerry = await repoHasYarnBerryManagedDependencies(
packageManagerInfo,
@@ -61,6 +62,8 @@ export const restoreCache = async (
}
core.setOutput('cache-hit', Boolean(cacheKey));
core.setOutput('cache-matched-key', cacheKey);
core.debug(`cache-matched-key is ${cacheKey}`);
if (!cacheKey) {
core.info(`${packageManager} cache is not found`);

View File

@@ -66,6 +66,7 @@ const cachePackages = async (packageManager: string) => {
}
core.info(`Cache saved with the key: ${primaryKey}`);
core.setOutput('cache-key', primaryKey);
};
run(true);