0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-16 22:50:20 +00:00
Commit graph

264 commits

Author SHA1 Message Date
github-actions[bot]
714df67ab1
ci: Version Packages (#11306)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-26 20:32:28 +02:00
alex-js-ltd
ac2b61230e
fix(react-query): propagate falsy errors to the error boundary (#11305)
* test(react-query): cover falsy errors with throwOnError in useQuery

* test(react-query): show falsy errors silently skip the error boundary

* fix(react-query): throw falsy errors from useQueries to the error boundary

* chore: add changeset
2026-08-26 15:27:28 +02:00
github-actions[bot]
1836e61b8c
ci: Version Packages (#11303)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-26 10:56:25 +02:00
Dominik Dorfmeister 🔮
ef1eff1b62
fix(query-devtools): remove solid-js import from declarations (#11300)
* fix(query-devtools): remove solid-js import from declarations

Move public devtools types into a Solid-free module so declaration
generation does not emit a side-effect import for solid-js.

* add integration regression test

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-26 10:50:02 +02:00
Dominik Dorfmeister 🔮
578e5c26e8
ref: bundle-size improvements (#11302)
* ref: bundle-size improvements

* revert size limit for better comparison

* spyOn setInterval
2026-08-26 10:49:36 +02:00
github-actions[bot]
51f12db919
ci: Version Packages (#11294)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-25 23:24:07 +02:00
Dominik Dorfmeister 🔮
a05df6aefb
fix(query-core): Avoid scheduling stale timeouts for disabled query observers (#11293)
* fix(query-core): Avoid scheduling stale timeouts for disabled query observers.

* ref: do the cheap thing first
2026-08-25 23:17:25 +02:00
github-actions[bot]
730b3aa06c
ci: Version Packages (#11276) 2026-08-25 04:21:47 +09:00
Wonsuk Choi
714c2856e0
fix(preact-query/usePrefetchQuery): replace deprecated 'queryClient.fetchQuery' with 'queryClient.query' (#11274)
* fix(preact-query/usePrefetchQuery): replace deprecated 'queryClient.fetchQuery' with 'queryClient.query'

* chore(.changeset): use conventional-commits style wording for changeset entry
2026-08-25 04:06:26 +09:00
github-actions[bot]
96f2da6353
ci: Version Packages (#11271)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-24 15:20:40 +02:00
Ben Younes
cafd540c02
fix(svelte-query): handle shrinking createRawRef array by multiple entries (#10341) (#10892)
The `createRawRef` Proxy used by `createQueries` crashed with
`TypeError: 'deleteProperty' on proxy: trap returned falsish for property 'N'`
whenever the reactive query list was shrunk by two or more items in one update.

Two compounding causes:
1. `update()` iterated `keysToRemove` in ascending index order. The trap
   decrements `target.length` after every deletion, so the next stale index
   was no longer `in target` and the trap returned `false`, which throws in
   strict mode (ES modules).
2. The trap returned `false` for missing props instead of treating delete on
   a nonexistent prop as a spec-compliant no-op.

Fix: sort `keysToRemove` descending for arrays so each delete acts on the
current tail, and return `true` from `deleteProperty` when the prop is
already absent.

Generated by Ora Studio
Vibe coded by ousamabenyounes

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-08-24 15:12:37 +02:00
renechoi
320ed25cac
fix(svelte-query): activate createQueries initialized with an empty array (#11127)
fix(svelte-query): track keys added to an empty createRawRef

createQueries stayed permanently inactive when it was initialized with an
empty queries array. Reads of an absent index have no $state.raw field to
subscribe to, and length is a plain array property, so a consumer that
observed the result while it was empty registered no reactive dependency
and never re-ran once queries were added.

Track those reads through a key version that update() bumps whenever the
key set changes.

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-08-24 15:03:01 +02:00
alex-js-ltd
250050d863
fix(svelte-query): shrink useMutationState results (#11153)
* test(svelte-query/useMutationState): add coverage for shrinking filtered results

* fix(svelte-query): shrink useMutationState results

* chore: add changeset for useMutationState fix

---------

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-08-24 14:41:56 +02:00
github-actions[bot]
388bbaf181
ci: Version Packages (#11265)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-23 19:57:36 +02:00
Bart Spaans
80fbf73e77
feat(query-core): export cache config types (#11263)
* export types

* changeset

---------

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-08-23 19:48:43 +02:00
github-actions[bot]
bc423b37ef
ci: Version Packages (#11261)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-23 12:57:01 +02:00
Manuel Schiller
134890dbdc
fix(query-core): accept partial dehydrated state (#11260) 2026-08-23 12:50:28 +02:00
github-actions[bot]
5743468462
ci: Version Packages (#11206)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-22 20:52:42 +02:00
Định Lê
2215bb0311
fix(query-core): make MutateFunction optional undefinable-variables (#8737)
* feat(query-core): make `MutateFunction` optional undefinable-variables

* test(query-core): MutateFunction

* test(query-core): MutateFunction

* vue

* ci: apply automated fixes

* angular

* fix adapter signatures

* ci: apply automated fixes

* changeset

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-22 11:24:11 +02:00
Manuel Schiller
b4368c4379
perf(query-core): skip no-op hydration callbacks and export dehydrateQuery (#11253)
* perf(query-core): skip no-op hydration callbacks and export dehydrateQuery

* export and add tests

Co-authored-by: Copilot <copilot@github.com>

* stabilize test

---------

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: TkDodo <office@dorfmeister.cc>
2026-08-22 11:13:51 +02:00
Dami Oyeniyi
3196e06b76
fix: vue devtools class attribute (#10849)
* fix(vue-query-devtools): use class instead of className in templates

* chore: add changeset
2026-08-22 10:25:22 +02:00
Dominik Dorfmeister 🔮
37127dbe47
fix/11018 (#11245)
* revert: remove NoInfer from useQuery return types

* add union type tests

* changeset
2026-08-21 16:22:28 +02:00
한국
6796c51275
fix(broadcast-client): recover from errors thrown while applying an incoming cross-tab message (#11242)
* fix(broadcast-client): recover from errors thrown while applying an incoming cross-tab message

If applying an incoming cross-tab message (query.setState/queryCache.build,
which notifies observers) throws, the internal `tx()` helper's `transaction`
flag was never reset. This silently disabled all future outgoing broadcasts
from this tab for the rest of the session. Guard with try/finally so a single
failed message can't permanently break cross-tab sync.

* test(broadcast-client): also cover the query.setState throw path

The existing regression test only exercised queryCache.build (a brand-new
remote query hash). Add a case where the incoming message targets an
existing query, so an exception during query.setState is exercised too.

Addresses CodeRabbit review feedback on #11242.
2026-08-21 11:50:13 +02:00
Zane Wang
3e83601003
fix(query-core): memoize falsy combine results in QueriesObserver (#11065)
fix(query-core): memoize falsy combine results

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-08-20 19:04:49 +02:00
Ciarán Curley
e6748265c8
React: update usePrefetchQuery to use new methods, plus react adaptor tests and docs (#10668)
* feat(react-query): update usePrefetchQuery to use new imperitive methods plus tests

* docs(react-query): new docs for usePrefetchQuery

* Update .changeset/warm-candies-like.md

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update packages/react-query/src/usePrefetchInfiniteQuery.tsx

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>

* Update packages/react-query/src/usePrefetchQuery.tsx

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-08-20 18:35:32 +02:00
Ciarán Curley
4e48c581b7
Preact: update usePrefetchQuery to use new methods with docs (#10669)
* feat(preact-query): use new methods for usePrefetchQuery plus tests

* docs(preact-query): updated docs for usePrefetchQuery

* Update docs/framework/preact/reference/interfaces/UsePrefetchInfiniteQueryOptions.md

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update packages/preact-query/src/usePrefetchInfiniteQuery.tsx

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>

* Update packages/preact-query/src/usePrefetchQuery.tsx

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-08-20 18:35:10 +02:00
Kushida
88342670ec
fix(react-query): keep unsubscribed useQueries idle (#11130) 2026-08-20 17:32:09 +02:00
Ciarán Curley
97ce30b51e
Vue: add new impertive methods to vue proxy QueryClient (#11208)
* feat(vue-query): add new methods to vue-query

* docs(vue-query): docs for new impertive methods for Vue

* fix(vue-query): remove getter options from impertive methods

There is no evidence that the () => queryOptions getter type is
properly used by `fetchQuery` et al, as while it accepts a getter in the
types, it doens't resolve the function at runtime (as opposed to
`useQuery`). Removing the type from `query` and `fetchQuery` and
documenting calling getters impertivly as a workaround.

* Update packages/vue-query/src/queryClient.ts

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>

* Update packages/vue-query/src/usePrefetchQuery.ts

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>

---------

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-08-20 17:12:42 +02:00
Dominik Dorfmeister 🔮
1ef42087c9
ref: remove experimental_prefetchInRender (#11221) 2026-08-20 11:32:10 +02:00
Jooyoung Shin
4913802895
fix(preact-query): allow retryOnMount when throwOnError is function (#11166)
Ports #9338 to preact-query: ensurePreventErrorBoundaryRetry now
receives the cached query and evaluates a function-form throwOnError
against the actual error before setting retryOnMount = false, instead
of treating any function as truthy. Includes the regression tests
from #9338, two of which fail on current main.

Fixes #11165

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-08-20 11:07:35 +02:00
n-satoshi061
3c79861ab1
fix(broadcast-client): handle unhandled postMessage rejections (#10771)
* fix(broadcast-client): handle unhandled postMessage rejections

Wrap channel.postMessage() calls in safePost() to catch DataCloneError
and similar failures that occur when query data contains non-cloneable
values (ReadableStream, Response, Vue reactive proxies, etc.).

Adds an optional onBroadcastError callback to BroadcastQueryClientOptions
so consumers can pipe errors to Sentry/Datadog. Falls back to console.warn
in development when the callback is not provided.

Fixes #10543

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(broadcast-client): guard against throwing onBroadcastError callback

Wrap onBroadcastError() in a try/catch so that if the callback itself
throws, the error does not escape as an unhandled rejection. Falls back
to console.warn in development when the callback throws.

Add a test asserting no unhandledRejection fires when onBroadcastError throws.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(broadcast-client): handle async onBroadcastError rejections

Support async onBroadcastError callbacks by calling .catch() on the
returned Promise, preventing unhandled rejections when the callback
rejects asynchronously.

Also extracts the console.warn fallback into warnBroadcastError to
deduplicate the warning logic.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test(broadcast-client): use try/finally to ensure unhandledRejection listener cleanup

Prevents listener leaks into subsequent tests if an assertion throws
before process.off() is reached.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(broadcast-client): improve types, messages, and docs

- Export BroadcastErrorEvent interface with QueryKey typing so consumers
  can import the type directly
- Use discriminated union for internal BroadcastMessage (state only on
  updated) for more precise typing
- onBroadcastError now receives BroadcastErrorEvent (no internal state
  field) instead of the raw BroadcastMessage
- Differentiate dev warning messages: broadcast failures explain the
  structured-clone cause and consequence; onBroadcastError failures
  explicitly identify the hook as the source
- Remove warnBroadcastError helper in favour of context-specific inlined
  warn calls
- Fix duplicate queryClient.getQueryCache() call (use queryCache directly)
- Add JSDoc to all BroadcastQueryClientOptions fields
- Add onBroadcastError section to broadcastQueryClient docs with Sentry
  example

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test(broadcast-client): assert warn message when onBroadcastError throws or rejects

Add two tests that verify the '[broadcastQueryClient] onBroadcastError
threw while handling...' console.warn message is emitted in development
when the onBroadcastError callback itself throws synchronously or rejects
asynchronously.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(broadcast-client): include state in 'added' broadcasts

The receiver's onmessage handler reads state for 'added' events to call
query.setState(state) and queryCache.build(..., state), but the sender
was not including state in the outbound message. This caused receiving
tabs to apply undefined state for newly added queries.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test(broadcast-client): wrap warnSpy in try/finally to prevent spy leakage

If an assertion fails before mockRestore(), the console.warn spy would
leak into subsequent tests. Wrapping each spy block in try/finally
ensures restore always runs regardless of test outcome.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* ci: apply automated fixes

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-20 10:24:33 +02:00
Scott Cooper
9656dc4e5f
fix(query-core): Keep observer notifications stable (#11234)
Removing an observer in place can shift the active notification loop and skip the next observer. Iterate over a shallow copy so synchronous unsubscriptions keep the old behavior without giving up the faster removal path from #11214.

Co-authored-by: Codex <noreply@openai.com>
2026-08-20 10:18:58 +02:00
Wonsuk Choi
64a8035303
fix(lit-query): migrate to standard tsdown build so 'build' output is cached by nx and 'test:build' passes (#10943)
* fix(lit-query): migrate to standard tsup build so 'build' output is cached by nx and 'test:build' passes

* chore(lit-query): align 'package.json' and rename 'vitest.config.ts' to 'vite.config.ts' to match react-query, drop obsolete knip 'src/tests' ignore

* fix(lit-query): migrate build from 'tsup' to 'tsdown' to match other adapters

* docs(.changeset): update 'lit-query' changeset to reference 'tsdown' instead of 'tsup'
2026-08-20 09:34:13 +09:00
Dominik Dorfmeister 🔮
b866a95add
ref: remove unused experimental_beforeQuery and experimental_afterQuery (#11233) 2026-08-19 20:34:40 +02:00
Dominik Dorfmeister 🔮
fb6c3fabda
fix(react): switch to export type * (#11228) 2026-08-18 21:20:11 +02:00
Shahid Hassan Ansari
5981771abe
fix(query-core): release the retryer once a mutation settles (#11218)
* fix(query-core): release the retryer once a mutation settles

Mutation.execute() never cleared #retryer after settling, so the settled
retryer's promise kept that mutation's result, variables and context
reachable for as long as the MutationCache retained the Mutation. Mirror
the treatment Query.fetch() received in #11163, guarded by an identity
check so a mutation re-executed from a cache callback keeps its own
retryer.

Releasing the retryer alone would change continue(): a settled mutation
no longer has a retryer to continue, so it would fall through to
execute() and run the mutationFn a second time. Both internal callers
filter on state.isPaused and never reach a settled mutation, but
continue() is reachable directly, so the fallback is now gated on the
mutation still being pending -- the same condition execute() already uses
to detect a restored mutation.

Fixes #11216

* test(query-core): assert the settled retryer is actually released

The previous tests only guarded the continue() gating and passed on main
too, so they did not demonstrate the fix. continue() is the only reader
of #retryer outside execute(): while a settled retryer is still held it
hands back that retryer's promise, which resolves with the raw result it
closed over (or rejects with its error). Both new tests fail on main and
pass with the retryer released.

---------

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-08-18 20:59:40 +02:00
Scott Cooper
1f631b3604
perf(query-core): Skip unused query result tracking (#11225)
* perf(query-core): Skip unused query result tracking

QueriesObserver was building tracked results on every update even when there was no combine function to consume them. Skip that work for normal useQueries notifications.

Co-Authored-By: Codex <noreply@openai.com>

* ref(query-core): Reuse combine skip check

Treat a missing combine function as another reason to skip combining. This keeps the notification flow close to the existing code and only defers result tracking.

Co-Authored-By: Codex <noreply@openai.com>

* ref(query-core): Match combine presence check

Use the same truthiness check as combineResult so null and other falsy runtime values follow the existing no-combine behavior.

Co-Authored-By: Codex <noreply@openai.com>

---------

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-08-18 18:52:50 +02:00
Dominik Dorfmeister 🔮
294d4e62c4
fix: declaration emit (#11224)
Co-Authored by @artemxknpv
2026-08-18 17:48:33 +02:00
Ben Younes
5199f0884c
fix(vue-query): preserve TQueryKey inference with generic params (#8199) (#10584)
* fix(vue-query): preserve TQueryKey inference with generic params (#8199)

The mapped UseQueryOptions type wrapped queryKey in
MaybeRefDeep<DeepUnwrapRef<TQueryKey>>. The recursive DeepUnwrapRef on a
generic TQueryKey is opaque to TS's homomorphic mapped type inference,
so TQueryKey collapsed to its default (QueryKey) when useQuery was
called from a composable that propagates a generic into the queryKey.

For the queryKey property only, drop DeepUnwrapRef and use a single-
level MaybeRef<TQueryKey> wrap. Inference now binds TQueryKey to the
supplied queryKey shape; queryFn still receives DeepUnwrapRef<TQueryKey>
via the existing mapping for non-queryKey properties.

Co-Authored-By: Ora Studio <noreply@oratelecom.net>

* test(vue-query): strengthen #8199 regression assertion with explicit TData

Per CodeRabbit feedback: bare assertType(useBasket('fruit')) only verified
the call compiled, which would still pass under the old buggy behavior
(TQueryKey collapsing to QueryKey, TData inferred as unknown). Lock the
regression by asserting the propagated TData explicitly.

---------

Co-authored-by: Ora Studio <noreply@oratelecom.net>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-08-18 17:44:01 +02:00
hamed-bavar
34f7ceed09
fix(query-core): clear stale select error when observer switches to a query without data (#11161)
* fix(query-core): clear stale select error when observer switches to a query without data

* fix(query-core): reset isPlaceholderData on select-error results

---------

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-08-18 10:55:02 +02:00
Lazizbek Ergashev
cb6c9d3725
fix({react,preact}-query): default 'TData' of infinite query options to 'InfiniteData' (#11147)
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-08-18 10:51:47 +02:00
Reza Rahemtola
e546d03bef
fix(react-query): remove placeholderData from suspense infinite query (#11144)
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-08-18 10:44:27 +02:00
Alexander Kireyev
ba4650c05e
fix(query-core): reset isPlaceholderData when select throws on placeholder data (#11011)
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-08-18 10:44:05 +02:00
Lazizbek Ergashev
18c1c1ef94
fix(query-core): reattach 'MutationObserver' to its mutation in 'onSubscribe' (#11172)
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-08-18 10:18:59 +02:00
Zelys
6e3d521fe5
fix(types): propagate generic type params to useMutationState select callback (#10373)
* fix(types): propagate generic type params to useMutationState select callback

When TResult is a typed MutationState, the select callback parameter
now receives the correctly typed Mutation instead of the base Mutation type.

Adds a second type param TMutation (defaulting to MutationTypeFromResult<TResult>)
to MutationStateOptions across all five framework adapters. Uses a non-distributive
conditional type to avoid union expansion when TResult is unresolved.

Fixes #9825

* ci: apply automated fixes

* refactor(types): simplify useMutationState cast to mutation as TMutation

Replace the double-cast `(fn as unknown as (m: Mutation) => TResult)(m)`
with the direct `fn(m as TMutation)` across all five framework packages.

The constraint `TMutation extends Mutation<any, any, any, any>` creates
sufficient overlap for the single cast to compile cleanly on TS 5.4–6.0.

* fix(test): reorder imports in useMutationState.test-d.tsx per import/order rule

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor(svelte-query): eliminate duplicate MutationTypeFromResult definition

Export MutationTypeFromResult from types.ts so useMutationState.svelte.ts
can import it instead of redefining it. Also normalises the else branch to
plain Mutation, matching every other adapter.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-08-18 10:02:05 +02:00
Scott Cooper
5bb089d153
perf(query-core): Reduce observer removal overhead (#11214)
Removing observers copied the full observer list on every unsubscribe, which got expensive when thousands of components shared a query. Splice the existing list in place instead.

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-08-18 09:38:08 +02:00
Gihyeon Jeong / 정기현
8582702152
refactor(eslint-plugin-query): remove unused ast-utils helpers (#11115)
* refactor(eslint-plugin-query): remove unused ast-utils helpers

Remove five unused helpers from the ASTUtils object in ast-utils.ts:
getNestedIdentifiers, getNestedReturnStatements, getClosestVariableDeclarator,
mapKeyNodeToText and mapKeyNodeToBaseText.

None are referenced by any rule or other module, and ASTUtils is not part of
the package's public API (it is not exported from index.ts). knip does not flag
them because ASTUtils is exported as a single object, so member-level dead code
slips past it.

All 1709 tests pass and ast-utils.ts line coverage rises from 41% to 95%.

* chore: add changeset for unused ast-utils helper removal

---------

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-08-18 09:37:41 +02:00
Scott Cooper
01a02bfad3
perf(query-core): Deduplicate tracked query properties (#11215)
* perf(query-core): Deduplicate tracked query properties

Each accessed useQueries result fans the same property out to every observer, making ordinary result mapping quadratic.

Track which properties have already been synchronized during the current result pass. This keeps the #7000 behavior while dropping the 10,000-result tracking benchmark from about 699 ms to under 1 ms locally.

Co-Authored-By: OpenAI Codex <noreply@openai.com>

* test(query-core): Cover repeated property tracking

Extend the existing tracking assertion to cover the same property being read from a second result.

Co-Authored-By: OpenAI Codex <noreply@openai.com>

---------

Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-08-18 09:37:33 +02:00
palkim
47d49d31aa
fix(solid-query): resolve query client outside memos (#10571)
* fix(solid-query): resolve query client outside memos

* fix(solid-query): resubscribe client counters

* test(solid-query): assert client subscription cleanup

---------

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-08-18 09:22:07 +02:00
Dominik Dorfmeister 🔮
279bb5508b
chore: update to ts 7 and move cut-off to 5.6 (#11212)
* update to ts 7 and move cut-off to 5.7

* changeset

* fix: use typescript v6 with tsup

* ci: apply automated fixes

* ref: update sveltejs/package

* ref: make ts6 the default typescript

* fix: lit build

* effing tsup

* move ignoreDeprecations to solid tsup config

* move ignoreDeprecations to relevant tsup configs

* better lit fix

* restore vue queryClient

* Revert "restore vue queryClient"

This reverts commit 4f95fc918a.

* fix things

* ignore devDep ordering

* vue needs to use ts6

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-17 22:50:18 +02:00