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

enhanced-resolve

Package Overview
Dependencies
Maintainers
4
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enhanced-resolve - npm Package Compare versions

Comparing version 4.3.0 to 4.4.0

12

lib/ResolverFactory.js

@@ -85,2 +85,5 @@ /*

// Ignore errors happening when resolving roots
const ignoreRootsErrors = options.ignoreRootsErrors || false;
const restrictions = options.restrictions || [];

@@ -226,3 +229,10 @@

roots.forEach(root => {
plugins.push(new RootPlugin("after-described-resolve", root, "relative"));
plugins.push(
new RootPlugin(
"after-described-resolve",
root,
"relative",
ignoreRootsErrors
)
);
});

@@ -229,0 +239,0 @@ plugins.push(new JoinRequestPlugin("after-described-resolve", "relative"));

@@ -16,7 +16,9 @@ /*

* @param {string | ResolveStepHook} target target hook
* @param {boolean=} ignoreErrors ignore error during resolving of root paths
*/
constructor(source, root, target) {
constructor(source, root, target, ignoreErrors) {
this.root = root;
this.source = source;
this.target = target;
this._ignoreErrors = ignoreErrors;
}

@@ -48,3 +50,16 @@

resolveContext,
callback
this._ignoreErrors
? (err, result) => {
if (err) {
if (resolveContext.log) {
resolveContext.log(
`Ignored fatal error while resolving root path:\n${err}`
);
}
return callback();
}
if (result) return callback(null, result);
callback();
}
: callback
);

@@ -51,0 +66,0 @@ });

2

package.json
{
"name": "enhanced-resolve",
"version": "4.3.0",
"version": "4.4.0",
"author": "Tobias Koppers @sokra",

@@ -5,0 +5,0 @@ "description": "Offers a async require.resolve function. It's highly configurable.",

@@ -62,2 +62,4 @@ # enhanced-resolve

| modules | ["node_modules"] | A list of directories to resolve modules from, can be absolute path or folder name |
| roots | [] | A list of directories to resolve request starting with `/` from |
| ignoreRootsErrors | false | Ignore fatal errors happening during handling of `roots` (allows to add `roots` without a breaking change) |
| unsafeCache | false | Use this cache object to unsafely cache the successful requests |

@@ -64,0 +66,0 @@ | plugins | [] | A list of additional resolve plugins which should be applied |

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