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

5,589 commits

Author SHA1 Message Date
Wonsuk Choi
663931dd58
test(solid-query/useQueries): rename 'createQueries.test-d.tsx' to 'useQueries.test-d.tsx' (#10497) 2026-04-15 01:32:30 +09:00
autofix-ci[bot]
396869171f
ci: apply automated fixes 2026-04-14 13:13:23 +00:00
Nirbhay Singh
cea9347717
docs: Update preact-query version in examples (#10483)
* docs(examples): update preact-query version in simple example

* docs(examples): update preact-query version in simple example
2026-04-14 15:12:08 +02:00
Wonsuk Choi
7a3bf3177a
test(solid-query/useInfiniteQuery): add type tests for page params, 'initialData', 'select', and 'Accessor<QueryClient>' (#10496) 2026-04-14 21:20:54 +09:00
Wonsuk Choi
2e144da49f
test(solid-query/useMutation): add type tests for generic type inference and callbacks (#10495) 2026-04-14 14:22:32 +09:00
Wonsuk Choi
bc83d370e8
test({react,preact}-query/useMutation): unify destructuring pattern in complex scenario tests (#10494)
test({react,preact}-query/useMutation): apply destructuring pattern to complex scenario tests
2026-04-14 10:35:08 +09:00
Wonsuk Choi
aad1bd59d8
test({react,preact}-query/useMutation): add parallel 'mutateAsync' tests with 'Promise.all' and 'Promise.allSettled' (#10493)
* test({react,preact}-query/useMutation): add parallel 'mutateAsync' tests with 'Promise.all' and 'Promise.allSettled'

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-14 10:04:07 +09:00
Wonsuk Choi
d7643b54fd
test({react,preact}-query/useMutation): add optimistic update tests with success and rollback on error (#10492) 2026-04-14 04:41:28 +09:00
Wonsuk Choi
cd89d6f706
test({react,preact}-query/useMutation): add conditional handling and retry tests using 'mutate' callbacks (#10491)
* test({react,preact}-query/useMutation): add conditional handling and retry tests using 'mutate' callbacks

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-14 04:22:42 +09:00
Wonsuk Choi
6e15fe62d2
test({react,preact}-query/useMutation): add chained 'mutateAsync' tests for sequential mutation calls (#10490)
* test({react,preact}-query/useMutation): add chained 'mutateAsync' tests for sequential mutation calls

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-14 04:01:03 +09:00
Wonsuk Choi
792d3a5b32
test({react,preact}-query/useMutation): add callback tests when 'useMutation' has no callbacks (#10489)
* test({react,preact}-query/useMutation): add callback tests when 'useMutation' has no callbacks

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-14 03:26:49 +09:00
Wonsuk Choi
1b661b34ec
test({react,preact}-query/useMutation): add single callback tests for 'mutateAsync' (#10488)
* test({react,preact}-query/useMutation): add single callback tests for 'mutateAsync'

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-14 02:54:52 +09:00
Wonsuk Choi
eccac7cfdf
test({react,preact}-query/useMutation): add single callback tests for 'onSuccess', 'onError', and 'onSettled' (#10487)
* test({react,preact}-query/useMutation): add single callback tests for 'onSuccess', 'onError', and 'onSettled'

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-14 02:27:49 +09:00
Wonsuk Choi
224c07388b
test({react,preact}-query/useMutation): add 'mutate' callback override tests (#10486) 2026-04-14 02:03:27 +09:00
Wonsuk Choi
9bd8b25ef2
test({react,preact}-query/useMutation): add 'throwOnError' false case tests (#10485) 2026-04-14 01:45:30 +09:00
Wonsuk Choi
ffa4164af0
test({react,preact}-query): add type tests for 'useMutation' (#10482)
* test(react-query/useMutation): add type tests for 'useMutation'

* test(preact-query/useMutation): add type tests for 'useMutation'
2026-04-14 01:02:25 +09:00
Wonsuk Choi
479b9a597b
test(svelte-query): remove 'Example' suffix from test component file names and rename 'QueryChild' to 'Child' (#10480)
test(svelte-query): remove 'Example' suffix from test component file names
2026-04-13 23:43:28 +09:00
Wonsuk Choi
8826b43bf2
test(vue-query/mutationOptions): reorder getter tests to group by feature and unify test descriptions (#10478)
test(vue-query/mutationOptions): reorder getter tests to group by feature
2026-04-13 13:57:18 +09:00
Wonsuk Choi
aaeefaea78
test(svelte-query/createMutation): rename 'OnSuccessExample' to 'SuccessExample' (#10477) 2026-04-13 13:34:55 +09:00
Wonsuk Choi
c9109b6310
test(vue-query/mutationOptions): add reactive 'mutationKey' test for getter overload (#10474) 2026-04-13 13:22:24 +09:00
Wonsuk Choi
4c489e4249
test(vue-query/mutationOptions): add shallow ref test for getter overload (#10473) 2026-04-13 12:11:33 +09:00
Wonsuk Choi
c8de088b6e
test(vue-query/mutationOptions): add 'useMutationState' tests for getter overloads (#10472) 2026-04-13 12:01:54 +09:00
Wonsuk Choi
8fc02cc3f6
test(vue-query/mutationOptions): add 'queryClient.isMutating' tests for getter overloads (#10471) 2026-04-13 11:49:32 +09:00
Wonsuk Choi
70a216d8e2
test(vue-query/mutationOptions): add 'useIsMutating' tests for getter overloads (#10469) 2026-04-13 10:57:51 +09:00
Wonsuk Choi
7d3b86c162
test(vue-query/mutationOptions): add identity tests for getter overloads (#10468) 2026-04-13 10:43:26 +09:00
Wonsuk Choi
6384368099
test(vue-query/mutationOptions): add type tests for getter overloads (#10466)
* test(vue-query/mutationOptions): add type tests for getter overloads

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-13 10:22:46 +09:00
Wonsuk Choi
24de260ad2
docs(solid-query): add 'mutationOptions' to config.json navigation (#10455) 2026-04-11 20:15:20 +02:00
github-actions[bot]
adc2543ade
ci: Version Packages (#10454) release-2026-04-11-1758 @tanstack/angular-query-experimental@5.99.0 @tanstack/eslint-plugin-query@5.99.0 @tanstack/preact-query-devtools@5.99.0 @tanstack/preact-query-persist-client@5.99.0 @tanstack/preact-query@5.99.0 @tanstack/query-async-storage-persister@5.99.0 @tanstack/query-broadcast-client-experimental@5.99.0 @tanstack/query-core@5.99.0 @tanstack/query-devtools@5.99.0 @tanstack/query-persist-client-core@5.99.0 @tanstack/query-sync-storage-persister@5.99.0 @tanstack/react-query-devtools@5.99.0 @tanstack/react-query-next-experimental@5.99.0 @tanstack/react-query-persist-client@5.99.0 @tanstack/react-query@5.99.0 @tanstack/solid-query-devtools@5.99.0 @tanstack/solid-query-persist-client@5.99.0 @tanstack/solid-query@5.99.0 @tanstack/svelte-query-devtools@6.1.16 @tanstack/svelte-query-persist-client@6.1.16 @tanstack/svelte-query@6.1.16 @tanstack/vue-query-devtools@6.1.16 @tanstack/vue-query@5.99.0
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-11 19:54:13 +02:00
Wonsuk Choi
f279ad2488
feat(vue-query): add 'mutationOptions' (#10381)
* feat(vue-query): add 'mutationOptions'

* ci: apply automated fixes

* chore(.changeset): add changeset for 'mutationOptions' in vue-query

* feat(vue-query/mutationOptions): add getter support and fix test descriptions to match actual behavior

* refactor(vue-query): rename 'VueMutationOptions' to 'MutationOptions'

* docs(vue-query): add 'mutationOptions' reference page

* test(vue-query/mutationOptions): add runtime test for getter without 'mutationKey'

* docs(vue-query): add 'mutationOptions' to config.json navigation

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-11 19:49:32 +02:00
Wonsuk Choi
012d323b9b
test(svelte-query): unify all test descriptions with 'should' (#10453) 2026-04-12 01:24:06 +09:00
github-actions[bot]
6040278e75
ci: Version Packages (#10451) release-2026-04-11-1610 @tanstack/angular-query-experimental@5.98.0 @tanstack/eslint-plugin-query@5.98.0 @tanstack/preact-query-devtools@5.98.0 @tanstack/preact-query-persist-client@5.98.0 @tanstack/preact-query@5.98.0 @tanstack/query-async-storage-persister@5.98.0 @tanstack/query-broadcast-client-experimental@5.98.0 @tanstack/query-core@5.98.0 @tanstack/query-devtools@5.98.0 @tanstack/query-persist-client-core@5.98.0 @tanstack/query-sync-storage-persister@5.98.0 @tanstack/react-query-devtools@5.98.0 @tanstack/react-query-next-experimental@5.98.0 @tanstack/react-query-persist-client@5.98.0 @tanstack/react-query@5.98.0 @tanstack/solid-query-devtools@5.98.0 @tanstack/solid-query-persist-client@5.98.0 @tanstack/solid-query@5.98.0 @tanstack/svelte-query-devtools@6.1.15 @tanstack/svelte-query-persist-client@6.1.15 @tanstack/svelte-query@6.1.15 @tanstack/vue-query-devtools@6.1.15 @tanstack/vue-query@5.98.0
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-11 18:06:24 +02:00
Damian Osipiuk
29e80d9f79
fix(vue-query): fix type of queryOptions to allow plain properies or getters (#10452) 2026-04-11 18:01:35 +02:00
thalassophilia
b97513f288
feat(vue-query): add usePrefetchQuery and usePrefetchInfiniteQuery (#10372)
* feat(vue-query): add prefetch composables

- Add usePrefetchQuery and usePrefetchInfiniteQuery to vue-query.
- Includes runtime and type tests, plus a changeset

* docs(vue-query): document prefetch composables

* revert unrelated change

* ci: apply automated fixes

---------

Co-authored-by: Damian Osipiuk <osipiukd+git@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-11 15:27:47 +02:00
semimikoh
0c2bf1ebe0
fix(vue-query-devtools): only register cleanup after mount (#10439)
* fix(vue-query-devtools): only register cleanup after mount

* chore(changeset): add vue-query-devtools patch release note
2026-04-11 14:52:22 +02:00
Wonsuk Choi
3f56a861b0
test(svelte-query): add 'assertType' and 'expectTypeOf' to type tests with no assertions (#10450)
* test(svelte-query): add 'assertType' to type tests with no assertions

* test(svelte-query): replace 'assertType' with 'expectTypeOf' for 'initialData' type validation
2026-04-11 17:51:44 +09:00
Wonsuk Choi
3d95119ee7
test(svelte-query/createInfiniteQuery): remove unused 'svelte-ignore state_snapshot_uncloneable' comments (#10449) 2026-04-11 17:23:26 +09:00
Wonsuk Choi
ee5b574b2d
test(svelte-query): replace inline props types with 'type Props', remove 'any', and add explicit generics (#10448) 2026-04-11 16:44:10 +09:00
Wonsuk Choi
1881109db6
test(svelte-query): extract 'queryClient' creation from Svelte components to test files (#10447)
* test(svelte-query): extract 'queryClient' creation from Svelte components to test files

* ci: apply automated fixes

* test(svelte-query/createMutation): rename 'client1'/'client2' to 'queryClient1'/'queryClient2' for clarity

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-11 15:16:54 +09:00
Wonsuk Choi
300d81ec9d
test(svelte-query): unify queryClient passing to 'setQueryClientContext' and rename test components (#10446)
* test(svelte-query): unify queryClient passing to 'setQueryClientContext' and rename test components

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-11 13:14:30 +09:00
Wonsuk Choi
d36ece2928
test(svelte-query): replace hardcoded query keys with 'queryKey()' in Svelte test components (#10443) 2026-04-10 15:54:31 +09:00
Wonsuk Choi
5048e868ee
test(svelte-query/createQuery): move test files into 'createQuery' directory (#10441) 2026-04-10 12:19:04 +09:00
Wonsuk Choi
d45ec4d099
test(svelte-query/createQuery): add test for not fetching when 'isRestoring' is true (#10440) 2026-04-10 11:54:52 +09:00
github-actions[bot]
125067c05a
ci: Version Packages (#10436) release-2026-04-09-0841 @tanstack/angular-query-experimental@5.97.0 @tanstack/eslint-plugin-query@5.97.0 @tanstack/preact-query-devtools@5.97.0 @tanstack/preact-query-persist-client@5.97.0 @tanstack/preact-query@5.97.0 @tanstack/query-async-storage-persister@5.97.0 @tanstack/query-broadcast-client-experimental@5.97.0 @tanstack/query-core@5.97.0 @tanstack/query-devtools@5.97.0 @tanstack/query-persist-client-core@5.97.0 @tanstack/query-sync-storage-persister@5.97.0 @tanstack/react-query-devtools@5.97.0 @tanstack/react-query-next-experimental@5.97.0 @tanstack/react-query-persist-client@5.97.0 @tanstack/react-query@5.97.0 @tanstack/solid-query-devtools@5.97.0 @tanstack/solid-query-persist-client@5.97.0 @tanstack/solid-query@5.97.0 @tanstack/svelte-query-devtools@6.1.14 @tanstack/svelte-query-persist-client@6.1.14 @tanstack/svelte-query@6.1.14 @tanstack/vue-query-devtools@6.1.14 @tanstack/vue-query@5.97.0
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-09 10:33:54 +02:00
Dami Oyeniyi
57a61d1027
docs(examples): add install step to preact simple README (#10433) 2026-04-09 10:33:33 +02:00
Dami Oyeniyi
aeb5fa0dc0
docs(examples): fix Vue example README headings (#10432) 2026-04-09 10:33:07 +02:00
Dami Oyeniyi
05771b1c2a
docs(examples): guard the react shadow-dom mount target (#10431) 2026-04-09 10:32:43 +02:00
Dami Oyeniyi
c945694007
docs(examples): fix Solid README dev commands (#10430) 2026-04-09 10:32:00 +02:00
Byungsker
23a4029c9a
feat(eslint-plugin-query): add ESLint v10 to peer dependencies (#10182)
* feat(eslint-plugin-query): add ESLint v10 to peer dependencies

* fix: bump @typescript-eslint/utils to ^8.56.0 for ESLint v10 peer support

* chore: fix lockfile

* add typescript v6 support

* Apply suggestions from code review

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

---------

Co-authored-by: TkDodo <office@dorfmeister.cc>
2026-04-09 10:31:00 +02:00
semimikoh
2bfb12cc44
fix(query-core): clear timers when timer ID is 0 (#10401)
* fix(query-core): use explicit undefined check for timer IDs

  Custom TimeoutProvider implementations may return 0 as a valid timer
  ID (e.g. a counter-based provider), but the existing truthy checks
  treated 0 as "no timer" and skipped clearTimeout/clearInterval. This
  left stale timers running, causing unexpected refetches and GC leaks.

  Compare against undefined instead, matching the optional `?:
  ManagedTimerId` field types.

  Fixes #10395

* chore: add changeset for #10395

---------

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-04-09 09:26:00 +02:00
Wonsuk Choi
48c3975afb
test(query-core): replace 'async/await sleep' with 'sleep().then()' in test 'queryFn' and 'mutationFn' (#10435) 2026-04-09 10:46:52 +09:00