From 594834dde748aa759b2ce094a689c4d1bb657899 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Feb 2022 20:11:22 +0000 Subject: [PATCH 1/2] Bump typescript from 4.3.5 to 4.5.5 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.3.5 to 4.5.5. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/compare/v4.3.5...v4.5.5) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index a781c046..6beec946 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,7 @@ "nock": "^13.2.4", "ts-jest": "^26.5.6", "ts-node": "^10.5.0", - "typescript": "^4.3.5", + "typescript": "^4.5.5", "yaml": "^1.10.2", "yargs": "^17.3.1" } @@ -7943,9 +7943,9 @@ } }, "node_modules/typescript": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", - "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -14566,9 +14566,9 @@ } }, "typescript": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", - "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", "dev": true }, "unbox-primitive": { diff --git a/package.json b/package.json index 4d697cda..6eb816c3 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "nock": "^13.2.4", "ts-jest": "^26.5.6", "ts-node": "^10.5.0", - "typescript": "^4.3.5", + "typescript": "^4.5.5", "yaml": "^1.10.2", "yargs": "^17.3.1" } From 91c778d976e85ab94a04a5a4dc140b131ee030dc Mon Sep 17 00:00:00 2001 From: Barry Gordon Date: Mon, 21 Feb 2022 20:21:46 +0000 Subject: [PATCH 2/2] Fix new Typescript rules --- dist/index.js | 9 +++++++-- src/dry-run.ts | 6 +++++- src/main.ts | 6 +++++- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 77c580e7..1830dd7f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -8956,7 +8956,7 @@ function set(updatedDependencies) { const directory = firstDependency === null || firstDependency === void 0 ? void 0 : firstDependency.directory; const ecosystem = firstDependency === null || firstDependency === void 0 ? void 0 : firstDependency.packageEcosystem; const target = firstDependency === null || firstDependency === void 0 ? void 0 : firstDependency.targetBranch; - core.startGroup(`Outputting metadata for ${pluralize_1.default('updated dependency', updatedDependencies.length, true)}`); + core.startGroup(`Outputting metadata for ${(0, pluralize_1.default)('updated dependency', updatedDependencies.length, true)}`); core.info(`outputs.dependency-names: ${dependencyNames}`); core.info(`outputs.dependency-type: ${dependencyType}`); core.info(`outputs.update-type: ${updateType}`); @@ -9231,7 +9231,12 @@ function run() { core.setFailed(`Api Error: (${error.status}) ${error.message}`); return; } - core.setFailed(error.message); + if (error instanceof Error) { + core.setFailed(error.message); + } + else { + core.setFailed('There was an unexpected error.'); + } } }); } diff --git a/src/dry-run.ts b/src/dry-run.ts index 418d877c..3a3a622a 100755 --- a/src/dry-run.ts +++ b/src/dry-run.ts @@ -65,7 +65,11 @@ async function check (args: any): Promise { process.exit(1) } } catch (exception) { - console.log(exception.message) + if (exception instanceof Error) { + console.log(exception.message) + } else { + console.log('There was an unexpected error.') + } process.exit(1) } } diff --git a/src/main.ts b/src/main.ts index 40a9bff1..34211c46 100644 --- a/src/main.ts +++ b/src/main.ts @@ -44,7 +44,11 @@ export async function run (): Promise { core.setFailed(`Api Error: (${error.status}) ${error.message}`) return } - core.setFailed(error.message) + if (error instanceof Error) { + core.setFailed(error.message) + } else { + core.setFailed('There was an unexpected error.') + } } }