Socket
Socket
Sign inDemoInstall

resolve

Package Overview
Dependencies
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resolve - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

test/resolver/biz/node_modules/garply/lib/index.js

2

lib/async.js

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

(function load (exts) {
if (exts.length === 0) return cb(null, undefined);
if (exts.length === 0) return cb(null, undefined, pkg);
var file = x + exts[0];

@@ -57,0 +57,0 @@

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

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

@@ -78,3 +78,3 @@ var test = require('tap').test;

test('biz', function (t) {
t.plan(12);
t.plan(24);
var dir = __dirname + '/resolver/biz/node_modules';

@@ -94,2 +94,14 @@

resolve('./garply', { basedir : dir }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, dir + '/garply/lib/index.js');
t.equal(pkg.main, './lib');
});
resolve('./garply', { basedir : dir, package: { main: 'biz' } }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, dir + '/garply/lib/index.js');
t.equal(pkg.main, './lib');
});
resolve('tiv', { basedir : dir + '/grux' }, function (err, res, pkg) {

@@ -107,2 +119,14 @@ if (err) t.fail(err);

resolve('tiv', { basedir : dir + '/garply' }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, dir + '/tiv/index.js');
t.equal(pkg, undefined);
});
resolve('tiv', { basedir : dir + '/garply', package: { main: './lib' } }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, dir + '/tiv/index.js');
t.equal(pkg, undefined);
});
resolve('grux', { basedir : dir + '/tiv' }, function (err, res, pkg) {

@@ -119,2 +143,14 @@ if (err) t.fail(err);

});
resolve('garply', { basedir : dir + '/tiv' }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, dir + '/garply/lib/index.js');
t.equal(pkg.main, './lib');
});
resolve('garply', { basedir : dir + '/tiv', package: { main: 'tiv' } }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, dir + '/garply/lib/index.js');
t.equal(pkg.main, './lib');
});
});

@@ -121,0 +157,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