-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix: various fixes #5593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
fix: various fixes #5593
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f4d30f7
fix: correctly resolve server functions in dev that are outside of pr…
schiller-manuel 9e815e6
fix: default autoSubfolderIndex to true
schiller-manuel 24092f6
fix: rename ALL to ANY in server routes
schiller-manuel d654fd1
fix: make optional path params explicitly undefined for use with `exa…
schiller-manuel cc0ed53
fix: cache css collection during build
schiller-manuel 3984d89
fix: cache created directories in writeBundleToDisk
schiller-manuel dd85beb
fix: inherit ssr type correctly
schiller-manuel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,20 @@ | ||
| import { createRouter } from '@tanstack/react-router' | ||
| import { setupRouterSsrQueryIntegration } from '@tanstack/react-router-ssr-query' | ||
| import { QueryClient } from '@tanstack/react-query' | ||
| import { routeTree } from './routeTree.gen' | ||
| import { DefaultCatchBoundary } from './components/DefaultCatchBoundary' | ||
| import { NotFound } from './components/NotFound' | ||
|
|
||
| export function getRouter() { | ||
| const queryClient = new QueryClient() | ||
| const router = createRouter({ | ||
| routeTree, | ||
| defaultPreload: 'intent', | ||
| defaultErrorComponent: DefaultCatchBoundary, | ||
| defaultNotFoundComponent: () => <NotFound />, | ||
| scrollRestoration: true, | ||
| }) | ||
| setupRouterSsrQueryIntegration({ router, queryClient }) | ||
|
|
||
| return router | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import { createFileRoute } from '@tanstack/react-router' | ||
| import { json } from '@tanstack/react-start' | ||
|
|
||
| export const Route = createFileRoute('/api/only-any')({ | ||
| server: { | ||
| handlers: { | ||
| ANY: ({ request }) => { | ||
| return json( | ||
| { | ||
| handler: 'ANY', | ||
| method: request.method, | ||
| }, | ||
| { headers: { 'X-HANDLER': 'ANY', 'X-METHOD': request.method } }, | ||
| ) | ||
| }, | ||
| }, | ||
| }, | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
e2e/react-start/server-routes/src/routes/methods/index.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import { createFileRoute } from '@tanstack/react-router' | ||
|
|
||
| export const Route = createFileRoute('/methods/')({ | ||
| component: RouteComponent, | ||
| }) | ||
|
|
||
| function RouteComponent() { | ||
| return ( | ||
| <div className="p-8"> | ||
| <ul className="list-disc p-4"> | ||
| <li> | ||
| <Route.Link to="./only-any"> | ||
| Server Route only has ANY handler | ||
| </Route.Link> | ||
| </li> | ||
| </ul> | ||
| </div> | ||
| ) | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
🧩 Analysis chain
Use workspace: for internal dependencies.*
Align internal packages with the repo guideline.
Apply this minimal diff:
"dependencies": { - "@tanstack/react-query": "5.66.0", - "@tanstack/react-router": "workspace:^", - "@tanstack/react-router-devtools": "workspace:^", - "@tanstack/react-router-ssr-query": "workspace:^", - "@tanstack/react-start": "workspace:^", + "@tanstack/react-query": "5.66.0", + "@tanstack/react-router": "workspace:*", + "@tanstack/react-router-devtools": "workspace:*", + "@tanstack/react-router-ssr-query": "workspace:*", + "@tanstack/react-start": "workspace:*", }, "devDependencies": { - "@tanstack/router-e2e-utils": "workspace:^", + "@tanstack/router-e2e-utils": "workspace:*", }Please also confirm version compatibility:
Also applies to: 30-31
🌐 Web query:
💡 Result:
Short answer: Yes — @tanstack/react-query v5.66.0 is compatible with React 19, but not because that specific release calls out React 19: the official docs state TanStack Query v5 supports React v18+ (i.e., React 19 is within the supported range), and the v5.66.0 release notes show no React-19–specific breaking changes or caveats. [1][2]
Sources:
Length of output: 814
🏁 Script executed:
Length of output: 833
Update workspace protocol to
workspace:*for all internal dependencies.The file currently uses
workspace:^for all internal @TanStack packages, which violates the guideline requiringworkspace:*. The suggested diff is correct.Version compatibility is not a concern: @tanstack/react-query v5.66.0 is compatible with React 19 (React Query v5 supports React 18+, with no breaking changes in v5.66.0).
Apply the diff across lines 14–18 and line 30 to align with the workspace protocol guideline.
🤖 Prompt for AI Agents