@reliverse/pathkit 1.1.9 → 1.1.10
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/bin/mod.js +2 -2
- package/package.json +1 -1
package/bin/mod.js
CHANGED
|
@@ -579,8 +579,8 @@ async function convertImportsExt({
|
|
|
579
579
|
const fromExtStr = extFrom === "none" ? "" : `.${extFrom}`;
|
|
580
580
|
const toExtStr = extTo === "none" ? "" : `.${extTo}`;
|
|
581
581
|
const importRegex = new RegExp(
|
|
582
|
-
`(?:import\\s+(?:[\\s\\S]*?)\\s+from\\s+|import\\s*\\(\\s
|
|
583
|
-
"
|
|
582
|
+
`(?:^|;|\\n)\\s*(?:import\\s+(?:[\\s\\S]*?)\\s+from\\s+|import\\s*\\(\\s*|export\\s+\\*\\s+from\\s+)\\s*(['"])([^'"]+${fromExtStr.replace(".", "\\.")})(\\1)`,
|
|
583
|
+
"gm"
|
|
584
584
|
);
|
|
585
585
|
function shouldSkipPath(path2) {
|
|
586
586
|
if (path2.startsWith("node:") || path2.startsWith("bun:") || path2.startsWith("npm:") || path2.startsWith("jsr:") || path2.startsWith("node_modules"))
|