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

5,264 commits

Author SHA1 Message Date
Wonsuk Choi
c8ebcd7118
test(solid-query): replace deprecated 'toBeCalledTimes' with 'toHaveBeenCalledTimes' (#10938) 2026-06-14 19:30:00 +09:00
Wonsuk Choi
87426a3016
test(react-query): replace deprecated 'toBeCalledTimes' with 'toHaveBeenCalledTimes' (#10937) 2026-06-14 19:20:56 +09:00
Wonsuk Choi
43a4ea0650
test(vue-query): replace deprecated 'toBeCalledWith' and 'toBeCalled' with 'toHaveBeenCalledWith' and 'toHaveBeenCalled' (#10935) 2026-06-14 18:44:47 +09:00
Wonsuk Choi
feb1efd804
test(*): move 'vi.useRealTimers' to the end of 'afterEach' so cleanup runs under fake timers (#10920)
* test(*): move 'vi.useRealTimers' to the end of 'afterEach' so cleanup runs under fake timers

* test(*): move 'vi.useRealTimers' to the end of 'afterEach' in persist-client and devtools suites

* test(svelte-query/createQueries): move 'vi.useRealTimers' to the end of 'afterEach'
2026-06-11 12:08:15 +09:00
Wonsuk Choi
b552179a3b
test(solid-query/useIsMutating): centralize 'queryClient' setup with 'beforeEach' and rename injected/spied clients (#10919) 2026-06-11 10:56:43 +09:00
Wonsuk Choi
b5ad7155b6
test(solid-query/useMutationState): centralize 'queryClient' setup with 'beforeEach' (#10918) 2026-06-11 10:56:33 +09:00
Wonsuk Choi
6c63b82622
test(solid-query/mutationOptions): centralize 'queryClient' setup with 'beforeEach' (#10917) 2026-06-11 10:56:21 +09:00
Wonsuk Choi
c916722e56
test(solid-query/useIsFetching): centralize 'queryClient' setup with 'beforeEach' and rename injected client to 'customClient' (#10916) 2026-06-11 10:56:09 +09:00
Wonsuk Choi
f6c6542668
test(solid-query/useMutation): add 'mutateAsync' callback tests for when 'useMutation' has no callbacks (#10915) 2026-06-11 10:20:31 +09:00
Wonsuk Choi
969a556b42
test(solid-query/useMutation): add 'mutate' callback tests for when 'useMutation' has no callbacks (#10914) 2026-06-11 10:01:47 +09:00
Wonsuk Choi
763782a240
test(svelte-query): align 'advanceTimersByTimeAsync' with 'sleep' duration in wait-for-fire cases (#10908) 2026-06-09 09:43:16 +09:00
Wonsuk Choi
2a4c2c9f1f
test(svelte-query/createQuery): replace 'Promise.resolve' with 'sleep' in render-based 'queryFn' (#10903) 2026-06-09 09:32:47 +09:00
Wonsuk Choi
3c77cd0826
test(svelte-query/createQuery): migrate suitable tests to render with reusable fixtures (#10902) 2026-06-08 02:55:46 +09:00
Wonsuk Choi
4077908fbd
test(query-core/queryObserver): add tests for 'notifyOnChangeProps' as a function controlling listener notification (#10900) 2026-06-07 16:51:25 +09:00
Wonsuk Choi
01616c69b3
test(query-core/queryObserver): add test for 'refetchInterval' as a function called with the query (#10901) 2026-06-07 16:23:47 +09:00
Wonsuk Choi
84cbbdb320
test(query-core/queryObserver): add test for 'refetchInterval' as a function refetching at the returned interval (#10899) 2026-06-07 16:11:06 +09:00
Wonsuk Choi
413fdc5101
test(query-core/queryObserver): add tests for 'refetchOnWindowFocus' as a function in 'shouldFetchOnWindowFocus' (#10898) 2026-06-07 13:32:44 +09:00
Wonsuk Choi
708d9c5b83
test(query-core/queryObserver): add test for 'refetchOnWindowFocus' as "always" in 'shouldFetchOnWindowFocus' (#10896) 2026-06-07 13:11:47 +09:00
Wonsuk Choi
1d12194a90
test(query-core/queryObserver): unify all test descriptions to start with 'should' (#10897) 2026-06-07 12:59:39 +09:00
Wonsuk Choi
ba7fbc443b
test(query-core/queryObserver): split 'shouldFetchOnWindowFocus' test by 'refetchOnWindowFocus' value (#10889) 2026-06-06 01:49:02 +09:00
Wonsuk Choi
b63da8a294
test(query-core/queryCache): add test for 'remove' only deleting the instance currently stored under its 'queryHash' (#10888) 2026-06-06 00:21:24 +09:00
Wonsuk Choi
bd0a264e5e
test(query-core/queryObserver): add test for promise not rejecting when 'experimental_prefetchInRender' is enabled (#10887) 2026-06-05 23:03:14 +09:00
Wonsuk Choi
92d9e2c01a
test(query-core/onlineManager): add test for online status updates from window events (#10886) 2026-06-05 22:46:46 +09:00
Wonsuk Choi
3270e09ac0
docs(reference/QueryCache): correct the 'find' and 'findAll' options to match their filter types (#10884) 2026-06-04 20:35:35 +09:00
Minh Lê
525e3168b5
docs(reference/QueryCache): use the v5 filters-object form in 'find' and 'findAll' examples (#10873)
docs(query): use the v5 filters-object form in QueryCache examples
2026-06-04 19:49:06 +09:00
Wonsuk Choi
c2d73d5636
test(query-persist-client-core/createPersister): add test for 'retrieveQuery' returning data without a restore callback (#10883) 2026-06-04 15:29:55 +09:00
Wonsuk Choi
c4b39ff8ed
test(query-persist-client-core/createPersister): add test for 'persisterGc' keeping valid entries (#10882) 2026-06-04 15:06:55 +09:00
Wonsuk Choi
0a0e2d9184
test(query-persist-client-core/createPersister): add tests for removing entries that fail to deserialize (#10881) 2026-06-04 14:52:23 +09:00
Wonsuk Choi
79e639ea93
test(query-persist-client-core/persist): add test for ignoring mutation observer events in 'persistQueryClientSubscribe' (#10880) 2026-06-04 14:39:58 +09:00
Wonsuk Choi
0c7b9d6a73
test(query-persist-client-core/persist): add tests for 'persistQueryClient' restore-then-subscribe flow (#10878) 2026-06-04 14:31:06 +09:00
Wonsuk Choi
5fcb4d76a4
test(query-persist-client-core/persist): add test for removing a cache without a timestamp in 'persistQueryClientRestore' (#10877) 2026-06-04 13:48:36 +09:00
Wonsuk Choi
89bae56573
test(query-persist-client-core/persist): add tests for removing an expired or busted cache in 'persistQueryClientRestore' (#10876) 2026-06-04 13:34:04 +09:00
Wonsuk Choi
e6c26c066b
test(query-persist-client-core/persist): wrap the suites in a top-level 'persist' describe and hoist the shared 'queryClient' setup (#10875) 2026-06-04 12:06:37 +09:00
Wonsuk Choi
a6fda44c0d
test(query-persist-client-core/persist): hoist 'queryClient' and 'persister' setup into 'beforeEach' and clear in 'afterEach' (#10874) 2026-06-04 11:19:24 +09:00
Wonsuk Choi
c3be7acfd6
test(query-persist-client-core/persist): add test for hydrating a valid persisted cache in 'persistQueryClientRestore' (#10872) 2026-06-04 10:51:37 +09:00
Wonsuk Choi
8f6f9235d7
test(query-persist-client-core/retryStrategies): add test for 'removeOldestQuery' preserving mutations (#10869) 2026-06-04 00:30:43 +09:00
Wonsuk Choi
b6b9d1acc5
test(query-persist-client-core/retryStrategies): add test for 'removeOldestQuery' returning undefined when there are no queries (#10868) 2026-06-04 00:11:06 +09:00
Wonsuk Choi
64b54a089b
test(query-persist-client-core/retryStrategies): add tests for 'removeOldestQuery' removing the oldest query (#10867) 2026-06-03 23:57:21 +09:00
Wonsuk Choi
dc0effd033
docs(framework/react/guides): replace deprecated 'isServer' with 'environmentManager.isServer()' (#10866) 2026-06-03 22:23:14 +09:00
Wonsuk Choi
2702b34c29
test(query-core/utils): add tests for consumed signal cancellation and single consumption in 'addConsumeAwareSignal' (#10864) 2026-06-03 21:36:03 +09:00
Wonsuk Choi
4fb2da15a1
test(query-core/utils): add test for recursion depth limit in 'replaceEqualDeep' (#10865) 2026-06-03 21:35:49 +09:00
Wonsuk Choi
304eb09a7f
test(query-core/utils): add test for exposing the signal on the query context in 'addConsumeAwareSignal' (#10863) 2026-06-03 20:56:41 +09:00
Wonsuk Choi
d29f7db10c
test(query-core/utils): add test for already-aborted signal in 'addConsumeAwareSignal' (#10862) 2026-06-03 19:51:00 +09:00
github-actions[bot]
f3d8d2abbf
ci: Version Packages (#10774) release-2026-06-02-1926 @tanstack/angular-query-experimental@5.101.0 @tanstack/eslint-plugin-query@5.101.0 @tanstack/lit-query@0.2.7 @tanstack/preact-query-devtools@5.101.0 @tanstack/preact-query-persist-client@5.101.0 @tanstack/preact-query@5.101.0 @tanstack/query-async-storage-persister@5.101.0 @tanstack/query-broadcast-client-experimental@5.101.0 @tanstack/query-core@5.101.0 @tanstack/query-devtools@5.101.0 @tanstack/query-persist-client-core@5.101.0 @tanstack/query-sync-storage-persister@5.101.0 @tanstack/react-query-devtools@5.101.0 @tanstack/react-query-next-experimental@5.101.0 @tanstack/react-query-persist-client@5.101.0 @tanstack/react-query@5.101.0 @tanstack/solid-query-devtools@5.101.0 @tanstack/solid-query-persist-client@5.101.0 @tanstack/solid-query@5.101.0 @tanstack/svelte-query-devtools@6.1.34 @tanstack/svelte-query-persist-client@6.1.34 @tanstack/svelte-query@6.1.34 @tanstack/vue-query-devtools@6.1.34 @tanstack/vue-query@5.101.0
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-02 21:21:24 +02:00
Eliya Cohen
dc54932864
fix(eslint-plugin-query): detect rest destructuring on custom query hooks (#10775)
* fix(eslint-plugin-query): detect rest destructuring on custom query hooks

Adds an opportunistic type-aware path to no-rest-destructuring. When
TypeScript parser services are available, the rule resolves the call
expression's return type and reports rest destructuring on custom hooks
that return a TanStack Query result. Untyped projects keep the existing
AST-only behavior unchanged.

Closes #8951

* perf(eslint-plugin-query): gate type lookup behind cheap binding check

Only run the type checker on non-direct hook calls when the binding can
actually report (rest destructure or identifier), avoiding type lookups on
every variable declarator. Add tests for cross-statement rest destructuring
and interface-typed (non-alias) query results.

* ci: apply automated fixes

---------

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-02 14:29:10 +02:00
Wonsuk Choi
7cf5923308
fix(react-query-next-experimental): replace deprecated 'isServer' with 'environmentManager.isServer()' (#10857) 2026-06-02 13:53:49 +02:00
Feranmi Adeniji
2faff25cbf
fix(examples): replace deprecated 'isServer' with 'environmentManager.isServer()' in remaining Next.js examples (#10860) 2026-06-02 13:52:50 +02:00
Wonsuk Choi
0bc0a8891f
fix(examples/integrations): replace deprecated 'isServer' with 'environmentManager.isServer()' in the Next.js examples (#10858) 2026-06-02 16:17:46 +09:00
Wonsuk Choi
f167fa8ef5
refactor(examples/nextjs-suspense-streaming): drop unnecessary 'as string' cast (#10859) 2026-06-02 11:26:37 +09:00
Spandan Chatterjee
134809544c
fix(vue-query): replace deprecated isServer with environmentManager.isServer() (#10826)
* fix(vue-query): replace deprecated isServer with environmentManager.isServer()

* chore: add changeset

---------

Co-authored-by: Spandan Chatterjee <spandzgit@users.noreply.github.com>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-06-01 16:25:11 +02:00