Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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.0 to 0.4.1

test/resolver/incorrect_main/index.js

2

lib/async.js

@@ -91,2 +91,4 @@ var core = require('./core');

if (m) return cb(null, m, pkg);
if (!pkg) return loadAsFile(path.join(x, '/index'), pkg, cb);
var dir = path.resolve(x, pkg.main);

@@ -93,0 +95,0 @@ loadAsDirectory(dir, pkg, function (err, n, pkg) {

2

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

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

@@ -158,1 +158,14 @@ var test = require('tap').test;

});
test('incorrect main', function (t) {
var resolverDir = __dirname + '/resolver';
var dir = resolverDir + '/incorrect_main';
t.equal(
resolve.sync('./incorrect_main', { basedir : resolverDir }),
dir + '/index.js'
)
t.end()
});

@@ -207,1 +207,13 @@ var test = require('tap').test;

});
test('incorrect main', function (t) {
t.plan(1)
var resolverDir = __dirname + '/resolver';
var dir = resolverDir + '/incorrect_main';
resolve('./incorrect_main', { basedir : resolverDir }, function (err, res, pkg) {
if (err) t.fail(err);
t.equal(res, dir + '/index.js');
});
});
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