@jsenv/node-esm-resolution
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -0,1 +1,3 @@ | ||
// tslint:disable:ordered-imports | ||
export { applyNodeEsmResolution } from "./src/node_esm_resolution.js"; | ||
@@ -2,0 +4,0 @@ export { determineModuleSystem } from "./src/determine_module_system.js"; |
{ | ||
"name": "@jsenv/node-esm-resolution", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": { |
import { existsSync } from "node:fs"; | ||
import { getParentUrl, asDirectoryUrl } from "./url_utils.js"; | ||
import { asDirectoryUrl, getParentUrl } from "./url_utils.js"; | ||
@@ -5,0 +5,0 @@ export const defaultLookupPackageScope = (url) => { |
import { statSync } from "node:fs"; | ||
import { urlToFilename, urlToExtension } from "./url_utils.js"; | ||
import { urlToExtension, urlToFilename } from "./url_utils.js"; | ||
@@ -5,0 +5,0 @@ export const applyFileSystemMagicResolution = ( |
@@ -12,17 +12,17 @@ /* | ||
*/ | ||
import { existsSync, readFileSync, realpathSync } from "node:fs"; | ||
import { pathToFileURL } from "node:url"; | ||
import { existsSync, readFileSync, realpathSync } from "node:fs"; | ||
import { isSpecifierForNodeBuiltin } from "./node_builtin_specifiers.js"; | ||
import { readCustomConditionsFromProcessArgs } from "./custom_conditions.js"; | ||
import { defaultLookupPackageScope } from "./default_lookup_package_scope.js"; | ||
import { defaultReadPackageJson } from "./default_read_package_json.js"; | ||
import { getParentUrl, isValidUrl } from "./url_utils.js"; | ||
import { | ||
createInvalidModuleSpecifierError, | ||
createInvalidPackageTargetError, | ||
createModuleNotFoundError, | ||
createPackageImportNotDefinedError, | ||
createPackagePathNotExportedError, | ||
createInvalidPackageTargetError, | ||
} from "./errors.js"; | ||
import { readCustomConditionsFromProcessArgs } from "./custom_conditions.js"; | ||
import { isSpecifierForNodeBuiltin } from "./node_builtin_specifiers.js"; | ||
import { getParentUrl, isValidUrl } from "./url_utils.js"; | ||
@@ -107,6 +107,2 @@ export const applyNodeEsmResolution = ({ | ||
const packageResolution = applyPackageResolve(specifier, resolutionContext); | ||
const search = new URL(specifier, "file://").search; | ||
if (search) { | ||
packageResolution.url = `${packageResolution.url}${search}`; | ||
} | ||
return packageResolution; | ||
@@ -113,0 +109,0 @@ } |
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
33971
1135