From 3bd8801dd38aed94693245490b1146b3a0c16504 Mon Sep 17 00:00:00 2001 From: Gregor Martynus <39992+gr2m@users.noreply.github.com> Date: Sun, 11 Apr 2021 14:33:45 -0700 Subject: [PATCH 1/2] fix(deps): bump `@octokit/webhooks` to `9.0.0-beta.5` (#231) BREAKING CHANGE: `sign` and `webhooks.sign` no default to `sha256` algorithm. In order to continue to use `sha1`, replace ```js sign(secret, payload) ``` with ```js sign({ secret, algorith: "sha1" }, payload) ``` BREAKING CHANGE: `webhooks.sign()` and `webhooks.verify()` are now asynchronous BREAKING CHANGE: static `sign` and `verify` methods are no longer exported. Use `@octokit/webhooks-methods` package instead --- package-lock.json | 12 +++++++++--- package.json | 2 +- test/readme-examples.test.ts | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7a2a5aa7a..29837f1db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1925,12 +1925,13 @@ } }, "@octokit/webhooks": { - "version": "9.0.0-beta.3", - "resolved": "https://registry.npmjs.org/@octokit/webhooks/-/webhooks-9.0.0-beta.3.tgz", - "integrity": "sha512-ln0zgS0iTYAHjat5cnMfiHfn0L0Rt3FDLIb0EeMfuhBKJHq9NWfKpzm/sy2NfZQ3cZFS0bWFQZAceD9ZkNA3Ng==", + "version": "9.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@octokit/webhooks/-/webhooks-9.0.0-beta.5.tgz", + "integrity": "sha512-5Z2i1O4cnOq2mgevjCK/VO2YAXFsX4vsuQCRHTClVrefBk7sGPQqNc4vhKFrFbZMHooJv2u0jMvMbyS3AxTPHg==", "requires": { "@octokit/request-error": "^2.0.2", "@octokit/webhooks-definitions": "3.65.5", + "@octokit/webhooks-methods": "^1.0.0", "aggregate-error": "^3.1.0" } }, @@ -1939,6 +1940,11 @@ "resolved": "https://registry.npmjs.org/@octokit/webhooks-definitions/-/webhooks-definitions-3.65.5.tgz", "integrity": "sha512-cQxHFYIrOHINEaw/dE8qrZKCmrJ7h8OOj8ZKeMq9KtP9ueBr9VdHKddbG4OMYEVHtylGSlGsvYT6GZBPYJe8OQ==" }, + "@octokit/webhooks-methods": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@octokit/webhooks-methods/-/webhooks-methods-1.0.0.tgz", + "integrity": "sha512-pVceMQcj9SZ5p2RkemL0TuuPdGULNQj9F3Pq1cNM1xH+Kst1VNt0dj3PEGZRZV473njrDnYdi/OG4wWY9TLbbA==" + }, "@pika/babel-plugin-esm-import-rewrite": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/@pika/babel-plugin-esm-import-rewrite/-/babel-plugin-esm-import-rewrite-0.6.1.tgz", diff --git a/package.json b/package.json index fa71d4b54..a5d49659b 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "@octokit/oauth-app": "^3.2.0", "@octokit/plugin-paginate-rest": "^2.6.0", "@octokit/types": "^6.0.3", - "@octokit/webhooks": "^9.0.0-beta.3" + "@octokit/webhooks": "^9.0.0-beta.5" }, "devDependencies": { "@pika/pack": "^0.5.0", diff --git a/test/readme-examples.test.ts b/test/readme-examples.test.ts index 1f1694ffd..ceb4eff15 100644 --- a/test/readme-examples.test.ts +++ b/test/readme-examples.test.ts @@ -241,7 +241,7 @@ describe("README examples", () => { headers: { "x-github-event": "issues", "x-github-delivery": "event-id-123", - "x-hub-signature-256": app.webhooks.sign(data), + "x-hub-signature-256": await app.webhooks.sign(data), }, data, }).catch(console.error); From 0513740b379fb37a1de0f8c93c765bffae4724f2 Mon Sep 17 00:00:00 2001 From: Gregor Martynus <39992+gr2m@users.noreply.github.com> Date: Wed, 14 Apr 2021 01:23:25 -0700 Subject: [PATCH 2/2] fix(deps): bump `@octokit/webhooks` to `9.0.0` --- 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 29837f1db..1f5aa9f9a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1925,20 +1925,20 @@ } }, "@octokit/webhooks": { - "version": "9.0.0-beta.5", - "resolved": "https://registry.npmjs.org/@octokit/webhooks/-/webhooks-9.0.0-beta.5.tgz", - "integrity": "sha512-5Z2i1O4cnOq2mgevjCK/VO2YAXFsX4vsuQCRHTClVrefBk7sGPQqNc4vhKFrFbZMHooJv2u0jMvMbyS3AxTPHg==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@octokit/webhooks/-/webhooks-9.0.0.tgz", + "integrity": "sha512-r8ZTnYAOZydrhRMnDonAVdeOl4IhK144UD+Vw8GUZCHurZxwO88VhoxV02omz2dm41h07EDo77i4H/A1DZ+0LQ==", "requires": { "@octokit/request-error": "^2.0.2", - "@octokit/webhooks-definitions": "3.65.5", + "@octokit/webhooks-definitions": "3.67.3", "@octokit/webhooks-methods": "^1.0.0", "aggregate-error": "^3.1.0" } }, "@octokit/webhooks-definitions": { - "version": "3.65.5", - "resolved": "https://registry.npmjs.org/@octokit/webhooks-definitions/-/webhooks-definitions-3.65.5.tgz", - "integrity": "sha512-cQxHFYIrOHINEaw/dE8qrZKCmrJ7h8OOj8ZKeMq9KtP9ueBr9VdHKddbG4OMYEVHtylGSlGsvYT6GZBPYJe8OQ==" + "version": "3.67.3", + "resolved": "https://registry.npmjs.org/@octokit/webhooks-definitions/-/webhooks-definitions-3.67.3.tgz", + "integrity": "sha512-do4Z1r2OVhuI0ihJhQ8Hg+yPWnBYEBNuFNCrvtPKoYT1w81jD7pBXgGe86lYuuNirkDHb0Nxt+zt4O5GiFJfgA==" }, "@octokit/webhooks-methods": { "version": "1.0.0", diff --git a/package.json b/package.json index a5d49659b..a82ca71aa 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "@octokit/oauth-app": "^3.2.0", "@octokit/plugin-paginate-rest": "^2.6.0", "@octokit/types": "^6.0.3", - "@octokit/webhooks": "^9.0.0-beta.5" + "@octokit/webhooks": "^9.0.0" }, "devDependencies": { "@pika/pack": "^0.5.0",