Skip to content

Commit 8b5accb

Browse files
schiller-manueltannerlinsleyXiNiHaSeanCassiereMoeedDar
authored
feat: Merge alpha to main (#4365)
Co-authored-by: Tanner Linsley <[email protected]> Co-authored-by: Tanner Linsley <[email protected]> Co-authored-by: Iha Shin (์‹ ์˜ํ•˜) <[email protected]> Co-authored-by: Sean Cassiere <[email protected]> Co-authored-by: MoeedDar <[email protected]> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Saลกa ล ijak <[email protected]> Co-authored-by: Christopher Horobin <[email protected]> Co-authored-by: Ryan Gillie <[email protected]> Co-authored-by: Jaga Santagostino <[email protected]> Co-authored-by: Birk Skyum <[email protected]> Co-authored-by: Yeoh Joer <[email protected]> Co-authored-by: Dane Grant <[email protected]> Co-authored-by: Birk Skyum <[email protected]> Co-authored-by: Luis Merino <[email protected]> Co-authored-by: ThaumRystra <[email protected]> Co-authored-by: Adam Hunter <[email protected]> Co-authored-by: Leonardo Montini <[email protected]> Co-authored-by: Joel Tannas <[email protected]> Co-authored-by: scarf <[email protected]> Co-authored-by: Lenz Weber-Tronic <[email protected]> Co-authored-by: Iรฑaki Larramendi <[email protected]> Co-authored-by: Hiแปƒn ฤร o Vinh <[email protected]> Co-authored-by: Lleyton W Morris <[email protected]> Co-authored-by: Lleyton Morris <[email protected]> Co-authored-by: Matthew Struble <[email protected]> Co-authored-by: Matt Anderson <[email protected]> Co-authored-by: Chung <[email protected]> Co-authored-by: Maxx Coffee <[email protected]> Co-authored-by: Joshua Coffee <[email protected]> Co-authored-by: Jack Herrington <[email protected]> Co-authored-by: Neeraj Dalal <[email protected]> Co-authored-by: Thomas Marnet <[email protected]> Co-authored-by: Vianney Carel <[email protected]> Co-authored-by: Vianney Carel <[email protected]> Co-authored-by: Diego Rincรณn <[email protected]> Co-authored-by: Erfan Hosseini <[email protected]> Co-authored-by: IderAghbal <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Andrew Jefferson <[email protected]>
1 parent 8315a69 commit 8b5accb

File tree

1,808 files changed

+38323
-32580
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,808 files changed

+38323
-32580
lines changed

โ€Ž.github/labeler.yml

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,12 @@
1414
- 'packages/react-router-with-query/**/*'
1515
'package: react-start':
1616
- 'packages/react-start/**/*'
17-
'package: start-api-routes':
18-
- 'packages/start-api-routes/**/*'
1917
'package: react-start-client':
2018
- 'packages/react-start-client/**/*'
21-
'package: react-start-config':
22-
- 'packages/react-start-config/**/*'
2319
'package: react-start-plugin':
2420
- 'packages/react-start-plugin/**/*'
25-
'package: react-start-router-manifest':
26-
- 'packages/react-start-router-manifest/**/*'
2721
'package: react-start-server':
2822
- 'packages/react-start-server/**/*'
29-
'package: start-server-functions-client':
30-
- 'packages/start-server-functions-client/**/*'
31-
'package: start-server-functions-fetcher':
32-
- 'packages/start-server-functions-fetcher/**/*'
33-
'package: start-server-functions-handler':
34-
- 'packages/start-server-functions-handler/**/*'
35-
'package: start-server-functions-ssr':
36-
- 'packages/start-server-functions-ssr/**/*'
3723
'package: router-cli':
3824
- 'packages/router-cli/**/*'
3925
'package: router-core':
@@ -60,18 +46,20 @@
6046
- 'packages/solid-start/**/*'
6147
'package: solid-start-client':
6248
- 'packages/solid-start-client/**/*'
63-
'package: solid-start-config':
64-
- 'packages/solid-start-config/**/*'
6549
'package: solid-start-plugin':
6650
- 'packages/solid-start-plugin/**/*'
67-
'package: solid-start-router-manifest':
68-
- 'packages/solid-start-router-manifest/**/*'
6951
'package: solid-start-server':
7052
- 'packages/solid-start-server/**/*'
71-
'package: start':
72-
- 'packages/start/**/*'
73-
'package: start-config':
74-
- 'packages/start-config/**/*'
53+
'package: start-client-core':
54+
- 'packages/start-client-core/**/*'
55+
'package: start-plugin-core':
56+
- 'packages/start-plugin-core/**/*'
57+
'package: start-server-core':
58+
- 'packages/start-server-core/**/*'
59+
'package: start-server-functions-client':
60+
- 'packages/start-server-functions-client/**/*'
61+
'package: start-server-functions-fetcher':
62+
- 'packages/start-server-functions-fetcher/**/*'
7563
'package: start-server-functions-server':
7664
- 'packages/start-server-functions-server/**/*'
7765
'package: valibot-adapter':

โ€Ž.github/workflows/pr.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
test:
1919
name: Test
2020
runs-on: ubuntu-latest
21+
env:
22+
TSR_TMP_DIR: ./tmp
2123
steps:
2224
- name: Checkout
2325
uses: actions/[email protected]

โ€Ž.gitignore

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,14 @@ nx-cloud.env
6060

6161
gpt/db.json
6262

63-
app.config.timestamp-*
63+
vite.config.timestamp-*
6464
vite.config.js.timestamp-*
6565
vite.config.ts.timestamp-*
66-
app.config.js.timestamp-*
67-
app.config.ts.timestamp-*
6866

69-
app.config.timestamp_*
67+
vite.config.timestamp_*
7068
vite.config.js.timestamp_*
7169
vite.config.ts.timestamp_*
72-
app.config.js.timestamp_*
73-
app.config.ts.timestamp_*
70+
7471
.idea
7572
*.vitest-temp.json
7673

@@ -79,3 +76,5 @@ app.config.ts.timestamp_*
7976
!/examples/react/**/.vscode/settings.json
8077

8178
**/llms
79+
80+
**/.tanstack

โ€Ž.prettierignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
pnpm-lock.yaml
88
**/snapshots
99
**/.vercel
10-
**/.vinxi
1110
**/.output
1211
**/node_modules
1312
node_modules
1413

1514
**/test-results
1615
**/tests/generator/file-modification/routes/(test)/*
1716
**/tests/generator/no-formatted-route-tree/routeTree.snapshot.ts
18-
/.nx/workspace-data
17+
/.nx/workspace-data
18+
**/src/routeTree.gen.ts

โ€Ždocs/router/api/file-based-routing.md

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ The following options are available for configuring the file-based routing:
2424
- [`disableLogging`](#disablelogging)
2525
- [`routeTreeFileHeader`](#routetreefileheader)
2626
- [`routeTreeFileFooter`](#routetreefilefooter)
27-
- [`disableManifestGeneration`](#disablemanifestgeneration)
2827
- [`enableRouteTreeFormatting`](#enableroutetreeformatting)
28+
- [`tmpDir`](#tmpdir)
2929

3030
> [!WARNING]
3131
> Do not set the `routeFilePrefix`, `routeFileIgnorePrefix`, or `routeFileIgnorePattern` options, to match any of the tokens used in the **File Naming Conventions** guide, or you may run into unexpected behavior.
@@ -132,19 +132,6 @@ By default, this value is set to `false`.
132132
> [!TIP]
133133
> You should ignore the path of your generated route tree file from your linter and formatter to avoid conflicts.
134134
135-
### `apiBase`
136-
137-
As a framework, [TanStack Start](/start) supports the concept of API routes. This option configures the base path for API routes.
138-
139-
By default, this value is set to `/api`.
140-
141-
This means that all API routes will be prefixed with `/api`.
142-
143-
This configuration value is only useful if you are using TanStack Start.
144-
145-
> [!IMPORTANT]
146-
> This default value may conflict with your own project's routing if you planned on having a normal route with the same base path. You can change this value to avoid conflicts.
147-
148135
### `autoCodeSplitting`
149136

150137
This feature is only available is you are using the TanStack Router Bundler Plugin.
@@ -200,16 +187,17 @@ By default, this value is set to:
200187
[]
201188
```
202189

203-
### `disableManifestGeneration`
204-
205-
[TanStack Start](/start) leverages the `generatedRouteTree` file to also store a JSON tree which allows Start to easily traverse the available route tree to understand the routing structure of the application. This JSON tree is saved at the end of the generated route tree file.
206-
207-
This option allows you to disable the generation of the manifest.
208-
209-
By default, this value is set to `false`.
210-
211190
### `enableRouteTreeFormatting`
212191

213192
This option turns on the formatting function on the generated route tree file, which can be time-consuming for large projects.
214193

215194
By default, this value is set to `true`.
195+
196+
### `tmpDir`
197+
198+
Atomic file writes (route files and the generated route tree file) are implemented by creating a temporary file first and then renaming it to their actual location.
199+
200+
This config option allows to configure the path of the temp directory that will be used for creating those temporary files.
201+
If it is a relative path, it will be resolved to the current working directory.
202+
If this value is not set, `process.env.TSR_TMP_DIR` will be used.
203+
If `process.env.TSR_TMP_DIR` is not set, it will default to `.tanstack/tmp` relative to the current working directory.

โ€Ždocs/router/eslint/create-route-property-order.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Examples of **incorrect** code for this rule:
2929
/* eslint "@tanstack/router/create-route-property-order": "warn" */
3030
import { createFileRoute } from '@tanstack/react-router'
3131

32-
export const Route = createFileRoute('/foo/bar/$id')({
32+
export const Route = createFileRoute({
3333
loader: async ({context}) => {
3434
await context.queryClient.ensureQueryData(getQueryOptions(context.hello)),
3535
},
@@ -43,7 +43,7 @@ Examples of **correct** code for this rule:
4343
/* eslint "@tanstack/router/create-route-property-order": "warn" */
4444
import { createFileRoute } from '@tanstack/react-router'
4545

46-
export const Route = createFileRoute('/foo/bar/$id')({
46+
export const Route = createFileRoute({
4747
beforeLoad: () => ({hello: 'world'}),
4848
loader: async ({context}) => {
4949
await context.queryClient.ensureQueryData(getQueryOptions(context.hello)),

โ€Ždocs/router/framework/react/api/router/createFileRouteFunction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ A new function that accepts a single argument of type [`RouteOptions`](../RouteO
2626
```tsx
2727
import { createFileRoute } from '@tanstack/react-router'
2828

29-
export const Route = createFileRoute('/')({
29+
export const Route = createFileRoute({
3030
loader: () => {
3131
return 'Hello World'
3232
},

โ€Ždocs/router/framework/react/api/router/retainSearchParamsFunction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const searchSchema = z.object({
3939
two: z.string().optional(),
4040
})
4141

42-
export const Route = createFileRoute('/hello')({
42+
export const Route = createFileRoute({
4343
validateSearch: zodValidator(searchSchema),
4444
search: {
4545
middlewares: [retainSearchParams(true)],

โ€Ždocs/router/framework/react/api/router/stripSearchParamsFunction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const searchSchema = z.object({
3030
two: z.string().default(defaultValues.two),
3131
})
3232

33-
export const Route = createFileRoute('/hello')({
33+
export const Route = createFileRoute({
3434
validateSearch: zodValidator(searchSchema),
3535
search: {
3636
// strip default values
@@ -68,7 +68,7 @@ const searchSchema = z.object({
6868
two: z.string().default('xyz'),
6969
})
7070

71-
export const Route = createFileRoute('/hello')({
71+
export const Route = createFileRoute({
7272
validateSearch: zodValidator(searchSchema),
7373
search: {
7474
// remove all search params

โ€Ždocs/router/framework/react/decisions-on-dx.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ Let's take a look at how the route configuration for the previous example would
225225
// src/routes/posts/index.ts
226226
import { createFileRoute } from '@tanstack/react-router'
227227

228-
export const Route = createFileRoute('/posts/')({
228+
export const Route = createFileRoute({
229229
component: () => 'Posts index component goes here!!!',
230230
})
231231
```

0 commit comments

Comments
ย (0)