@tanstack/router-generator
Advanced tools
Comparing version 1.19.5 to 1.19.6
@@ -231,3 +231,3 @@ import path from "path"; | ||
const cleanedPathIsEmpty = (node.cleanedPath || "").length === 0; | ||
node.isVirtualParentRequired = node.isLayout ? !cleanedPathIsEmpty && !node.parent : false; | ||
node.isVirtualParentRequired = node.isLayout ? !cleanedPathIsEmpty : false; | ||
if (!node.isVirtual && node.isVirtualParentRequired) { | ||
@@ -278,4 +278,4 @@ const parentRoutePath = removeLastSegmentFromPath(node.routePath) || "/"; | ||
} | ||
async function buildRouteConfig(nodes, depth = 1) { | ||
const children = nodes.map(async (node) => { | ||
function buildRouteConfig(nodes, depth = 1) { | ||
const children = nodes.map((node) => { | ||
var _a, _b; | ||
@@ -290,3 +290,3 @@ if (node.isRoot) { | ||
if ((_b = node.children) == null ? void 0 : _b.length) { | ||
const childConfigs = await buildRouteConfig(node.children, depth + 1); | ||
const childConfigs = buildRouteConfig(node.children, depth + 1); | ||
return `${route}.addChildren([${spaces(depth * 4)}${childConfigs}])`; | ||
@@ -296,5 +296,5 @@ } | ||
}); | ||
return (await Promise.all(children)).filter(Boolean).join(`,`); | ||
return children.filter(Boolean).join(`,`); | ||
} | ||
const routeConfigChildrenText = await buildRouteConfig(routeTree); | ||
const routeConfigChildrenText = buildRouteConfig(routeTree); | ||
const sortedRouteNodes = multiSortBy(routeNodes, [ | ||
@@ -301,0 +301,0 @@ (d) => { |
{ | ||
"name": "@tanstack/router-generator", | ||
"version": "1.19.5", | ||
"version": "1.19.6", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "author": "Tanner Linsley", |
@@ -341,7 +341,3 @@ import path from 'path' | ||
const cleanedPathIsEmpty = (node.cleanedPath || '').length === 0 | ||
node.isVirtualParentRequired = node.isLayout | ||
? !cleanedPathIsEmpty && !node.parent | ||
: false | ||
node.isVirtualParentRequired = node.isLayout ? !cleanedPathIsEmpty : false | ||
if (!node.isVirtual && node.isVirtualParentRequired) { | ||
@@ -404,7 +400,4 @@ const parentRoutePath = removeLastSegmentFromPath(node.routePath) || '/' | ||
async function buildRouteConfig( | ||
nodes: RouteNode[], | ||
depth = 1, | ||
): Promise<string> { | ||
const children = nodes.map(async (node) => { | ||
function buildRouteConfig(nodes: RouteNode[], depth = 1): string { | ||
const children = nodes.map((node) => { | ||
if (node.isRoot) { | ||
@@ -421,3 +414,3 @@ return | ||
if (node.children?.length) { | ||
const childConfigs = await buildRouteConfig(node.children, depth + 1) | ||
const childConfigs = buildRouteConfig(node.children, depth + 1) | ||
return `${route}.addChildren([${spaces(depth * 4)}${childConfigs}])` | ||
@@ -429,6 +422,6 @@ } | ||
return (await Promise.all(children)).filter(Boolean).join(`,`) | ||
return children.filter(Boolean).join(`,`) | ||
} | ||
const routeConfigChildrenText = await buildRouteConfig(routeTree) | ||
const routeConfigChildrenText = buildRouteConfig(routeTree) | ||
@@ -435,0 +428,0 @@ const sortedRouteNodes = multiSortBy(routeNodes, [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
164833
2131