@bleedingdev/modern-js-utils 3.9.0-ultramodern.11 → 3.9.0-ultramodern.12
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/esm/cli/require.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFile } from "node:fs/promises";
|
|
2
2
|
import { isAbsolute } from "node:path";
|
|
3
|
-
import { pathToFileURL } from "node:url";
|
|
3
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
4
4
|
import { moduleResolve } from "import-meta-resolve";
|
|
5
5
|
import { findExists } from "./fs.mjs";
|
|
6
6
|
async function importPath(path) {
|
|
@@ -69,7 +69,7 @@ const tryResolveESM = (name, ...resolvePath)=>{
|
|
|
69
69
|
'default'
|
|
70
70
|
]);
|
|
71
71
|
for (const p of resolvePath)try {
|
|
72
|
-
return moduleResolve(name, pathToFileURL(`${p}/`), conditions, false)
|
|
72
|
+
return fileURLToPath(moduleResolve(name, pathToFileURL(`${p}/`), conditions, false));
|
|
73
73
|
} catch (err) {}
|
|
74
74
|
const err = new Error(`Can not find module ${name}.`);
|
|
75
75
|
err.code = 'MODULE_NOT_FOUND';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "node:module";
|
|
2
2
|
import { readFile } from "node:fs/promises";
|
|
3
3
|
import { isAbsolute } from "node:path";
|
|
4
|
-
import { pathToFileURL } from "node:url";
|
|
4
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
5
5
|
import { moduleResolve } from "import-meta-resolve";
|
|
6
6
|
import { findExists } from "./fs.mjs";
|
|
7
7
|
async function importPath(path) {
|
|
@@ -70,7 +70,7 @@ const tryResolveESM = (name, ...resolvePath)=>{
|
|
|
70
70
|
'default'
|
|
71
71
|
]);
|
|
72
72
|
for (const p of resolvePath)try {
|
|
73
|
-
return moduleResolve(name, pathToFileURL(`${p}/`), conditions, false)
|
|
73
|
+
return fileURLToPath(moduleResolve(name, pathToFileURL(`${p}/`), conditions, false));
|
|
74
74
|
} catch (err) {}
|
|
75
75
|
const err = new Error(`Can not find module ${name}.`);
|
|
76
76
|
err.code = 'MODULE_NOT_FOUND';
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"modern",
|
|
18
18
|
"modern.js"
|
|
19
19
|
],
|
|
20
|
-
"version": "3.9.0-ultramodern.
|
|
20
|
+
"version": "3.9.0-ultramodern.12",
|
|
21
21
|
"types": "./dist/types/index.d.ts",
|
|
22
22
|
"main": "./dist/cjs/index.js",
|
|
23
23
|
"module": "./dist/esm/index.mjs",
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
"rslog": "^2.3.0"
|
|
188
188
|
},
|
|
189
189
|
"devDependencies": {
|
|
190
|
-
"@modern-js/types": "npm:@bleedingdev/modern-js-types@3.9.0-ultramodern.
|
|
190
|
+
"@modern-js/types": "npm:@bleedingdev/modern-js-types@3.9.0-ultramodern.12",
|
|
191
191
|
"@rslib/core": "1.0.0",
|
|
192
192
|
"@scripts/rstest-config": "2.66.0",
|
|
193
193
|
"@types/node": "^26.4.1",
|