@vorplex/compiler 0.0.60 → 0.0.63

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.
@@ -40,8 +40,10 @@ export class Bundler {
40
40
  const importPath = relative ? $Path.join(importerPath, `../${args.path}`) : args.path;
41
41
  importParent[importPath] ??= importerPath;
42
42
  let importStack = [];
43
+ const visited = new Set();
43
44
  let parentPath = importerPath;
44
- while (parentPath) {
45
+ while (parentPath && !visited.has(parentPath)) {
46
+ visited.add(parentPath);
45
47
  importStack.push(parentPath);
46
48
  parentPath = importParent[importPathAlias[parentPath]] ?? importParent[parentPath];
47
49
  }
@@ -110,6 +110,7 @@ export class NPM {
110
110
  return Array.from(script.matchAll(/import\s+[\s\S]*?\s+from\s+['"]([^'"]+)['"]|require\(['"]([^'"]+)['"]\)/g)).map((match) => match[1] ?? match[2]);
111
111
  }
112
112
  static parseImportString(string) {
113
+ string = string.replace(/\/$/, '');
113
114
  const match = string.match(/^(?<packageName>(?:@[\w.-]+\/[\w.-]+|[\w.-]+))(?:\/(?<subpath>.+?))?(?:\/?@(?<version>\d+(?:\.\d+)*(?:-[\w.]+)?(?:\+[\w.]+)?))?$/);
114
115
  if (!match)
115
116
  throw new Error(`Invalid import string (${string})`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vorplex/compiler",
3
- "version": "0.0.60",
3
+ "version": "0.0.63",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "files": [
@@ -15,11 +15,11 @@
15
15
  "types": "./dist/index.d.ts",
16
16
  "main": "./dist/index.js",
17
17
  "dependencies": {
18
- "@vorplex/core": "0.0.60",
18
+ "@vorplex/core": "0.0.63",
19
19
  "esbuild-wasm": "0.25.12",
20
20
  "tslib": "2.8.1",
21
- "typescript": "5.9.3",
22
21
  "semver": "7.7.3",
22
+ "typescript": "5.9.3",
23
23
  "yaml": "2.8.2"
24
24
  },
25
25
  "devDependencies": {