Comparing version 0.7.1 to 0.7.2
@@ -28,4 +28,6 @@ var core = require('./core'); | ||
if (x.match(/^(?:\.\.?\/|\/|([A-Za-z]:)?\\)/)) { | ||
loadAsFile(path.resolve(y, x), function (err, m, pkg) { | ||
if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?\\)/.test(x)) { | ||
var res = path.resolve(y, x); | ||
if (x === '..') res += '/'; | ||
loadAsFile(res, function (err, m, pkg) { | ||
if (err) cb(err) | ||
@@ -32,0 +34,0 @@ else if (m) cb(null, m, pkg) |
@@ -21,5 +21,6 @@ var core = require('./core'); | ||
if (x.match(/^(?:\.\.?\/|\/|([A-Za-z]:)?\\)/)) { | ||
var m = loadAsFileSync(path.resolve(y, x)) | ||
|| loadAsDirectorySync(path.resolve(y, x)); | ||
if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?\\)/.test(x)) { | ||
var res = path.resolve(y, x); | ||
if (x === '..') res += '/'; | ||
var m = loadAsFileSync(res) || loadAsDirectorySync(res); | ||
if (m) return m; | ||
@@ -26,0 +27,0 @@ } else { |
{ | ||
"name" : "resolve", | ||
"description" : "resolve like require.resolve() on behalf of files asynchronously and synchronously", | ||
"version" : "0.7.1", | ||
"version" : "0.7.2", | ||
"repository" : { | ||
@@ -6,0 +6,0 @@ "type" : "git", |
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
38588
54
1019