Comparing version 3.10.0 to 3.11.0
@@ -21,3 +21,3 @@ /** | ||
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } | ||
module.exports = /*#__PURE__*/function () { | ||
var Profiler = /*#__PURE__*/function () { | ||
/** | ||
@@ -32,7 +32,9 @@ * Constructor function for the Profiler instance used by | ||
_classCallCheck(this, Profiler); | ||
if (!logger) { | ||
throw new Error('Logger is required for profiling.'); | ||
var Logger = require('./logger'); | ||
if (_typeof(logger) !== 'object' || Array.isArray(logger) || !(logger instanceof Logger)) { | ||
throw new Error('Logger is required for profiling'); | ||
} else { | ||
this.logger = logger; | ||
this.start = Date.now(); | ||
} | ||
this.logger = logger; | ||
this.start = Date.now(); | ||
} | ||
@@ -64,2 +66,4 @@ | ||
return Profiler; | ||
}(); | ||
}(); | ||
; | ||
module.exports = Profiler; |
@@ -9,3 +9,2 @@ /** | ||
'use strict'; | ||
/** | ||
@@ -16,3 +15,3 @@ * TODO: add class description. | ||
*/ | ||
module.exports = class Profiler { | ||
class Profiler { | ||
/** | ||
@@ -26,8 +25,9 @@ * Constructor function for the Profiler instance used by | ||
constructor(logger) { | ||
if (!logger) { | ||
throw new Error('Logger is required for profiling.'); | ||
const Logger = require('./logger'); | ||
if (typeof logger !== 'object' || Array.isArray(logger) || !(logger instanceof Logger)) { | ||
throw new Error('Logger is required for profiling'); | ||
} else { | ||
this.logger = logger; | ||
this.start = Date.now(); | ||
} | ||
this.logger = logger; | ||
this.start = Date.now(); | ||
} | ||
@@ -55,1 +55,3 @@ | ||
}; | ||
module.exports = Profiler; |
@@ -37,2 +37,3 @@ // Type definitions for winston 3.0 | ||
tailable?: boolean; | ||
lazy?: boolean; | ||
} | ||
@@ -51,2 +52,3 @@ | ||
tailable: boolean; | ||
lazy: boolean; | ||
@@ -53,0 +55,0 @@ new(options?: FileTransportOptions): FileTransportInstance; |
{ | ||
"name": "winston", | ||
"description": "A logger for just about everything.", | ||
"version": "3.10.0", | ||
"version": "3.11.0", | ||
"author": "Charlie Robbins <charlie.robbins@gmail.com>", | ||
@@ -28,3 +28,3 @@ "maintainers": [ | ||
"@dabh/diagnostics": "^2.0.2", | ||
"@colors/colors": "1.5.0", | ||
"@colors/colors": "^1.6.0", | ||
"async": "^3.2.3", | ||
@@ -53,3 +53,3 @@ "is-stream": "^2.0.0", | ||
"nyc": "^15.1.0", | ||
"rimraf": "^3.0.2", | ||
"rimraf": "^5.0.5", | ||
"split2": "^4.1.0", | ||
@@ -56,0 +56,0 @@ "std-mocks": "^1.0.1", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
268482
6279
- Removed@colors/colors@1.5.0(transitive)
Updated@colors/colors@^1.6.0