chore: bump tanstack packages#6479
Conversation
|
Warning Rate limit exceeded@KATT has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 10 minutes and 39 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
WalkthroughThe pull request updates dependency versions across multiple Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
🚅 Previously deployed to Railway in the trpc-sse-and-websockets project. Environment has been deleted. |
There was a problem hiding this comment.
Actionable comments posted: 1
🔭 Outside diff range comments (1)
packages/react-query/package.json (1)
67-67: 💡 Verification agent🛠️ Refactor suggestion
🧩 Analysis chain
Verify peer dependency compatibility.
The package specifies
@tanstack/react-queryversion^5.62.8as a peer dependency but uses^5.66.0in devDependencies. This mismatch should be addressed to ensure consistent versioning.Update the peer dependency to match:
- "@tanstack/react-query": "^5.62.8", + "@tanstack/react-query": "^5.66.0",Also applies to: 75-75
🌐 Web query:
What are the breaking changes between @tanstack/react-query versions 5.62.8 and 5.66.0?💡 Result:
The breaking changes between @tanstack/react-query versions
v5.62.xandv5.x.xup tov5.x.xare minimal but include notable TypeScript adjustments and behavioral fixes:
Breaking Changes
TypeScript Key Typing Enhancements
- QueryKey/MutationKey Registration
Added support for strongly typedQueryKey/MutationKeyviaRegister, requiring updates for projects using custom key definitions[^4][^6].
Example:declare module '@tanstack/react-query' { interface Register { queryKey: YourCustomQueryKeyType; } }Suspense Mode Behavior
- StaleTime Enforcement
In suspense mode (useSuspenseQuery),staleTimebelow1000msnow defaults to1000ms, overriding manual configurations[^4][^6].
Notable Non-Breaking Changes
Features
- Query Cache Unsubscription
Addedunsubscribeoption touseQuery/useQueriesfor manual cache management[^4].- Infinite Query Improvements
IntroducedmaxPagesto limit stored pages[^6].Fixes
- Vue Query Key Matching
Fixed reactivity issues withqueryKeyrefs[^4].- Observer Duplicate Queries
Improved deduplication logic forQueriesObserver[^4].
Migration Steps
1️⃣ Update TypeScript definitions if using custom query/mutation keys:
// Before type QueryKeys = { ... }; // After declare module '@tanstack/react-query' { interface Register { queryKey: QueryKeys; mutationKey: MutationKeys; } }2️⃣ Adjust suspense configurations if relying on low
staleTimevalues:// Before useSuspenseQuery({ queryKey: ['todos'], queryFn: fetchTodos, staleTime: 500 }); // After (staleTime automatically set to 1000) useSuspenseQuery({ queryKey: ['todos'], queryFn: fetchTodos });
For detailed code examples and additional fixes (e.g., ESLint compatibility), refer to the official v5 migration guide[^1][^6].
Citations:
- 1: https://tanstack.com/query/latest/docs/framework/react/guides/migrating-to-v5
- 2: https://newreleases.io/project/npm/@tanstack/react-query/release/5.66.0
- 3: https://security.snyk.io/package/npm/@tanstack%2Freact-query-devtools
- 4: https://github.com/TanStack/query/releases
- 5: https://tanstack.com/query/v5/docs/framework/react/guides/migrating-to-v5
- 6: https://dreamix.eu/insights/tanstack-query-v5-migration-made-easy-key-aspects-breaking-changes/
- 7: https://socket.dev/npm/package/@tanstack/react-query
- 8: https://tanstack.com/query/v4/docs/framework/react/guides/migrating-to-react-query-4
- 9: https://socket.dev/npm/package/@tanstack/react-query-next-experimental
- 10: https://www.npmjs.com/package/@tanstack/react-query?activeTab=versions
Action: Update @tanstack/react-query peer dependency version for consistency
- The peer dependency is set to
^5.62.8while the devDependencies reference^5.66.0.- According to the migration details, the changes between these versions are minimal (mainly TypeScript enhancements and minor behavioral tweaks), so updating the peer dependency should be safe.
- Recommend updating to
"@tanstack/react-query": "^5.66.0"in both locations (lines 67 and 75) to ensure consistency.
🧹 Nitpick comments (1)
packages/next/package.json (1)
76-76: Consider updating the peer dependency version.The devDependency version of
@tanstack/react-queryis^5.66.0while the peerDependency is still at^5.59.15. Consider updating the peerDependency to match for better version alignment.- "@tanstack/react-query": "^5.59.15", + "@tanstack/react-query": "^5.66.0",Also applies to: 94-94
✅ Verification successful
🌐 Web query:
What are the breaking changes or deprecations in @tanstack/react-query between versions 5.62.8 and 5.66.0?💡 Result:
Between versions
5.62.8and5.66.0of@tanstack/react-query, several updates and fixes were introduced with no major breaking changes reported in the release notes[3][10]. However, there are notable adjustments worth highlighting:
Key Changes
Suspense Timers Adjustment
- In
v5.62.14, suspense timers now enforce a minimumstaleTimeof1000mswhen using suspense mode[3]. This affects timing-sensitive implementations:// Before: Could use staleTime <1000ms // After: Automatically set to 1000ms if lower useSuspenseQuery({ queryKey: ['todos'], queryFn: fetchTodos, staleTime: 500 }) // [!code --]TypeScript Improvements
v5.64.ximproved type safety for query/mutation keys by supporting bothArrayandReadonlyArraytypes[3].Unsubscription Option
- Added
subscribedoption inv5.63.xto control cache subscription behavior foruseQuery/useQueries[3]:useQuery({ queryKey: ['todos'], queryFn: fetchTodos, subscribed: false // Opt out of automatic cache updates })
Deprecations & Removals
No explicit deprecations occurred in this version range based on available data[3][10]. Earlier major changes (like v5’s removal of overloaded APIs) predate these versions[1][7].
Critical Fixes
- React Suspense Errors (
v5.65.x): Improved error propagation foruseSuspenseQuery[3].- Vue Query Keys (
v5.62.x): Fixed reactivity issues with Vue’squeryKeyrefs[3].For full details, see the release notes[3].
Citations:
- 1: https://tanstack.com/query/latest/docs/framework/react/guides/migrating-to-v5
- 2: https://tanstack.com/query/v5/docs/framework/vue/guides/migrating-to-v5
- 3: https://github.com/TanStack/query/releases
- 4: marmelab/react-admin#8008
- 5: https://dreamix.eu/insights/tanstack-query-v5-migration-made-easy-key-aspects-breaking-changes/
- 6: https://security.snyk.io/package/npm/@tanstack%2Freact-query
- 7: https://tanstack.com/blog/announcing-tanstack-query-v5
- 8: https://tanstack.com/query/latest/docs/framework/react/guides/migrating-to-react-query-3
- 9: https://tanstack.com/query/v4/docs/framework/react/guides/migrating-to-react-query-4
- 10: https://www.npmjs.com/package/@tanstack/react-query?activeTab=versions
Action: Update the peer dependency version to ensure consistency.
After verifying the changelog for
@tanstack/react-query, we confirmed that the changes between versions 5.62.8 and 5.66.0 introduced minor adjustments and improvements without any breaking changes. Given that the devDependency is now set to^5.66.0, aligning the peer dependency to the same version (i.e., updating it from^5.59.15to^5.66.0) will ensure consistency across your project.
- File:
packages/next/package.json(lines 76 and 94)- Suggestion:
- "@tanstack/react-query": "^5.59.15", + "@tanstack/react-query": "^5.66.0",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (20)
examples/.experimental/next-app-dir/package.json(1 hunks)examples/.test/diagnostics-big-router/package.json(1 hunks)examples/.test/monotest-app/package.json(1 hunks)examples/.test/ssg-infinite-serialization/package.json(1 hunks)examples/.test/ssg/package.json(1 hunks)examples/minimal-content-types/client/package.json(1 hunks)examples/minimal-react/client/package.json(1 hunks)examples/next-big-router/package.json(1 hunks)examples/next-edge-runtime/package.json(1 hunks)examples/next-formdata/package.json(1 hunks)examples/next-minimal-starter/package.json(1 hunks)examples/next-prisma-starter/package.json(1 hunks)examples/next-prisma-todomvc/package.json(2 hunks)examples/next-prisma-websockets-starter/package.json(2 hunks)examples/next-sse-chat/package.json(1 hunks)examples/tanstack-start/package.json(1 hunks)packages/next/package.json(1 hunks)packages/react-query/package.json(1 hunks)packages/server/package.json(1 hunks)packages/tests/package.json(1 hunks)
✅ Files skipped from review due to trivial changes (8)
- examples/next-minimal-starter/package.json
- examples/next-big-router/package.json
- examples/next-edge-runtime/package.json
- examples/next-formdata/package.json
- examples/minimal-react/client/package.json
- examples/.test/monotest-app/package.json
- examples/.experimental/next-app-dir/package.json
- examples/next-sse-chat/package.json
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: test
- GitHub Check: build
- GitHub Check: Lint and auto-fix
🔇 Additional comments (9)
examples/minimal-content-types/client/package.json (1)
12-12: Verify compatibility with the latest @tanstack/react-query version.Let's check the latest version and any potential security advisories for @tanstack/react-query.
✅ Verification successful
🏁 Script executed:
#!/bin/bash # Description: Check for security advisories and latest versions of @tanstack/react-query # Check NPM for latest versions curl -s https://registry.npmjs.org/@tanstack/react-query | jq '.["dist-tags"]' # Check for security advisories gh api graphql -f query=' { securityVulnerabilities(first: 5, ecosystem: NPM, package: "@tanstack/react-query") { nodes { advisory { summary severity publishedAt } vulnerableVersionRange firstPatchedVersion { identifier } } } }'Length of output: 539
🌐 Web query:
What is the latest version of @tanstack/react-query and are there any breaking changes between 5.62.8 and 5.66.0?💡 Result:
The latest version of
@tanstack/react-queryis v5.66.0, released on January 31, 2025[1].Breaking Changes Between v5.62.x and v5.66.x
No major breaking changes are documented in releases from v5.62.x to v5.66.x. However, several notable updates and fixes were introduced:
Key Changes
1️⃣ React Suspense Improvements
- Fixed suspense timers to enforce
staleTime ≥ 1000mswhen usingensureSuspenseTimers[1][7].- Errors from
selectinuseSuspenseQuerynow propagate to React Error Boundaries[1].2️⃣ TypeScript Enhancements
- Added support for both
ArrayandReadonlyArraytypes in query/mutation keys[1][7].- Fixed missing
subscribedoption type inUseInfiniteQueryOptions[1].3️⃣ New Features
- Added an
unsubscribeoption foruseQuery/useQueriesto disconnect from the query cache[1][7].Deprecations & Migration Notes
While no direct breaking changes occurred between these versions:
- The broader v5 release introduced major changes like replacing
keepPreviousDatawithplaceholderData, renamingHydratetoHydrationBoundary, and requiring React ≥18[4][2].- Ensure your codebase follows v5 migration guidelines[4], such as updating hydration patterns and structural sharing configurations[4][2].
For full details, review the release notes[1] or test upgrades using automated codemods from TanStack[4].
Citations:
- 1: https://github.com/TanStack/query/releases
- 2: https://dreamix.eu/insights/tanstack-query-v5-migration-made-easy-key-aspects-breaking-changes/
- 3: https://security.snyk.io/package/npm/@tanstack%2Freact-query
- 4: https://tanstack.com/query/latest/docs/framework/react/guides/migrating-to-v5
- 5: https://tanstack.com/query/v4/docs/framework/react/guides/migrating-to-react-query-4
- 6: https://www.npmjs.com/package/react-query
- 7: https://www.npmjs.com/package/@tanstack/react-query?activeTab=versions
- 8: https://tanstack.com/query/latest/docs/framework/react/installation
- 9: https://github.com/TanStack/query/issues
- 10: https://tanstack.com/query/latest/docs/framework/react/overview
Compatibility Confirmed: @tanstack/react-query v5.66.0 is safe to use
- The NPM registry confirms 5.66.0 is the latest release.
- No security vulnerabilities were reported.
- Documentation shows no major breaking changes between v5.62.x and v5.66.x.
- React 19 (your current version) meets the requirement of React ≥18 for v5.
- Compatibility with @trpc/react-query@next appears unaffected based on relevant version updates.
examples/.test/diagnostics-big-router/package.json (1)
10-10: LGTM! Version update is consistent.The update to @tanstack/react-query ^5.66.0 maintains consistency with other packages in the monorepo.
examples/.test/ssg/package.json (1)
14-14: LGTM! Version update is consistent.The update to @tanstack/react-query ^5.66.0 maintains consistency with other packages in the monorepo.
examples/tanstack-start/package.json (1)
15-16: Verify compatibility between TanStack packages.Please ensure compatibility between all TanStack packages:
- @tanstack/react-query ^5.66.0
- @tanstack/react-query-devtools ^5.64.2
- @tanstack/react-router ^1.85.10
- @tanstack/react-router-with-query ^1.85.10
- @tanstack/router-devtools ^1.69.1
- @tanstack/start ^1.69.1
✅ Verification successful
🌐 Web query:
What are the peer dependency requirements for @tanstack/react-query-devtools v5.64.2?💡 Result:
The peer dependency requirements for @tanstack/react-query-devtools v5.64.2 are:
React ≥18:
- Required due to React Query v5's reliance on
useSyncExternalStore, introduced in React 18[4][5].- Conflicts arise if using React 19 beta or older versions like React 17[5][10].
@tanstack/react-query ≥v5:
- Must match compatible versions (e.g.,
@tanstack/react-query@5.x)[1][3].- Version mismatches trigger installation errors unless forced with
--force[5].For Next.js 13+ App Dir projects, install as a dev dependency:
npm install @tanstack/react-query-devtools@5.64.2 --save-devCitations:
- 1: https://tanstack.com/query/latest/docs/framework/react/devtools
- 2: https://github.com/TanStack/query/releases
- 3: https://tanstack.com/query/v4/docs/framework/react/guides/migrating-to-react-query-4
- 4: https://tanstack.com/query/v5/docs/framework/react/guides/migrating-to-v5
- 5: https://community.render.com/t/npm-install-force/21290
- 6: https://www.npmjs.com/package/@tanstack/react-query-devtools?activeTab=readme
- 7: TanStack/router#257
- 8: https://www.npmjs.com/package/@tanstack/react-query-devtools
- 9: https://github.com/TanStack/query/blob/main/packages/react-query-devtools/package.json
- 10: https://answers.netlify.com/t/conflicting-peer-dependency-types-react-17-0-50/76583
Compatibility between TanStack packages verified.
The peer dependency check for @tanstack/react-query-devtools v5.64.2 confirms it requires @tanstack/react-query ≥ v5, which is satisfied by ^5.66.0. The other TanStack packages (react-router, react-router-with-query, router-devtools, and start) are maintained at consistent version levels that are designed to work together within the TanStack ecosystem.
examples/next-prisma-todomvc/package.json (1)
25-25: LGTM! Dependencies updated consistently.The updates to both
@tanstack/react-queryand@tanstack/react-query-devtoolsare aligned with the project-wide version bump.Also applies to: 41-41
examples/next-prisma-starter/package.json (1)
35-35: LGTM! Dependency version updated consistently.The update to
@tanstack/react-querymatches the project-wide version bump.examples/next-prisma-websockets-starter/package.json (1)
44-44: LGTM! Dependencies updated consistently.The updates to both
@tanstack/react-queryand@tanstack/react-query-devtoolsare aligned with the project-wide version bump.Also applies to: 61-61
packages/tests/package.json (1)
18-18: LGTM! Test dependency version updated consistently.The update to
@tanstack/react-querymatches the project-wide version bump.packages/server/package.json (1)
121-121: LGTM! Version update is consistent.The update of
@tanstack/react-queryto^5.66.0matches the version used in other packages, maintaining consistency across the project.
commit: |
|
This pull request has been locked because we are very unlikely to see comments on closed issues. If you think, this PR is still necessary, create a new one with the same branch. Thank you. |
Closes #
🎯 Changes
Summary by CodeRabbit