@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.
Files changed (2) hide show
  1. package/bin/mod.js +2 -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*)\\s*(['"])([^'"]+${fromExtStr.replace(".", "\\.")})(\\1)`,
583
- "g"
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"))
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "license": "MIT",
6
6
  "name": "@reliverse/pathkit",
7
7
  "type": "module",
8
- "version": "1.1.9",
8
+ "version": "1.1.10",
9
9
  "devDependencies": {},
10
10
  "exports": {
11
11
  ".": "./bin/mod.js"