Comparing version 5.3.0 to 5.3.1
{ | ||
"name": "pn-logging", | ||
"version": "5.3.0", | ||
"version": "5.3.1", | ||
"description": "A logging wrapper around winston and sentry.", | ||
@@ -27,6 +27,6 @@ "engines": { | ||
"devDependencies": { | ||
"chai": "3.4.1", | ||
"eslint": "5.13.0", | ||
"istanbul": "0.4.1", | ||
"mocha": "2.3.4", | ||
"chai": "4.2.0", | ||
"eslint": "5.16.0", | ||
"istanbul": "0.4.5", | ||
"mocha": "6.0.2", | ||
"sinon": "1.17.2" | ||
@@ -33,0 +33,0 @@ }, |
@@ -210,2 +210,26 @@ /*eslint vars-on-top:0*/ | ||
it('should support req with undefined url', function() { | ||
const req = { | ||
headers: { | ||
host: 'guest', | ||
}, | ||
method: 'take', | ||
connection: { | ||
remoteAddress: '4.3.2.1', | ||
}, | ||
pathname: '/req/path', | ||
}; | ||
const res = { | ||
statusCode: 1000000, | ||
}; | ||
log.info('hi', { name: 'Dan' }, null, req, res); | ||
var args = spy.args[0]; | ||
expect(args[2]).to.have.property('name', 'Dan'); | ||
expect(args[2]).to.have.property('reqHost', 'guest'); | ||
expect(args[2]).to.have.property('resStatus', '1000000'); | ||
}) | ||
it('should support opts hash', function() { | ||
@@ -212,0 +236,0 @@ const err = new Error('zot'); |
@@ -215,3 +215,3 @@ // Generated by CoffeeScript 1.10.0 | ||
maxChars = 200; | ||
urlObj = url.parse(req != null ? req.url : void 0); | ||
urlObj = req.url && url.parse(req.url); | ||
path = (ref = urlObj != null ? urlObj.pathname : void 0) != null ? ref : ""; | ||
@@ -218,0 +218,0 @@ query = (ref1 = urlObj != null ? urlObj.query : void 0) != null ? ref1 : ""; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
159299
1170
1