Socket
Socket
Sign inDemoInstall

enhanced-resolve

Package Overview
Dependencies
0
Maintainers
1
Versions
129
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.4.8 to 0.4.9

0

lib/cachedFsResolve.js

@@ -0,0 +0,0 @@ var resolveFactory = require("./resolve");

@@ -0,0 +0,0 @@ /*

@@ -0,0 +0,0 @@ /*

25

lib/resolve.js

@@ -184,3 +184,3 @@ /*

var postprocessor = postprocessors.shift();
if(typeof postprocessor == "string") postprocessor = require(postprocessor);
if(typeof postprocessor == "string") postprocessor = require.valueOf()(postprocessor);
postprocessor(result, next);

@@ -353,2 +353,3 @@ })(null, intermediateResult);

// insert position is at the end, we offer to complete the slash
// TODO check for module is directory
if(item.insert == "" && part.path.slice(-1) == "*") {

@@ -429,3 +430,6 @@ result.push({

// to the user, as starting is handled as finished
resolve(context, parse.part(starting), options, type === "loader" ? "loader-context" : "context", sync, function(err, resolvedStarting) {
var parsedStarting = parse.part(starting);
if(parsedStarting && parsedStarting.path) resolve(context, parsedStarting, options, type === "loader" ? "loader-context" : "context", sync, onResolved);
else onResolved(null, {path:"/"});
function onResolved(err, resolvedStarting) {
if(err) return callback(err);

@@ -440,3 +444,12 @@

var extensions = type === "loader" ? options.loaderExtensions : options.extensions;
if(/^(\.\.\/)+\*$/.test(part.path) && parsedStarting && parsedStarting.path && parsedStarting.path != "/") {
results.push({
insert: "../",
seqment: "../",
part: "../" + part.path.slice(0, part.path.length-1) + (part.query ? part.query : "")
});
}
// get possible shortcuts for all files "a.js" -> ["a", "a.js"]

@@ -493,3 +506,3 @@ var seqments = cutExtensions(files, extensions);

});
});
}
}

@@ -528,2 +541,6 @@

Object.keys(options.alias).forEach(testModule);
var prefixes = type === "loader" ? options.loaderPostfixes : options.postfixes;
var extensions = type === "loader" ? options.loaderExtensions : options.extensions;
var both = prefixes.slice();
extensions.forEach(function(i) { both.push(i) });
var count = paths.length;

@@ -535,3 +552,3 @@ paths.forEach(function(path) {

(sync?readdirSync:readdirAsync)(path, function(err, files) {
files = cutExtensions(files, type === "loader" ? options.loaderPostfixes : options.postfixes);
files = cutExtensions(files, both);
files.forEach(testModule);

@@ -538,0 +555,0 @@ endOne();

@@ -0,0 +0,0 @@ /*

2

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

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

@@ -0,0 +0,0 @@ # enhanced-resolve

@@ -0,0 +0,0 @@ /*

@@ -0,0 +0,0 @@ var resolve = require("../");

module.exports = function a() {
return "This is a";
};
module.exports = function b() {
return "This is b";
};

@@ -0,0 +0,0 @@ module.exports = function b() {

@@ -0,0 +0,0 @@ var complex1 = require("./lib/complex1");

@@ -0,0 +0,0 @@ var a = require("./a");

@@ -0,0 +0,0 @@ var a = require("./a");

@@ -0,0 +0,0 @@ var a = require("./a");

module.exports = function a() {
return "This is m1/a";
};
module.exports = function a() {
return "This is m1/b";
};
module.exports = function() {
"module.exports = 'This is m2-loader/b';";
}
module.exports = "This is m2/b";

@@ -0,0 +0,0 @@ function AsyncFileSystem(fs) {

@@ -0,0 +0,0 @@ var ConstFileSystem = require("./ConstFileSystem");

@@ -0,0 +0,0 @@ function CachedFileSystem(fs) {

@@ -7,2 +7,3 @@ function ConstFileSystem(content) {

ConstFileSystem.prototype.get = function(path) {
if(path == "/") return this.content;
var seqments = path.split(/[\/\\]/g);

@@ -9,0 +10,0 @@ if(seqments[0] != "") throw new Error("path is not absolute");

@@ -0,0 +0,0 @@ var resolveFactory = require("../../lib/resolve");

@@ -0,0 +0,0 @@ function DebugFileSystem(fs) {

@@ -0,0 +0,0 @@ function LoggedFileSystem(fs) {

@@ -0,0 +0,0 @@ exports.simple = {

@@ -0,0 +0,0 @@ /*

@@ -0,0 +0,0 @@ /*

@@ -0,0 +0,0 @@ var resolve = require("../");

@@ -0,0 +0,0 @@ /*

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc