@jsenv/eslint-import-resolver
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "@jsenv/eslint-import-resolver", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -14,4 +14,3 @@ // https://github.com/benmosher/eslint-plugin-import/blob/master/resolvers/node/index.js | ||
import { createLogger } from "./logger.js" | ||
import { isSpecifierForNodeBuiltin } from "../../node-esm-resolution/src/node_builtin_specifiers.js" | ||
import { isSpecifierForNodeBuiltin } from "@jsenv/node-esm-resolution/src/node_builtin_specifiers.js" | ||
import { | ||
@@ -21,4 +20,4 @@ determineModuleSystem, | ||
applyFileSystemMagicResolution, | ||
} from "../../node-esm-resolution/main.js" | ||
} from "@jsenv/node-esm-resolution/main.js" | ||
import { createLogger } from "./logger.js" | ||
import { applyImportmapResolution } from "./importmap_resolution.js" | ||
@@ -54,2 +53,4 @@ import { applyUrlResolution } from "./url_resolution.js" | ||
${urlToFileSystemPath(rootDirectoryUrl)}`) | ||
const browserInPackageConditions = packageConditions.includes("browser") | ||
const nodeInPackageConditions = packageConditions.includes("node") | ||
@@ -86,2 +87,10 @@ if (nodeInPackageConditions && isSpecifierForNodeBuiltin(source)) { | ||
try { | ||
if ( | ||
browserInPackageConditions && | ||
!nodeInPackageConditions && | ||
specifier[0] === "/" | ||
) { | ||
return onUrl(new URL(specifier, rootDirectoryUrl).href) | ||
} | ||
// data:*, http://*, https://*, file://* | ||
@@ -88,0 +97,0 @@ if (isAbsoluteUrl(specifier)) { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68952
2527