From bd617e3c737fbf0aa0d0ff791c7d80eb74c3a9c6 Mon Sep 17 00:00:00 2001 From: Lorenzo Corallo <66379281+lorenzocorallo@users.noreply.github.com> Date: Sat, 8 Jul 2023 06:22:31 +0200 Subject: [PATCH 1/3] docs: fix code error in route-paths.md (#623) --- docs/guide/route-paths.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/guide/route-paths.md b/docs/guide/route-paths.md index 9474927897..dcbbb5e4fb 100644 --- a/docs/guide/route-paths.md +++ b/docs/guide/route-paths.md @@ -95,7 +95,9 @@ const userRoute = new Route({ path: '$userId', }) -const routeConfig = rootRoute.addChildren([userBaseRoute]) +const routeConfig = rootRoute.addChildren([ + usersRoute.addChildren([userRoute]) +]) ``` Dynamic segments can be accessed via the `params` object using the label you provided as the property key. For example, a path of `/users/$userId` would produce a `userId` param of `123` for the path `/users/123/details`: From 1cfe90f4011004ff74b2653e462b290f2f27e6ae Mon Sep 17 00:00:00 2001 From: Lorenzo Corallo <66379281+lorenzocorallo@users.noreply.github.com> Date: Sat, 8 Jul 2023 06:24:32 +0200 Subject: [PATCH 2/3] fix: merge testRoute declarations into a single one (#624) --- packages/router/__tests__/createRoutes.test.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/router/__tests__/createRoutes.test.ts b/packages/router/__tests__/createRoutes.test.ts index da74622dba..65b783533d 100644 --- a/packages/router/__tests__/createRoutes.test.ts +++ b/packages/router/__tests__/createRoutes.test.ts @@ -30,6 +30,7 @@ describe('everything', () => { }) const testRoute = new Route({ getParentRoute: () => rootRoute, + component: lazy(() => import('./TestComponent'), 'NamedComponent'), path: 'test', validateSearch: (search) => z @@ -144,12 +145,6 @@ describe('everything', () => { component: () => 'layout-b', }) - const testRoute = new Route({ - getParentRout: () => rootRoute, - path: 'testPath', - component: lazy(() => import('./TestComponent'), 'NamedComponent'), - }) - const routeTree = rootRoute.addChildren([ indexRoute, testRoute, @@ -159,8 +154,7 @@ describe('everything', () => { usersRoute.addChildren([userRoute]), ]), authenticatedRoute.addChildren([authenticatedIndexRoute]), - layoutRoute.addChildren([layoutARoute, layoutBRoute]), - testRoute, + layoutRoute.addChildren([layoutARoute, layoutBRoute]) ]) type MyRoutesInfo = RoutesInfo From 67d8e4451a3437affe5372b7ce72355375fa3ccf Mon Sep 17 00:00:00 2001 From: Tanner Linsley Date: Sat, 8 Jul 2023 04:26:02 +0000 Subject: [PATCH 3/3] release: v0.0.1-beta.93 --- examples/react/basic-ssr-streaming/package.json | 4 ++-- examples/react/basic-ssr-with-html/package.json | 4 ++-- examples/react/basic-ssr/package.json | 4 ++-- examples/react/basic/package.json | 4 ++-- examples/react/kitchen-sink-multi-file/package.json | 4 ++-- examples/react/kitchen-sink-single-file/package.json | 4 ++-- examples/react/quickstart/package.json | 4 ++-- examples/react/start-basic/package.json | 4 ++-- examples/react/start-kitchen-sink-single-file/package.json | 4 ++-- examples/react/with-react-query/package.json | 4 ++-- examples/react/with-trpc-react-query/package.json | 4 ++-- examples/react/with-trpc/package.json | 4 ++-- packages/router-devtools/package.json | 2 +- packages/router/package.json | 2 +- 14 files changed, 26 insertions(+), 26 deletions(-) diff --git a/examples/react/basic-ssr-streaming/package.json b/examples/react/basic-ssr-streaming/package.json index fd95356ee0..69bc79a267 100644 --- a/examples/react/basic-ssr-streaming/package.json +++ b/examples/react/basic-ssr-streaming/package.json @@ -13,8 +13,8 @@ }, "dependencies": { "@tanstack/react-loaders": "0.0.1-beta.90", - "@tanstack/router": "0.0.1-beta.92", - "@tanstack/router-devtools": "0.0.1-beta.92", + "@tanstack/router": "0.0.1-beta.93", + "@tanstack/router-devtools": "0.0.1-beta.93", "@tanstack/router-cli": "0.0.1-beta.69", "axios": "^1.1.3", "react": "^18.2.0", diff --git a/examples/react/basic-ssr-with-html/package.json b/examples/react/basic-ssr-with-html/package.json index 5ceaddeebc..8312b0f176 100644 --- a/examples/react/basic-ssr-with-html/package.json +++ b/examples/react/basic-ssr-with-html/package.json @@ -13,8 +13,8 @@ }, "dependencies": { "@tanstack/react-loaders": "0.0.1-beta.90", - "@tanstack/router": "0.0.1-beta.92", - "@tanstack/router-devtools": "0.0.1-beta.92", + "@tanstack/router": "0.0.1-beta.93", + "@tanstack/router-devtools": "0.0.1-beta.93", "@tanstack/router-cli": "0.0.1-beta.69", "axios": "^1.1.3", "react": "^18.2.0", diff --git a/examples/react/basic-ssr/package.json b/examples/react/basic-ssr/package.json index 9b0f60669a..4c6e77b465 100644 --- a/examples/react/basic-ssr/package.json +++ b/examples/react/basic-ssr/package.json @@ -13,8 +13,8 @@ }, "dependencies": { "@tanstack/react-loaders": "0.0.1-beta.90", - "@tanstack/router": "0.0.1-beta.92", - "@tanstack/router-devtools": "0.0.1-beta.92", + "@tanstack/router": "0.0.1-beta.93", + "@tanstack/router-devtools": "0.0.1-beta.93", "@tanstack/router-cli": "0.0.1-beta.69", "axios": "^1.1.3", "react": "^18.2.0", diff --git a/examples/react/basic/package.json b/examples/react/basic/package.json index df04401f26..a97e21da36 100644 --- a/examples/react/basic/package.json +++ b/examples/react/basic/package.json @@ -9,10 +9,10 @@ "start": "vite" }, "dependencies": { - "@tanstack/router": "0.0.1-beta.92", + "@tanstack/router": "0.0.1-beta.93", "@tanstack/react-actions": "0.0.1-beta.90", "@tanstack/react-loaders": "0.0.1-beta.90", - "@tanstack/router-devtools": "0.0.1-beta.92", + "@tanstack/router-devtools": "0.0.1-beta.93", "@vitejs/plugin-react": "^1.1.3", "axios": "^1.1.3", "immer": "^9.0.15", diff --git a/examples/react/kitchen-sink-multi-file/package.json b/examples/react/kitchen-sink-multi-file/package.json index 0aeed6bfba..23f9da74c3 100644 --- a/examples/react/kitchen-sink-multi-file/package.json +++ b/examples/react/kitchen-sink-multi-file/package.json @@ -9,10 +9,10 @@ "start": "vite" }, "dependencies": { - "@tanstack/router": "0.0.1-beta.92", + "@tanstack/router": "0.0.1-beta.93", "@tanstack/react-loaders": "0.0.1-beta.90", "@tanstack/react-actions": "0.0.1-beta.90", - "@tanstack/router-devtools": "0.0.1-beta.92", + "@tanstack/router-devtools": "0.0.1-beta.93", "@vitejs/plugin-react": "^1.1.3", "axios": "^1.1.3", "immer": "^9.0.15", diff --git a/examples/react/kitchen-sink-single-file/package.json b/examples/react/kitchen-sink-single-file/package.json index f91e1530b3..c26370f29b 100644 --- a/examples/react/kitchen-sink-single-file/package.json +++ b/examples/react/kitchen-sink-single-file/package.json @@ -11,8 +11,8 @@ "dependencies": { "@tanstack/react-loaders": "0.0.1-beta.90", "@tanstack/react-actions": "0.0.1-beta.90", - "@tanstack/router": "0.0.1-beta.92", - "@tanstack/router-devtools": "0.0.1-beta.92", + "@tanstack/router": "0.0.1-beta.93", + "@tanstack/router-devtools": "0.0.1-beta.93", "@vitejs/plugin-react": "^1.1.3", "axios": "^1.1.3", "immer": "^9.0.15", diff --git a/examples/react/quickstart/package.json b/examples/react/quickstart/package.json index 0fc18dc6d6..47e4ddf7e2 100644 --- a/examples/react/quickstart/package.json +++ b/examples/react/quickstart/package.json @@ -9,8 +9,8 @@ "start": "vite" }, "dependencies": { - "@tanstack/router": "0.0.1-beta.92", - "@tanstack/router-devtools": "0.0.1-beta.92", + "@tanstack/router": "0.0.1-beta.93", + "@tanstack/router-devtools": "0.0.1-beta.93", "@vitejs/plugin-react": "^1.1.3", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/examples/react/start-basic/package.json b/examples/react/start-basic/package.json index d6e6b46c36..e334cb3cd6 100644 --- a/examples/react/start-basic/package.json +++ b/examples/react/start-basic/package.json @@ -17,8 +17,8 @@ "@tanstack/bling": "^0.4.0", "@tanstack/react-loaders": "0.0.1-beta.90", "@tanstack/react-start": "0.0.1-beta.83", - "@tanstack/router": "0.0.1-beta.92", - "@tanstack/router-devtools": "0.0.1-beta.92", + "@tanstack/router": "0.0.1-beta.93", + "@tanstack/router-devtools": "0.0.1-beta.93", "@vitejs/plugin-react": "^3.1.0", "astro": "^2.0.16", "concurrently": "^7.6.0", diff --git a/examples/react/start-kitchen-sink-single-file/package.json b/examples/react/start-kitchen-sink-single-file/package.json index 43c336f64c..5c832a9a3f 100644 --- a/examples/react/start-kitchen-sink-single-file/package.json +++ b/examples/react/start-kitchen-sink-single-file/package.json @@ -11,8 +11,8 @@ "dependencies": { "@tanstack/react-loaders": "0.0.1-beta.90", "@tanstack/react-actions": "0.0.1-beta.90", - "@tanstack/router": "0.0.1-beta.92", - "@tanstack/router-devtools": "0.0.1-beta.92", + "@tanstack/router": "0.0.1-beta.93", + "@tanstack/router-devtools": "0.0.1-beta.93", "@vitejs/plugin-react": "^1.1.3", "axios": "^1.1.3", "immer": "^9.0.15", diff --git a/examples/react/with-react-query/package.json b/examples/react/with-react-query/package.json index b64c450892..e7fcbc5aec 100644 --- a/examples/react/with-react-query/package.json +++ b/examples/react/with-react-query/package.json @@ -11,8 +11,8 @@ "dependencies": { "@tanstack/react-query": "^4.14.1", "@tanstack/react-query-devtools": "^4.14.1", - "@tanstack/router": "0.0.1-beta.92", - "@tanstack/router-devtools": "0.0.1-beta.92", + "@tanstack/router": "0.0.1-beta.93", + "@tanstack/router-devtools": "0.0.1-beta.93", "@vitejs/plugin-react": "^1.1.3", "axios": "^1.1.3", "immer": "^9.0.15", diff --git a/examples/react/with-trpc-react-query/package.json b/examples/react/with-trpc-react-query/package.json index 3cc389146e..1776693727 100644 --- a/examples/react/with-trpc-react-query/package.json +++ b/examples/react/with-trpc-react-query/package.json @@ -13,8 +13,8 @@ "dependencies": { "@tanstack/react-query": "^4.14.1", "@tanstack/react-query-devtools": "^4.14.1", - "@tanstack/router": "0.0.1-beta.92", - "@tanstack/router-devtools": "0.0.1-beta.92", + "@tanstack/router": "0.0.1-beta.93", + "@tanstack/router-devtools": "0.0.1-beta.93", "@trpc/client": "^10.0.0-rc.6", "@trpc/react-query": "^10.0.0-rc.6", "@trpc/server": "^10.0.0-rc.6", diff --git a/examples/react/with-trpc/package.json b/examples/react/with-trpc/package.json index ff6db49afc..b8b0b15097 100644 --- a/examples/react/with-trpc/package.json +++ b/examples/react/with-trpc/package.json @@ -14,8 +14,8 @@ "@tanstack/react-loaders": "0.0.1-beta.90", "@tanstack/react-query": "^4.14.1", "@tanstack/react-query-devtools": "^4.14.1", - "@tanstack/router": "0.0.1-beta.92", - "@tanstack/router-devtools": "0.0.1-beta.92", + "@tanstack/router": "0.0.1-beta.93", + "@tanstack/router-devtools": "0.0.1-beta.93", "@trpc/client": "^10.0.0-rc.6", "@trpc/react-query": "^10.0.0-rc.6", "@trpc/server": "^10.0.0-rc.6", diff --git a/packages/router-devtools/package.json b/packages/router-devtools/package.json index 04eb5a8bff..5052baddbc 100644 --- a/packages/router-devtools/package.json +++ b/packages/router-devtools/package.json @@ -1,7 +1,7 @@ { "name": "@tanstack/router-devtools", "author": "Tanner Linsley", - "version": "0.0.1-beta.92", + "version": "0.0.1-beta.93", "license": "MIT", "repository": "tanstack/router", "homepage": "https://tanstack.com/router/", diff --git a/packages/router/package.json b/packages/router/package.json index 8f19c85d23..31502f9540 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,7 +1,7 @@ { "name": "@tanstack/router", "author": "Tanner Linsley", - "version": "0.0.1-beta.92", + "version": "0.0.1-beta.93", "license": "MIT", "repository": "tanstack/router", "homepage": "https://tanstack.com/router",