Comparing version 2.1.1 to 2.1.2
@@ -5,2 +5,7 @@ # Changelog | ||
## [2.1.2][] - 2021-04-07 | ||
- Stop module only if module folder removed, not just `stop.js` file | ||
- Update metawatch to fix bug: load created directory after delete | ||
## [2.1.1][] - 2021-03-30 | ||
@@ -131,3 +136,4 @@ | ||
[unreleased]: https://github.com/metarhia/impress/compare/v2.1.1...HEAD | ||
[unreleased]: https://github.com/metarhia/impress/compare/v2.1.2...HEAD | ||
[2.1.2]: https://github.com/metarhia/impress/compare/v2.1.1...v2.1.2 | ||
[2.1.1]: https://github.com/metarhia/impress/compare/v2.1.0...v2.1.1 | ||
@@ -134,0 +140,0 @@ [2.1.0]: https://github.com/metarhia/impress/compare/v2.0.14...v2.1.0 |
@@ -22,2 +22,10 @@ 'use strict'; | ||
stop(name, method) { | ||
const timeout = this.application.config.server.timeouts.watch; | ||
setTimeout(() => { | ||
if (this.tree[name] !== undefined) return; | ||
this.application.execute(method); | ||
}, timeout); | ||
} | ||
set(relPath, exports, iface) { | ||
@@ -30,9 +38,5 @@ const names = parsePath(relPath); | ||
let next = level[name]; | ||
if (next && depth === 1 && name === 'stop') { | ||
if (exports === null && level.stop) { | ||
this.application.exacute(level.stop); | ||
} | ||
} | ||
if (depth === last) { | ||
if (exports === null) { | ||
if (name === 'stop') this.stop(names[0], level.stop); | ||
delete level[name]; | ||
@@ -39,0 +43,0 @@ return; |
{ | ||
"name": "impress", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"author": "Timur Shemsedinov <timur.shemsedinov@gmail.com>", | ||
@@ -75,3 +75,3 @@ "description": "Enterprise application server for Node.js", | ||
"metavm": "^1.0.0", | ||
"metawatch": "^1.0.2" | ||
"metawatch": "^1.0.3" | ||
}, | ||
@@ -84,3 +84,2 @@ "devDependencies": { | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-impress": "^2.3.1", | ||
"eslint-plugin-prettier": "^3.3.1", | ||
@@ -87,0 +86,0 @@ "metatests": "^0.7.2", |
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
44040
9
924
Updatedmetawatch@^1.0.3