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

enhanced-resolve

Package Overview
Dependencies
Maintainers
1
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 3.0.0 to 3.0.1

6

lib/CachedInputFileSystem.js

@@ -61,3 +61,5 @@ /*

if(data) {
return callback.apply(null, data);
return process.nextTick(function() {
callback.apply(null, data);
});
}

@@ -85,3 +87,3 @@ }

} catch(e) {
this.finishedSync(null, e);
this.finishedSync(name, e);
throw e;

@@ -88,0 +90,0 @@ }

@@ -16,20 +16,29 @@ /*

module.exports = function getPaths(path) {
var parts = path.split(/(.*?[\\\/]+)/);
var paths = [path];
var pathSeqments = [];
var addr = [path];
var pathSeqment = popPathSeqment(addr);
while(pathSeqment) {
pathSeqments.push(pathSeqment);
paths.push(addr[0]);
pathSeqment = popPathSeqment(addr);
var seqments = [parts[parts.length - 1]];
var part = parts[parts.length - 1];
path = path.substr(0, path.length - part.length - 1);
paths.push(path)
for(var i = parts.length - 2; i > 2; i-=2) {
var part = parts[i];
path = path.substr(0, path.length - part.length) || "/";
paths.push(path);
seqments.push(part.substr(0, part.length - 1));
}
pathSeqments.push(paths[paths.length - 1]);
part = parts[1];
seqments.push(part.length > 1 ? part.substr(0, part.length - 1) : part);
return {
paths: paths,
seqments: pathSeqments
};
};
seqments: seqments
}
}
module.exports.basename = function basename(path) {
return popPathSeqment([path]);
var i = path.lastIndexOf("/"),
j = path.lastIndexOf("\\");
var p = i < 0 ? j : j < 0 ? i : i < j ? j : i;
if(p < 0) return null;
var s = path.substr(p + 1);
return s;
}
{
"name": "enhanced-resolve",
"version": "3.0.0",
"version": "3.0.1",
"author": "Tobias Koppers @sokra",

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

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