node_modules: update

This commit is contained in:
Dawid Dziurla 2020-11-12 16:37:43 +01:00
parent 4a21c51f2f
commit b91baffed3
No known key found for this signature in database
GPG key ID: 7B6D8368172E9B0B
107 changed files with 3886 additions and 2943 deletions

View file

@ -1,6 +1,7 @@
language: node_js
node_js:
- "14"
- "12"
- "10"
- "9"

View file

@ -63,7 +63,7 @@ function reqSerializer (req) {
_req.url = req.originalUrl
} else {
// req.url.path is for hapi compat.
_req.url = req.url ? (req.url.path || req.url) : undefined
_req.url = req.path || (req.url ? (req.url.path || req.url) : undefined)
}
_req.headers = req.headers
_req.remoteAddress = connection && connection.remoteAddress

View file

@ -1,8 +1,8 @@
{
"_from": "pino-std-serializers@^2.4.2",
"_id": "pino-std-serializers@2.4.2",
"_id": "pino-std-serializers@2.5.0",
"_inBundle": false,
"_integrity": "sha512-WaL504dO8eGs+vrK+j4BuQQq6GLKeCCcHaMB2ItygzVURcL1CycwNEUHTD/lHFHs/NL5qAz2UKrjYWXKSf4aMQ==",
"_integrity": "sha512-wXqbqSrIhE58TdrxxlfLwU9eDhrzppQDvGhBEr1gYbzzM4KKo3Y63gSjiDXRKLVS2UOXdPNR2v+KnQgNrs+xUg==",
"_location": "/pino-std-serializers",
"_phantomChildren": {},
"_requested": {
@ -18,8 +18,8 @@
"_requiredBy": [
"/pino"
],
"_resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-2.4.2.tgz",
"_shasum": "cb5e3e58c358b26f88969d7e619ae54bdfcc1ae1",
"_resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-2.5.0.tgz",
"_shasum": "40ead781c65a0ce7ecd9c1c33f409d31fe712315",
"_spec": "pino-std-serializers@^2.4.2",
"_where": "/home/dawidd6/github/dawidd6/action-debian-package/node_modules/pino",
"author": {
@ -60,5 +60,5 @@
"test": "tap --no-cov 'test/**/*.test.js'",
"test-ci": "tap --cov --coverage-report=text 'test/**/*.test.js'"
},
"version": "2.4.2"
"version": "2.5.0"
}

View file

@ -158,6 +158,25 @@ test('req.id has a non-function value with custom id function', function (t) {
}
})
test('req.url will be obtained from input request req.path when input request url is an object', function (t) {
t.plan(1)
var server = http.createServer(handler)
server.unref()
server.listen(0, () => {
http.get(server.address(), () => {})
})
t.tearDown(() => server.close())
function handler (req, res) {
req.path = '/test'
var serialized = serializers.reqSerializer(req)
t.is(serialized.url, '/test')
res.end()
}
})
test('req.url will be obtained from input request url.path when input request url is an object', function (t) {
t.plan(1)
@ -170,13 +189,50 @@ test('req.url will be obtained from input request url.path when input request ur
t.tearDown(() => server.close())
function handler (req, res) {
req.url = {path: '/test'}
req.url = { path: '/test' }
var serialized = serializers.reqSerializer(req)
t.is(serialized.url, '/test')
res.end()
}
})
test('req.url will be obtained from input request url when input request url is not an object', function (t) {
t.plan(1)
var server = http.createServer(handler)
server.unref()
server.listen(0, () => {
http.get(server.address(), () => {})
})
t.tearDown(() => server.close())
function handler (req, res) {
req.url = '/test'
var serialized = serializers.reqSerializer(req)
t.is(serialized.url, '/test')
res.end()
}
})
test('req.url will be empty when input request path and url are not defined', function (t) {
t.plan(1)
var server = http.createServer(handler)
server.unref()
server.listen(0, () => {
http.get(server.address(), () => {})
})
t.tearDown(() => server.close())
function handler (req, res) {
var serialized = serializers.reqSerializer(req)
t.is(serialized.url, '/')
res.end()
}
})
test('req.url will be obtained from input request originalUrl when available', function (t) {
t.plan(1)