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

5,266 commits

Author SHA1 Message Date
github-actions[bot]
d4033eb1e5
ci: Version Packages (#11651) release-2026-09-26-0357 @tanstack/vue-query@5.104.0 @tanstack/vue-query-devtools@6.3.0 @tanstack/svelte-query-persist-client@6.3.0 @tanstack/query-async-storage-persister@5.104.0 @tanstack/svelte-query-devtools@6.3.0 @tanstack/solid-query@5.104.0 @tanstack/solid-query-persist-client@5.104.0 @tanstack/solid-query-devtools@5.104.0 @tanstack/react-query@5.104.0 @tanstack/react-query-persist-client@5.104.0 @tanstack/react-query-next-experimental@5.104.0 @tanstack/preact-query@5.104.0 @tanstack/svelte-query@6.3.0 @tanstack/query-persist-client-core@5.104.0 @tanstack/react-query-devtools@5.104.0 @tanstack/query-devtools@5.104.0 @tanstack/eslint-plugin-query@5.104.0 @tanstack/angular-query-experimental@5.104.0 @tanstack/lit-query@0.2.25 @tanstack/query-core@5.104.0 @tanstack/preact-query-devtools@5.104.0 @tanstack/query-sync-storage-persister@5.104.0 @tanstack/preact-query-persist-client@5.104.0 @tanstack/query-broadcast-client-experimental@5.104.0
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-26 13:53:37 +10:00
Lachlan Collins
5279b05211
chore(deps): update Vite from v6 to v8 (#11650)
* chore(deps): update Vite from v6 to v8

* Fix angular, vue-devtools

* Fix vue-devtools

* Fix knip, remove @tanstack/vite-config

* Update eslint config

* Disable false eslint errors

* Fix remaining errors

* Fix knip, dedupe esbuild

* Add changeset
2026-09-26 12:23:02 +10:00
github-actions[bot]
fe053bf8e9
ci: Version Packages (#11612) release-2026-09-26-0017 @tanstack/query-core@5.103.3 @tanstack/solid-query@5.103.3 @tanstack/angular-query-experimental@5.103.3 @tanstack/query-broadcast-client-experimental@5.103.3 @tanstack/preact-query@5.103.3 @tanstack/preact-query-persist-client@5.103.3 @tanstack/preact-query-devtools@5.103.3 @tanstack/query-devtools@5.103.3 @tanstack/lit-query@0.2.24 @tanstack/vue-query-devtools@6.2.5 @tanstack/query-persist-client-core@5.103.3 @tanstack/svelte-query@6.2.5 @tanstack/query-sync-storage-persister@5.103.3 @tanstack/eslint-plugin-query@5.103.3 @tanstack/svelte-query-persist-client@6.2.5 @tanstack/react-query-devtools@5.103.3 @tanstack/vue-query@5.103.3 @tanstack/svelte-query-devtools@6.2.5 @tanstack/react-query-next-experimental@5.103.3 @tanstack/query-async-storage-persister@5.103.3 @tanstack/react-query-persist-client@5.103.3 @tanstack/solid-query-persist-client@5.103.3 @tanstack/react-query@5.103.3 @tanstack/solid-query-devtools@5.103.3
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-26 10:13:58 +10:00
Lachlan Collins
a0ee654cd8
chore(angular-query): migrate to tsdown (#11649)
* chore(angular-query): migrate to tsdown

* Add changeset

* Fix types

* Fix attw
2026-09-26 09:59:39 +10:00
Lachlan Collins
d86ac36663
chore(query-devtools): update dependencies (#11648)
* chore(query-devtools): update dependencies

* Add changeset

* Fix build
2026-09-26 08:45:38 +10:00
Lachlan Collins
1c9693eac7
fix(codemods): update codemods build script (#11647)
* fix(codemods): update codemods build script

* Add changeset
2026-09-26 07:47:49 +10:00
autofix-ci[bot]
7a23df2abb
ci: apply automated fixes 2026-09-25 21:32:09 +00:00
Lachlan Collins
f00aad602e
chore(deps): update dev dependencies (#11640)
chore(deps): update many dev dependencies
2026-09-26 07:30:31 +10:00
Lachlan Collins
6ebffacbe7
fix(solid-query): useBaseQuery SSR cleanup (#11628)
* fix(solid-query): useBaseQuery SSR cleanup

* Add changeset
2026-09-26 06:18:00 +10:00
Wonsuk Choi
2443290fb5
test(*): rename 'console.error' spies to 'consoleErrorMock' (#11646) 2026-09-26 00:45:05 +09:00
Wonsuk Choi
fd64c13e68
test(*): rename 'console.warn' spies to 'consoleWarnMock' (#11645) 2026-09-26 00:28:28 +09:00
Wonsuk Choi
9ff2ee3bbd
docs(vue-query): document how 'suspense()' resolves and handles errors, and fix the 'suspense' SSR examples (#11629)
* docs(vue-query): document how 'suspense()' resolves, including the disabled query caveat on the server

* docs(vue-query/suspense): add error handling with 'throwOnError' and 'onErrorCaptured'

* docs(vue-query/ssr): fix the Nuxt examples that call 'suspense' without destructuring it and destructure a nonexistent 'data2'

* docs(vue-query/suspense): note that 'suspense()' can resolve before the query function finishes

* docs(vue-query/{ssr,suspense}): scope the disabled 'suspense()' caveat to queries that stay disabled

* docs(vue-query/{ssr,suspense}): scope the SSR caveat heading to queries that stay disabled

* docs(vue-query/ssr): use 'vue' code blocks for the SFC examples
2026-09-25 23:34:07 +09:00
Ciarán Curley
45657919ac
chore: add human voice ai policy from ai-policy.dev (#11641)
* chore: add human voice ai policy from ai-policy.dev

https://ai-policy.dev/policies/human-voice

* fix typo pr template

* simplfy the contibutions details

* Fix typo in CONTRIBUTING.md

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-09-25 16:13:38 +02:00
Wonsuk Choi
fcab29fa8c
test({query-core,react-query,preact-query}): restore the previous 'isServer' value in 'setIsServer' instead of the deprecated 'isServer' constant (#11632)
* test(query-core/utils): restore the previous 'isServer' value in 'setIsServer' instead of the deprecated 'isServer' constant

* test(react-query/utils): restore the previous 'isServer' value in 'setIsServer' instead of the deprecated 'isServer' constant

* test(preact-query/utils): restore the previous 'isServer' value in 'setIsServer' instead of the deprecated 'isServer' constant

* test({query-core,react-query,preact-query}/utils): rename 'original' to 'originalIsServer' in 'setIsServer'
2026-09-25 17:16:27 +09:00
Wonsuk Choi
e8dacbee8b
docs({react-query,preact-query,solid-query,svelte-query}/README): point the CI badge at the 'release.yml' workflow on 'main' (#11633)
* docs({react-query,preact-query,solid-query,svelte-query}/README): point the CI badge at the 'release.yml' workflow on 'main'

* docs({react-query,preact-query,solid-query,svelte-query}/README): add alt text to the release badge
2026-09-25 17:14:12 +09:00
Wonsuk Choi
ea2da8f631
test(vue-query/vueQueryPlugin): add test for not mounting the client on the server (#11631) 2026-09-25 17:01:37 +09:00
Wonsuk Choi
eb8ab6ed76
test(vue-query): replace mock type casts with 'vi.mocked' and remove unused 'getCurrentInstance' mocks (#11630) 2026-09-25 17:00:34 +09:00
Wonsuk Choi
b0222f23b4
test(query-core/timeoutManager): remove redundant 'vi.mocked' around the 'console.error' spy (#11634) 2026-09-25 16:53:58 +09:00
Wonsuk Choi
edbe7b3633
test(vue-query/{useQuery,useQueries,useMutation}): add tests for the 'shallow' option (#11622)
* test(vue-query/{useQuery,useQueries,mutationOptions}): add tests for the 'shallow' option

* test(vue-query/{useQuery,useQueries,mutationOptions}): add tests for deeply reactive and readonly results when 'shallow' is not set

* test(vue-query/{useMutation,mutationOptions}): move the 'useMutation' 'shallow' tests to 'useMutation.test.ts'
2026-09-25 15:21:34 +09:00
Wonsuk Choi
b6da52620b
test(vue-query/{useQuery,useQueries,useIsMutating}): assert the query or mutation actually runs in the 'onScopeDispose' tests (#11626) 2026-09-25 15:17:20 +09:00
Wonsuk Choi
6ced66cf6a
test(vue-query/ssr): add test for resolving a dependent query whose 'queryKey' changed before 'suspense' in 'onServerPrefetch' (#11618) 2026-09-25 15:08:20 +09:00
Wonsuk Choi
7655a43ad5
test(vue-query/useMutation): add test for stopping listening to changes on 'onScopeDispose' (#11619)
* test(vue-query/useMutation): add test for stopping listening to changes on 'onScopeDispose'

* test(vue-query/useMutation): assert the mutation actually runs in the 'onScopeDispose' test with 'isMutating'
2026-09-25 15:03:47 +09:00
Wonsuk Choi
606968e01a
test(vue-query/queryClient): add tests for custom 'queryCache'/'mutationCache' and the arguments 'invalidateQueries' passes to 'refetchQueries' (#11621) 2026-09-25 14:56:29 +09:00
Wonsuk Choi
d649c4de42
test(vue-query/useIsMutating): add tests for filters wrapped in a 'ref' and a 'queryClient' passed as the second argument (#11620) 2026-09-25 14:53:59 +09:00
Wonsuk Choi
2ae71c17d7
test(vue-query/vueQueryPlugin): add tests for 'clientPersisterOnSuccess' and the 'unmount' returned by 'clientPersister' (#11623) 2026-09-25 14:39:43 +09:00
Wonsuk Choi
3e5e7eba46
test(vue-query/useQueries): add test for using the current 'queryKey' value when 'refetch' is called (#11617) 2026-09-25 14:32:14 +09:00
Wonsuk Choi
dfc3d9abed
docs(svelte-query/useMutationState): align the JSDoc description with the other adapters (#11624)
* docs(svelte-query/useMutationState): replace 'hook instance' with 'createMutation' call in JSDoc

* docs(svelte-query/useMutationState): align the JSDoc description with the other adapters
2026-09-25 14:27:22 +09:00
autofix-ci[bot]
bf3a04c21c
ci: apply automated fixes 2026-09-25 05:17:34 +00:00
Lachlan Collins
57f40eb05b
chore(deps): update non-major dependencies (#11625)
* chore(deps): update non-major dependencies

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-09-25 15:15:46 +10:00
changbaebang
1e90d389e5
docs(svelte-query): add package 'README.md' (#11604)
* docs(svelte-query): add package README

Every other adapter (react, preact, solid, vue, lit, angular) ships a
README; svelte-query did not, so its npm page is empty. Copied from
solid-query, which uses the ci badge that still resolves.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* docs(svelte-query): fix the CI link encoding and point the downloads badge at this package

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* docs(svelte-query/README): replace 'Primitives' with 'Functions' in the description

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Wonsuk Choi <sukvvon@gmail.com>
2026-09-25 14:12:34 +09:00
Wonsuk Choi
0d118a0694
test(vue-query/useMutation): assert the error watcher throw on both Vue 2 and Vue 3 (#11606)
* test(vue-query/useMutation): assert the error watcher throw on both Vue 2 and Vue 3

* test(vue-query/useMutation): remove the 'unhandledRejection' listener in 'onTestFinished' so it does not leak when the test fails

* test(vue-query/useMutation): assert the 'unhandledRejection' listener receives the rejected promise with 'expect.any(Promise)'
2026-09-25 11:29:48 +09:00
Wonsuk Choi
397ad07f60
test({query-core,react-query,preact-query,solid-query}): pass 'unhandledRejectionFn' directly so 'process.off' removes the 'unhandledRejection' listener (#11610)
* test(query-core/{mutation,mutationObserver}): pass 'unhandledRejectionFn' directly so 'process.off' removes the 'unhandledRejection' listener

* test(react-query/useMutation): pass 'unhandledRejectionFn' directly so 'process.off' removes the 'unhandledRejection' listener

* test(preact-query/useMutation): pass 'unhandledRejectionFn' directly so 'process.off' removes the 'unhandledRejection' listener

* test(solid-query/useMutation): pass 'unhandledRejectionFn' directly so 'process.off' removes the 'unhandledRejection' listener
2026-09-25 11:26:16 +09:00
Wonsuk Choi
3d6144e42c
test(vue-query/utils): assert 'updateState' sets keys missing from the update to 'undefined' (#11609) 2026-09-25 11:25:39 +09:00
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