Comparing version 2.0.0 to 2.0.1
@@ -5,2 +5,6 @@ # Change Log | ||
## [2.0.1](https://github.com/jsless/hable/compare/v2.0.0...v2.0.1) (2019-08-21) | ||
# [2.0.0](https://github.com/jsless/hable/compare/v1.0.1...v2.0.0) (2019-08-21) | ||
@@ -7,0 +11,0 @@ |
@@ -5,3 +5,3 @@ const { serial, flatHooks } = require('./utils') | ||
constructor (logger = console) { | ||
this.logger = logger | ||
this._logger = logger | ||
this._hooks = {} | ||
@@ -20,3 +20,3 @@ this._deprecatedHooks = {} | ||
if (this._deprecatedHooks[name]) { | ||
this.logger.warn(`${name} hook has been deprecated, please use ${this._deprecatedHooks[name]}`) | ||
this._logger.warn(`${name} hook has been deprecated, please use ${this._deprecatedHooks[name]}`) | ||
name = this._deprecatedHooks[name] | ||
@@ -47,4 +47,6 @@ } | ||
} catch (err) { | ||
name !== 'error' && await this.callHook('error', err) | ||
this.logger.error(err) | ||
if (name !== 'error') { | ||
await this.callHook('error', err) | ||
} | ||
this._logger.error(err) | ||
} | ||
@@ -51,0 +53,0 @@ } |
{ | ||
"name": "hable", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Awaitable hooks for Node.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
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
8795
66