@evjs/manifest 0.0.22 → 0.0.24

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/esm/index.js +8 -2
  2. package/package.json +1 -1
package/esm/index.js CHANGED
@@ -41,16 +41,22 @@ export function resolveRoutes(routes) {
41
41
  * Walk up the parent chain to build the full path prefix for a route.
42
42
  * Returns the full resolved path of the given route variable.
43
43
  */
44
- function resolveParentPath(route) {
44
+ function resolveParentPath(route, visited = new Set()) {
45
45
  if (!route.parentName)
46
46
  return route.path;
47
+ // Guard against circular parent references
48
+ if (route.varName) {
49
+ if (visited.has(route.varName))
50
+ return route.path;
51
+ visited.add(route.varName);
52
+ }
47
53
  const parent = byName.get(route.parentName);
48
54
  if (!parent) {
49
55
  // Parent not in the extracted set (e.g. rootRoute from createRootRoute)
50
56
  // — treat as top-level, no prefix.
51
57
  return route.path;
52
58
  }
53
- const parentPath = resolveParentPath(parent);
59
+ const parentPath = resolveParentPath(parent, visited);
54
60
  return joinPaths(parentPath, route.path);
55
61
  }
56
62
  const seen = new Set();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evjs/manifest",
3
- "version": "0.0.22",
3
+ "version": "0.0.24",
4
4
  "description": "Shared manifest types for the ev framework",
5
5
  "type": "module",
6
6
  "publishConfig": {