Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@octokit/webhooks

Package Overview
Dependencies
Maintainers
3
Versions
257
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octokit/webhooks - npm Package Compare versions

Comparing version 4.0.0 to 5.0.0

10

middleware/middleware.js

@@ -27,7 +27,9 @@ module.exports = middleware

if (missingHeaders) {
debug(`ignored: ${request.method} ${request.url} due to missing headers: ${missingHeaders}`)
const error = new Error(`Required headers missing: ${missingHeaders}`)
response.statusCode = 400
response.end(`Required headers missing: ${missingHeaders}`)
return
return state.eventHandler.receive(error)
.catch(() => {
response.statusCode = 400
response.end(error.message)
})
}

@@ -34,0 +36,0 @@

6

package.json
{
"name": "@octokit/webhooks",
"version": "4.0.0",
"version": "5.0.0",
"publishConfig": {

@@ -20,3 +20,3 @@ "access": "public"

"coveralls": "^3.0.0",
"get-port": "^3.2.0",
"get-port": "^4.0.0",
"pify": "^3.0.0",

@@ -27,3 +27,3 @@ "proxyquire": "^2.0.0",

"standard": "^11.0.0",
"tap": "^11.0.0"
"tap": "^12.0.0"
},

@@ -30,0 +30,0 @@ "scripts": {

@@ -101,3 +101,3 @@ # @octokit/webhooks

```js
weebhooks.sign(eventPayload)
webhooks.sign(eventPayload)
```

@@ -129,3 +129,3 @@

```js
weebhooks.verify(eventPayload, signature)
webhooks.verify(eventPayload, signature)
```

@@ -171,3 +171,3 @@

```js
weebhooks.verifyAndReceive({id, name, payload, signature})
webhooks.verifyAndReceive({id, name, payload, signature})
```

@@ -174,0 +174,0 @@

@@ -96,2 +96,4 @@ const http = require('http')

const server = http.createServer(api.middleware)
const errorHandler = simple.spy()
api.on('error', errorHandler)

@@ -118,2 +120,3 @@ promisify(server.listen.bind(server))(this.port)

.then(() => {
t.is(errorHandler.callCount, 1, 'calls "error" event handler')
server.close(t.end)

@@ -120,0 +123,0 @@ })

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc