@tanstack/react-start 1.168.23 → 1.168.25

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/react-start",
3
- "version": "1.168.23",
3
+ "version": "1.168.25",
4
4
  "description": "Modern and scalable routing for React applications",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
@@ -155,14 +155,14 @@
155
155
  },
156
156
  "dependencies": {
157
157
  "pathe": "^2.0.3",
158
- "@tanstack/react-router": "1.170.14",
159
- "@tanstack/react-start-client": "1.168.11",
160
- "@tanstack/react-start-rsc": "0.1.22",
161
- "@tanstack/react-start-server": "1.167.17",
158
+ "@tanstack/react-router": "1.170.15",
159
+ "@tanstack/react-start-client": "1.168.13",
160
+ "@tanstack/react-start-rsc": "0.1.24",
161
+ "@tanstack/react-start-server": "1.167.19",
162
162
  "@tanstack/router-utils": "1.162.2",
163
- "@tanstack/start-client-core": "1.170.10",
164
- "@tanstack/start-plugin-core": "1.171.15",
165
- "@tanstack/start-server-core": "1.169.12"
163
+ "@tanstack/start-client-core": "1.170.12",
164
+ "@tanstack/start-plugin-core": "1.171.17",
165
+ "@tanstack/start-server-core": "1.169.14"
166
166
  },
167
167
  "peerDependencies": {
168
168
  "@rsbuild/core": "^2.0.0",
@@ -220,7 +220,7 @@ TanStack Start:
220
220
  import { createServerFn } from '@tanstack/react-start'
221
221
 
222
222
  export const createPost = createServerFn({ method: 'POST' })
223
- .inputValidator((data) => {
223
+ .validator((data) => {
224
224
  if (!(data instanceof FormData)) throw new Error('Expected FormData')
225
225
  return { title: data.get('title')?.toString() || '' }
226
226
  })
@@ -181,7 +181,7 @@ Use `useServerFn` to call server functions from React components with proper int
181
181
  import { createServerFn, useServerFn } from '@tanstack/react-start'
182
182
 
183
183
  const updatePost = createServerFn({ method: 'POST' })
184
- .inputValidator((data: { id: string; title: string }) => data)
184
+ .validator((data: { id: string; title: string }) => data)
185
185
  .handler(async ({ data }) => {
186
186
  await db.posts.update(data.id, { title: data.title })
187
187
  return { success: true }
@@ -46,7 +46,7 @@ Treat TanStack Start RSCs as fetchable React Flight payloads, not as a framework
46
46
  - Query-cached RSC values require `structuralSharing: false`.
47
47
  - Slot payloads are opaque on the server. Do not inspect, map, or clone `props.children`.
48
48
  - Render-prop and component-slot arguments must stay Flight-serializable.
49
- - Current server function validation API is `.inputValidator(...)`. Older snippets may still show `.validator(...)`; normalize them.
49
+ - Current server function validation API is `.validator(...)`. Older snippets may still show `.validator(...)`; normalize them.
50
50
  - TanStack custom serialization does not apply inside RSCs yet. Stay inside native Flight-supported values.
51
51
 
52
52
  ## Decide three things immediately
@@ -97,7 +97,7 @@ Treat TanStack Start RSCs as fetchable React Flight payloads, not as a framework
97
97
  - Are query options using `structuralSharing: false` for any RSC value?
98
98
  - Are mutations explicit `createServerFn({ method: 'POST' })` calls instead of hidden server actions?
99
99
  - Are server-only imports kept inside server functions or server-only boundaries?
100
- - Are examples using current names (`renderServerComponent`, `.inputValidator`) instead of stale ones?
100
+ - Are examples using current names (`renderServerComponent`, `.validator`) instead of stale ones?
101
101
 
102
102
  ## Debug fast
103
103
 
@@ -29,7 +29,7 @@ Use low-level APIs only for custom transport:
29
29
 
30
30
  ## Current validation API
31
31
 
32
- Use `.inputValidator(...)` on `createServerFn`.
32
+ Use `.validator(...)` on `createServerFn`.
33
33
 
34
34
  Important because some current RSC docs snippets still show the older `.validator(...)` spelling. Normalize those examples before copying them into real code.
35
35
 
@@ -48,7 +48,7 @@ You may still find older official repo examples using `renderRsc` and older conf
48
48
 
49
49
  ### Old validation snippets
50
50
 
51
- If you see `.validator(z.object(...))` in an RSC example, rewrite it to `.inputValidator(z.object(...))` to match the current server function API.
51
+ If you see `.validator(z.object(...))` in an RSC example, rewrite it to `.validator(z.object(...))` to match the current server function API.
52
52
 
53
53
  ### Old Vite config shapes
54
54
 
@@ -15,7 +15,7 @@ Checks:
15
15
 
16
16
  - inspect `vite.config.*`
17
17
  - inspect imports from `@tanstack/react-start/rsc`
18
- - normalize to `renderServerComponent`, `createCompositeComponent`, `CompositeComponent`, `.inputValidator(...)`
18
+ - normalize to `renderServerComponent`, `createCompositeComponent`, `CompositeComponent`, `.validator(...)`
19
19
 
20
20
  ### 2. Wrong environment failure
21
21
 
@@ -34,6 +34,6 @@ Validated on 2026-04-13.
34
34
  ## Notes on drift observed during validation
35
35
 
36
36
  - Current RSC docs and blog use `renderServerComponent`, `createCompositeComponent`, `CompositeComponent`, and low-level Flight APIs from `@tanstack/react-start/rsc`.
37
- - Current Server Functions docs use `.inputValidator(...)`.
37
+ - Current Server Functions docs use `.validator(...)`.
38
38
  - Some current RSC docs snippets still show older `.validator(...)`.
39
39
  - Older official repo examples may still show `renderRsc` and older config shapes. Prefer the current docs above.
@@ -32,7 +32,7 @@ declare const db: {
32
32
  }
33
33
 
34
34
  const getPostCard = createServerFn({ method: 'GET' })
35
- .inputValidator(z.object({ postId: z.string() }))
35
+ .validator(z.object({ postId: z.string() }))
36
36
  .handler(async ({ data }) => {
37
37
  const post = await db.posts.findById(data.postId)
38
38
 
@@ -93,7 +93,7 @@ function PostActions(props: { postId: string; authorId: string }) {
93
93
 
94
94
  // Component-prop slot variant
95
95
  const getProductCard = createServerFn({ method: 'GET' })
96
- .inputValidator(z.object({ productId: z.string() }))
96
+ .validator(z.object({ productId: z.string() }))
97
97
  .handler(async ({ data }) => {
98
98
  const product = await db.products.findById(data.productId)
99
99
 
@@ -27,7 +27,7 @@ declare const db: {
27
27
  }
28
28
 
29
29
  const getPostRsc = createServerFn({ method: 'GET' })
30
- .inputValidator(z.object({ postId: z.string() }))
30
+ .validator(z.object({ postId: z.string() }))
31
31
  .handler(async ({ data }) => {
32
32
  const post = await db.posts.findById(data.postId)
33
33
 
@@ -45,7 +45,7 @@ const getPostRsc = createServerFn({ method: 'GET' })
45
45
  })
46
46
 
47
47
  const updatePost = createServerFn({ method: 'POST' })
48
- .inputValidator(
48
+ .validator(
49
49
  z.object({
50
50
  postId: z.string(),
51
51
  title: z.string().optional(),
@@ -7,7 +7,7 @@ import { renderServerComponent } from '@tanstack/react-start/rsc'
7
7
  import { z } from 'zod'
8
8
 
9
9
  const getDrawingTools = createServerFn({ method: 'POST' })
10
- .inputValidator(z.object({ savedState: z.string().nullable() }))
10
+ .validator(z.object({ savedState: z.string().nullable() }))
11
11
  .handler(async ({ data }) => {
12
12
  const Tools = await renderServerComponent(
13
13
  <ToolPalette savedState={data.savedState} />,