Upgrade dependencies

and deal with the fallouts

Signed-off-by: Paul Merlin <paul@gradle.com>
This commit is contained in:
paul 2020-09-22 18:02:50 +02:00
parent e7b6c4bcaa
commit d48df5be4b
6 changed files with 3154 additions and 1954 deletions

View file

@ -1,6 +1,6 @@
{
"plugins": ["jest", "@typescript-eslint"],
"extends": ["plugin:github/es6"],
"extends": ["plugin:github/typescript"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 9,
@ -16,13 +16,9 @@
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-ignore": "error",
"camelcase": "off",
"@typescript-eslint/camelcase": "error",
"@typescript-eslint/class-name-casing": "error",
"@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
"@typescript-eslint/func-call-spacing": ["error", "never"],
"@typescript-eslint/generic-type-naming": ["error", "^[A-Z][A-Za-z]*$"],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error",

194
dist/index.js vendored

File diff suppressed because one or more lines are too long

4845
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -25,23 +25,23 @@
"author": "YourNameOrOrganization",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.2.3",
"typed-rest-client": "^1.7.3",
"unhomoglyph": "^1.0.5"
"@actions/core": "1.2.5",
"typed-rest-client": "1.7.3",
"unhomoglyph": "1.0.6"
},
"devDependencies": {
"@types/jest": "^25.2.1",
"@types/node": "^12.12.34",
"@typescript-eslint/parser": "^2.27.0",
"@zeit/ncc": "^0.22.1",
"eslint": "^6.8.0",
"eslint-plugin-github": "^3.4.1",
"eslint-plugin-jest": "^23.8.2",
"jest": "^25.2.7",
"jest-circus": "^25.2.7",
"js-yaml": "^3.13.1",
"prettier": "^2.0.4",
"ts-jest": "^25.3.1",
"typescript": "^3.8.3"
"@types/jest": "26.0.14",
"@types/node": "12.12.62",
"@typescript-eslint/parser": "4.2.0",
"@zeit/ncc": "0.22.3",
"eslint": "7.9.0",
"eslint-plugin-github": "4.1.1",
"eslint-plugin-jest": "24.0.2",
"jest": "26.4.2",
"jest-circus": "26.4.2",
"js-yaml": "3.14.0",
"prettier": "2.1.2",
"ts-jest": "26.4.0",
"typescript": "4.0.3"
}
}

View file

@ -6,7 +6,10 @@ export async function fetchValidChecksums(
allowSnapshots: boolean
): Promise<string[]> {
const all = await httpGetJsonArray('https://services.gradle.org/versions/all')
const withChecksum = all.filter(entry =>
const withChecksum = all.filter(
entry =>
typeof entry === 'object' &&
entry != null &&
entry.hasOwnProperty('wrapperChecksumUrl')
)
const allowed = withChecksum.filter(
@ -23,7 +26,7 @@ export async function fetchValidChecksums(
return [...new Set(checksums)]
}
async function httpGetJsonArray(url: string): Promise<object[]> {
async function httpGetJsonArray(url: string): Promise<unknown[]> {
return JSON.parse(await httpGetText(url))
}