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.2.1 to 0.2.2

16

index.js

@@ -56,3 +56,3 @@ var fs = require('fs');

function loadAsDirectorySync (x) {
var pkgfile = x + '/package.json';
var pkgfile = path.join(x, '/package.json');
if (isFile(pkgfile)) {

@@ -74,3 +74,3 @@ var body = readFileSync(pkgfile, 'utf8');

return loadAsFileSync(x + '/index');
return loadAsFileSync(path.join( x, '/index'));
}

@@ -82,5 +82,5 @@

var dir = dirs[i];
var m = loadAsFileSync(dir + '/' + x);
var m = loadAsFileSync(path.join( dir, '/', x));
if (m) return m;
var n = loadAsDirectorySync(dir + '/' + x);
var n = loadAsDirectorySync(path.join( dir, '/', x ));
if (n) return n;

@@ -97,3 +97,9 @@ }

if (parts[i] === 'node_modules') continue;
var dir = parts.slice(0, i + 1).join('/') + '/node_modules';
var dir = path.join(
path.join.apply(path, parts.slice(0, i + 1)),
'node_modules'
);
if (!parts[0].match(/([A-Za-z]:)/)) {
dir = '/' + dir;
}
dirs.push(dir);

@@ -100,0 +106,0 @@ }

{
"name" : "resolve",
"description" : "A more hookable require.resolve() implementation",
"version" : "0.2.1",
"version" : "0.2.2",
"repository" : {

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

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