Socket
Socket
Sign inDemoInstall

resolve

Package Overview
Dependencies
0
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.6.0 to 0.6.1

4

lib/async.js

@@ -36,3 +36,3 @@ var core = require('./core');

else if (d) cb(null, d, pkg)
else cb(new Error("Cannot find module '" + x + "'"))
else cb(new Error("Cannot find module '" + x + "' from '" + y + "'"))
})

@@ -45,3 +45,3 @@ });

else if (core[x]) return cb(null, x);
else cb(new Error("Cannot find module '" + x + "'"))
else cb(new Error("Cannot find module '" + x + "' from '" + y + "'"))
});

@@ -48,0 +48,0 @@

@@ -31,5 +31,5 @@ var core = require('./core');

if (core[x]) return x;
throw new Error("Cannot find module '" + x + "'");
throw new Error("Cannot find module '" + x + "' from '" + y + "'");
function loadAsFileSync (x) {

@@ -36,0 +36,0 @@ if (isFile(x)) {

{
"name" : "resolve",
"description" : "resolve like require.resolve() on behalf of files asynchronously and synchronously",
"version" : "0.6.0",
"version" : "0.6.1",
"repository" : {

@@ -6,0 +6,0 @@ "type" : "git",

@@ -36,7 +36,7 @@ var test = require('tap').test;

resolve('baz', opts('/foo/bar'), function (err, res) {
t.equal(err.message, "Cannot find module 'baz'");
t.equal(err.message, "Cannot find module 'baz' from '/foo/bar'");
});
resolve('../baz', opts('/foo/bar'), function (err, res) {
t.equal(err.message, "Cannot find module '../baz'");
t.equal(err.message, "Cannot find module '../baz' from '/foo/bar'");
});

@@ -78,7 +78,7 @@ });

resolve('baz', opts('/foo/bar'), function (err, res) {
t.equal(err.message, "Cannot find module 'baz'");
t.equal(err.message, "Cannot find module 'baz' from '/foo/bar'");
});
resolve('../baz', opts('/foo/bar'), function (err, res) {
t.equal(err.message, "Cannot find module '../baz'");
t.equal(err.message, "Cannot find module '../baz' from '/foo/bar'");
});

@@ -85,0 +85,0 @@ });

@@ -0,1 +1,2 @@

var path = require('path');
var test = require('tap').test;

@@ -33,3 +34,3 @@ var resolve = require('../');

resolve('foo', { basedir : dir }, function (err) {
t.equal(err.message, "Cannot find module 'foo'");
t.equal(err.message, "Cannot find module 'foo' from '" + path.resolve(dir) + "'");
});

@@ -194,3 +195,3 @@ });

function (err, res) {
t.equal(err.message, "Cannot find module './cup'");
t.equal(err.message, "Cannot find module './cup' from '" + path.resolve(dir) + "'");
});

@@ -238,7 +239,7 @@ });

resolve('root', { basedir : dir, }, function (err, res) {
t.equal(err.message, "Cannot find module 'root'");
t.equal(err.message, "Cannot find module 'root' from '" + path.resolve(dir) + "'");
});
resolve('zzz', { basedir : dir, paths: [otherDir] }, function (err, res) {
t.equal(err.message, "Cannot find module 'zzz'");
t.equal(err.message, "Cannot find module 'zzz' from '" + path.resolve(dir) + "'");
});

@@ -245,0 +246,0 @@ });

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