enhanced-resolve
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -34,3 +34,2 @@ /* | ||
lastTime = currentTime; | ||
// console.log("request to " + pathname); | ||
fs.stat(pathname, function fsStatCallback(err, result) { | ||
@@ -37,0 +36,0 @@ cacheEntry.time = currentTime; |
@@ -200,4 +200,4 @@ /* | ||
var results = tries.slice(0); | ||
tries.forEach(function(test, idx) { | ||
performantStat(test, function(err, stat) { | ||
tries.forEach(function forEachTryFn(test, idx) { | ||
performantStat(test, function loadAsFileTryCallback(err, stat) { | ||
results[idx] = (err || !stat || !stat.isFile()) ? null : test; | ||
@@ -251,3 +251,3 @@ count--; | ||
var fastExit = false; | ||
loadAsFile(pathname, options, type, function(err, absoluteFilename) { | ||
loadAsFile(pathname, options, type, function loadAsFileOrDirectoryFileResultCallback(err, absoluteFilename) { | ||
if(err) | ||
@@ -261,3 +261,3 @@ error = err; | ||
}); | ||
loadAsDirectory(pathname, options, type, function(err, absoluteFilename) { | ||
loadAsDirectory(pathname, options, type, function loadAsFileOrDirectoryDirectoryResultCallback(err, absoluteFilename) { | ||
if(err) { | ||
@@ -264,0 +264,0 @@ if(!error) error = err; |
{ | ||
"name": "enhanced-resolve", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"author": "Tobias Koppers @sokra", | ||
@@ -5,0 +5,0 @@ "description": "Offers a async require.resolve function. It's highly configurable.", |
@@ -6,10 +6,10 @@ var resolve = require("../lib/resolve"); | ||
describe("simple", function() { | ||
it("should resolve itself", function(done) { | ||
var pathsToIt = [ | ||
[__dirname, "../lib/resolve"], | ||
[__dirname, "../"], | ||
[path.join(__dirname, "..", "..", ".."), "enhanced-require"], | ||
[path.join(__dirname, "..", "..", ".."), "enhanced-require/lib/resolve"] | ||
]; | ||
pathsToIt.forEach(function(pathToIt) { | ||
var pathsToIt = [ | ||
[__dirname, "../lib/resolve", "direct"], | ||
[__dirname, "../", "as directory"], | ||
[path.join(__dirname, "..", "..", ".."), "enhanced-resolve", "as module"], | ||
[path.join(__dirname, "..", "..", ".."), "enhanced-resolve/lib/resolve", "in module"] | ||
]; | ||
pathsToIt.forEach(function(pathToIt) { | ||
it("should resolve itself " + pathToIt[2], function(done) { | ||
resolve(pathToIt[0], pathToIt[1], function(err, filename) { | ||
@@ -20,2 +20,3 @@ if(err) throw err; | ||
filename.should.be.eql(path.join(__dirname, "..", "lib", "resolve.js")); | ||
done(); | ||
}); | ||
@@ -22,0 +23,0 @@ }); |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
17583
16
508
7