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

5,165 commits

Author SHA1 Message Date
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
Wonsuk Choi
6b95cd871a
test(query-core): replace 'vi.waitFor' with 'vi.advanceTimersByTimeAsync' in 'query.test.tsx' (#10434) 2026-04-09 09:41:31 +09:00
Wonsuk Choi
ef62f7b0ac
test(query-core/hydration): replace 'vi.waitFor' with 'vi.advanceTimersByTimeAsync' (#10428)
* test(query-core/hydration): replace 'vi.waitFor' with 'vi.advanceTimersByTimeAsync'

* ci: trigger CI
2026-04-08 10:31:14 +09:00
Wonsuk Choi
2e26f14a41
test(query-core): replace hardcoded query keys with 'queryKey()' utility (#10425)
* test(query-core): replace hardcoded query keys with 'queryKey()' utility

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-08 03:28:04 +09:00
Wonsuk Choi
79dee50d56
test(query-core/mutationCache): add test for removing a mutation that does not exist in the cache (#10423)
* test(query-core/mutationCache): add test for removing a mutation that does not exist in the cache

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-08 01:33:49 +09:00
Wonsuk Choi
f6991900dc
test(react-query): replace hardcoded query keys with 'queryKey()' utility (#10420)
* test(react-query): replace hardcoded query keys with 'queryKey()' utility

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-07 16:46:01 +09:00
Wonsuk Choi
389bbca956
test(preact-query): replace hardcoded query keys with 'queryKey()' utility (#10419) 2026-04-07 15:38:54 +09:00
Wonsuk Choi
4335fce4ae
test(angular-query-experimental): replace hardcoded query keys with 'queryKey()' utility (#10418) 2026-04-07 13:41:37 +09:00
Wonsuk Choi
dbe3f957c2
test(vue-query): replace hardcoded query keys with 'queryKey()' utility (#10417) 2026-04-07 12:21:22 +09:00
Wonsuk Choi
d9384ac630
test(solid-query): replace hardcoded query keys with 'queryKey()' utility (#10416) 2026-04-07 11:25:11 +09:00
Wonsuk Choi
e203306f5e
test(svelte-query): replace hardcoded query keys with 'queryKey()' utility (#10415) 2026-04-07 10:57:24 +09:00
Wonsuk Choi
f3d3eea76b
test(*): replace deprecated 'toMatchTypeOf' with 'toExtend' (#10413) 2026-04-07 00:39:33 +09:00
Wonsuk Choi
cf82e86b47
test({solid,svelte}-query): add missing 'initialData' describe nesting in type test files (#10412)
* test({solid,svelte}-query): add missing 'initialData' describe nesting in type test files

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-06 23:58:21 +09:00
Wonsuk Choi
2a4fc9f04f
test(angular-query-experimental): fix 'describe' nesting and naming in type test files (#10411)
* test({solid,svelte,angular}-query): add missing 'initialData' describe nesting and wrap with top-level describe

* ci: apply automated fixes

* test(angular-query-experimental): fix incorrect 'describe' name in 'inject-queries.test-d.ts' and 'inject-mutation.test-d.ts'

* ci: apply automated fixes

* revert: remove solid-query and svelte-query changes from this PR

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-06 23:46:31 +09:00
Wonsuk Choi
fc35bbf4b5
test({solid,svelte}-query): fix incorrect 'describe' name from 'initialData' to match file name (#10410) 2026-04-06 23:03:00 +09:00
Wonsuk Choi
a8dc3b7228
test(svelte-query/infiniteQueryOptions): fix incorrect 'describe' name from 'queryOptions' to 'infiniteQueryOptions' (#10409) 2026-04-06 22:54:16 +09:00
Wonsuk Choi
36fc645a87
test({solid,svelte}-query/mutationOptions): replace 'toStrictEqual' with 'toBe' for identity check (#10407)
* test({react,preact}-query/infiniteQueryOptions): replace type annotation with 'as const'

* Revert "test({react,preact}-query/infiniteQueryOptions): replace type annotation with 'as const'"

This reverts commit 2bb0029621.

* test({solid,svelte}-query/mutationOptions): replace 'toStrictEqual' with 'toBe' for identity check
2026-04-06 22:43:08 +09:00
Wonsuk Choi
1a6fdd0b95
test({solid,vue}-query/infiniteQueryOptions): add runtime test for 'infiniteQueryOptions' (#10406) 2026-04-06 21:49:25 +09:00
Wonsuk Choi
e919c54f86
test(*): replace deprecated 'toThrowError' with 'toThrow' (#10405) 2026-04-06 21:32:42 +09:00
Wonsuk Choi
1493433c34
test(angular-query-experimental): replace 'async/await sleep' with 'sleep().then()' in test 'queryFn' and 'mutationFn' (#10404)
* test(angular-query-experimental): replace 'async/await sleep' with 'sleep().then()' in test 'queryFn' and 'mutationFn'

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-06 19:54:01 +09:00
Wonsuk Choi
3d6e001bae
test(react-query/useSuspenseQueries): replace 'async/await sleep' with 'sleep().then()' in 'queryFn' (#10403) 2026-04-06 19:19:27 +09:00
Wonsuk Choi
eac62b8593
test(preact-query): replace 'async/await sleep' with 'sleep().then()' in test 'queryFn' and 'mutationFn' (#10400)
* test(preact-query): replace 'async/await sleep' with 'sleep().then()' in test 'queryFn' and 'mutationFn'

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-06 15:25:33 +09:00
Wonsuk Choi
7d7a21c49c
test(react-query): replace 'async/await sleep' with 'sleep().then()' in test 'queryFn' and 'mutationFn' (#10399)
* test(react-query): replace 'async/await sleep' with 'sleep().then()' in test 'queryFn' and 'mutationFn'

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-06 13:52:50 +09:00
Wonsuk Choi
ef2a4e3f6c
test(solid-query): replace 'async/await sleep' with 'sleep().then()' in test 'queryFn' and 'mutationFn' (#10398) 2026-04-06 13:25:59 +09:00
Wonsuk Choi
abf854764b
test(svelte-query): replace 'async/await sleep' with 'sleep().then()' in test 'queryFn' and 'mutationFn' (#10397) 2026-04-06 10:39:51 +09:00