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

pino-std-serializers

Package Overview
Dependencies
Maintainers
4
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pino-std-serializers - npm Package Compare versions

Comparing version 3.1.1 to 3.2.0

12

lib/req.js

@@ -25,2 +25,12 @@ 'use strict'

},
query: {
enumerable: true,
writable: true,
value: ''
},
params: {
enumerable: true,
writable: true,
value: ''
},
headers: {

@@ -65,2 +75,4 @@ enumerable: true,

_req.url = req.originalUrl
_req.query = req.query
_req.params = req.params
} else {

@@ -67,0 +79,0 @@ // req.url.path is for hapi compat.

2

package.json
{
"name": "pino-std-serializers",
"version": "3.1.1",
"version": "3.2.0",
"description": "A collection of standard object serializers for Pino",

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

@@ -355,1 +355,41 @@ 'use strict'

})
test('req.query is available', function (t) {
t.plan(1)
const server = http.createServer(handler)
server.unref()
server.listen(0, () => {
http.get(server.address(), () => {})
})
t.tearDown(() => server.close())
function handler (req, res) {
req.originalUrl = '/test'
req.query = '/foo?bar=foobar&bar=foo'
const serialized = serializers.reqSerializer(req)
t.is(serialized.query, '/foo?bar=foobar&bar=foo')
res.end()
}
})
test('req.params is available', function (t) {
t.plan(1)
const server = http.createServer(handler)
server.unref()
server.listen(0, () => {
http.get(server.address(), () => {})
})
t.tearDown(() => server.close())
function handler (req, res) {
req.originalUrl = '/test'
req.params = '/foo/bar'
const serialized = serializers.reqSerializer(req)
t.is(serialized.params, '/foo/bar')
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