0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-18 19:33:22 +00:00
Commit graph

5,683 commits

Author SHA1 Message Date
Wonsuk Choi
c9c86ff4db
test(vue-query/useQueries): assert the other query is not refetched when refetching a single query (#11608) 2026-09-25 11:24:30 +09:00
Wonsuk Choi
43dcbd99e0
test(vue-query/useIsMutating): use 'sleep(10)' so the 'onScopeDispose' test fails if the subscription is kept (#11607) 2026-09-25 11:24:13 +09:00
Wonsuk Choi
c420d59d66
test(vue-query/useQuery): assert the 'suspense' result in the enabled, default and 'throwOnError' tests (#11605)
* test(vue-query/useQuery): assert the 'suspense' result in the enabled, default and 'throwOnError' tests

* test(vue-query/useQuery): remove the 'unhandledRejection' listener in 'onTestFinished' so it does not leak when the test fails
2026-09-25 11:23:17 +09:00
autofix-ci[bot]
077230bf29
ci: apply automated fixes 2026-09-24 10:02:48 +00:00
Wonsuk Choi
d03806572a
fix(svelte-query/{createQuery,queryOptions}): correct the overload selected for 'initialData' (#11592)
* fix(svelte-query/{createQuery,queryOptions}): correct the overload selected for 'initialData'

* test(svelte-query/queryOptions): use a non-literal condition instead of a wrapper function in the optional 'initialData' object test
2026-09-24 20:01:04 +10:00
Wonsuk Choi
645291a439
test(solid-query-persist-client/PersistQueryClientProvider): rename 'console.error' spy from 'onErrorMock' to 'consoleMock' to align with react-query (#11603) 2026-09-24 14:12:35 +09:00
Wonsuk Choi
b2dcd86837
test({angular-query-experimental,angular-query-persist-client}): align mock names with react-query and the options they are passed to (#11602) 2026-09-24 14:12:14 +09:00
Wonsuk Choi
f6036d75f2
test(svelte-query/createMutation): rename per-call 'onSuccess' mocks to 'onSuccessMutate' to align with react-query (#11601) 2026-09-24 14:11:29 +09:00
Wonsuk Choi
7bfe142e8a
test(vue-query/useQuery): wire the mock 'queryFn' into the fresh-data 'suspense' test (#11600) 2026-09-24 13:23:28 +09:00
Wonsuk Choi
a43e741e04
test(vue-query): align mock names with react-query and the options they are passed to (#11599) 2026-09-24 13:11:27 +09:00
Wonsuk Choi
bf07891f8a
test(vue-query): add tests for a 'computed' 'queryFn' resolving to 'skipToken' and a whole-'queryKey' getter (#11427)
* fix(vue-query): widen 'SkipToken' to 'symbol' so it type-checks inside a whole-options getter

* chore(vue-query): add changeset for 'SkipToken' widening fix

* test(vue-query/useQuery): document that widening 'SkipToken' also accepts unrelated symbols

* fix(vue-query): unify 'UseQueryOptions' with 'QueryOptions' so 'queryFn' accepts a 'computed' resolving to 'skipToken'

* test(vue-query): add runtime coverage for 'skipToken' and bare-getter 'queryKey' across 'useQuery'/'useQueries'/'useInfiniteQuery'

* fix(vue-query): narrow 'queryOptions()' input back to only 'enabled'/'queryKey'/'queryFn' reactive

* test(vue-query/useQuery): verify 'TQueryFnData' inference for a computed 'queryFn' resolving to 'skipToken'

* test(vue-query): fill remaining type-coverage gaps for reactive 'queryFn'/'queryKey' and 'queryOptions()' input narrowing

* test(vue-query/queryOptions): verify skipToken ternary inside a whole-options getter

* test(vue-query/useQueries): import 'reactive' from 'vue' and 'computed'/'ref' from 'vue-demi'

* test(vue-query): downgrade 'computed' 'queryFn' assertions 'vue-tsc' can't resolve to 'assertType'

* chore(vue-query): shorten changeset summary to match PR title

* fix(vue-query/infiniteQueryOptions): separate plain output type from reactive input and allow a bare getter for 'queryKey'

* fix(vue-query/index): export 'InfiniteQueryOptions'

* fix(vue-query): restore 'enabled' plain-callback support on 'infiniteQueryOptions'

Narrowing 'InfiniteQueryOptions' to match 'QueryOptions' had also copied its
narrower 'enabled' union, which drops the plain '(query) => boolean' callback
that 'InfiniteQueryObserverOptions' allows. Restore 'enabled' to source from
'InfiniteQueryObserverOptions' directly so all four shapes keep working.

* docs(vue-query): correct inaccurate test comments flagged by CodeRabbit

The 'unrelated symbol' comment on 'useQuery.test-d.ts' claimed it behaves like
'skipToken' at runtime, but 'ensureQueryFn' only identity-checks the exact
'skipToken' value and returns anything else verbatim, so an unrelated symbol
throws once invoked as a function. Also note why the '@ts-expect-error' in
'queryOptions.test-d.ts' sits on 'queryKey' rather than 'staleTime': overload
resolution fails on the whole object literal, and TypeScript reports it at the
first property.

* chore(vue-query): re-sync changeset summary with PR title

The 'infiniteQueryOptions()' narrowing clause got appended to the changeset
only, drifting it back over the 100-char limit and out of sync with the PR
title again. The title's 'align queryOptions/infiniteQueryOptions input'
already covers it.

* test(vue-query/{useQuery,useQueries,useInfiniteQuery}): align the 'skipToken' and whole-'queryKey' getter tests with their neighboring tests

* test(vue-query/{useQuery,useQueries,useInfiniteQuery}): use a real 'sleep(10)' delay in the new 'skipToken' and whole-'queryKey' getter tests

* test(vue-query/{useQuery,useInfiniteQuery}): drop the whole-options getter 'skipToken' test and the 'useInfiniteQuery' whole-'queryKey' getter test
2026-09-24 12:49:49 +09:00
Wonsuk Choi
ac3256ad0d
docs(vue-query): redirect flat reference URLs broken by the TypeDoc migration (#11398)
docs(config): register redirect_from mappings for vue-query reference pages
2026-09-24 11:57:53 +09:00
Lachlan Collins
32ca5b50d4
chore(examples): update Expo from v52 to v57 (#11596) 2026-09-23 21:24:20 +10:00
Wonsuk Choi
c74591ea22
test({angular,vue,solid}-query/queryOptions): add type tests for an optional 'initialData' object (#11593) 2026-09-23 19:11:07 +09:00
Wonsuk Choi
5c018edc2d
test({react,preact}-query/queryOptions): use a non-literal condition instead of a wrapper function in the optional 'initialData' object test (#11594) 2026-09-23 19:10:49 +09:00
Wonsuk Choi
852924d586
docs({react,preact}-query): fix a missing 'noop' import, a link, and typos in the SSR guide (#11591)
* docs({react,preact}-query): fix a missing 'noop' import, a link, and typos in the SSR guide

* docs(react-query): fix subject-verb agreement in the SSR guide's waterfall section
2026-09-23 18:11:51 +09:00
Wonsuk Choi
545911defe
docs(*): fix article and grammar typos in docs and comments (#11590) 2026-09-23 17:48:31 +09:00
changbaebang
1b24bc303f
docs(react-query): fix undefined userId in dependent query prefetch example (#11504)
The server-side example in the SSR guide checked `user?.userId` and then
referenced an undeclared `userId` variable. Align it with the client-side
example above it (and the Preact guide) by using `user?.id` / `user.id`.
2026-09-23 17:47:53 +09:00
Chris Z
36d8ebb324
docs(vue-query): fix 'loosing' typo in the v5 migration guide (#11580)
docs(vue): fix typo 'loosing' -> 'losing' in v5 migration guide

Correct the spelling of 'losing' in the v5 migration guide for the Vue
adapter. 'Loosing' means 'to release/unfasten', while 'losing' means
'to be deprived of' — the latter is the intended meaning here.

Co-authored-by: haimingZZ <haimingZZ@users.noreply.github.com>
Co-authored-by: Wonsuk Choi <sukvvon@gmail.com>
2026-09-23 17:22:39 +09:00
Wonsuk Choi
7176a1cfa9
docs(svelte-query/{createInfiniteQuery,infiniteQueryOptions}): describe overload selection by whether 'initialData' is known to be defined (#11589)
* docs(svelte-query/{createInfiniteQuery,infiniteQueryOptions}): describe overload selection by whether 'initialData' is known to be defined

* docs(svelte-query): regenerate reference docs
2026-09-23 17:07:05 +09:00
Wonsuk Choi
1b7250b3a0
docs(solid-query): replace the 'advanced-ssr' placeholder with a pointer to the SSR guide (#11588) 2026-09-23 14:58:19 +09:00
Wonsuk Choi
848b42129e
docs({react,preact,solid,vue}-query/useQuery): add 'initialDataUpdatedAt' to the seeding example (#11579) 2026-09-23 13:36:10 +09:00
Wonsuk Choi
10a5afcafb
docs(*): exclude protected members from generated reference docs (#11564) 2026-09-23 13:32:45 +09:00
Wonsuk Choi
04c0fa109f
docs(svelte-query): correct 'initialData'/'select' JSDoc inaccuracy (#11577) 2026-09-23 12:21:07 +09:00
Wonsuk Choi
4cd7f1e35b
docs(solid-query): correct 'initialData'/'select' JSDoc inaccuracy (#11576) 2026-09-23 12:20:45 +09:00
Wonsuk Choi
96919caac5
docs(vue-query): correct 'initialData'/'select' JSDoc inaccuracy (#11575)
* docs(vue-query): correct 'initialData'/'select' JSDoc inaccuracy

* docs(vue-query): fix missed 'select' qualifier on 'DefinedInitialQueryOptions' JSDoc
2026-09-23 12:20:26 +09:00
Wonsuk Choi
d33b407d2a
docs({react,preact}-query): correct 'initialData'/'select' and 'QueriesOptions' fallback JSDoc inaccuracies (#11574)
* docs(react-query): correct inaccurate JSDoc statements

* docs(react-query): split QueriesOptions/SuspenseQueriesOptions JSDoc into paragraphs

* docs(preact-query): correct 'initialData'/'select' and 'QueriesOptions' fallback JSDoc inaccuracies

* docs({react,preact}-query): fix missed 'select' qualifier on 'DefinedInitialDataOptions' JSDoc
2026-09-23 12:19:55 +09:00
Wonsuk Choi
1fd9c6d7a5
docs(solid-query): add SSR guide for SolidStart (#11581)
* docs(solid-query): add SSR guide for SolidStart

* ci: apply automated fixes

* docs(solid-query): fix misleading 'staleTime' comment in SSR guide's 'app.tsx' example

* docs(solid-query): drop inaccurate 'gcTime' aside from the SSR guide's memory note

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-09-23 12:18:39 +09:00
Lachlan Collins
8a5e385f67
ci: update to pnpm v12 (#11584) 2026-09-23 07:35:46 +10:00
Lachlan Collins
6a762c790f
ci: update to changesets v3 (#11583) 2026-09-23 07:12:56 +10:00
Lachlan Collins
248343dee9
ci: update to Nx v23 (#11567) 2026-09-23 06:31:23 +10:00
github-actions[bot]
8884f1a4d9
ci: Version Packages (#11582) release-2026-09-22-1338 @tanstack/svelte-query-devtools@6.2.4 @tanstack/svelte-query-persist-client@6.2.4 @tanstack/svelte-query@6.2.4 @tanstack/vue-query-devtools@6.2.4
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-22 15:35:37 +02:00
Wonsuk Choi
535cd61221
fix(svelte-query-devtools): update the devtools instance when options change after mount (#11009)
* fix(svelte-query-devtools): update the devtools instance when options change after mount

* test(svelte-query-devtools/Devtools): add missing 'setTheme' mock and coverage

---------

Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2026-09-22 20:46:19 +10:00
Wonsuk Choi
129955c8fd
docs(vue-query): document 'queryKey'/'mutationKey' getter-entry unwrap gap (#11573) 2026-09-22 14:37:45 +09:00
Wonsuk Choi
9b14786c6a
test({react,preact,svelte}-query/queryOptions): remove dead 'QueriesObserver' type tests duplicated by 'query-core' (#11572) 2026-09-22 14:06:16 +09:00
Wonsuk Choi
baf7cc644b
docs(query-core): add JSDoc '@param' for 'QueryClient#setQueryData' options (#11571) 2026-09-22 11:27:13 +09:00
Wonsuk Choi
87c77175f9
docs(query-core): remove dead '@param' tags from 'streamedQuery' (#11570) 2026-09-22 11:25:53 +09:00
Wonsuk Choi
b5553313ba
docs(query-core): add JSDoc '@returns' for 'QueryClient' data accessors (#11569) 2026-09-22 11:17:08 +09:00
Wonsuk Choi
46b22a636f
docs(query-core): add JSDoc for 'Subscribable' and 'Removable' base classes (#11565) 2026-09-22 10:50:43 +09:00
github-actions[bot]
413ba6e30b
ci: Version Packages (#11566) release-2026-09-21-1030 @tanstack/svelte-query-devtools@6.2.3 @tanstack/svelte-query-persist-client@6.2.3 @tanstack/svelte-query@6.2.3 @tanstack/vue-query-devtools@6.2.3
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-21 20:28:35 +10:00
Simon H
1490a4b2ae
fix: support async Svelte (#9810)
* fix: support async Svelte

Svelte 5 now supports async await in components. One behavior there is that when a component is created as part of a boundary that has pending async work, its `$effect`s will not run until that async work is done.

The way the code is written right now means you can end up in an infinite pending state: If you do `await someQuery.promise`, the `$effect` for the subscription will never run, and therefore the `await` will never resolve. This PR fixes it.

* lint

* fix

---------

Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2026-09-21 20:10:05 +10:00
Dami Oyeniyi
847f471e37
feat(svelte-query-devtools): add theme option (#10636)
Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2026-09-21 20:09:29 +10:00
github-actions[bot]
e0f6c5542f
ci: Version Packages (#11525) release-2026-09-21-0933 @tanstack/angular-query-experimental@5.103.2 @tanstack/eslint-plugin-query@5.103.2 @tanstack/lit-query@0.2.23 @tanstack/preact-query-devtools@5.103.2 @tanstack/preact-query-persist-client@5.103.2 @tanstack/preact-query@5.103.2 @tanstack/query-async-storage-persister@5.103.2 @tanstack/query-broadcast-client-experimental@5.103.2 @tanstack/query-core@5.103.2 @tanstack/query-devtools@5.103.2 @tanstack/query-persist-client-core@5.103.2 @tanstack/query-sync-storage-persister@5.103.2 @tanstack/react-query-devtools@5.103.2 @tanstack/react-query-next-experimental@5.103.2 @tanstack/react-query-persist-client@5.103.2 @tanstack/react-query@5.103.2 @tanstack/solid-query-devtools@5.103.2 @tanstack/solid-query-persist-client@5.103.2 @tanstack/solid-query@5.103.2 @tanstack/svelte-query-devtools@6.2.2 @tanstack/svelte-query-persist-client@6.2.2 @tanstack/svelte-query@6.2.2 @tanstack/vue-query-devtools@6.2.2 @tanstack/vue-query@5.103.2
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-21 11:29:33 +02:00
Lazizbek Ergashev
322152569e
fix(broadcast-client): don't overwrite an existing query's data on an incoming 'added' message (#11392)
* fix(broadcast-client): don't overwrite an existing query's data on an incoming 'added' message

* test(query-broadcast-client-experimental): drop test that duplicates existing 'added' build coverage
2026-09-21 10:50:04 +02:00
Wonsuk Choi
97cab92a7e
docs(solid-query): add JSDoc for re-declared 'queryKey' (#11563) 2026-09-21 12:01:41 +09:00
Wonsuk Choi
64f1795ada
docs(query-core): add JSDoc for 'select' and 'defaultOptions' (#11562) 2026-09-21 11:25:46 +09:00
Wonsuk Choi
06869a8886
docs(solid-query): rewrite shared 'hook' prose to 'primitive' in guide frontmatter (#11561) 2026-09-21 10:45:13 +09:00
Wonsuk Choi
436a3baa93
docs(solid-query): call the adapter's APIs primitives instead of functions (#11560) 2026-09-21 10:34:21 +09:00
Wonsuk Choi
94de9b4e31
docs(svelte-query): call 'useIsMutating' a function instead of a hook (#11559) 2026-09-21 10:16:49 +09:00
Wonsuk Choi
73a016baab
docs(solid-query): call the adapter's APIs functions instead of hooks (#11558) 2026-09-21 10:16:36 +09:00