mirror of
https://github.com/actions/setup-java.git
synced 2024-11-25 09:51:03 -05:00
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:
parent
9eda6b51cc
commit
387ac29b30
44 changed files with 17996 additions and 24138 deletions
2
.github/workflows/basic-validation.yml
vendored
2
.github/workflows/basic-validation.yml
vendored
|
@ -15,3 +15,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.x'
|
||||||
|
|
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.x'
|
||||||
|
|
BIN
.licenses/npm/@actions/core.dep.yml
generated
BIN
.licenses/npm/@actions/core.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@actions/exec.dep.yml
generated
BIN
.licenses/npm/@actions/exec.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.
BIN
.licenses/npm/@actions/http-client-2.0.1.dep.yml
generated
BIN
.licenses/npm/@actions/http-client-2.0.1.dep.yml
generated
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
BIN
.licenses/npm/@fastify/busboy.dep.yml
generated
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-14.6.2.dep.yml
generated
BIN
.licenses/npm/@types/node-14.6.2.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.
Binary file not shown.
BIN
.licenses/npm/balanced-match.dep.yml
generated
BIN
.licenses/npm/balanced-match.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/mime-db.dep.yml
generated
BIN
.licenses/npm/mime-db.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/mime-types.dep.yml
generated
BIN
.licenses/npm/mime-types.dep.yml
generated
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.
BIN
.licenses/npm/tslib-2.3.1.dep.yml
generated
BIN
.licenses/npm/tslib-2.3.1.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/tslib-2.5.0.dep.yml
generated
BIN
.licenses/npm/tslib-2.5.0.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/tslib-2.6.2.dep.yml
generated
Normal file
BIN
.licenses/npm/tslib-2.6.2.dep.yml
generated
Normal file
Binary file not shown.
Binary file not shown.
BIN
.licenses/npm/undici.dep.yml
generated
BIN
.licenses/npm/undici.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/xmlbuilder2.dep.yml
generated
BIN
.licenses/npm/xmlbuilder2.dep.yml
generated
Binary file not shown.
|
@ -81,6 +81,6 @@ outputs:
|
||||||
cache-hit:
|
cache-hit:
|
||||||
description: 'A boolean value to indicate an exact match was found for the primary key'
|
description: 'A boolean value to indicate an exact match was found for the primary key'
|
||||||
runs:
|
runs:
|
||||||
using: 'node16'
|
using: 'node20'
|
||||||
main: 'dist/setup/index.js'
|
main: 'dist/setup/index.js'
|
||||||
post: 'dist/cleanup/index.js'
|
post: 'dist/cleanup/index.js'
|
||||||
|
|
12741
dist/cleanup/index.js
vendored
12741
dist/cleanup/index.js
vendored
File diff suppressed because one or more lines are too long
21201
dist/setup/index.js
vendored
21201
dist/setup/index.js
vendored
File diff suppressed because one or more lines are too long
8131
package-lock.json
generated
8131
package-lock.json
generated
File diff suppressed because it is too large
Load diff
29
package.json
29
package.json
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "setup-java",
|
"name": "setup-java",
|
||||||
"version": "3.4.1",
|
"version": "4.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "setup java action",
|
"description": "setup java action",
|
||||||
"main": "dist/setup/index.js",
|
"main": "dist/setup/index.js",
|
||||||
|
@ -29,28 +29,33 @@
|
||||||
"@actions/cache": "^3.0.4",
|
"@actions/cache": "^3.0.4",
|
||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.10.0",
|
||||||
"@actions/exec": "^1.0.4",
|
"@actions/exec": "^1.0.4",
|
||||||
"@actions/glob": "^0.2.0",
|
"@actions/glob": "^0.4.0",
|
||||||
"@actions/http-client": "^1.0.11",
|
"@actions/http-client": "^2.2.0",
|
||||||
"@actions/io": "^1.0.2",
|
"@actions/io": "^1.0.2",
|
||||||
"@actions/tool-cache": "^1.6.1",
|
"@actions/tool-cache": "^2.0.1",
|
||||||
"semver": "^7.3.4",
|
"semver": "^7.3.4",
|
||||||
"xmlbuilder2": "^2.4.0"
|
"xmlbuilder2": "^2.4.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^27.0.2",
|
"@types/jest": "^29.5.9",
|
||||||
"@types/node": "^16.11.25",
|
"@types/node": "^20.9.3",
|
||||||
"@types/semver": "^7.3.4",
|
"@types/semver": "^7.3.4",
|
||||||
"@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.5.1",
|
"jest": "^29.7.0",
|
||||||
"jest-circus": "^27.5.1",
|
"jest-circus": "^29.7.0",
|
||||||
"prettier": "^2.8.4",
|
"prettier": "^2.8.4",
|
||||||
"ts-jest": "^27.0.5",
|
"ts-jest": "^29.1.1",
|
||||||
"typescript": "^4.2.3"
|
"typescript": "^5.3.2"
|
||||||
}
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/actions/setup-java/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/actions/setup-java#readme"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -149,10 +149,12 @@ export async function save(id: string) {
|
||||||
await cache.saveCache(packageManager.path, primaryKey);
|
await cache.saveCache(packageManager.path, primaryKey);
|
||||||
core.info(`Cache saved with the key: ${primaryKey}`);
|
core.info(`Cache saved with the key: ${primaryKey}`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.name === cache.ReserveCacheError.name) {
|
const err = error as Error;
|
||||||
core.info(error.message);
|
|
||||||
|
if (err.name === cache.ReserveCacheError.name) {
|
||||||
|
core.info(err.message);
|
||||||
} else {
|
} else {
|
||||||
if (isProbablyGradleDaemonProblem(packageManager, error)) {
|
if (isProbablyGradleDaemonProblem(packageManager, err)) {
|
||||||
core.warning(
|
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.'
|
'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.'
|
||||||
);
|
);
|
||||||
|
|
|
@ -13,7 +13,9 @@ async function removePrivateKeyFromKeychain() {
|
||||||
);
|
);
|
||||||
await gpg.deleteKey(keyFingerprint);
|
await gpg.deleteKey(keyFingerprint);
|
||||||
} catch (error) {
|
} 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}`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -206,7 +206,9 @@ export class DragonwellDistribution extends JavaBase {
|
||||||
return fetchedDragonwellJson;
|
return fetchedDragonwellJson;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
core.debug(
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -232,7 +234,9 @@ export class DragonwellDistribution extends JavaBase {
|
||||||
return fetchedDragonwellJson;
|
return fetchedDragonwellJson;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
core.debug(
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ import * as core from '@actions/core';
|
||||||
import * as tc from '@actions/tool-cache';
|
import * as tc from '@actions/tool-cache';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import {ITypedResponse} from '@actions/http-client/interfaces';
|
import {TypedResponse} from '@actions/http-client/lib/interfaces';
|
||||||
|
|
||||||
export class MicrosoftDistributions extends JavaBase {
|
export class MicrosoftDistributions extends JavaBase {
|
||||||
constructor(installerOptions: JavaInstallerOptions) {
|
constructor(installerOptions: JavaInstallerOptions) {
|
||||||
|
@ -99,7 +99,7 @@ export class MicrosoftDistributions extends JavaBase {
|
||||||
|
|
||||||
const headers = getGitHubHttpHeaders();
|
const headers = getGitHubHttpHeaders();
|
||||||
|
|
||||||
let response: ITypedResponse<tc.IToolRelease[]> | null = null;
|
let response: TypedResponse<tc.IToolRelease[]> | null = null;
|
||||||
|
|
||||||
if (core.isDebug()) {
|
if (core.isDebug()) {
|
||||||
console.time('Retrieving available versions for Microsoft took'); // eslint-disable-line no-console
|
console.time('Retrieving available versions for Microsoft took'); // eslint-disable-line no-console
|
||||||
|
|
|
@ -79,7 +79,7 @@ async function run() {
|
||||||
await restore(cache, cacheDependencyPath);
|
await restore(cache, cacheDependencyPath);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed((error as Error).message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue