Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

include-all

Package Overview
Dependencies
Maintainers
3
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

include-all - npm Package Compare versions

Comparing version 1.0.8 to 2.0.0

24

lib/help-include-all-sync.js

@@ -262,7 +262,25 @@ /**

// If `force: true` was set, wipe out the previous contents from
// this spot in the require cache before proceeding.
// If `force: true` was set, remove the module from the require()
// cache, along with any modules that the module `required()`
if (options.force) {
var resolved = require.resolve(filepath);
if (require.cache[resolved]) { delete require.cache[resolved]; }
// First, see if the item is actually cached.
if (require.cache[resolved]) {
// If so, add it to a stack of modules to remove.
var modulesToRemove = [require.cache[resolved]];
// While there are items in the stack...
while (modulesToRemove.length) {
// Pop a module off the stack.
var moduleToRemove = modulesToRemove.pop();
// Add its children to the stack.
var children = (require.cache[moduleToRemove.id] && require.cache[moduleToRemove.id].children) || [];
// Don't clear compiled node modules from the cache.
children = _.reject(children, function(child) {
return child.id.match(/\.node$/);
});
modulesToRemove = modulesToRemove.concat(children);
// Delete the module from the cache.
delete require.cache[moduleToRemove.id];
}
}
}

@@ -269,0 +287,0 @@

2

package.json
{
"name": "include-all",
"version": "1.0.8",
"version": "2.0.0",
"description": "An easy way to include all node.js modules within a directory.",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc