mirror of
https://kkgithub.com/actions/setup-node.git
synced 2025-10-30 18:01:51 +08:00
Compare commits
2 Commits
0721c9d359
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
| 45ff88d393 | |||
| 89d709d423 |
@ -114,10 +114,10 @@ describe('run', () => {
|
|||||||
key === State.CachePackageManager
|
key === State.CachePackageManager
|
||||||
? inputs['cache']
|
? inputs['cache']
|
||||||
: key === State.CachePrimaryKey || key === State.CacheMatchedKey
|
: key === State.CachePrimaryKey || key === State.CacheMatchedKey
|
||||||
? yarnFileHash
|
? yarnFileHash
|
||||||
: key === State.CachePaths
|
: key === State.CachePaths
|
||||||
? '["/foo/bar"]'
|
? '["/foo/bar"]'
|
||||||
: 'not expected'
|
: 'not expected'
|
||||||
);
|
);
|
||||||
|
|
||||||
await run();
|
await run();
|
||||||
@ -138,10 +138,10 @@ describe('run', () => {
|
|||||||
key === State.CachePackageManager
|
key === State.CachePackageManager
|
||||||
? inputs['cache']
|
? inputs['cache']
|
||||||
: key === State.CachePrimaryKey || key === State.CacheMatchedKey
|
: key === State.CachePrimaryKey || key === State.CacheMatchedKey
|
||||||
? yarnFileHash
|
? yarnFileHash
|
||||||
: key === State.CachePaths
|
: key === State.CachePaths
|
||||||
? '["/foo/bar"]'
|
? '["/foo/bar"]'
|
||||||
: 'not expected'
|
: 'not expected'
|
||||||
);
|
);
|
||||||
|
|
||||||
await run();
|
await run();
|
||||||
@ -162,10 +162,10 @@ describe('run', () => {
|
|||||||
key === State.CachePackageManager
|
key === State.CachePackageManager
|
||||||
? inputs['cache']
|
? inputs['cache']
|
||||||
: key === State.CachePrimaryKey || key === State.CacheMatchedKey
|
: key === State.CachePrimaryKey || key === State.CacheMatchedKey
|
||||||
? yarnFileHash
|
? yarnFileHash
|
||||||
: key === State.CachePaths
|
: key === State.CachePaths
|
||||||
? '["/foo/bar"]'
|
? '["/foo/bar"]'
|
||||||
: 'not expected'
|
: 'not expected'
|
||||||
);
|
);
|
||||||
getCommandOutputSpy.mockImplementationOnce(() => `${commonPath}/npm`);
|
getCommandOutputSpy.mockImplementationOnce(() => `${commonPath}/npm`);
|
||||||
|
|
||||||
@ -184,10 +184,10 @@ describe('run', () => {
|
|||||||
key === State.CachePackageManager
|
key === State.CachePackageManager
|
||||||
? inputs['cache']
|
? inputs['cache']
|
||||||
: key === State.CachePrimaryKey || key === State.CacheMatchedKey
|
: key === State.CachePrimaryKey || key === State.CacheMatchedKey
|
||||||
? yarnFileHash
|
? yarnFileHash
|
||||||
: key === State.CachePaths
|
: key === State.CachePaths
|
||||||
? '["/foo/bar"]'
|
? '["/foo/bar"]'
|
||||||
: 'not expected'
|
: 'not expected'
|
||||||
);
|
);
|
||||||
|
|
||||||
await run();
|
await run();
|
||||||
@ -207,12 +207,12 @@ describe('run', () => {
|
|||||||
key === State.CachePackageManager
|
key === State.CachePackageManager
|
||||||
? inputs['cache']
|
? inputs['cache']
|
||||||
: key === State.CacheMatchedKey
|
: key === State.CacheMatchedKey
|
||||||
? yarnFileHash
|
? yarnFileHash
|
||||||
: key === State.CachePrimaryKey
|
: key === State.CachePrimaryKey
|
||||||
? npmFileHash
|
? npmFileHash
|
||||||
: key === State.CachePaths
|
: key === State.CachePaths
|
||||||
? '["/foo/bar"]'
|
? '["/foo/bar"]'
|
||||||
: 'not expected'
|
: 'not expected'
|
||||||
);
|
);
|
||||||
|
|
||||||
await run();
|
await run();
|
||||||
@ -237,12 +237,12 @@ describe('run', () => {
|
|||||||
key === State.CachePackageManager
|
key === State.CachePackageManager
|
||||||
? inputs['cache']
|
? inputs['cache']
|
||||||
: key === State.CacheMatchedKey
|
: key === State.CacheMatchedKey
|
||||||
? yarnFileHash
|
? yarnFileHash
|
||||||
: key === State.CachePrimaryKey
|
: key === State.CachePrimaryKey
|
||||||
? npmFileHash
|
? npmFileHash
|
||||||
: key === State.CachePaths
|
: key === State.CachePaths
|
||||||
? '["/foo/bar"]'
|
? '["/foo/bar"]'
|
||||||
: 'not expected'
|
: 'not expected'
|
||||||
);
|
);
|
||||||
|
|
||||||
await run();
|
await run();
|
||||||
@ -267,12 +267,12 @@ describe('run', () => {
|
|||||||
key === State.CachePackageManager
|
key === State.CachePackageManager
|
||||||
? inputs['cache']
|
? inputs['cache']
|
||||||
: key === State.CacheMatchedKey
|
: key === State.CacheMatchedKey
|
||||||
? npmFileHash
|
? npmFileHash
|
||||||
: key === State.CachePrimaryKey
|
: key === State.CachePrimaryKey
|
||||||
? yarnFileHash
|
? yarnFileHash
|
||||||
: key === State.CachePaths
|
: key === State.CachePaths
|
||||||
? '["/foo/bar"]'
|
? '["/foo/bar"]'
|
||||||
: 'not expected'
|
: 'not expected'
|
||||||
);
|
);
|
||||||
|
|
||||||
await run();
|
await run();
|
||||||
@ -297,12 +297,12 @@ describe('run', () => {
|
|||||||
key === State.CachePackageManager
|
key === State.CachePackageManager
|
||||||
? inputs['cache']
|
? inputs['cache']
|
||||||
: key === State.CacheMatchedKey
|
: key === State.CacheMatchedKey
|
||||||
? pnpmFileHash
|
? pnpmFileHash
|
||||||
: key === State.CachePrimaryKey
|
: key === State.CachePrimaryKey
|
||||||
? npmFileHash
|
? npmFileHash
|
||||||
: key === State.CachePaths
|
: key === State.CachePaths
|
||||||
? '["/foo/bar"]'
|
? '["/foo/bar"]'
|
||||||
: 'not expected'
|
: 'not expected'
|
||||||
);
|
);
|
||||||
|
|
||||||
await run();
|
await run();
|
||||||
@ -327,12 +327,12 @@ describe('run', () => {
|
|||||||
key === State.CachePackageManager
|
key === State.CachePackageManager
|
||||||
? inputs['cache']
|
? inputs['cache']
|
||||||
: key === State.CacheMatchedKey
|
: key === State.CacheMatchedKey
|
||||||
? npmFileHash
|
? npmFileHash
|
||||||
: key === State.CachePrimaryKey
|
: key === State.CachePrimaryKey
|
||||||
? yarnFileHash
|
? yarnFileHash
|
||||||
: key === State.CachePaths
|
: key === State.CachePaths
|
||||||
? '["/foo/bar"]'
|
? '["/foo/bar"]'
|
||||||
: 'not expected'
|
: 'not expected'
|
||||||
);
|
);
|
||||||
saveCacheSpy.mockImplementation(() => {
|
saveCacheSpy.mockImplementation(() => {
|
||||||
return -1;
|
return -1;
|
||||||
@ -360,12 +360,12 @@ describe('run', () => {
|
|||||||
key === State.CachePackageManager
|
key === State.CachePackageManager
|
||||||
? inputs['cache']
|
? inputs['cache']
|
||||||
: key === State.CacheMatchedKey
|
: key === State.CacheMatchedKey
|
||||||
? npmFileHash
|
? npmFileHash
|
||||||
: key === State.CachePrimaryKey
|
: key === State.CachePrimaryKey
|
||||||
? yarnFileHash
|
? yarnFileHash
|
||||||
: key === State.CachePaths
|
: key === State.CachePaths
|
||||||
? '["/foo/bar"]'
|
? '["/foo/bar"]'
|
||||||
: 'not expected'
|
: 'not expected'
|
||||||
);
|
);
|
||||||
saveCacheSpy.mockImplementation(() => {
|
saveCacheSpy.mockImplementation(() => {
|
||||||
throw new cache.ValidationError('Validation failed');
|
throw new cache.ValidationError('Validation failed');
|
||||||
|
|||||||
2581
package-lock.json
generated
2581
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -43,7 +43,7 @@
|
|||||||
"@types/jest": "^29.5.14",
|
"@types/jest": "^29.5.14",
|
||||||
"@types/node": "^24.1.0",
|
"@types/node": "^24.1.0",
|
||||||
"@types/semver": "^7.5.8",
|
"@types/semver": "^7.5.8",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.43.0",
|
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
||||||
"@typescript-eslint/parser": "^5.54.0",
|
"@typescript-eslint/parser": "^5.54.0",
|
||||||
"@vercel/ncc": "^0.38.3",
|
"@vercel/ncc": "^0.38.3",
|
||||||
"eslint": "^8.57.0",
|
"eslint": "^8.57.0",
|
||||||
@ -51,9 +51,9 @@
|
|||||||
"eslint-plugin-jest": "^27.9.0",
|
"eslint-plugin-jest": "^27.9.0",
|
||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"jest-circus": "^29.7.0",
|
"jest-circus": "^30.2.0",
|
||||||
"jest-each": "^29.7.0",
|
"jest-each": "^29.7.0",
|
||||||
"prettier": "^2.8.4",
|
"prettier": "^3.6.2",
|
||||||
"ts-jest": "^29.4.1",
|
"ts-jest": "^29.4.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -167,14 +167,12 @@ const getCacheDirectoriesFromCacheDependencyPath = async (
|
|||||||
packageManagerInfo: PackageManagerInfo,
|
packageManagerInfo: PackageManagerInfo,
|
||||||
cacheDependencyPath: string
|
cacheDependencyPath: string
|
||||||
): Promise<string[]> => {
|
): Promise<string[]> => {
|
||||||
const projectDirectories = await getProjectDirectoriesFromCacheDependencyPath(
|
const projectDirectories =
|
||||||
cacheDependencyPath
|
await getProjectDirectoriesFromCacheDependencyPath(cacheDependencyPath);
|
||||||
);
|
|
||||||
const cacheFoldersPaths = await Promise.all(
|
const cacheFoldersPaths = await Promise.all(
|
||||||
projectDirectories.map(async projectDirectory => {
|
projectDirectories.map(async projectDirectory => {
|
||||||
const cacheFolderPath = await packageManagerInfo.getCacheFolderPath(
|
const cacheFolderPath =
|
||||||
projectDirectory
|
await packageManagerInfo.getCacheFolderPath(projectDirectory);
|
||||||
);
|
|
||||||
core.debug(
|
core.debug(
|
||||||
`${packageManagerInfo.name}'s cache folder "${cacheFolderPath}" configured for the directory "${projectDirectory}"`
|
`${packageManagerInfo.name}'s cache folder "${cacheFolderPath}" configured for the directory "${projectDirectory}"`
|
||||||
);
|
);
|
||||||
|
|||||||
@ -221,8 +221,8 @@ export default class OfficialBuilds extends BaseDistribution {
|
|||||||
alias === '*'
|
alias === '*'
|
||||||
? numbered[numbered.length - 1]
|
? numbered[numbered.length - 1]
|
||||||
: n < 0
|
: n < 0
|
||||||
? numbered[numbered.length - 1 + n]
|
? numbered[numbered.length - 1 + n]
|
||||||
: aliases[alias];
|
: aliases[alias];
|
||||||
|
|
||||||
if (!release) {
|
if (!release) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
|
|||||||
Reference in New Issue
Block a user