Skip to content

fix: raise TanStack Query and Pinia Colada peer dependency floors - #2180

Merged
dinwwwh merged 1 commit into
middleapi:mainfrom
dinwwwh:claude/nostalgic-antonelli-c9cc02
Oct 5, 2026
Merged

dinwwwh merged 1 commit into
middleapi:mainfrom
dinwwwh:claude/nostalgic-antonelli-c9cc02

Conversation

@dinwwwh

@dinwwwh dinwwwh commented Oct 5, 2026

Copy link
Copy Markdown
Member

@orpc/tanstack-query now requires @tanstack/query-core >=5.89.0 (was >=5.80.2), and @orpc/pinia-colada requires @pinia/colada >=1.2.0 (was >=1.0.0). The old TanStack floor let 5.80.2–5.87.4 install, and on those versions mutation interceptors receive fnContext === undefined, so the documented fnContext.client.invalidateQueries(...) throws at runtime. Package managers now warn about these setups at install time instead.

Fixes

  • TanStack Query: query-core 5.87.4 and earlier call mutationFn(variables). The { client, meta, mutationKey } context and the MutationFunctionContext type both first ship in 5.89.0 (there is no 5.88.x). On older versions the "Interceptors" example rejects the mutation even though the server already applied it. The "Contract Options Plugin" example throws before the request is sent.
  • Pinia Colada: works at runtime from 1.0.0, but DefineInfiniteQueryOptions, DefineInfiniteQueryOptionsTagged and DefineMutationOptionsTagged are first exported in 1.2.0. On 1.0/1.1 the infiniteOptions()/mutationOptions() types silently become any under skipLibCheck.
  • SWR: unchanged; >=2.4.2 already covers everything it uses.

Testing

  • Checked mutation.ts in every query-core release from 5.80.2 to 5.89.0, both src and published build. Only 5.89.0 passes the second argument.
  • Ran a MutationObserver repro using the documented interceptor pattern. On 5.87.4 it fails with TypeError: Cannot read properties of undefined (reading 'client'); on 5.89.0 it succeeds.
  • Confirmed every @tanstack/query-core import in the package is exported at 5.89.0, and that QueryFunctionContext.client already exists at 5.80.2, so query interceptors were never affected.

@tanstack/query-core only passes the second context argument to
mutationFn starting in 5.89.0 (5.87.4 and earlier call mutationFn(variables)),
so mutation interceptors received fnContext === undefined on 5.80.2-5.87.4 and
the documented fnContext.client usage threw. MutationFunctionContext is also
first exported in 5.89.0.

@pinia/colada first exports DefineInfiniteQueryOptions,
DefineInfiniteQueryOptionsTagged and DefineMutationOptionsTagged in 1.2.0;
on 1.0/1.1 those imports fail and the option types collapse to any.
@pkg-pr-new

pkg-pr-new Bot commented Oct 5, 2026

Copy link
Copy Markdown
More templates

@orpc/ai-sdk

npm i https://pkg.pr.new/@orpc/ai-sdk@2180

@orpc/arktype

npm i https://pkg.pr.new/@orpc/arktype@2180

@orpc/bun

npm i https://pkg.pr.new/@orpc/bun@2180

@orpc/client

npm i https://pkg.pr.new/@orpc/client@2180

@orpc/cloudflare

npm i https://pkg.pr.new/@orpc/cloudflare@2180

@orpc/contract

npm i https://pkg.pr.new/@orpc/contract@2180

@orpc/experimental-effect

npm i https://pkg.pr.new/@orpc/experimental-effect@2180

@orpc/evlog

npm i https://pkg.pr.new/@orpc/evlog@2180

@orpc/hibernation

npm i https://pkg.pr.new/@orpc/hibernation@2180

@orpc/json-schema

npm i https://pkg.pr.new/@orpc/json-schema@2180

@orpc/experimental-lock

npm i https://pkg.pr.new/@orpc/experimental-lock@2180

@orpc/experimental-msw

npm i https://pkg.pr.new/@orpc/experimental-msw@2180

@orpc/nest

npm i https://pkg.pr.new/@orpc/nest@2180

@orpc/next

npm i https://pkg.pr.new/@orpc/next@2180

@orpc/node

npm i https://pkg.pr.new/@orpc/node@2180

@orpc/openapi

npm i https://pkg.pr.new/@orpc/openapi@2180

@orpc/opentelemetry

npm i https://pkg.pr.new/@orpc/opentelemetry@2180

@orpc/pinia-colada

npm i https://pkg.pr.new/@orpc/pinia-colada@2180

@orpc/pino

npm i https://pkg.pr.new/@orpc/pino@2180

@orpc/publisher

npm i https://pkg.pr.new/@orpc/publisher@2180

@orpc/ratelimit

npm i https://pkg.pr.new/@orpc/ratelimit@2180

@orpc/server

npm i https://pkg.pr.new/@orpc/server@2180

@orpc/shared

npm i https://pkg.pr.new/@orpc/shared@2180

@orpc/swr

npm i https://pkg.pr.new/@orpc/swr@2180

@orpc/tanstack-query

npm i https://pkg.pr.new/@orpc/tanstack-query@2180

@orpc/trpc

npm i https://pkg.pr.new/@orpc/trpc@2180

@orpc/valibot

npm i https://pkg.pr.new/@orpc/valibot@2180

@orpc/zod

npm i https://pkg.pr.new/@orpc/zod@2180

commit: d556b8e

@codspeed

codspeed Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 30 untouched benchmarks


Comparing dinwwwh:claude/nostalgic-antonelli-c9cc02 (d556b8e) with main (d3ec224)

Open in CodSpeed

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed changes

Raised two peer dependency floors; verified both against the published upstream packages.

  • @orpc/tanstack-query — @tanstack/query-core floor >=5.80.2 → >=5.89.0. 5.89.0 is the exact first version that passes the MutationFunctionContext second argument to mutationFn and exports the type; 5.87.4 does neither, and no 5.88.x was ever released. The adapter reads that fnContext at runtime in procedure-utils.ts.
  • @orpc/pinia-colada — @pinia/colada floor >=1.0.0 → >=1.2.0. 1.1.0 lacks DefineInfiniteQueryOptions, DefineInfiniteQueryOptionsTagged, and DefineMutationOptionsTagged; 1.2.0 (the next release) exports all three, which src/types.ts imports.
  • No pnpm-lock.yaml update is needed (pnpm importers don't record peer ranges), and no docs or in-repo packages reference the old floors — all workspace devDeps/playgrounds already resolve above the new ones.

Both floors are correct and minimal. No issues found.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@dinwwwh
dinwwwh merged commit 7ee24a6 into middleapi:main Oct 5, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant