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

5,975 commits

Author SHA1 Message Date
Wonsuk Choi
7d4b6ed52e
docs(config.json): register missing angular API reference functions in sidebar (#11191) 2026-08-16 18:25:52 +09:00
Wonsuk Choi
a9f416bbae
docs: regenerate reference docs to fix stale content and Preact source links (#11189) 2026-08-16 17:58:55 +09:00
Wonsuk Choi
c5f29995fe
docs(solid-query/useQuery): document 'throwOnError' default value and its exceptions (#11170)
* docs(solid-query/useQuery): document 'throwOnError' default value

* docs(solid-query/useQuery): document SSR and 'suspense' exceptions to 'throwOnError' default
2026-08-16 14:06:04 +09:00
Wonsuk Choi
159982c80b
docs(react-query/useQuery): document 'throwOnError' default value (#11156)
* docs(react-query/useQuery): document 'throwOnError' default and its absence in suspense hooks

* docs(react-query/useQuery): use framework-agnostic wording for suspense throwOnError note

* docs(react-query/useQuery): remove inaccurate suspense-mode throwOnError note
2026-08-12 10:03:07 +09:00
Alem Tuzlak
46d7f02f1c
docs: use the dynamic README header endpoint (#11136)
* docs: use the dynamic README header endpoint

* docs: add README header banners to the framework adapter packages
2026-08-03 13:43:19 +02:00
Melih Arık
31c7f374e2
docs(angular-query): fix invalid imports and syntax error in guide examples (#11090)
* docs(angular-query): fix three broken examples in the guides

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-02 17:34:23 +09:00
SiHyunLee
96fbd7d38e
docs(CONTRIBUTING): remove stale gitpod one-click setup section (#11096) 2026-08-02 16:17:51 +09:00
SiHyunLee
6efc619123
docs(CONTRIBUTING): replace 'npm run test' and 'npx nx' commands with 'pnpm' equivalents (#11095)
docs(CONTRIBUTING): replace 'npm run test' and 'npx nx' command with 'pnpm' equivalents
2026-08-02 16:07:27 +09:00
Wonsuk Choi
9d24c45545
test(react-query/useQuery.promise): unskip 'cancelQueries' while suspending test by keeping 'queryFn' in-flight (#10910)
* test(react-query/useQuery.promise): unskip 'cancelQueries' while suspending test by keeping 'queryFn' in-flight

* test(react-query/useQuery.promise): clarify why 'sleep' is extended in cancel-while-suspending test
2026-07-29 10:03:48 +09:00
kinsk2839
75b2d101f0
test(svelte-query/createQuery): replace 'toBeDefined' with exact-value assertion (#11126)
* test(svelte-query/createQuery): assert exact queryKey instead of loose 'toBeDefined'

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-28 11:29:09 +09:00
ChangJun Park
e396148c07
test(query-devtools/Devtools): add test for rendering a hydrated query with a custom hash function (#11055)
* Protect restored custom-hash queries in devtools

Exercise the full dehydrate, hydrate, and query-row rendering path for a per-query custom queryKeyHashFn. This locks the queryHash lookup behavior introduced by #10750 and covers the persistence failure reported in #6958.

Constraint: The runtime lookup fix already shipped in #10750

Rejected: Reapply queryCache.get changes | current main already contains the implementation

Confidence: high

Scope-risk: narrow

Tested: query-devtools 246 tests; ESLint; TypeScript current; Prettier

Related: TanStack/query#6958

* test(query-devtools/Devtools): use 'advanceTimersByTimeAsync' for consistency and remove redundant 'clear'

* test(query-devtools/Devtools): move custom-hash hydration test to the end of 'query list'

* test(query-devtools/Devtools): align custom-hash test title with the 'when X' convention

---------

Co-authored-by: Wonsuk Choi <sukvvon@gmail.com>
2026-07-27 01:54:54 +09:00
Wonsuk Choi
5972ae6e11
test(svelte-query): replace 'toBeDefined' with exact-value assertion (#11124)
test(svelte-query): assert exact values instead of loose matchers
2026-07-27 00:58:26 +09:00
Wonsuk Choi
fbe532c477
test({react,preact}-query): replace 'toBeDefined'/'toBeFalsy' with exact-value assertions (#11123)
test({react,preact}-query): assert exact values instead of loose matchers
2026-07-27 00:57:58 +09:00
Wonsuk Choi
f99c105e8a
test(lit-query): replace 'toBeDefined'/'toBeGreaterThan' with exact-value assertions (#11122)
test(lit-query): assert exact values instead of loose matchers
2026-07-27 00:57:13 +09:00
Wonsuk Choi
e330cee106
test(angular-query): replace 'toBeDefined' with exact-value assertion (#11121)
test(angular-query): assert exact values instead of loose matchers
2026-07-27 00:56:47 +09:00
karl
3bf3adcbb4
test(query-core): assert exact values instead of loose matchers in remaining tests (#11093)
Co-authored-by: Wonsuk Choi <sukvvon@gmail.com>
2026-07-27 00:15:21 +09:00
karl
f320db5a4c
test(solid-query): assert exact values instead of loose matchers (#11105)
Co-authored-by: Wonsuk Choi <sukvvon@gmail.com>
2026-07-26 23:56:26 +09:00
Lachlan Collins
fd50fa14d2
ci: update renovate.json (#11114) 2026-07-24 22:22:47 +10:00
SiHyunLee
a3b0612729
test({react,preact}-query/usePrefetchQuery): use the '.then()' convention consistently (#11091)
Co-authored-by: Wonsuk Choi <sukvvon@gmail.com>
2026-07-24 12:30:17 +09:00
SiHyunLee
98d2bfda92
docs(CONTRIBUTING): link '.nvmrc' reference to the actual file (#11097) 2026-07-24 12:19:12 +09:00
github-actions[bot]
86bb8a6fb2
ci: Version Packages (#11094) release-2026-07-21-1305 @tanstack/angular-query-experimental@5.101.4 @tanstack/eslint-plugin-query@5.101.4 @tanstack/lit-query@0.2.11 @tanstack/preact-query-devtools@5.101.4 @tanstack/preact-query-persist-client@5.101.4 @tanstack/preact-query@5.101.4 @tanstack/query-async-storage-persister@5.101.4 @tanstack/query-broadcast-client-experimental@5.101.4 @tanstack/query-core@5.101.4 @tanstack/query-devtools@5.101.4 @tanstack/query-persist-client-core@5.101.4 @tanstack/query-sync-storage-persister@5.101.4 @tanstack/react-query-devtools@5.101.4 @tanstack/react-query-next-experimental@5.101.4 @tanstack/react-query-persist-client@5.101.4 @tanstack/react-query@5.101.4 @tanstack/solid-query-devtools@5.101.4 @tanstack/solid-query-persist-client@5.101.4 @tanstack/solid-query@5.101.4 @tanstack/svelte-query-devtools@6.1.38 @tanstack/svelte-query-persist-client@6.1.38 @tanstack/svelte-query@6.1.38 @tanstack/vue-query-devtools@6.1.38 @tanstack/vue-query@5.101.4
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-21 15:00:30 +02:00
Eliya Cohen
7ac45ed45c
fix(eslint-plugin-query): ignore call targets in exhaustive-deps (#11067)
* fix(query-eslint): ignore call targets in exhaustive deps

* fix(query-eslint): guard AST parent access

* fix(query-eslint): accept JSX scope references

---------

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-07-21 14:50:23 +02:00
github-actions[bot]
181ea826cb
ci: Version Packages (#11089) release-2026-07-20-1205 @tanstack/angular-query-experimental@5.101.3 @tanstack/eslint-plugin-query@5.101.3 @tanstack/lit-query@0.2.10 @tanstack/preact-query-devtools@5.101.3 @tanstack/preact-query-persist-client@5.101.3 @tanstack/preact-query@5.101.3 @tanstack/query-async-storage-persister@5.101.3 @tanstack/query-broadcast-client-experimental@5.101.3 @tanstack/query-core@5.101.3 @tanstack/query-devtools@5.101.3 @tanstack/query-persist-client-core@5.101.3 @tanstack/query-sync-storage-persister@5.101.3 @tanstack/react-query-devtools@5.101.3 @tanstack/react-query-next-experimental@5.101.3 @tanstack/react-query-persist-client@5.101.3 @tanstack/react-query@5.101.3 @tanstack/solid-query-devtools@5.101.3 @tanstack/solid-query-persist-client@5.101.3 @tanstack/solid-query@5.101.3 @tanstack/svelte-query-devtools@6.1.37 @tanstack/svelte-query-persist-client@6.1.37 @tanstack/svelte-query@6.1.37 @tanstack/vue-query-devtools@6.1.37 @tanstack/vue-query@5.101.3
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-20 14:01:04 +02:00
James Garbutt
7e3c822a10
perf: special case arrays in partialMatchKey (#11084)
This does 2 things:

1. If the values being compared are both arrays, iterate through them
   directly
2. Use a `for...of` instead of allocating an arrow function per
   recursive call

The results:

| Task name | Latency avg (ns) | Latency med (ns) | Throughput avg (ops/s) | Throughput med (ops/s) | Samples |
| -- | -- | -- | -- | -- | -- |
| 'partialMatchKey dev' | '38.21 ± 0.16%' | '42.00 ± 0.00' | '24035274 ± 0.00%' | '23809524 ± 1' | 13086480 |
| 'partialMatchKey prod' | '102.05 ± 0.52%' | '84.00 ± 1.00' | '10289814 ± 0.02%' | '11904762 ± 143431' | 4899508 |

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-07-20 13:36:12 +02:00
Wonsuk Choi
0a612ec662
test(angular-query-persist-client): use the '.then()' convention consistently (#11088) 2026-07-20 19:39:36 +09:00
Wonsuk Choi
ff24bf7b31
test(solid-query): use the '.then()' convention consistently (#11087)
* test(solid-query/useMutation): use the '.then()' convention consistently

* test(solid-query/useQuery): use the '.then()' convention consistently

* test(solid-query-persist-client): use the '.then()' convention consistently
2026-07-20 19:39:14 +09:00
Wonsuk Choi
6d55b0759b
test({react,preact}-query): use the '.then()' convention consistently (#11085)
* test({react,preact}-query/useInfiniteQuery): use the '.then()' convention consistently

* test({react,preact}-query/useMutation): use the '.then()' convention consistently

* test({react,preact}-query/useQueries): use the '.then()' convention consistently

* test({react,preact}-query/useQuery): use the '.then()' convention consistently
2026-07-20 19:38:28 +09:00
Wonsuk Choi
a42b8a3b00
test(query-core/queryObserver): use the '.then()' convention consistently (#11086) 2026-07-20 12:32:07 +09:00
Wonsuk Choi
44f38df5de
test({react,preact,solid}-query/useInfiniteQuery): inline the shared 'fetchItems' helper into the tests that use it (#11082) 2026-07-19 16:55:57 +09:00
Wonsuk Choi
d1558c1491
test({react,preact}-query/usePrefetchQuery): inline the 'generateQueryFn' factory into each call site (#11080)
* test({react,preact}-query/usePrefetchQuery): inline the 'generateQueryFn' factory into each call site

* test({react,preact}-query/usePrefetchQuery): drop the unnecessary 'vi.fn()' wrapper on the never-asserted sentinel queryFn
2026-07-19 02:36:41 +09:00
Wonsuk Choi
99690d18b7
test({react,preact}-query/usePrefetchInfiniteQuery): inline single-use helpers and adopt the 'pageParam' mock convention (#11079) 2026-07-18 21:43:09 +09:00
Wonsuk Choi
10770f0720
test({react,preact}-query/usePrefetchInfiniteQuery): inline the shared 'Suspended' component into each test (#11078) 2026-07-18 21:10:27 +09:00
Wonsuk Choi
dbd5a86e95
test({react,preact}-query/usePrefetchQuery): inline the shared 'Suspended' component into each test (#11077) 2026-07-18 21:10:18 +09:00
Wonsuk Choi
b955f60d79
test({react,preact}-query/useSuspenseQuery): assert the 'loading' fallback is rendered when gcTime is 0 (#11076) 2026-07-18 14:47:58 +09:00
Wonsuk Choi
b9c657e20b
test({react,preact}-query/usePrefetchQuery): assert the 'Loading...' fallback is rendered before the prefetch resolves (#11075) 2026-07-18 14:47:42 +09:00
Wonsuk Choi
97db5d2447
test(query-core/utils): split 'isValidTimeout' rejection cases into separate 'it' blocks (#11071) 2026-07-17 13:26:43 +09:00
Wonsuk Choi
80b833ecbd
test(query-core/utils): assert exact booleans with 'toBe' instead of 'toEqual' (#11070) 2026-07-17 12:50:37 +09:00
whizzkid1452
a9aa23f823
test(query-core/utils): add tests for 'undefined' key properties and 'isValidTimeout' validation (#11013)
* test(query-core): cover query key undefined and timeout validation

Clarify isValidTimeout with Number.isFinite, add regression tests for undefined query-key object properties, and fix TanStack branding in community resources.

* Update docs/community-resources.md

* Update packages/query-core/src/utils.ts

---------

Co-authored-by: HURRAEY <ajvl33333@gmail.com>
Co-authored-by: Wonsuk Choi <sukvvon@gmail.com>
2026-07-17 12:35:51 +09:00
Kobi Hikri
1d972e78d4
docs(CONTRIBUTING): update pnpm version from 'v10' to 'v11' (#11066)
docs: CONTRIBUTING says pnpm v10 but the repo uses pnpm v11
2026-07-16 09:35:35 +09:00
max
79d2384db5
docs(*): fix 'homogenous', 'stoage', 'supressed', 'compoennts' spelling typos (#11040)
* fix: correct spelling typos across docs, examples, and source comments

- homogenous -> homogeneous in 7 useQueries/createQueries source files
- stoage -> storage in react and vue createPersister docs
- supressed -> suppressed in react and angular pagination examples
- compoennts -> components in solid-start-streaming example

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs(react-query/useSuspenseQueries): correct 'homogenous' typo to 'homogeneous' in comment

---------

Co-authored-by: maxtaran2010 <ocotifuzo727@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Wonsuk Choi <sukvvon@gmail.com>
2026-07-13 14:06:03 +09:00
Samuel Wai Weng Yong
f6cf12002a
docs({react,solid}-query): add missing 'errorUpdateCount' to 'useQuery' return signature (#11041)
* docs(react-query): add missing errorUpdateCount to useQuery return signature

* docs(react-query): move errorUpdateCount after errorUpdatedAt

* docs(react-query): keep 'errorUpdateCount' before 'errorUpdatedAt' to preserve alphabetical order

---------

Co-authored-by: Wonsuk Choi <sukvvon@gmail.com>
2026-07-13 03:28:00 +09:00
Wonsuk Choi
045c947f2a
test(*): assert exact values instead of loose matchers (#11057) 2026-07-13 02:27:36 +09:00
Wonsuk Choi
fb8f4745d7
test(vue-query/{usePrefetchQuery,usePrefetchInfiniteQuery}): assert exact prefetch options instead of 'objectContaining' (#11056) 2026-07-13 01:56:30 +09:00
Wonsuk Choi
b2ce5bcecb
test(query-core): assert exact cache event payloads in subscribe callbacks (#11053)
test(query-core): assert exact cache event arguments in subscribe callbacks
2026-07-12 13:26:02 +09:00
Wonsuk Choi
8773a1501f
test(query-devtools/PiPContext): assert exact spy arguments instead of 'objectContaining'/'stringContaining' (#11052) 2026-07-12 12:28:02 +09:00
Wonsuk Choi
aa1f9d7bf1
test({vue,angular}-query): pin the reactive refetch call with 'toHaveBeenNthCalledWith' (#11051) 2026-07-12 12:09:38 +09:00
Wonsuk Choi
0a852e0d74
test({react,preact,solid}-query/useMutation): improve callback assertions with 'toHaveBeenNthCalledWith' (#11050) 2026-07-11 15:37:03 +09:00
Wonsuk Choi
72e90c88eb
test(vue-query/vueQueryPlugin): assert exact booleans with 'toBe' instead of 'toBeTruthy'/'toBeFalsy' (#11049) 2026-07-11 15:03:21 +09:00
Wonsuk Choi
0cdfdea388
test(query-core/utils,vue-query/mutationOptions): assert reference identity with 'toBe' (#11048) 2026-07-11 14:52:39 +09:00
Wonsuk Choi
7bc34156b0
test(solid-query-persist-client/PersistQueryClientProvider): use 'toStrictEqual' to assert the exact state shape (#11047) 2026-07-11 13:51:36 +09:00