From ad34390f922b76553391267ed9ce9567f81e7827 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 01:31:40 +0000 Subject: [PATCH 1/2] Bump @octokit/request-error from 2.1.0 to 5.0.1 Bumps [@octokit/request-error](https://github.com/octokit/request-error.js) from 2.1.0 to 5.0.1. - [Release notes](https://github.com/octokit/request-error.js/releases) - [Commits](https://github.com/octokit/request-error.js/compare/v2.1.0...v5.0.1) --- updated-dependencies: - dependency-name: "@octokit/request-error" dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 37 +++++++++++++++++++++++++------------ package.json | 2 +- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9d2fa17..eb50958 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@actions/core": "^1.10.0", "@actions/github": "^5.1.1", "@octokit/plugin-retry": "^5.0.4", - "@octokit/request-error": "^2.1.0", + "@octokit/request-error": "^5.0.1", "ansi-styles": "^6.2.1", "got": "^13.0.0", "octokit": "^2.1.0", @@ -132,6 +132,16 @@ "universal-user-agent": "^6.0.0" } }, + "node_modules/@actions/github/node_modules/@octokit/request-error": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz", + "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==", + "dependencies": { + "@octokit/types": "^6.0.3", + "deprecation": "^2.0.0", + "once": "^1.4.0" + } + }, "node_modules/@actions/github/node_modules/@octokit/types": { "version": "6.41.0", "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", @@ -2015,26 +2025,29 @@ } }, "node_modules/@octokit/request-error": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz", - "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.0.1.tgz", + "integrity": "sha512-X7pnyTMV7MgtGmiXBwmO6M5kIPrntOXdyKZLigNfQWSEQzVxR4a4vo49vJjTWX70mPndj8KhfT4Dx+2Ng3vnBQ==", "dependencies": { - "@octokit/types": "^6.0.3", + "@octokit/types": "^12.0.0", "deprecation": "^2.0.0", "once": "^1.4.0" + }, + "engines": { + "node": ">= 18" } }, "node_modules/@octokit/request-error/node_modules/@octokit/openapi-types": { - "version": "12.11.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", - "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==" + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-19.0.0.tgz", + "integrity": "sha512-PclQ6JGMTE9iUStpzMkwLCISFn/wDeRjkZFIKALpvJQNBGwDoYYi2fFvuHwssoQ1rXI5mfh6jgTgWuddeUzfWw==" }, "node_modules/@octokit/request-error/node_modules/@octokit/types": { - "version": "6.41.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", - "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.0.0.tgz", + "integrity": "sha512-EzD434aHTFifGudYAygnFlS1Tl6KhbTynEWELQXIbTY8Msvb5nEqTZIm7sbPEt4mQYLZwu3zPKVdeIrw0g7ovg==", "dependencies": { - "@octokit/openapi-types": "^12.11.0" + "@octokit/openapi-types": "^19.0.0" } }, "node_modules/@octokit/request/node_modules/@octokit/request-error": { diff --git a/package.json b/package.json index 21883c8..85b59ae 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "@actions/core": "^1.10.0", "@actions/github": "^5.1.1", "@octokit/plugin-retry": "^5.0.4", - "@octokit/request-error": "^2.1.0", + "@octokit/request-error": "^5.0.1", "ansi-styles": "^6.2.1", "got": "^13.0.0", "octokit": "^2.1.0", From 8dc52cdbed80b6f7430e3d7b9388b247d3c976c6 Mon Sep 17 00:00:00 2001 From: Federico Builes Date: Mon, 9 Oct 2023 11:23:53 +0200 Subject: [PATCH 2/2] update tests --- __tests__/dependency-graph.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/__tests__/dependency-graph.test.ts b/__tests__/dependency-graph.test.ts index c2c4628..4533b2f 100644 --- a/__tests__/dependency-graph.test.ts +++ b/__tests__/dependency-graph.test.ts @@ -24,6 +24,7 @@ test('it properly catches RequestError type', async () => { headRef: 'refs/heads/master' }) } catch (error) { - expect(error).toBeInstanceOf(RequestError) + const err = error as RequestError + expect(err.status).toBe(401) } })