Comparing version 1.3.0 to 1.3.1
@@ -6,3 +6,2 @@ var core = require('./core'); | ||
var nodeModulesPaths = require('./node-modules-paths.js'); | ||
var format = require('util').format; | ||
@@ -48,3 +47,3 @@ module.exports = function resolve(x, options, callback) { | ||
else { | ||
var moduleError = new Error(format("Cannot find module '%s' from '%s' with extension in %j", x, y, extensions)); | ||
var moduleError = new Error("Cannot find module '" + x + "' from '" + y + "'"); | ||
moduleError.code = 'MODULE_NOT_FOUND'; | ||
@@ -62,3 +61,3 @@ cb(moduleError); | ||
else { | ||
var moduleError = new Error(format("Cannot find module '%s' from '%s' with extension in %j", x, y, extensions)); | ||
var moduleError = new Error("Cannot find module '" + x + "' from '" + y + "'"); | ||
moduleError.code = 'MODULE_NOT_FOUND'; | ||
@@ -65,0 +64,0 @@ cb(moduleError); |
@@ -6,3 +6,2 @@ var core = require('./core'); | ||
var nodeModulesPaths = require('./node-modules-paths.js'); | ||
var format = require('util').format; | ||
@@ -39,3 +38,3 @@ module.exports = function (x, options) { | ||
var err = new Error(format("Cannot find module '%s' from '%s' with extension in %j", x, y, extensions)); | ||
var err = new Error("Cannot find module '" + x + "' from '" + y + "'"); | ||
err.code = 'MODULE_NOT_FOUND'; | ||
@@ -42,0 +41,0 @@ throw err; |
{ | ||
"name": "resolve", | ||
"description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"repository": { | ||
@@ -6,0 +6,0 @@ "type": "git", |
@@ -36,3 +36,3 @@ var path = require('path'); | ||
resolve('baz', opts('/foo/bar'), function (err, res) { | ||
t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "' with extension in [\".js\"]"); | ||
t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'"); | ||
t.equal(err.code, 'MODULE_NOT_FOUND'); | ||
@@ -42,3 +42,3 @@ }); | ||
resolve('../baz', opts('/foo/bar'), function (err, res) { | ||
t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "' with extension in [\".js\"]"); | ||
t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'"); | ||
t.equal(err.code, 'MODULE_NOT_FOUND'); | ||
@@ -80,3 +80,3 @@ }); | ||
resolve('baz', opts('/foo/bar'), function (err, res) { | ||
t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "' with extension in [\".js\"]"); | ||
t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'"); | ||
t.equal(err.code, 'MODULE_NOT_FOUND'); | ||
@@ -86,3 +86,3 @@ }); | ||
resolve('../baz', opts('/foo/bar'), function (err, res) { | ||
t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "' with extension in [\".js\"]"); | ||
t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'"); | ||
t.equal(err.code, 'MODULE_NOT_FOUND'); | ||
@@ -89,0 +89,0 @@ }); |
@@ -34,3 +34,3 @@ var path = require('path'); | ||
resolve('foo', { basedir: dir }, function (err) { | ||
t.equal(err.message, "Cannot find module 'foo' from '" + path.resolve(dir) + "' with extension in [\".js\"]"); | ||
t.equal(err.message, "Cannot find module 'foo' from '" + path.resolve(dir) + "'"); | ||
t.equal(err.code, 'MODULE_NOT_FOUND'); | ||
@@ -194,3 +194,3 @@ }); | ||
resolve('./cup', { basedir: dir, extensions: ['.js'] }, function (err, res) { | ||
t.equal(err.message, "Cannot find module './cup' from '" + path.resolve(dir) + "' with extension in [\".js\"]"); | ||
t.equal(err.message, "Cannot find module './cup' from '" + path.resolve(dir) + "'"); | ||
t.equal(err.code, 'MODULE_NOT_FOUND'); | ||
@@ -236,3 +236,3 @@ }); | ||
resolve('root', { basedir: dir }, function (err, res) { | ||
t.equal(err.message, "Cannot find module 'root' from '" + path.resolve(dir) + "' with extension in [\".js\"]"); | ||
t.equal(err.message, "Cannot find module 'root' from '" + path.resolve(dir) + "'"); | ||
t.equal(err.code, 'MODULE_NOT_FOUND'); | ||
@@ -242,3 +242,3 @@ }); | ||
resolve('zzz', { basedir: dir, paths: [otherDir] }, function (err, res) { | ||
t.equal(err.message, "Cannot find module 'zzz' from '" + path.resolve(dir) + "' with extension in [\".js\"]"); | ||
t.equal(err.message, "Cannot find module 'zzz' from '" + path.resolve(dir) + "'"); | ||
t.equal(err.code, 'MODULE_NOT_FOUND'); | ||
@@ -245,0 +245,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
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
56318
1288