Comparing version 2.0.0 to 2.0.1
@@ -92,3 +92,3 @@ /** | ||
if (isMethodAllowed(method, levels)) { | ||
write(method, _this._prefix, format ? format(method, _this._prefix, args) : args); | ||
write(method, _this._prefix, format ? format(method, _this._prefix, args.slice()) : args); | ||
} | ||
@@ -95,0 +95,0 @@ }); |
{ | ||
"name": "lggr", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
@@ -63,3 +63,3 @@ /** | ||
this._prefix, | ||
format ? format(method, this._prefix, args) : args | ||
format ? format(method, this._prefix, args.slice()) : args | ||
); | ||
@@ -66,0 +66,0 @@ } |
@@ -8,2 +8,3 @@ | ||
import createJoinFormatter from '../src/formatters/join'; | ||
import placeholdersNormalizer from '../src/formatters/placeholders-normalizer'; | ||
@@ -54,2 +55,28 @@ var sandbox = sinon.sandbox.create(); | ||
describe('formatters', function () { | ||
it.only('should not modify args for another writers', function () { | ||
var format3 = sinon.spy(placeholdersNormalizer({ | ||
o: 'i' | ||
})); | ||
var format4 = sinon.spy(placeholdersNormalizer({ | ||
k: 's' | ||
})); | ||
var logger = new Logger('prefix', { | ||
methods: ['log'], | ||
writers: {console: this.write1, console2: this.write2}, | ||
formatters: {console: format3, console2: format4}, | ||
levels: {console: ['log'], console2: ['log']} | ||
}); | ||
logger.log('%o %k', 'test'); | ||
sinon.assert.calledOnce(format4); | ||
assert.deepEqual(format4.args[0][2], ['%o %s', 'test']); | ||
sinon.assert.calledOnce(format3); | ||
assert.deepEqual(format3.args[0][2], ['%i %k', 'test']); | ||
}); | ||
}); | ||
describe('logging logic', function () { | ||
@@ -56,0 +83,0 @@ it('should write to passed writer', function () { |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
85535
2310
47