Upgrade Node to v20 (#558)

* Build changes

* 4.0.0

* node version update

* changes

* upgrade to v20

* Removing conflicts

* Upgrade to v20 in the reusable workflows

* Rebased index.js

* Removing conflicts

* Resolving conflicts

* Fomat check

* failed checks fix
This commit is contained in:
aparnajyothi-y 2023-11-29 19:41:46 +05:30 committed by GitHub
parent 9eda6b51cc
commit 387ac29b30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
44 changed files with 17996 additions and 24138 deletions

View File

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

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.x'

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.

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.

Binary file not shown.

BIN
.licenses/npm/tslib-2.6.2.dep.yml generated Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -81,6 +81,6 @@ outputs:
cache-hit:
description: 'A boolean value to indicate an exact match was found for the primary key'
runs:
using: 'node16'
using: 'node20'
main: 'dist/setup/index.js'
post: 'dist/cleanup/index.js'

12741
dist/cleanup/index.js vendored

File diff suppressed because one or more lines are too long

21201
dist/setup/index.js vendored

File diff suppressed because one or more lines are too long

8131
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "setup-java",
"version": "3.4.1",
"version": "4.0.0",
"private": true,
"description": "setup java action",
"main": "dist/setup/index.js",
@ -29,28 +29,33 @@
"@actions/cache": "^3.0.4",
"@actions/core": "^1.10.0",
"@actions/exec": "^1.0.4",
"@actions/glob": "^0.2.0",
"@actions/http-client": "^1.0.11",
"@actions/glob": "^0.4.0",
"@actions/http-client": "^2.2.0",
"@actions/io": "^1.0.2",
"@actions/tool-cache": "^1.6.1",
"@actions/tool-cache": "^2.0.1",
"semver": "^7.3.4",
"xmlbuilder2": "^2.4.0"
},
"devDependencies": {
"@types/jest": "^27.0.2",
"@types/node": "^16.11.25",
"@types/jest": "^29.5.9",
"@types/node": "^20.9.3",
"@types/semver": "^7.3.4",
"@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.5.1",
"jest-circus": "^27.5.1",
"jest": "^29.7.0",
"jest-circus": "^29.7.0",
"prettier": "^2.8.4",
"ts-jest": "^27.0.5",
"typescript": "^4.2.3"
}
"ts-jest": "^29.1.1",
"typescript": "^5.3.2"
},
"bugs": {
"url": "https://github.com/actions/setup-java/issues"
},
"homepage": "https://github.com/actions/setup-java#readme"
}

View File

@ -149,10 +149,12 @@ export async function save(id: string) {
await cache.saveCache(packageManager.path, primaryKey);
core.info(`Cache saved with the key: ${primaryKey}`);
} catch (error) {
if (error.name === cache.ReserveCacheError.name) {
core.info(error.message);
const err = error as Error;
if (err.name === cache.ReserveCacheError.name) {
core.info(err.message);
} else {
if (isProbablyGradleDaemonProblem(packageManager, error)) {
if (isProbablyGradleDaemonProblem(packageManager, err)) {
core.warning(
'Failed to save Gradle cache on Windows. If tar.exe reported "Permission denied", try to run Gradle with `--no-daemon` option. Refer to https://github.com/actions/cache/issues/454 for details.'
);

View File

@ -13,7 +13,9 @@ async function removePrivateKeyFromKeychain() {
);
await gpg.deleteKey(keyFingerprint);
} catch (error) {
core.setFailed(`Failed to remove private key due to: ${error.message}`);
core.setFailed(
`Failed to remove private key due to: ${(error as Error).message}`
);
}
}
}

View File

@ -206,7 +206,9 @@ export class DragonwellDistribution extends JavaBase {
return fetchedDragonwellJson;
} catch (err) {
core.debug(
`Fetching Dragonwell versions info from the primary link: ${primaryUrl} ended up with the error: ${err.message}`
`Fetching Dragonwell versions info from the primary link: ${primaryUrl} ended up with the error: ${
(err as Error).message
}`
);
return null;
}
@ -232,7 +234,9 @@ export class DragonwellDistribution extends JavaBase {
return fetchedDragonwellJson;
} catch (err) {
core.debug(
`Fetching Dragonwell versions info from the backup url: ${backupUrl} ended up with the error: ${err.message}`
`Fetching Dragonwell versions info from the backup url: ${backupUrl} ended up with the error: ${
(err as Error).message
}`
);
return null;
}

View File

@ -13,7 +13,7 @@ import * as core from '@actions/core';
import * as tc from '@actions/tool-cache';
import fs from 'fs';
import path from 'path';
import {ITypedResponse} from '@actions/http-client/interfaces';
import {TypedResponse} from '@actions/http-client/lib/interfaces';
export class MicrosoftDistributions extends JavaBase {
constructor(installerOptions: JavaInstallerOptions) {
@ -99,7 +99,7 @@ export class MicrosoftDistributions extends JavaBase {
const headers = getGitHubHttpHeaders();
let response: ITypedResponse<tc.IToolRelease[]> | null = null;
let response: TypedResponse<tc.IToolRelease[]> | null = null;
if (core.isDebug()) {
console.time('Retrieving available versions for Microsoft took'); // eslint-disable-line no-console

View File

@ -79,7 +79,7 @@ async function run() {
await restore(cache, cacheDependencyPath);
}
} catch (error) {
core.setFailed(error.message);
core.setFailed((error as Error).message);
}
}