Repository navigation
chore(deps): bump @tanstack/* query packages repo-wide - #7761
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Dependency version updates examples/**/package.json, packages/*/package.json, www/package.json |
Manifests now specify ^5.105.0 for TanStack Query dependencies that previously used ^5.80.3. The website also updates @tanstack/query-core from ^5.90.20 to ^5.105.0. |
SSE chat dependency resolution examples/tanstack-start-sse-chat/package.json, examples/tanstack-start-sse-chat/tsconfig.json, examples/tanstack-start-sse-chat/vite.config.ts |
The package manifest uses direct version specifications instead of npm aliases. The TypeScript path alias and Vite deduplication setting for @tanstack/react-query were removed. |
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Other
Possibly related PRs
- trpc/trpc#7758: Makes the same TanStack Query version updates and SSE chat dependency-resolution changes.
- trpc/trpc#7760: Adds TanStack Query 5.105 type support and updates package dependencies.
- trpc/trpc#7755: Migrates the SSE chat example to TanStack Start and changes its TanStack Query integration.
Suggested reviewers: nick-lucas
Merge Risk: 
Minimal · previous review 53978
-
No actionable merge-blocking risk remains in this dependency-only update.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (7 skipped: 7 unsupported.)
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
@trpc/client
@trpc/next
@trpc/openapi
@trpc/react-query
@trpc/server
@trpc/tanstack-react-query
@trpc/upgrade
commit: |
a77c398 to
53978d4
Compare
Bump examples, www and the lockfile to ^5.105.0 and drop the SSE chat example's npm: alias, Vite dedupe and tsconfig path for @tanstack/react-query. Co-authored-by: alexander <[email protected]>
53978d4 to
425e06f
Compare
… 5.105 types (trpc#7760) <!-- CURSOR_AGENT_PR_BODY_BEGIN --> ## Why - tRPC's packages build and test against `@tanstack/react-query` 5.80. Newer TanStack Query types break a few of our types. - This is the library half of trpc#7758. The repo-wide upgrade (examples, `www`, SSE example alias) is stacked on top in trpc#7761. ## What - Build and test `packages/` against TanStack Query 5.105: - The lockfile resolves every TanStack Query package to a single `5.105.0`. The existing `^5.80.3` ranges already allow it. - `@trpc/react-query` dev dependencies `@tanstack/react-query-persist-client` and `@tanstack/query-sync-storage-persister` move to `^5.105.0`. - The `@tanstack/react-query` dev dependency range stays `^5.80.3` here. `manypkg` (run by autofix CI) wants one range repo-wide, and examples still use `^5.80.3`. trpc#7761 moves every range to `^5.105.0`. - Peer ranges are unchanged: `@trpc/react-query` and `@trpc/tanstack-react-query` keep `^5.80.3`, `@trpc/next` keeps `^5.59.15`. - Widen the `onSuccess` mutation override in both `UseMutationOverride` (`@trpc/react-query`) and `MutationOptionsOverride` (`@trpc/tanstack-react-query`), matching TanStack's own `onSuccess`. Existing overrides still type-check. ```ts // before onSuccess: (opts: { originalFn: () => MaybePromise<void>; ... }) => MaybePromise<void>; // after onSuccess: (opts: { originalFn: () => MaybePromise<unknown>; ... }) => MaybePromise<unknown>; ``` - Type-only fixes in `@trpc/react-query`. Runtime is unchanged: - `usePrefetchQuery` / `usePrefetchInfiniteQuery`: cast the `skipToken` branch of `queryFn`, which TanStack's types now exclude. - SSR `retryOnMount` helper accepts the function form. - Tests: - The `cancelQuery()` test now asserts that the cancelled `fetch()` rejects; it was an unhandled rejection. - A `mutationFn` call passes the new context argument. - Lockfile: only TanStack Query entries change. ## Release - Ship as a **minor**. The repo has no changesets: choose `minor` for `version_bump` when running the Release Packages workflow. Lerna uses fixed versioning with `--force-publish`, so every published `@trpc/*` package moves together (11.22.1 → 11.23.0). ## Links None. No docs or example changes in this PR. ## Alternatives considered - Bump examples and `www` in the same PR (trpc#7758): split out so the library change ships as its own minor. - Raise the peer ranges to `^5.105.0`: not needed, since the fixes are type-only and still compile against 5.80. ## Testing - `pnpm install --frozen-lockfile`, `pnpm manypkg check`, `pnpm build`, `pnpm typecheck-packages` pass. - `pnpm test --watch false`: 191 files, 1361 tests pass. - `pnpm turbo typecheck --filter="./examples/**" --filter=www`: `www` and the TanStack Query examples pass. - The Lambda examples fail locally on global type clashes in `node_modules` type declarations. - The Prisma examples pass once `prisma generate` has run for each. - SSE chat example (still on its `npm:` alias here) typechecks and `vite build` succeeds. <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-c41566ba-7b11-5a92-a7b8-2411c0751504?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-c41566ba-7b11-5a92-a7b8-2411c0751504&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> <!-- codesmith:footer --> --- <a href="https://app.blacksmith.sh/trpc/codesmith/trpc/pr/7760?autoLogin=true&ref=codesmith_pr_footer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-light-v3.svg"><img alt="View with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png" width="162" height="28"></picture></a> <a href="https://backend.blacksmith.sh/track/enable-autofix?expires=1796077414&installation_model_id=443568&pr_number=7760&ref=codesmith_pr_footer&repository=trpc%2Ftrpc&return_to=https%3A%2F%2Fgithub.com%2Ftrpc%2Ftrpc%2Fpull%2F7760&signature=ec1b1614bc53dab60e7a0e2142952f2dab6cf8f0b497f5c650d085a751bc7688"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img alt="Autofix with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png" width="190" height="28"></picture></a> <sup>Need help on this PR? Tag <code>@codesmith-bot</code> with what you need.</sup> <!-- codesmith:autofix:disabled --> <!-- /codesmith:footer --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Mutation success callbacks can now return values in addition to promises that resolve without a value. * Server-rendered query options accept a wider range of `retryOnMount` values. * Preview URLs can be generated from a branch name, with support for fork branches and long names. * Pull request guidance now includes WebSockets and TanStack Start SSE chat examples, plus branch-based preview links. * **Tests** * Updated query cancellation and mutation-default tests to check expected promise behavior and provide mutation context. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Cursor Agent <[email protected]>
|
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. |
Why
packages/against TanStack Query 5.105 but keeps the^5.80.3range for@tanstack/react-query, becausemanypkgwants one range repo-wide.^5.105.0.npm:alias, a Vitededupeand a tsconfig path, to avoid two copies of@tanstack/react-query.What
Bump TanStack Query ranges to
^5.105.0inpackages/(dev dependencies only), examples andwww:@tanstack/react-query^5.80.3^5.105.0@tanstack/react-query-devtools^5.80.3^5.105.0@tanstack/query-core(www)^5.90.20^5.105.0Peer ranges are unchanged.
SSE chat example (
examples/tanstack-start-sse-chat): drop thenpm:alias, the Vitededupeand the tsconfig path for@tanstack/react-query.Lockfile: specifier updates only. Resolved versions are the same as in feat(react-query,tanstack-react-query): support @tanstack/react-query 5.105 types #7760.
Router and Start packages are already at latest.
Links
@tanstack/react-query./channels/<id>: pendingAlternatives considered
npm:alias in the example: works, but leaves mismatched ranges and needs workarounds in the example.Testing
pnpm install --frozen-lockfileandpnpm manypkg checkpass.pnpm buildandpnpm typecheck-packagespass.pnpm test --watch false packages/react-query packages/tanstack-react-query: 64 files, 292 tests pass. The full suite runs on feat(react-query,tanstack-react-query): support @tanstack/react-query 5.105 types #7760 with the same resolved versions.pnpm turbo typecheck --filter="./examples/**" --filter=www:wwwand the TanStack Query examples pass.node_modulestype declarations.prisma generatehas run for each.vite buildsucceeds.Need help on this PR? Tag
@codesmith-botwith what you need.Summary by CodeRabbit