Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tanstack/router-generator

Package Overview
Dependencies
Maintainers
2
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tanstack/router-generator - npm Package Compare versions

Comparing version 1.19.5 to 1.19.6

12

dist/esm/generator.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc