Comparing version 4.3.0 to 4.4.0
@@ -66,3 +66,5 @@ var path = require('path'); // if module is locally defined we path.resolve it | ||
current.children.forEach(function (child) { | ||
if (!visited[child.id]) { | ||
// ignore .node files, decachine native modules throws a | ||
// "module did not self-register" error on second require | ||
if (path.extname(child.filename) !== '.node' && !visited[child.id]) { | ||
run(child); | ||
@@ -69,0 +71,0 @@ } |
{ | ||
"name": "decache", | ||
"version": "4.3.0", | ||
"version": "4.4.0", | ||
"description": "decache (Delete Cache) lets you delete modules from node.js require() cache; useful when testing your modules/projects.", | ||
@@ -34,2 +34,3 @@ "main": "decache.js", | ||
"istanbul": "^0.4.4", | ||
"modern-syslog": "~1.1.4", | ||
"pre-commit": "^1.1.3", | ||
@@ -36,0 +37,0 @@ "tap-spec": "^4.1.1", |
@@ -58,2 +58,5 @@ # decache | ||
Note that native modules with the `.node` extension are ignored from decaching because | ||
they behave unexpectedly when decached. | ||
If you have any questions or need more examples, please create a GitHub issue: | ||
@@ -60,0 +63,0 @@ https://github.com/nelsonic/decache/issues |
@@ -77,1 +77,10 @@ // awesome tests here! | ||
}); | ||
test('.node extensions are ignored', function(t) { | ||
require('modern-syslog'); | ||
decache('modern-syslog'); | ||
t.doesNotThrow(function() { | ||
require('modern-syslog'); | ||
}); | ||
t.end(); | ||
}); |
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
9911
171
65
5