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

@jsenv/eslint-import-resolver

Package Overview
Dependencies
Maintainers
2
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jsenv/eslint-import-resolver - npm Package Compare versions

Comparing version 4.6.0 to 4.7.0

dist/commonjs/main.js

21

package.json
{
"name": "@jsenv/eslint-import-resolver",
"version": "4.6.0",
"version": "4.7.0",
"license": "MIT",

@@ -12,3 +12,3 @@ "repository": {

},
"main": "dist/index.js",
"main": "dist/commonjs/index.js",
"module": "index.js",

@@ -21,3 +21,3 @@ "files": [

"dependencies": {
"@jsenv/module-resolution": "2.4.0",
"@jsenv/module-resolution": "3.0.0",
"@dmail/helper": "2.2.0"

@@ -27,4 +27,4 @@ },

"@babel/core": "7.2.0",
"@jsenv/codecov-upload": "1.2.0",
"@jsenv/core": "5.29.0",
"@jsenv/core": "5.65.0",
"@jsenv/node-launcher": "1.0.0",
"@jsenv/eslint-config": "8.0.0",

@@ -34,3 +34,4 @@ "@jsenv/eslint-import-resolver": "4.5.0",

"@jsenv/prettier-check-project": "1.10.0",
"@jsenv/node-module-import-map": "1.2.0",
"@jsenv/node-module-import-map": "1.5.0",
"@jsenv/codecov-upload": "1.6.0",
"@dmail/assert": "3.4.0",

@@ -47,8 +48,8 @@ "babel-eslint": "11.0.0-beta.0",

"test": "node ./script/test/test.js",
"eslint-check-project": "eslint .",
"prettier-check-project": "node ./script/prettier-check-project/prettier-check-project.js",
"eslint-check": "eslint .",
"prettier-check": "node ./script/prettier-check/prettier-check.js",
"generate-coverage": "node ./script/generate-coverage/generate-coverage.js",
"upload-coverage": "node ./script/upload-coverage/upload-coverage.js",
"bundle-node": "node ./script/bundle-node/bundle-node.js",
"dist": "npm run clean && npm run bundle-node",
"generate-commonjs-bundle": "node ./script/generate-commonjs-bundle/generate-commonjs-bundle.js",
"dist": "npm run clean && npm run generate-commonjs-bundle",
"clean": "rimraf dist && rimraf coverage",

@@ -55,0 +56,0 @@ "reinstall": "npm run clean && rimraf node_modules && npm install",

@@ -7,4 +7,3 @@ // https://github.com/benmosher/eslint-plugin-import/blob/master/resolvers/node/index.js

import {
resolveImport,
remapResolvedImport,
resolvePath,
hrefToPathname,

@@ -34,2 +33,3 @@ hrefToOrigin,

logLevel = LOG_LEVEL_OFF,
defaultExtension,
},

@@ -73,8 +73,2 @@ ) => {

const resolvedImport = resolveImport({
importer: importerHref,
specifier: source,
})
log(`-> located at ${resolvedImport}`)
let fileImportMap

@@ -95,15 +89,14 @@ if (importMapRelativePath) {

const remappedImport = remapResolvedImport({
const resolvedPath = resolvePath({
importer: importerHref,
specifier: source,
importMap: mergeImportMap(importMap, fileImportMap),
importerHref,
resolvedImport,
defaultExtension,
})
log(`-> located at ${resolvedPath}`)
const remappedOrigin = hrefToOrigin(remappedImport)
const resolvedOrigin = hrefToOrigin(resolvedPath)
if (remappedOrigin === origin) {
const filename = pathnameToFilename(`${projectPathname}${hrefToPathname(remappedImport)}`)
if (remappedImport !== resolvedImport) {
log(`-> remapped to ${filename}`)
}
if (resolvedOrigin === origin) {
const filename = pathnameToFilename(`${projectPathname}${hrefToPathname(resolvedPath)}`)
log(`-> search file at ${filename}`)

@@ -125,6 +118,3 @@

if (remappedImport !== resolvedImport) {
log(`-> remapped to ${remappedImport}`)
}
const scheme = hrefToScheme(remappedImport)
const scheme = hrefToScheme(resolvedPath)

@@ -145,3 +135,3 @@ if (scheme === "https" || scheme === "http") {

found: false,
path: remappedImport,
path: resolvedPath,
}

@@ -148,0 +138,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