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

5,624 commits

Author SHA1 Message Date
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
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