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

pino-http

Package Overview
Dependencies
Maintainers
4
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 3.0.0 to 3.0.1

2

logger.js

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

const _req = Object.create(pinoReqProto)
_req.id = req.id
_req.id = typeof req.id === 'function' ? req.id() : req.id
_req.method = req.method

@@ -127,0 +127,0 @@ _req.url = req.url

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

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

@@ -324,4 +324,3 @@ 'use strict'

server.listen(0, () => {
const port = server.address().port
http.get(`http://127.0.0.1:${port}`, () => {})
http.get(server.address(), () => {})
})

@@ -356,4 +355,3 @@

server.listen(0, () => {
const port = server.address().port
http.get(`http://127.0.0.1:${port}`, () => {})
http.get(server.address(), () => {})
})

@@ -384,4 +382,3 @@

server.listen(0, () => {
const port = server.address().port
http.get(`http://127.0.0.1:${port}`, () => {})
http.get(server.address(), () => {})
})

@@ -411,4 +408,3 @@

server.listen(0, () => {
const port = server.address().port
http.get(`http://127.0.0.1:${port}`, () => {})
http.get(server.address(), () => {})
})

@@ -421,1 +417,26 @@

})
test('req.id has a non-function value', function (t) {
t.plan(1)
var dest = split(JSON.parse)
var logger = pinoHttp({
logger: pino(dest),
serializers: {
req: function (req) {
t.is(typeof req.id === 'function', false)
return req
}
}
})
var server = http.createServer(handler)
server.unref()
server.listen(0, () => {
http.get(server.address(), () => {})
})
function handler (req, res) {
logger(req, res)
res.end()
}
})
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