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

5,395 commits

Author SHA1 Message Date
Wonsuk Choi
15c2a807cf
test(lit-query/queries-controller): replace fake hosts with 'LitElement' hosts and assert the re-rendered output (#11683) 2026-09-27 14:50:53 +09:00
Wonsuk Choi
e309b9cc1e
test(lit-query/query-controller): replace fake hosts with 'LitElement' hosts and assert the re-rendered output (#11682) 2026-09-27 14:50:44 +09:00
Wonsuk Choi
4752ec80d4
test(lit-query/mutation-controller): replace fake hosts with 'LitElement' hosts and add 'generateElementName' helper (#11681)
* test(lit-query/mutation-controller): replace fake hosts with 'LitElement' hosts and add 'generateElementName' helper

* test(lit-query/mutation-controller): capture the callback version when the options accessor runs
2026-09-27 14:37:56 +09:00
Wonsuk Choi
66a7103e58
test(lit-query): create 'queryClient' in 'beforeEach' and drop unneeded 'retry: false' default options (#11677) 2026-09-27 03:20:32 +09:00
Wonsuk Choi
0c40a4b5ec
test(lit-query/testHost): remove unused 'waitFor' and 'waitForMissingQueryClient' helpers (#11676) 2026-09-27 02:45:04 +09:00
Wonsuk Choi
98184c157d
test(lit-query/client-switch-controllers): switch to fake timers, use 'sleep(10)' and 'queryKey()', and unify test names with 'should' (#11671)
* test(lit-query/client-switch-controllers): switch to fake timers, use 'sleep(10)' and 'queryKey()', and unify test names with 'should'

* test(lit-query/client-switch-controllers): wait for the invalidation refetch to finish and assert its result
2026-09-27 02:36:45 +09:00
Wonsuk Choi
0c2d24a132
test(lit-query/type-inference): use 'queryKey()' and unify test names with 'should' (#11675) 2026-09-27 02:34:59 +09:00
Wonsuk Choi
bfaf34e352
test(lit-query/base-controller): switch to fake timers and unify test names with 'should' (#11674) 2026-09-27 02:34:29 +09:00
Wonsuk Choi
0389826a6e
test(lit-query/mutation-controller): switch to fake timers, use 'sleep(10)' and 'queryKey()', and unify test names with 'should' (#11672) 2026-09-27 02:34:11 +09:00
Wonsuk Choi
cdfb4870f2
test(lit-query/context-provider): switch to fake timers, use 'sleep(10)' and 'queryKey()', and unify test names with 'should' (#11673) 2026-09-27 02:33:45 +09:00
Wonsuk Choi
cbe1add42e
test(lit-query/infinite-and-options): switch to fake timers, use 'sleep(10)' and 'queryKey()', and unify test names with 'should' (#11670) 2026-09-27 02:29:48 +09:00
Wonsuk Choi
ebdfc6b269
test(lit-query/counters-and-state): switch to fake timers, use 'sleep(10)' and 'queryKey()', and unify test names with 'should' (#11669) 2026-09-27 02:29:38 +09:00
Wonsuk Choi
7896579432
test(lit-query/query-controller): switch to fake timers, use 'sleep(10)' and 'queryKey()', and unify test names with 'should' (#11667) 2026-09-27 02:29:28 +09:00
Wonsuk Choi
8be1c836e9
test(lit-query/queries-controller): switch to fake timers, use 'sleep(10)' and 'queryKey()', and unify test names with 'should' (#11668) 2026-09-27 02:28:31 +09:00
Wonsuk Choi
824e07adda
test(lit-query): keep each action, wait and assertion together and separate mounting and each new action (#11666) 2026-09-27 01:43:29 +09:00
Wonsuk Choi
dbb3f22400
test(query-devtools): keep each action, wait and assertion together (#11665) 2026-09-27 01:43:18 +09:00
Wonsuk Choi
743af679f9
test(query-core): keep each action, wait and assertion together and separate setup and each new action (#11664)
* test(query-core): keep each action, wait and assertion together and separate setup and each new action

* test(query-persist-client-core,query-*-storage-persister,query-broadcast-client-experimental): keep each action, wait and assertion together
2026-09-27 01:43:06 +09:00
Wonsuk Choi
c4975411ea
test(solid-query): keep each action, wait and assertion together and separate each new user action (#11662)
* test(solid-query): remove blank lines between actions, waits and their assertions

* test(solid-query/QueryClientProvider): add blank line after 'render'

* test(solid-query/{useIsFetching,useIsMutating}): remove blank lines between the awaited 'Promise.all' and its assertion

* test(solid-query/useQuery): add blank lines around 'window.dispatchEvent'
2026-09-27 01:42:45 +09:00
Wonsuk Choi
f98b0d9af5
test(angular-query): keep each action, wait and assertion together (#11661)
* test(angular-query): remove blank lines between actions, waits and their assertions

* test(angular-query-experimental/injectQuery): add blank line after 'invalidateQueries'

* test(angular-query-experimental): remove blank lines between consecutive waits such as 'TestBed.tick' and 'app.whenStable'

* test(angular-query-experimental): remove blank lines within retry wait cycles and after awaited 'stablePromise'

* test(angular-query-experimental): keep 'detectChanges', component-instance actions and span retrievals together with their waits and assertions
2026-09-27 01:42:07 +09:00
Wonsuk Choi
12dc7ddf02
test(svelte-query): keep each action, wait and assertion together and separate setup calls and new user actions (#11660)
* test(svelte-query): remove blank lines between actions, waits and their assertions

* test(svelte-query/createQuery): add blank lines around 'queryClient' calls

* test(svelte-query-devtools): remove blank lines between 'vi.dynamicImportSettled' and its assertions

* test({svelte-query,svelte-query-devtools}): separate actions after assertions and add blank lines after 'render'
2026-09-27 01:41:59 +09:00
Wonsuk Choi
862b89e283
test(vue-query): keep each action, wait and assertion together and separate setup calls and new user actions (#11659)
* test(vue-query): keep each assertion and the following wait together and separate setup calls and new user actions

* test(vue-query): add blank lines after composables called directly in a test

* test(vue-query/useMutation): remove blank line between the awaited 'Promise.all' wait and its assertion

* test(vue-query/{useMutation,useQuery}): keep awaited promises and value retrievals together with their waits and assertions
2026-09-27 01:41:50 +09:00
Wonsuk Choi
b5d4242976
test({react,preact}-query): keep each action, wait and assertion together and separate each new user action (#11658)
* test({react-query,preact-query}): keep each action, wait and assertion together and separate each new user action

* test({react-query,preact-query}): remove remaining blank lines around a commented assertion and 'act' wait blocks

* test(react-query/useSuspenseQueries): remove blank line between the 'fireEvent' wrapped in 'expect' and its wait

* test({react-query,preact-query}): add blank lines after setup such as 'renderWithClient', 'rerender' and 'queryClient' calls

* test({react-query,preact-query}-persist-client): remove blank lines between assertions, waits and their assertions

* test(react-query/transition): remove blank lines between 'act' wrapped 'fireEvent' and its assertions

* test({react-query,preact-query}): add blank lines before 'fireEvent' after multi-line assertions and keep prefetch with its wait
2026-09-27 01:39:14 +09:00
Wonsuk Choi
2dbddfbb61
test(svelte-query): advance timers by the time the awaited work takes (#11657)
* test(svelte-query): advance timers by the time the awaited work takes

* test(svelte-query/createQuery): keep the intentional 100ms wait in the disabled query invalidation test
2026-09-26 18:15:19 +09:00
Wonsuk Choi
5bdb8d1476
test(svelte-query/createInfiniteQuery): add tests for 'initialData' with a failed refetch and an infinite query waiting on 'skipToken' (#11655)
* test(svelte-query/createInfiniteQuery): add tests for 'initialData' with a failed refetch and an infinite query waiting on 'skipToken'

* test(svelte-query/createInfiniteQuery): advance timers by the minimum 10ms in the 'initialData' and 'skipToken' tests
2026-09-26 17:46:34 +09:00
Wonsuk Choi
bc132e7910
test(vue-query): remove blank lines between actions, waits and their assertions (#11656) 2026-09-26 17:45:16 +09:00
Wonsuk Choi
c1e7dfbe94
test(solid-query/useInfiniteQuery): add test for not fetching while 'queryFn' is 'skipToken' and fetching once it is replaced (#11654) 2026-09-26 16:11:46 +09:00
Wonsuk Choi
303779f1b4
test(vue-query/useQuery): use 'initial' and 'data' in the 'initialData' tests like the other adapters (#11653) 2026-09-26 14:45:15 +09:00
Wonsuk Choi
cd1d1327f8
test(vue-query): add tests for 'initialData' with a failed refetch and an infinite query waiting on 'skipToken' (#11426)
* test(vue-query): add tests for 'initialData' with a failed refetch and 'skipToken' dependent query

* test(vue-query/useInfiniteQuery): assert 'queryFn' call count in skipToken test
2026-09-26 14:38:39 +09:00
Wonsuk Choi
fe6fa7307c
chore(scripts/create-github-release): push only the release tag instead of every local tag (#11652)
* chore(scripts/create-github-release): push only the release tag instead of every local tag

* chore(scripts/create-github-release): remove the comment on the release tag push
2026-09-26 14:27:56 +09:00
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