mirror of
https://github.com/actions/setup-go.git
synced 2024-11-15 11:54:34 +08:00
Update dependencies for node20 (#445)
This commit is contained in:
parent
bfd2fb341f
commit
0c52d547c9
2
.github/workflows/basic-validation.yml
vendored
2
.github/workflows/basic-validation.yml
vendored
@ -14,3 +14,5 @@ jobs:
|
|||||||
call-basic-validation:
|
call-basic-validation:
|
||||||
name: Basic validation
|
name: Basic validation
|
||||||
uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main
|
uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
2
.github/workflows/check-dist.yml
vendored
2
.github/workflows/check-dist.yml
vendored
@ -15,3 +15,5 @@ jobs:
|
|||||||
call-check-dist:
|
call-check-dist:
|
||||||
name: Check dist/
|
name: Check dist/
|
||||||
uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main
|
uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
BIN
.licenses/npm/@actions/cache.dep.yml
generated
BIN
.licenses/npm/@actions/cache.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@actions/core.dep.yml
generated
BIN
.licenses/npm/@actions/core.dep.yml
generated
Binary file not shown.
Binary file not shown.
BIN
.licenses/npm/@actions/http-client-1.0.11.dep.yml
generated
BIN
.licenses/npm/@actions/http-client-1.0.11.dep.yml
generated
Binary file not shown.
Binary file not shown.
BIN
.licenses/npm/@actions/io.dep.yml
generated
BIN
.licenses/npm/@actions/io.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@actions/tool-cache.dep.yml
generated
BIN
.licenses/npm/@actions/tool-cache.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@azure/core-auth.dep.yml
generated
BIN
.licenses/npm/@azure/core-auth.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@azure/core-http.dep.yml
generated
BIN
.licenses/npm/@azure/core-http.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@azure/core-lro.dep.yml
generated
BIN
.licenses/npm/@azure/core-lro.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@azure/core-paging.dep.yml
generated
BIN
.licenses/npm/@azure/core-paging.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@azure/core-util.dep.yml
generated
BIN
.licenses/npm/@azure/core-util.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@azure/logger.dep.yml
generated
BIN
.licenses/npm/@azure/logger.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@azure/storage-blob.dep.yml
generated
BIN
.licenses/npm/@azure/storage-blob.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@fastify/busboy.dep.yml
generated
Normal file
BIN
.licenses/npm/@fastify/busboy.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/@opentelemetry/api.dep.yml
generated
BIN
.licenses/npm/@opentelemetry/api.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@types/node-fetch.dep.yml
generated
BIN
.licenses/npm/@types/node-fetch.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@types/node.dep.yml
generated
BIN
.licenses/npm/@types/node.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/form-data-3.0.1.dep.yml
generated
BIN
.licenses/npm/form-data-3.0.1.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/lru-cache.dep.yml
generated
Normal file
BIN
.licenses/npm/lru-cache.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/node-fetch.dep.yml
generated
BIN
.licenses/npm/node-fetch.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/sax.dep.yml
generated
BIN
.licenses/npm/sax.dep.yml
generated
Binary file not shown.
Binary file not shown.
BIN
.licenses/npm/semver-7.5.4.dep.yml
generated
Normal file
BIN
.licenses/npm/semver-7.5.4.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/tslib-2.3.1.dep.yml
generated
BIN
.licenses/npm/tslib-2.3.1.dep.yml
generated
Binary file not shown.
Binary file not shown.
BIN
.licenses/npm/undici-types.dep.yml
generated
Normal file
BIN
.licenses/npm/undici-types.dep.yml
generated
Normal file
Binary file not shown.
Binary file not shown.
BIN
.licenses/npm/yallist.dep.yml
generated
Normal file
BIN
.licenses/npm/yallist.dep.yml
generated
Normal file
Binary file not shown.
36232
dist/cache-save/index.js
vendored
36232
dist/cache-save/index.js
vendored
File diff suppressed because one or more lines are too long
40905
dist/setup/index.js
vendored
40905
dist/setup/index.js
vendored
File diff suppressed because one or more lines are too long
8786
package-lock.json
generated
8786
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
24
package.json
24
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "setup-go",
|
"name": "setup-go",
|
||||||
"version": "4.0.0",
|
"version": "5.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "setup go action",
|
"description": "setup go action",
|
||||||
"main": "lib/setup-go.js",
|
"main": "lib/setup-go.js",
|
||||||
@ -28,28 +28,28 @@
|
|||||||
"@actions/cache": "^3.2.1",
|
"@actions/cache": "^3.2.1",
|
||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.10.0",
|
||||||
"@actions/exec": "^1.1.0",
|
"@actions/exec": "^1.1.0",
|
||||||
"@actions/glob": "^0.2.0",
|
"@actions/glob": "^0.4.0",
|
||||||
"@actions/http-client": "^2.0.1",
|
"@actions/http-client": "^2.0.1",
|
||||||
"@actions/io": "^1.0.2",
|
"@actions/io": "^1.0.2",
|
||||||
"@actions/tool-cache": "^1.5.5",
|
"@actions/tool-cache": "^2.0.1",
|
||||||
"semver": "^6.3.1"
|
"semver": "^7.5.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^27.0.2",
|
"@types/jest": "^29.5.10",
|
||||||
"@types/node": "^16.11.25",
|
"@types/node": "^20.10.3",
|
||||||
"@types/semver": "^6.0.0",
|
"@types/semver": "^7.5.6",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
||||||
"@typescript-eslint/parser": "^5.54.0",
|
"@typescript-eslint/parser": "^5.54.0",
|
||||||
"@vercel/ncc": "^0.33.4",
|
"@vercel/ncc": "^0.38.1",
|
||||||
"eslint": "^8.35.0",
|
"eslint": "^8.35.0",
|
||||||
"eslint-config-prettier": "^8.6.0",
|
"eslint-config-prettier": "^8.6.0",
|
||||||
"eslint-plugin-jest": "^27.2.1",
|
"eslint-plugin-jest": "^27.2.1",
|
||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"jest": "^27.2.5",
|
"jest": "^29.7.0",
|
||||||
"jest-circus": "^27.2.5",
|
"jest-circus": "^29.7.0",
|
||||||
"nock": "^10.0.6",
|
"nock": "^10.0.6",
|
||||||
"prettier": "^2.8.4",
|
"prettier": "^2.8.4",
|
||||||
"ts-jest": "^27.0.5",
|
"ts-jest": "^29.1.1",
|
||||||
"typescript": "^4.3.3"
|
"typescript": "^5.3.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,9 +12,19 @@ process.on('uncaughtException', e => {
|
|||||||
core.info(`${warningPrefix}${e.message}`);
|
core.info(`${warningPrefix}${e.message}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
export async function run() {
|
// Added early exit to resolve issue with slow post action step:
|
||||||
|
// - https://github.com/actions/setup-node/issues/878
|
||||||
|
// https://github.com/actions/cache/pull/1217
|
||||||
|
export async function run(earlyExit?: boolean) {
|
||||||
try {
|
try {
|
||||||
|
const cacheInput = core.getBooleanInput('cache');
|
||||||
|
if (cacheInput) {
|
||||||
await cachePackages();
|
await cachePackages();
|
||||||
|
|
||||||
|
if (earlyExit) {
|
||||||
|
process.exit(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
let message = 'Unknown error!';
|
let message = 'Unknown error!';
|
||||||
if (error instanceof Error) {
|
if (error instanceof Error) {
|
||||||
@ -28,11 +38,6 @@ export async function run() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const cachePackages = async () => {
|
const cachePackages = async () => {
|
||||||
const cacheInput = core.getBooleanInput('cache');
|
|
||||||
if (!cacheInput) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const packageManager = 'default';
|
const packageManager = 'default';
|
||||||
|
|
||||||
const state = core.getState(State.CacheMatchedKey);
|
const state = core.getState(State.CacheMatchedKey);
|
||||||
@ -85,4 +90,4 @@ function logWarning(message: string): void {
|
|||||||
core.info(`${warningPrefix}${message}`);
|
core.info(`${warningPrefix}${message}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run(true);
|
||||||
|
@ -114,9 +114,9 @@ export async function getGo(
|
|||||||
`Received HTTP status code ${err.httpStatusCode}. This usually indicates the rate limit has been exceeded`
|
`Received HTTP status code ${err.httpStatusCode}. This usually indicates the rate limit has been exceeded`
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
core.info(err.message);
|
core.info((err as Error).message);
|
||||||
}
|
}
|
||||||
core.debug(err.stack);
|
core.debug((err as Error).stack ?? '');
|
||||||
core.info('Falling back to download directly from Go');
|
core.info('Falling back to download directly from Go');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ async function resolveVersionFromManifest(
|
|||||||
return info?.resolvedVersion;
|
return info?.resolvedVersion;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
core.info('Unable to resolve a version from the manifest...');
|
core.info('Unable to resolve a version from the manifest...');
|
||||||
core.debug(err.message);
|
core.debug((err as Error).message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ export async function run() {
|
|||||||
cacheDependencyPath
|
cacheDependencyPath
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.warning(`Restore cache failed: ${error.message}`);
|
core.warning(`Restore cache failed: ${(error as Error).message}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ export async function run() {
|
|||||||
core.info(goEnv);
|
core.info(goEnv);
|
||||||
core.endGroup();
|
core.endGroup();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed((error as Error).message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user