@boost/log
Advanced tools
Comparing version 2.1.7 to 2.1.8
@@ -6,2 +6,14 @@ # Change Log | ||
### 2.1.8 - 2020-12-21 | ||
#### 🐞 Fixes | ||
- Fix validation breaking transport instances. (#133) ([51f5486](https://github.com/milesj/boost/commit/51f5486)), closes [#133](https://github.com/milesj/boost/issues/133) | ||
**Note:** Version bump only for package @boost/log | ||
### 2.1.7 - 2020-12-07 | ||
@@ -8,0 +20,0 @@ |
@@ -153,2 +153,3 @@ 'use strict'; | ||
func, | ||
instance, | ||
object, | ||
@@ -162,8 +163,3 @@ shape, | ||
name: string().required().notEmpty(), | ||
transports: array(shape({ | ||
format: func().notNullable(), | ||
// eslint-disable-next-line react/forbid-prop-types | ||
levels: array(string()), | ||
write: func().notNullable() | ||
}), [new ConsoleTransport()]) | ||
transports: array(instance(Transport).notNullable(), [new ConsoleTransport()]) | ||
}; | ||
@@ -553,2 +549,8 @@ } | ||
class StreamTransport extends Transport { | ||
constructor(options) { | ||
super(options); | ||
this.stream = void 0; | ||
this.stream = options.stream; | ||
} | ||
blueprint(preds) { | ||
@@ -567,3 +569,3 @@ const { | ||
write(message) { | ||
this.options.stream.write(message); | ||
this.stream.write(message); | ||
} | ||
@@ -570,0 +572,0 @@ |
@@ -6,3 +6,3 @@ import { Contract, Predicates, Blueprint } from '@boost/common'; | ||
constructor(options: LoggerOptions); | ||
blueprint({ array, func, object, shape, string }: Predicates): Blueprint<LoggerOptions>; | ||
blueprint({ array, func, instance, object, shape, string, }: Predicates): Blueprint<LoggerOptions>; | ||
disable(): void; | ||
@@ -9,0 +9,0 @@ enable(): void; |
@@ -8,2 +8,4 @@ import { Predicates, Blueprint } from '@boost/common'; | ||
export default class StreamTransport extends Transport<StreamTransportOptions> { | ||
protected stream: Writable; | ||
constructor(options: StreamTransportOptions); | ||
blueprint(preds: Predicates): Blueprint<StreamTransportOptions>; | ||
@@ -10,0 +12,0 @@ write(message: string): void; |
{ | ||
"name": "@boost/log", | ||
"version": "2.1.7", | ||
"version": "2.1.8", | ||
"release": "1594765247526", | ||
@@ -33,3 +33,3 @@ "description": "Lightweight level based logging system.", | ||
}, | ||
"gitHead": "8d659dcc081c84c25ba62fec46b42d8936c97f4a" | ||
"gitHead": "45655a11181a9b0cef323516256b1be107767edc" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
41039
727