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.2 to 0.4.3

lib/caller.js

5

lib/async.js
var core = require('./core');
var fs = require('fs');
var path = require('path');
var caller = require('./caller.js');

@@ -24,5 +25,3 @@ module.exports = function resolve (x, opts, cb) {

var extensions = opts.extensions || [ '.js' ];
var y = opts.basedir
|| path.dirname(require.cache[__filename].parent.filename)
;
var y = opts.basedir || path.dirname(caller());

@@ -29,0 +28,0 @@ opts.paths = opts.paths || [];

var core = require('./core');
var fs = require('fs');
var path = require('path');
var caller = require('./caller.js');

@@ -17,5 +18,3 @@ module.exports = function (x, opts) {

var extensions = opts.extensions || [ '.js' ];
var y = opts.basedir
|| path.dirname(require.cache[__filename].parent.filename)
;
var y = opts.basedir || path.dirname(caller());

@@ -22,0 +21,0 @@ opts.paths = opts.paths || [];

2

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

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

@@ -255,1 +255,17 @@ var test = require('tap').test;

});
test('without basedir', function (t) {
t.plan(1);
var dir = __dirname + '/resolver/without_basedir';
var tester = require(dir + '/main.js');
tester(t, function (err, res, pkg){
if (err) {
t.fail(err);
} else {
t.equal(res, dir + '/node_modules/mymodule.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