Socket
Socket
Sign inDemoInstall

eslint-import-resolver-node

Package Overview
Dependencies
Maintainers
3
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-import-resolver-node - npm Package Compare versions

Comparing version 0.3.7 to 0.3.8

17

index.js
'use strict';
const resolve = require('resolve');
const resolve = require('resolve/sync');
const isCoreModule = require('is-core-module');

@@ -22,3 +22,3 @@ const path = require('path');

const cachedFilter = function (pkg, dir) { return packageFilter(pkg, dir, config); };
resolvedPath = resolve.sync(source, opts(file, config, cachedFilter));
resolvedPath = resolve(source, opts(file, config, cachedFilter));
log('Resolved to:', resolvedPath);

@@ -33,13 +33,10 @@ return { found: true, path: resolvedPath };

function opts(file, config, packageFilter) {
return Object.assign({
// more closely matches Node (#333)
return { // more closely matches Node (#333)
// plus 'mjs' for native modules! (#939)
extensions: ['.mjs', '.js', '.json', '.node'],
},
config,
{
...config,
// path.resolve will handle paths relative to CWD
basedir: path.dirname(path.resolve(file)),
packageFilter,
});
};
}

@@ -54,3 +51,3 @@

try {
resolve.sync(String(pkg.module).replace(/^(?:\.\/)?/, './'), opts(file, config, identity));
resolve(String(pkg.module).replace(/^(?:\.\/)?/, './'), opts(file, config, identity));
pkg.main = pkg.module;

@@ -64,3 +61,3 @@ found = true;

try {
resolve.sync(String(pkg['jsnext:main']).replace(/^(?:\.\/)?/, './'), opts(file, config, identity));
resolve(String(pkg['jsnext:main']).replace(/^(?:\.\/)?/, './'), opts(file, config, identity));
pkg.main = pkg['jsnext:main'];

@@ -67,0 +64,0 @@ found = true;

{
"name": "eslint-import-resolver-node",
"version": "0.3.7",
"version": "0.3.8",
"description": "Node default behavior import resolution plugin for eslint-plugin-import.",

@@ -33,4 +33,4 @@ "main": "index.js",

"debug": "^3.2.7",
"is-core-module": "^2.11.0",
"resolve": "^1.22.1"
"is-core-module": "^2.13.0",
"resolve": "^1.22.4"
},

@@ -37,0 +37,0 @@ "devDependencies": {

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