@jsenv/node-esm-resolution 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/main.js CHANGED
@@ -1,3 +1,5 @@
1
+ // tslint:disable:ordered-imports
2
+
1
3
  export { applyNodeEsmResolution } from "./src/node_esm_resolution.js";
2
4
  export { determineModuleSystem } from "./src/determine_module_system.js";
3
5
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/node-esm-resolution",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,6 +1,6 @@
1
1
  import { existsSync } from "node:fs";
2
2
 
3
- import { getParentUrl, asDirectoryUrl } from "./url_utils.js";
3
+ import { asDirectoryUrl, getParentUrl } from "./url_utils.js";
4
4
 
5
5
  export const defaultLookupPackageScope = (url) => {
6
6
  let scopeUrl = asDirectoryUrl(url);
@@ -1,6 +1,6 @@
1
1
  import { statSync } from "node:fs";
2
2
 
3
- import { urlToFilename, urlToExtension } from "./url_utils.js";
3
+ import { urlToExtension, urlToFilename } from "./url_utils.js";
4
4
 
5
5
  export const applyFileSystemMagicResolution = (
6
6
  fileUrl,
@@ -9,21 +9,21 @@
9
9
  * maintain symlink as facade url when it's outside project directory
10
10
  * or use the real path when inside
11
11
  */
12
- import { pathToFileURL } from "node:url";
13
12
  import { existsSync, readFileSync, realpathSync } from "node:fs";
13
+ import { pathToFileURL } from "node:url";
14
14
 
15
- import { isSpecifierForNodeBuiltin } from "./node_builtin_specifiers.js";
15
+ import { readCustomConditionsFromProcessArgs } from "./custom_conditions.js";
16
16
  import { defaultLookupPackageScope } from "./default_lookup_package_scope.js";
17
17
  import { defaultReadPackageJson } from "./default_read_package_json.js";
18
- import { getParentUrl, isValidUrl } from "./url_utils.js";
19
18
  import {
20
19
  createInvalidModuleSpecifierError,
20
+ createInvalidPackageTargetError,
21
21
  createModuleNotFoundError,
22
22
  createPackageImportNotDefinedError,
23
23
  createPackagePathNotExportedError,
24
- createInvalidPackageTargetError,
25
24
  } from "./errors.js";
26
- import { readCustomConditionsFromProcessArgs } from "./custom_conditions.js";
25
+ import { isSpecifierForNodeBuiltin } from "./node_builtin_specifiers.js";
26
+ import { getParentUrl, isValidUrl } from "./url_utils.js";
27
27
 
28
28
  export const applyNodeEsmResolution = ({
29
29
  specifier,
@@ -103,10 +103,6 @@ const applyPackageSpecifierResolution = (specifier, resolutionContext) => {
103
103
  return browserFieldResolution;
104
104
  }
105
105
  const packageResolution = applyPackageResolve(specifier, resolutionContext);
106
- const search = new URL(specifier, "file://").search;
107
- if (search) {
108
- packageResolution.url = `${packageResolution.url}${search}`;
109
- }
110
106
  return packageResolution;
111
107
  }
112
108
  };