node-hot-loader
Advanced tools
Comparing version 1.8.1 to 1.8.2
@@ -0,1 +1,8 @@ | ||
<a name="1.8.2"></a> | ||
## <small>1.8.2 (2018-04-27)</small> | ||
* Add comments ([0ff1623](https://github.com/vlazh/node-hot-loader/commit/0ff1623)) | ||
<a name="1.8.1"></a> | ||
@@ -2,0 +9,0 @@ ## <small>1.8.1 (2018-04-27)</small> |
@@ -84,3 +84,3 @@ 'use strict'; | ||
ignoreDeclined: true, | ||
ignoreErrored: true, | ||
ignoreErrored: true, // true allows to restore state after errors. | ||
onUnaccepted: info => { | ||
@@ -94,3 +94,4 @@ this.logger.warn(`Ignored an update to unaccepted module ${info.chain.join(' -> ')}`); | ||
this.logger.warn(`Ignored an error while updating module ${info.moduleId} (${info.type})`); | ||
// If throw error then module.hot.status() always equals 'apply' and module.hot.check() will not work. | ||
// If ignoreErrored is true and throw info.error then module.hot.status() always | ||
// equals 'apply' and module.hot.check() will not work. | ||
this.logger.error(info.error); | ||
@@ -108,4 +109,4 @@ } | ||
if (['abort', 'fail'].indexOf(status) >= 0) { | ||
this.logger.warn('Cannot check for update. Need to do restart server!'); | ||
this.logger.warn(err.stack || err.message); | ||
this.logger.error('Cannot check for update. Need to do restart server!'); | ||
this.logger.error(err.stack || err.message); | ||
} else { | ||
@@ -112,0 +113,0 @@ this.logger.error(`Update check failed: ${err.stack}` || err.message); |
{ | ||
"name": "node-hot-loader", | ||
"version": "1.8.1", | ||
"version": "1.8.2", | ||
"description": "Hot module replacement for Node.js applications", | ||
@@ -5,0 +5,0 @@ "main": "./lib/node-hot.js", |
41085
498