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

5,040 commits

Author SHA1 Message Date
Wonsuk Choi
9e1bb94abc
test(react-query/useSuspenseQueries): remove unnecessary 'act' wrapper from background refetch assertions (#10350) 2026-03-29 15:12:26 +09:00
Wonsuk Choi
55cee0a71c
test({react,preact}-query/useSuspenseQueries): add test for not suspending but only refetching the stale query when one query has stale and the other has fresh cached data (#10349) 2026-03-29 14:50:42 +09:00
Zelys
289fe2eab9
test(eslint-plugin-query/no-void-query-fn): add coverage for useInfiniteQuery, useSuspenseQuery, queryOptions, fetchQuery (#10332)
The existing tests only exercised useQuery. The rule checks any object
property named queryFn, so it applies equally to useInfiniteQuery,
useSuspenseQuery, queryOptions(), and queryClient.fetchQuery(). Add
valid + invalid cases for each to document and lock in that behavior.

Co-authored-by: Wonsuk Choi <sukvvon@gmail.com>
2026-03-29 14:19:50 +09:00
Wonsuk Choi
a62f695b4e
test(preact-query): apply 'prefer-template', 'no-else-return', 'object-shorthand', 'radix', and 'require-await' eslint rules (#10346) 2026-03-28 22:16:06 +09:00
renovate[bot]
0e939ac802
chore(deps): update dependency astro to v5.18.1 [security] (#10338)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-28 09:08:49 +00:00
Wonsuk Choi
7fc6e6a911
test({react,preact}-query/useSuspenseQueries): add test for not suspending but only refetching the stale query when one query has fresh and the other has stale cached data (#10345) 2026-03-28 17:07:04 +09:00
Wonsuk Choi
0e766f25f4
test(eslint-plugin-query/stable-query-client): fix misleading test name for async component with 'solid-query' import (#10344) 2026-03-28 16:19:14 +09:00
japark
42259260e1
test(eslint-plugin-query/stable-query-client): add tests for async server component and destructuring pattern (#10315)
* test(eslint-plugin-query/stable-query-client): add tests for uncovered branches

Add 3 test cases to improve branch coverage of 'stable-query-client' rule from 78.57% to 92.85%.

- add valid case for arrow function component where fnAncestor has no id
- add valid case for async server component with @tanstack/react-query import
- add invalid case for destructuring pattern where autofix is not applicable

The existing valid tests for line 58 (non-component function, async component)
used @tanstack/solid-query imports, causing early return at the import check    (line 44) and never reaching the target branch.

* test(eslint-plugin-query/stable-query-client): remove arrow function component valid case

Remove the arrow function component test case from valid cases.

The current rule does not detect `new QueryClient()` inside arrow function
components because `fnAncestor.id` is undefined for arrow functions.
This is a false negative (known limitation), not intended behavior.
Adding it as a valid case would bake that bug into the test suite and cause failures when the rule is fixed in the future.

---------

Co-authored-by: Wonsuk Choi <sukvvon@gmail.com>
2026-03-28 15:48:04 +09:00
github-actions[bot]
1047cdc393
ci: Version Packages (#10326) release-2026-03-23-1536 @tanstack/angular-query-experimental@5.95.2 @tanstack/eslint-plugin-query@5.95.2 @tanstack/preact-query-devtools@5.95.2 @tanstack/preact-query-persist-client@5.95.2 @tanstack/preact-query@5.95.2 @tanstack/query-async-storage-persister@5.95.2 @tanstack/query-broadcast-client-experimental@5.95.2 @tanstack/query-core@5.95.2 @tanstack/query-devtools@5.95.2 @tanstack/query-persist-client-core@5.95.2 @tanstack/query-sync-storage-persister@5.95.2 @tanstack/react-query-devtools@5.95.2 @tanstack/react-query-next-experimental@5.95.2 @tanstack/react-query-persist-client@5.95.2 @tanstack/react-query@5.95.2 @tanstack/solid-query-devtools@5.95.2 @tanstack/solid-query-persist-client@5.95.2 @tanstack/solid-query@5.95.2 @tanstack/svelte-query-devtools@6.1.10 @tanstack/svelte-query-persist-client@6.1.10 @tanstack/svelte-query@6.1.10 @tanstack/vue-query-devtools@6.1.10 @tanstack/vue-query@5.95.2
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-23 16:31:44 +01:00
Dominik Dorfmeister 🔮
cd5a35b328
fix/nodejs timeout (#10325)
* fix(timeout): make sure NodeJs.Timout doesn't leak

* changeset

* fix(tsconfig): include src directory in production configuration
2026-03-23 15:58:17 +01:00
github-actions[bot]
5806444b97
ci: Version Packages (#10324) release-2026-03-23-1426 @tanstack/angular-query-experimental@5.95.1 @tanstack/eslint-plugin-query@5.95.1 @tanstack/preact-query-devtools@5.95.1 @tanstack/preact-query-persist-client@5.95.1 @tanstack/preact-query@5.95.1 @tanstack/query-async-storage-persister@5.95.1 @tanstack/query-broadcast-client-experimental@5.95.1 @tanstack/query-core@5.95.1 @tanstack/query-devtools@5.95.1 @tanstack/query-persist-client-core@5.95.1 @tanstack/query-sync-storage-persister@5.95.1 @tanstack/react-query-devtools@5.95.1 @tanstack/react-query-next-experimental@5.95.1 @tanstack/react-query-persist-client@5.95.1 @tanstack/react-query@5.95.1 @tanstack/solid-query-devtools@5.95.1 @tanstack/solid-query-persist-client@5.95.1 @tanstack/solid-query@5.95.1 @tanstack/svelte-query-devtools@6.1.9 @tanstack/svelte-query-persist-client@6.1.9 @tanstack/svelte-query@6.1.9 @tanstack/vue-query-devtools@6.1.9 @tanstack/vue-query@5.95.1
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-23 15:21:38 +01:00
Dominik Dorfmeister 🔮
1f1775ca92
fix(timeout): make sure NodeJs.Timout doesn't leak (#10323)
* fix(timeout): make sure NodeJs.Timout doesn't leak

* changeset
2026-03-23 15:07:55 +01:00
TkDodo
b1188fee93 ref: knip v6 2026-03-23 08:54:47 +01:00
Dami Oyeniyi
c73e4a2c5a
fix(examples): guard missing filmId param in react star-wars example (#10143) 2026-03-22 18:45:58 +01:00
Dami Oyeniyi
c7c0cd9439
fix(examples): guard missing mount targets in remaining react examples (#10305) 2026-03-22 18:40:46 +01:00
github-actions[bot]
4d7de830eb
ci: Version Packages (#10317) release-2026-03-22-1745 @tanstack/angular-query-experimental@5.95.0 @tanstack/eslint-plugin-query@5.95.0 @tanstack/preact-query-devtools@5.95.0 @tanstack/preact-query-persist-client@5.95.0 @tanstack/preact-query@5.95.0 @tanstack/query-async-storage-persister@5.95.0 @tanstack/query-broadcast-client-experimental@5.95.0 @tanstack/query-core@5.95.0 @tanstack/query-devtools@5.95.0 @tanstack/query-persist-client-core@5.95.0 @tanstack/query-sync-storage-persister@5.95.0 @tanstack/react-query-devtools@5.95.0 @tanstack/react-query-next-experimental@5.95.0 @tanstack/react-query-persist-client@5.95.0 @tanstack/react-query@5.95.0 @tanstack/solid-query-devtools@5.95.0 @tanstack/solid-query-persist-client@5.95.0 @tanstack/solid-query@5.95.0 @tanstack/svelte-query-devtools@6.1.8 @tanstack/svelte-query-persist-client@6.1.8 @tanstack/svelte-query@6.1.8 @tanstack/vue-query-devtools@6.1.8 @tanstack/vue-query@5.95.0
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-22 18:40:14 +01:00
Eliya Cohen
3443736e29
feat(eslint-plugin): add allowlist option to exhaustive-deps rule (#10295)
* feat(eslint-plugin): add allowlist option to exhaustive-deps rule

Introduce an `allowlist` option with `variables` and `types` arrays so
stable variables and types can be excluded from dependency enforcement.

Also report member expression dependencies more granularly for call
expressions (e.g. `a.b.foo()` suggests `a.b` instead of only `a`).

BREAKING CHANGE: exhaustive-deps now reports member expression deps more
granularly, so some previously passing code may now report missing deps.
Use the allowlist option to exclude stable variables/types as needed.

* fix

* ci: apply automated fixes

* increase coverage

* address false positives

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-03-22 18:33:16 +01:00
github-actions[bot]
8fe71e4fe7
ci: Version Packages (#10313) release-2026-03-21-1602 @tanstack/angular-query-experimental@5.94.5 @tanstack/eslint-plugin-query@5.94.5 @tanstack/preact-query-devtools@5.94.5 @tanstack/preact-query-persist-client@5.94.5 @tanstack/preact-query@5.94.5 @tanstack/query-async-storage-persister@5.94.5 @tanstack/query-broadcast-client-experimental@5.94.5 @tanstack/query-core@5.94.5 @tanstack/query-devtools@5.94.5 @tanstack/query-persist-client-core@5.94.5 @tanstack/query-sync-storage-persister@5.94.5 @tanstack/react-query-devtools@5.94.5 @tanstack/react-query-next-experimental@5.94.5 @tanstack/react-query-persist-client@5.94.5 @tanstack/react-query@5.94.5 @tanstack/solid-query-devtools@5.94.5 @tanstack/solid-query-persist-client@5.94.5 @tanstack/solid-query@5.94.5 @tanstack/svelte-query-devtools@6.1.7 @tanstack/svelte-query-persist-client@6.1.7 @tanstack/svelte-query@6.1.7 @tanstack/vue-query-devtools@6.1.7 @tanstack/vue-query@5.94.5
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-22 00:57:17 +09:00
Jonghyeon Ko
4b6536dfce
chore: add build step in release workflow (#10312)
* chore: add build step in release workflow

* chore: standardize quotes in release workflow configuration

* chore: add changeset for patch versions across multiple TanStack packages and fix build directory exclusion issue
2026-03-22 00:50:12 +09:00
Jonghyeon Ko
0ddf442d30
chore: update version in query-test-utils package.json to 0.0.0 (#10310) release-2026-03-21-1447 @tanstack/preact-query-persist-client@5.94.4 @tanstack/preact-query@5.94.4 @tanstack/query-async-storage-persister@5.94.4 @tanstack/query-core@5.94.4 @tanstack/query-persist-client-core@5.94.4 @tanstack/query-sync-storage-persister@5.94.4 @tanstack/react-query-persist-client@5.94.4 @tanstack/react-query@5.94.4 @tanstack/solid-query-persist-client@5.94.4 @tanstack/solid-query@5.94.4 @tanstack/svelte-query-persist-client@6.1.6 @tanstack/svelte-query@6.1.6 @tanstack/vue-query@5.94.4 2026-03-21 23:45:59 +09:00
github-actions[bot]
c613c22535
ci: Version Packages (#10309)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-21 23:35:14 +09:00
Jonghyeon Ko
4c75210ce8
ci(changesets): fixed version (#10064)
* chore: update changeset configuration to include fixed dependencies for various TanStack packages

* chore: update package versions across multiple examples and packages to 5.92.9, including Angular, React, Solid, Svelte, and Vue integrations

* chore: add changeset for version patches across multiple TanStack packages

* chore: update changeset configuration to include @tanstack/vue-query-devtools as a dependency

* feat: add support for Preact query packages in changeset configuration

* chore: update changeset configuration to include Preact query packages
2026-03-21 22:52:02 +09:00
Birk Skyum
3b7a177ed0
ci: use separate changeset publishing pr (#10303) 2026-03-20 14:03:33 +01:00
github-actions[bot]
9346430657 ci: changeset release @tanstack/preact-query@5.94.3 @tanstack/react-query@5.91.3 @tanstack/solid-query@5.91.4 release-2026-03-20-1227 2026-03-20 12:27:46 +00:00
Dominik Dorfmeister 🔮
be3746f069
fix: stop node types from leaking into browser (#10302) 2026-03-20 13:25:49 +01:00
Birk Skyum
e79176a72b
ci: align publishing to router with main/-pre/-maint (#10283) 2026-03-19 22:01:19 +01:00
github-actions[bot]
b6fd86b0b0
ci: Version Packages (#10297) @tanstack/angular-query-experimental@5.90.28 @tanstack/preact-query-persist-client@5.92.3 @tanstack/preact-query@5.94.2 @tanstack/query-async-storage-persister@5.90.27 @tanstack/query-broadcast-client-experimental@5.90.23 @tanstack/query-core@5.91.2 @tanstack/query-persist-client-core@5.92.4 @tanstack/query-sync-storage-persister@5.90.27 @tanstack/react-query-persist-client@5.90.27 @tanstack/react-query@5.91.2 @tanstack/solid-query-persist-client@5.90.28 @tanstack/solid-query@5.91.3 @tanstack/svelte-query-persist-client@6.0.25 @tanstack/svelte-query@6.1.3 @tanstack/vue-query@5.92.12
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-19 11:09:07 +01:00
github-actions[bot]
79e37cb5de
ci: Version Packages (#10296)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-03-19 11:04:55 +01:00
Dominik Dorfmeister 🔮
248975e896
fix(streamedQuery): maintain error state on reset refetch with initialData defined (#10287)
* fix(streamedQuery): maintain error state on reset refetch with initialData defined

* ref: changeset

* fix: isRefetch computation

* test: add refetch behavior for reset mode after initial error

* test: add reset behavior for refetch after initial error with initialData

* ref: re-use isFetched in queryObserver.ts

* ref: function instead of getter
2026-03-19 10:55:22 +01:00
Dominik Dorfmeister 🔮
a89aab9755
fix(core): cancel paused initial fetch when last observer unsubscribes (#10291)
* fix(core): cancel paused initial fetch when last observer unsubscribes

* ci: apply automated fixes

* fix: preact and solid tests

* changeset

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-19 10:50:02 +01:00
Wonsuk Choi
b799510ebf
test(angular-query-experimental/injectQueries): switch to fake timers, replace 'setTimeout' with 'sleep', replace 'findByText' with 'getByText', add 'toBeInTheDocument', remove unused 'toString' method, rename '_pushResults' to '_', and add '@testing-library/jest-dom/vitest' (#9896) 2026-03-18 15:22:03 +01:00
Wonsuk Choi
0249bbd52e
test(vue-query/useQueries): add test for 'refetch' of individual query without affecting others (#10242) 2026-03-18 15:21:52 +01:00
github-actions[bot]
3761d2bd13
ci: Version Packages (#10290) @tanstack/angular-query-experimental@5.90.26 @tanstack/preact-query-persist-client@5.92.1 @tanstack/preact-query@5.94.0 @tanstack/query-async-storage-persister@5.90.25 @tanstack/query-broadcast-client-experimental@5.90.21 @tanstack/query-core@5.91.0 @tanstack/query-persist-client-core@5.92.2 @tanstack/query-sync-storage-persister@5.90.25 @tanstack/react-query-persist-client@5.90.25 @tanstack/react-query@5.91.0 @tanstack/solid-query-persist-client@5.90.26 @tanstack/solid-query@5.91.1 @tanstack/svelte-query-persist-client@6.0.23 @tanstack/svelte-query@6.1.1 @tanstack/vue-query@5.92.10
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-18 14:44:42 +01:00
Lubos
0e066c444c
docs: Update Hey API description (#10230)
Aligned the description with the GitHub repository.
2026-03-18 14:40:45 +01:00
Dami Oyeniyi
f8c434051e
fix(examples): guard missing mount targets in react examples (#10226) 2026-03-18 14:39:57 +01:00
Dominik Dorfmeister 🔮
81689b6c46
fix ci (#10289)
* ci

* fix: remove ts 6.0 remnants

* fix ts peer resolution

* revert debugging

* revert to main
2026-03-18 14:38:37 +01:00
Dominik Dorfmeister 🔮
0c2cb738c9
ci: detect agent workflow (#10288) 2026-03-18 13:41:09 +01:00
Dominik Dorfmeister 🔮
6fa901b97a
feat/environmentManager (#10199)
* environmentManager

* ci: apply automated fixes

* ref: environmentManager

* fix: adapt tests to not using isServer anymore

* ref: revert to main

* make tests better

* Create moody-mails-deliver.md

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-18 12:52:51 +01:00
Pavan Shinde
5cd3896947
docs(react): update legacy react-query GitHub links (#10232)
* docs(react): update legacy react-query GitHub links

* docs: fix React Query stars badge repo
2026-03-18 12:49:21 +01:00
Dami Oyeniyi
bf9ca9869f
docs(examples): fix nuxt3 README links and commands (#10227)
* docs(examples): fix nuxt3 README links and commands

* docs(examples): polish nuxt3 README wording
2026-03-18 12:47:43 +01:00
Wonsuk Choi
16e8c1aeb6
test(query-core/queriesObserver): add test for 'getObservers' method (#10248) 2026-03-18 12:46:39 +01:00
Wonsuk Choi
93f9134cbf
test(query-core/queriesObserver): add test for 'getQueries' method (#10247) 2026-03-18 12:46:21 +01:00
Wonsuk Choi
a41178d0f3
test(query-core/queriesObserver): add test for subscribing new observers when a query is added while subscribed (#10246)
* test(query-core/queriesObserver): add test for subscribing new observers when a query is added while subscribed

* ci: re-trigger CI
2026-03-18 12:46:00 +01:00
Wonsuk Choi
9ced4694ea
test(svelte-query/{queryOptions,infiniteQueryOptions}): flatten test directories that don't require '.svelte' component files (#10245) 2026-03-18 12:45:35 +01:00
Wonsuk Choi
c79a191703
test(svelte-query/createMutation): add test for recreating observer when 'queryClient' changes (#10244) 2026-03-18 12:45:13 +01:00
Wonsuk Choi
50eecb2d98
test(vue-query/useQueries): add test for outside scope warning in development mode (#10240) 2026-03-18 12:44:08 +01:00
Wonsuk Choi
ef2eb66887
test(vue-query/useMutation): add test for 'throw' from error watcher when 'throwOnError' returns true (#10239) 2026-03-18 12:43:52 +01:00
Wonsuk Choi
eca0da2eec
test(vue-query/useMutation): add test for outside scope warning in development mode (#10238)
* test(vue-query/useMutation): add test for outside scope warning in development mode

* refactor(vue-query/useMutation): wrap outside scope warning test with 'try/finally' for cleanup safety
2026-03-18 12:43:31 +01:00
Wonsuk Choi
38cd749a6c
test(vue-query/useIsFetching): add test for outside scope warning in development mode (#10237)
* test(vue-query/useIsFetching): add test for outside scope warning in development mode

* refactor(vue-query/useIsFetching): wrap outside scope warning test with 'try/finally' for cleanup safety
2026-03-18 12:43:14 +01:00
Wonsuk Choi
15d4a1a463
test(vue-query/useMutationState): split 'useMutationState' tests into separate file from 'useIsMutating.test.ts' (#10236) 2026-03-18 12:42:55 +01:00