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

pino-http

Package Overview
Dependencies
Maintainers
2
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pino-http - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

2

logger.js

@@ -38,3 +38,3 @@ 'use strict'

err: err,
responseTime: this.responseTime
responseTime: responseTime
}, 'request errored')

@@ -41,0 +41,0 @@ return

{
"name": "pino-http",
"version": "1.1.0",
"version": "1.1.1",
"description": "High-speed HTTP logger for Node.js",

@@ -5,0 +5,0 @@ "main": "logger.js",

@@ -112,3 +112,2 @@ 'use strict'

var server = http.createServer(handle)
function handle (req, res) {

@@ -121,10 +120,25 @@ logger(req, res)

t.tearDown(function (cb) {
server.close(cb)
})
expectResponseTime(t, dest, logger, handle)
})
server.listen(0, '127.0.0.1', function (err) {
test('responseTime for errored request', function (t) {
var dest = split(JSON.parse)
var logger = pinoLogger(dest)
function handle (req, res) {
logger(req, res)
setTimeout(function () {
res.emit('error', new Error('Some error'))
res.end()
}, 100)
}
expectResponseTime(t, dest, logger, handle)
})
function expectResponseTime (t, dest, logger, handle) {
setup(t, logger, function (err, server) {
t.error(err)
doGet(server)
})
}, handle)

@@ -136,3 +150,3 @@ dest.on('data', function (line) {

})
})
}
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