Socket
Socket
Sign inDemoInstall

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 0.2.0 to 0.2.1

test/fixtures/a.js

1

lib/performantStat.js

@@ -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 @@ });

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