caterpillar
Advanced tools
Comparing version 5.1.0 to 5.1.1-next.1588918805.1b57e48dd056074c146f04a5d3898aef026862a8
@@ -23,2 +23,5 @@ import { deep } from 'extendr' | ||
export class Logger extends PassThrough { | ||
// =================================== | ||
// Generic | ||
// This code is shared between Logger and Transform | ||
constructor(...args) { | ||
@@ -29,5 +32,2 @@ super(...args) | ||
} | ||
// =================================== | ||
// Generic Differences | ||
// This code is shared but different between Logger and Transform | ||
/** | ||
@@ -50,3 +50,2 @@ * Get the initial configuration. | ||
* Alternative way of creating an instance of the class without having to use the `new` keyword. | ||
* Useful when creating the class directly from `require` statements. | ||
*/ | ||
@@ -56,5 +55,2 @@ static create(...args) { | ||
} | ||
// =================================== | ||
// Generic | ||
// This code is shared between Logger and Transform | ||
/** | ||
@@ -185,2 +181,5 @@ * Get the current configuration object for this instance. | ||
export class Transform extends _Transform { | ||
// =================================== | ||
// Generic | ||
// This code is shared between Logger and Transform | ||
constructor(...args) { | ||
@@ -191,9 +190,5 @@ super(...args) | ||
} | ||
// =================================== | ||
// Generic Differences | ||
// This code is shared but different between Logger and Transform | ||
/** | ||
* Get the initial configuration option. | ||
* Use this to add default/initial configuration to your class. | ||
* @returns {Configuration} | ||
*/ | ||
@@ -209,5 +204,2 @@ getInitialConfig() { | ||
} | ||
// =================================== | ||
// Generic | ||
// This code is shared between Logger and Transform | ||
/** | ||
@@ -221,6 +213,7 @@ * Get the current configuration object for this instance. | ||
* Apply the specified configurations to this instance's configuration via deep merging. | ||
* @param configs | ||
* @example | ||
* ``` javascript | ||
* setConfig({a: 1}, {b: 2}) | ||
* getConfig() // {a: 1, b: 2} | ||
* ``` | ||
*/ | ||
@@ -227,0 +220,0 @@ setConfig(...configs) { |
@@ -41,2 +41,5 @@ 'use strict' | ||
class Logger extends stream_1.PassThrough { | ||
// =================================== | ||
// Generic | ||
// This code is shared between Logger and Transform | ||
constructor(...args) { | ||
@@ -47,5 +50,2 @@ super(...args) | ||
} | ||
// =================================== | ||
// Generic Differences | ||
// This code is shared but different between Logger and Transform | ||
/** | ||
@@ -68,3 +68,2 @@ * Get the initial configuration. | ||
* Alternative way of creating an instance of the class without having to use the `new` keyword. | ||
* Useful when creating the class directly from `require` statements. | ||
*/ | ||
@@ -74,5 +73,2 @@ static create(...args) { | ||
} | ||
// =================================== | ||
// Generic | ||
// This code is shared between Logger and Transform | ||
/** | ||
@@ -204,2 +200,5 @@ * Get the current configuration object for this instance. | ||
class Transform extends stream_1.Transform { | ||
// =================================== | ||
// Generic | ||
// This code is shared between Logger and Transform | ||
constructor(...args) { | ||
@@ -210,9 +209,5 @@ super(...args) | ||
} | ||
// =================================== | ||
// Generic Differences | ||
// This code is shared but different between Logger and Transform | ||
/** | ||
* Get the initial configuration option. | ||
* Use this to add default/initial configuration to your class. | ||
* @returns {Configuration} | ||
*/ | ||
@@ -228,5 +223,2 @@ getInitialConfig() { | ||
} | ||
// =================================== | ||
// Generic | ||
// This code is shared between Logger and Transform | ||
/** | ||
@@ -240,6 +232,7 @@ * Get the current configuration object for this instance. | ||
* Apply the specified configurations to this instance's configuration via deep merging. | ||
* @param configs | ||
* @example | ||
* ``` javascript | ||
* setConfig({a: 1}, {b: 2}) | ||
* getConfig() // {a: 1, b: 2} | ||
* ``` | ||
*/ | ||
@@ -246,0 +239,0 @@ setConfig(...configs) { |
# History | ||
## v5.1.1 2020 May 8 | ||
- Fix some types on the Transform class | ||
## v5.1.0 2020 May 8 | ||
@@ -4,0 +8,0 @@ |
{ | ||
"title": "Caterpillar", | ||
"name": "caterpillar", | ||
"version": "5.1.0", | ||
"version": "5.1.1-next.1588918805.1b57e48dd056074c146f04a5d3898aef026862a8", | ||
"description": "Caterpillar is the ultimate logging system for Node.js, based on transform streams you can log to it and pipe the output off to different locations, including some pre-made ones. Caterpillar also supports log levels according to the RFC standard, as well as line, method, and file fetching for messages. You can even use it in web browsers with caterpillar-browser.", | ||
@@ -6,0 +6,0 @@ "homepage": "https://github.com/bevry/caterpillar", |
@@ -54,3 +54,3 @@ <!-- TITLE/ --> | ||
<script type="module"> | ||
import * as pkg from '//cdn.pika.dev/caterpillar/^5.1.0' | ||
import * as pkg from '//cdn.pika.dev/caterpillar/^5.1.1' | ||
</script> | ||
@@ -63,3 +63,3 @@ ``` | ||
<script type="module"> | ||
import * as pkg from '//unpkg.com/caterpillar@^5.1.0' | ||
import * as pkg from '//unpkg.com/caterpillar@^5.1.1' | ||
</script> | ||
@@ -72,3 +72,3 @@ ``` | ||
<script type="module"> | ||
import * as pkg from '//dev.jspm.io/caterpillar@5.1.0' | ||
import * as pkg from '//dev.jspm.io/caterpillar@5.1.1' | ||
</script> | ||
@@ -75,0 +75,0 @@ ``` |
@@ -48,10 +48,2 @@ import { deep } from 'extendr' | ||
export class Logger extends PassThrough { | ||
constructor(...args: any) { | ||
super(...args) | ||
this._config = this.getInitialConfig() | ||
this.setConfig(...args) | ||
} | ||
protected _config: CaterpillarConfiguration | ||
// =================================== | ||
@@ -61,2 +53,4 @@ // Generic Differences | ||
protected _config: CaterpillarConfiguration | ||
/** | ||
@@ -78,5 +72,14 @@ * Get the initial configuration. | ||
// =================================== | ||
// Generic | ||
// This code is shared between Logger and Transform | ||
constructor(...args: any) { | ||
super(...args) | ||
this._config = this.getInitialConfig() | ||
this.setConfig(...args) | ||
} | ||
/** | ||
* Alternative way of creating an instance of the class without having to use the `new` keyword. | ||
* Useful when creating the class directly from `require` statements. | ||
*/ | ||
@@ -87,6 +90,2 @@ static create(...args: any) { | ||
// =================================== | ||
// Generic | ||
// This code is shared between Logger and Transform | ||
/** | ||
@@ -228,10 +227,2 @@ * Get the current configuration object for this instance. | ||
export class Transform extends _Transform { | ||
constructor(...args: any) { | ||
super(...args) | ||
this._config = this.getInitialConfig() | ||
this.setConfig(...args) | ||
} | ||
_config: Configuration | ||
// =================================== | ||
@@ -241,11 +232,22 @@ // Generic Differences | ||
protected _config: Configuration | ||
/** | ||
* Get the initial configuration option. | ||
* Use this to add default/initial configuration to your class. | ||
* @returns {Configuration} | ||
*/ | ||
getInitialConfig() { | ||
getInitialConfig(): Configuration { | ||
return {} | ||
} | ||
// =================================== | ||
// Generic | ||
// This code is shared between Logger and Transform | ||
constructor(...args: any) { | ||
super(...args) | ||
this._config = this.getInitialConfig() | ||
this.setConfig(...args) | ||
} | ||
/** | ||
@@ -258,6 +260,2 @@ * Alternative way of creating an instance of the class without having to use the `new` keyword. | ||
// =================================== | ||
// Generic | ||
// This code is shared between Logger and Transform | ||
/** | ||
@@ -272,6 +270,7 @@ * Get the current configuration object for this instance. | ||
* Apply the specified configurations to this instance's configuration via deep merging. | ||
* @param configs | ||
* @example | ||
* ``` javascript | ||
* setConfig({a: 1}, {b: 2}) | ||
* getConfig() // {a: 1, b: 2} | ||
* ``` | ||
*/ | ||
@@ -278,0 +277,0 @@ setConfig(...configs: Configuration[]) { |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
48669
856
1