github-webhook-handler 2.1.2 → 2.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@ jobs:
13
13
  - name: Checkout Repository
14
14
  uses: actions/checkout@v6
15
15
  - name: Use Node.js ${{ matrix.node }}
16
- uses: actions/setup-node@v6.3.0
16
+ uses: actions/setup-node@v6.4.0
17
17
  with:
18
18
  node-version: ${{ matrix.node }}
19
19
  - name: Install Dependencies
@@ -41,7 +41,7 @@ jobs:
41
41
  with:
42
42
  fetch-depth: 0
43
43
  - name: Setup Node.js
44
- uses: actions/setup-node@v6.3.0
44
+ uses: actions/setup-node@v6.4.0
45
45
  with:
46
46
  node-version: lts/*
47
47
  registry-url: 'https://registry.npmjs.org'
package/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ## [2.1.4](https://github.com/rvagg/github-webhook-handler/compare/v2.1.3...v2.1.4) (2026-04-29)
2
+
3
+ ### Trivial Changes
4
+
5
+ * **deps:** bump actions/setup-node from 6.3.0 to 6.4.0 ([#63](https://github.com/rvagg/github-webhook-handler/issues/63)) ([0465bb4](https://github.com/rvagg/github-webhook-handler/commit/0465bb466d4c7abb6f225368c69c44329a4da5fa))
6
+
7
+ ## [2.1.3](https://github.com/rvagg/github-webhook-handler/compare/v2.1.2...v2.1.3) (2026-04-28)
8
+
9
+ ### Bug Fixes
10
+
11
+ * make ready for bl@7 ([089bec6](https://github.com/rvagg/github-webhook-handler/commit/089bec66f92c20b2b46ea7546afc552b763b3f50))
12
+
13
+ ### Trivial Changes
14
+
15
+ * **deps:** bump bl from 6.1.6 to 7.0.0 ([226cdc3](https://github.com/rvagg/github-webhook-handler/commit/226cdc3ffcbecfc16be781bf0510da3bfffc5cbc))
16
+
1
17
  ## [2.1.2](https://github.com/rvagg/github-webhook-handler/compare/v2.1.1...v2.1.2) (2026-04-28)
2
18
 
3
19
  ### Trivial Changes
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter } from 'node:events'
2
2
  import crypto from 'node:crypto'
3
- import bl from 'bl'
3
+ import { BufferListStream } from 'bl'
4
4
 
5
5
  /**
6
6
  * @typedef {Object} CreateHandlerOptions
@@ -160,19 +160,20 @@ function create (initOptions) {
160
160
  return hasError('X-Github-Event is not acceptable')
161
161
  }
162
162
 
163
- req.pipe(bl((err, data) => {
163
+ req.pipe(new BufferListStream((err, data) => {
164
164
  if (err) {
165
165
  return hasError(err.message)
166
166
  }
167
167
 
168
168
  let obj
169
+ const buf = /** @type {Buffer} */ (data)
169
170
 
170
- if (!verify(/** @type {string} */ (sig), data)) {
171
+ if (!verify(/** @type {string} */ (sig), buf)) {
171
172
  return hasError('X-Hub-Signature does not match blob signature')
172
173
  }
173
174
 
174
175
  try {
175
- obj = JSON.parse(data.toString())
176
+ obj = JSON.parse(buf.toString())
176
177
  } catch (e) {
177
178
  return hasError(/** @type {Error} */ (e).message)
178
179
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "github-webhook-handler",
3
- "version": "2.1.2",
3
+ "version": "2.1.4",
4
4
  "description": "Web handler / middleware for processing GitHub Webhooks",
5
5
  "type": "module",
6
6
  "main": "github-webhook-handler.js",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "license": "MIT",
35
35
  "dependencies": {
36
- "bl": "^6.1.6"
36
+ "bl": "^7.0.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@semantic-release/changelog": "^6.0.3",
package/tsconfig.json CHANGED
@@ -25,7 +25,8 @@
25
25
  "skipLibCheck": true,
26
26
  "stripInternal": true,
27
27
  "resolveJsonModule": true,
28
- "emitDeclarationOnly": true
28
+ "emitDeclarationOnly": true,
29
+ "types": ["node"]
29
30
  },
30
31
  "include": ["github-webhook-handler.js"],
31
32
  "exclude": ["node_modules"],
@@ -1 +1 @@
1
- {"version":3,"file":"github-webhook-handler.d.ts","sourceRoot":"","sources":["../github-webhook-handler.js"],"names":[],"mappings":";;UAMc,MAAM;YACN,MAAM;;;;;;;WAMN,MAAM;;;;QACN,MAAM;;;;aACN,GAAG;;;;;;;;;;;;SAGH,MAAM;;;;UACN,MAAM;;AAwCpB;;;GAGG;AACH,qCAHW,oBAAoB,GAAG,oBAAoB,EAAE,GAC3C,YAAY,GAAG;IAAC,CAAC,GAAG,EAAE,OAAO,WAAW,EAAE,eAAe,EAAE,GAAG,EAAE,OAAO,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,KAAK,IAAI,GAAG,IAAI,CAAC;IAAC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAAC,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;CAAC,CAyIvP;6BAtM4B,aAAa"}
1
+ {"version":3,"file":"github-webhook-handler.d.ts","sourceRoot":"","sources":["../github-webhook-handler.js"],"names":[],"mappings":";;UAMc,MAAM;YACN,MAAM;;;;;;;WAMN,MAAM;;;;QACN,MAAM;;;;aACN,GAAG;;;;;;;;;;;;SAGH,MAAM;;;;UACN,MAAM;;AAwCpB;;;GAGG;AACH,qCAHW,oBAAoB,GAAG,oBAAoB,EAAE,GAC3C,YAAY,GAAG;IAAC,CAAC,GAAG,EAAE,OAAO,WAAW,EAAE,eAAe,EAAE,GAAG,EAAE,OAAO,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,KAAK,IAAI,GAAG,IAAI,CAAC;IAAC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAAC,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;CAAC,CA0IvP;6BAvM4B,aAAa"}