@everymundo/simple-logr
Advanced tools
Comparing version 2.0.3 to 2.0.4
{ | ||
"name": "@everymundo/simple-logr", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "A very simplistic logger that allows one to avoid using the console.log directly allowing stubbing and better linting.", | ||
@@ -34,12 +34,13 @@ "main": "index.js", | ||
"devDependencies": { | ||
"@everymundo/cleanrequire": "^1.2.1", | ||
"chai": "^4.2.0", | ||
"ghooks": "^2.0.4", | ||
"mocha": "^6.2.0", | ||
"mocha": "^6.2.2", | ||
"nyc": "^14.1.1", | ||
"sinon": "^7.4.1", | ||
"standard": "^14.0.0" | ||
"sinon": "^7.5.0", | ||
"standard": "^14.3.1" | ||
}, | ||
"dependencies": { | ||
"pino": "^5.13.2" | ||
"pino": "^5.14.0" | ||
} | ||
} |
@@ -8,5 +8,6 @@ 'use strict' | ||
const { expect } = require('chai') | ||
const cleanrequire = require('@everymundo/cleanrequire') | ||
describe('index.js', () => { | ||
process.env.LOG_LEVEL = 'silent' | ||
// process.env.LOG_LEVEL = 'silent' | ||
@@ -31,3 +32,14 @@ let box | ||
}) | ||
context('when env.LOG_LEVEL is not defined', () => { | ||
beforeEach(() => { | ||
box.stub(process.env, 'LOG_LEVEL').value('') | ||
}) | ||
it('should assume info as its default LOG_LEVEL', () => { | ||
const logr = cleanrequire('../index.js').createLogger({ level: 'debug' }) | ||
expect(logr).to.have.property('level', 'debug') | ||
}) | ||
}) | ||
}) | ||
}) |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
7567
56
7
Updatedpino@^5.14.0