Update dependencies for node20 (#445)

This commit is contained in:
Dmitry Shibanov 2023-12-05 17:50:42 +01:00 committed by GitHub
parent bfd2fb341f
commit 0c52d547c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
38 changed files with 66845 additions and 19461 deletions

View File

@ -14,3 +14,5 @@ jobs:
call-basic-validation:
name: Basic validation
uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main
with:
node-version: '20'

View File

@ -15,3 +15,5 @@ jobs:
call-check-dist:
name: Check dist/
uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main
with:
node-version: '20'

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
.licenses/npm/@fastify/busboy.dep.yml generated Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
.licenses/npm/lru-cache.dep.yml generated Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
.licenses/npm/semver-7.5.4.dep.yml generated Normal file

Binary file not shown.

Binary file not shown.

BIN
.licenses/npm/undici-types.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/yallist.dep.yml generated Normal file

Binary file not shown.

36296
dist/cache-save/index.js vendored

File diff suppressed because one or more lines are too long

41163
dist/setup/index.js vendored

File diff suppressed because one or more lines are too long

8788
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "setup-go",
"version": "4.0.0",
"version": "5.0.0",
"private": true,
"description": "setup go action",
"main": "lib/setup-go.js",
@ -28,28 +28,28 @@
"@actions/cache": "^3.2.1",
"@actions/core": "^1.10.0",
"@actions/exec": "^1.1.0",
"@actions/glob": "^0.2.0",
"@actions/glob": "^0.4.0",
"@actions/http-client": "^2.0.1",
"@actions/io": "^1.0.2",
"@actions/tool-cache": "^1.5.5",
"semver": "^6.3.1"
"@actions/tool-cache": "^2.0.1",
"semver": "^7.5.4"
},
"devDependencies": {
"@types/jest": "^27.0.2",
"@types/node": "^16.11.25",
"@types/semver": "^6.0.0",
"@types/jest": "^29.5.10",
"@types/node": "^20.10.3",
"@types/semver": "^7.5.6",
"@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0",
"@vercel/ncc": "^0.33.4",
"@vercel/ncc": "^0.38.1",
"eslint": "^8.35.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-node": "^11.1.0",
"jest": "^27.2.5",
"jest-circus": "^27.2.5",
"jest": "^29.7.0",
"jest-circus": "^29.7.0",
"nock": "^10.0.6",
"prettier": "^2.8.4",
"ts-jest": "^27.0.5",
"typescript": "^4.3.3"
"ts-jest": "^29.1.1",
"typescript": "^5.3.2"
}
}

View File

@ -12,9 +12,19 @@ process.on('uncaughtException', e => {
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 {
await cachePackages();
const cacheInput = core.getBooleanInput('cache');
if (cacheInput) {
await cachePackages();
if (earlyExit) {
process.exit(0);
}
}
} catch (error) {
let message = 'Unknown error!';
if (error instanceof Error) {
@ -28,11 +38,6 @@ export async function run() {
}
const cachePackages = async () => {
const cacheInput = core.getBooleanInput('cache');
if (!cacheInput) {
return;
}
const packageManager = 'default';
const state = core.getState(State.CacheMatchedKey);
@ -85,4 +90,4 @@ function logWarning(message: string): void {
core.info(`${warningPrefix}${message}`);
}
run();
run(true);

View File

@ -114,9 +114,9 @@ export async function getGo(
`Received HTTP status code ${err.httpStatusCode}. This usually indicates the rate limit has been exceeded`
);
} 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');
}
@ -160,7 +160,7 @@ async function resolveVersionFromManifest(
return info?.resolvedVersion;
} catch (err) {
core.info('Unable to resolve a version from the manifest...');
core.debug(err.message);
core.debug((err as Error).message);
}
}

View File

@ -74,7 +74,7 @@ export async function run() {
cacheDependencyPath
);
} 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.endGroup();
} catch (error) {
core.setFailed(error.message);
core.setFailed((error as Error).message);
}
}