node-preload
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -5,2 +5,10 @@ # Changelog | ||
### [0.1.1](https://github.com/cfware/node-preload/compare/v0.1.0...v0.1.1) (2019-09-23) | ||
### Bug Fixes | ||
* Add `main` to package.json ([6b39401](https://github.com/cfware/node-preload/commit/6b39401)) | ||
* Handle situations where a preload might require node-preload. ([3b41164](https://github.com/cfware/node-preload/commit/3b41164)) | ||
## 0.1.0 (2019-09-23) | ||
@@ -7,0 +15,0 @@ |
@@ -125,5 +125,7 @@ 'use strict'; | ||
preloadList.forEach(file => { | ||
require(file); | ||
}); | ||
function executePreload() { | ||
preloadList.forEach(file => { | ||
require(file); | ||
}); | ||
} | ||
@@ -151,3 +153,4 @@ function unpatch() { | ||
}, | ||
unpatch | ||
unpatch, | ||
executePreload | ||
}; |
@@ -19,4 +19,5 @@ 'use strict'; | ||
const {unpatch} = module.exports; | ||
const {unpatch, executePreload} = module.exports; | ||
delete module.exports.unpatch; | ||
delete module.exports.executePreload; | ||
@@ -28,2 +29,6 @@ if (!global[singletonNodePreload]) { | ||
}); | ||
/* This is executed after setting the global singleton to deal with | ||
* situations where a preloaded module needs to `require('node-preload')` */ | ||
executePreload(); | ||
} | ||
@@ -30,0 +35,0 @@ |
{ | ||
"name": "node-preload", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Request that Node.js child processes preload modules", | ||
@@ -13,2 +13,3 @@ "scripts": { | ||
}, | ||
"main": "node-preload.js", | ||
"files": [ | ||
@@ -15,0 +16,0 @@ "node-preload*.js" |
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
10030
183