@esmx/import 3.0.0-rc.38 → 3.0.0-rc.40
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/dist/import-vm.mjs +2 -2
- package/package.json +3 -3
- package/src/import-vm.ts +2 -2
package/dist/import-vm.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import { isBuiltin } from "node:module";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
5
5
|
import vm from "node:vm";
|
|
6
6
|
import IM from "@import-maps/resolve";
|
|
7
7
|
import { CircularDependencyError, FileReadError } from "./error.mjs";
|
|
@@ -36,7 +36,7 @@ export function createVmImport(baseURL, importMap = {}) {
|
|
|
36
36
|
} else {
|
|
37
37
|
filename = import.meta.resolve(specifier, parent);
|
|
38
38
|
}
|
|
39
|
-
const url =
|
|
39
|
+
const url = pathToFileURL(filename);
|
|
40
40
|
const pathname = fileURLToPath(url);
|
|
41
41
|
return {
|
|
42
42
|
filename,
|
package/package.json
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@biomejs/biome": "1.9.4",
|
|
36
|
-
"@esmx/lint": "3.0.0-rc.
|
|
36
|
+
"@esmx/lint": "3.0.0-rc.40",
|
|
37
37
|
"@types/node": "^24.0.0",
|
|
38
38
|
"@vitest/coverage-v8": "3.2.4",
|
|
39
39
|
"stylelint": "16.21.0",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"unbuild": "3.5.0",
|
|
42
42
|
"vitest": "3.2.4"
|
|
43
43
|
},
|
|
44
|
-
"version": "3.0.0-rc.
|
|
44
|
+
"version": "3.0.0-rc.40",
|
|
45
45
|
"type": "module",
|
|
46
46
|
"private": false,
|
|
47
47
|
"exports": {
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"template",
|
|
61
61
|
"public"
|
|
62
62
|
],
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "30d447ebc32dabc2e8fe35727ab05c074a0f0b54"
|
|
64
64
|
}
|
package/src/import-vm.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
2
|
import { isBuiltin } from 'node:module';
|
|
3
3
|
import path from 'node:path';
|
|
4
|
-
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
5
5
|
import vm from 'node:vm';
|
|
6
6
|
import IM from '@import-maps/resolve';
|
|
7
7
|
import { CircularDependencyError, FileReadError } from './error';
|
|
@@ -40,7 +40,7 @@ export function createVmImport(baseURL: URL, importMap: ImportMap = {}) {
|
|
|
40
40
|
} else {
|
|
41
41
|
filename = import.meta.resolve(specifier, parent);
|
|
42
42
|
}
|
|
43
|
-
const url =
|
|
43
|
+
const url = pathToFileURL(filename);
|
|
44
44
|
const pathname = fileURLToPath(url);
|
|
45
45
|
return {
|
|
46
46
|
filename,
|