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

912 commits

Author SHA1 Message Date
Wonsuk Choi
2a495979b4
docs(query-core): add JSDoc for shared option and registry types (#11552) 2026-09-19 18:08:15 +09:00
Wonsuk Choi
54929cf71f
docs(query-core): add JSDoc for 'initialPageParam' (#11551) 2026-09-19 17:27:33 +09:00
Wonsuk Choi
8f6d322a5a
docs(query-core): add JSDoc for 'MutationOptions' (#11550) 2026-09-19 16:51:40 +09:00
Wonsuk Choi
d346e85f01
docs(*): promote default values from prose to '@defaultValue' tags (#11538) 2026-09-18 17:16:33 +09:00
Wonsuk Choi
992c94234c
docs(query-core): inline option type aliases in generated reference docs (#11534)
* docs(query-core): inline option type aliases in generated reference docs

* docs(query-core): inline retry, notify and remaining option aliases
2026-09-18 17:08:56 +09:00
곽지욱
8a28904aac
fix(query-core): ignore stale query removals (#11524) 2026-09-17 10:22:10 +02:00
github-actions[bot]
c08f5766dd
ci: Version Packages (#11511)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-16 16:56:55 +02:00
곽지욱
8330b2f2d4
fix(query-core): handle plain objects with constructor fields (#11512)
fix(query-core): handle plain objects with constructor fields
2026-09-16 15:42:44 +02:00
곽지욱
3212966a36
fix(query-core): preserve null streamed query results (#11510)
fix(query-core): preserve null streamed query results
2026-09-16 11:36:14 +02:00
github-actions[bot]
19ccf2794b
ci: Version Packages (#11339)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-16 09:03:53 +02:00
Wonsuk Choi
2da46cd137
chore(*): use eslint description syntax for grandfathered 'no-restricted-syntax' disables (#11508) 2026-09-16 10:43:43 +09:00
Wonsuk Choi
4324e61070
test(query-core/utils): remove vacuous 'VoidFunction' assertion for 'noop' (#11507) 2026-09-16 09:48:42 +09:00
Wonsuk Choi
7b0d0a99aa
test(query-core/{streamedQuery,subscribable}): flatten generic parameter describes into 'it' names (#11506) 2026-09-16 09:48:32 +09:00
Wonsuk Choi
3f7181e4a0
test(query-core/queryClient): add test for 'pages' type in 'InfiniteQueryExecuteOptions' (#11505) 2026-09-16 09:48:22 +09:00
Dominik Dorfmeister 🔮
58ad3e2f08
fix: isolate TypeScript test output (#11503) 2026-09-15 20:56:41 +02:00
Ciarán Curley
d63afc715c
Simplifed query methods/internal tests new lint (#11347)
* chore: update type tests to use new query methods, types

* chore: disallow future calls to deprecated methods

* fix(eslint): detect computed query method calls

- Match bracket notation for deprecated query client methods
2026-09-15 20:25:08 +02:00
곽지욱
cbf77bf8e1
fix(query-core): reject longer partial array keys (#11502)
* fix(query-core): reject longer partial array keys

* test(query-core): clarify partial key regression
2026-09-15 20:24:59 +02:00
Wonsuk Choi
bfd42a5b79
test(query-core/queryObserver): assert the non-function arm of every option that accepts a value or a callback (#11498) 2026-09-14 10:36:29 +09:00
Wonsuk Choi
b8fdc2806f
test(query-core/queryClient): add type tests for every client method, its config and the tagged key inference (#11497) 2026-09-13 15:17:40 +09:00
Wonsuk Choi
d7f9def0d9
test(query-core/OmitKeyof): add type tests for 'TStrictly' modes, modifier preservation and 'DistributiveOmit' (#11492) 2026-09-13 15:17:26 +09:00
Wonsuk Choi
7083d1e53f
test(query-core/query): add type tests for 'Query', its state, actions and fetch types (#11490) 2026-09-13 15:17:14 +09:00
Wonsuk Choi
37e4448876
test(query-core/queryCache): add type tests for 'QueryCache', its config, store and notify events (#11487) 2026-09-13 15:17:01 +09:00
Wonsuk Choi
b71e8b7cc2
test(query-core/queriesObserver): add type tests for 'QueriesObserver' and its combine inference (#11485) 2026-09-13 15:16:48 +09:00
Wonsuk Choi
795382d35d
test(query-core/streamedQuery): add type tests for 'streamedQuery' parameters and inference (#11483) 2026-09-13 15:16:25 +09:00
Wonsuk Choi
1e8e0943ed
test(query-core/infiniteQueryObserver): add type tests for the infinite options, result branches and page fetching (#11496) 2026-09-13 15:04:42 +09:00
Wonsuk Choi
ba1e818a7a
test(query-core/utils): add type tests for every exported helper, filter and type alias (#11495) 2026-09-13 15:01:38 +09:00
Wonsuk Choi
783aeffb19
test(query-core/mutation): add type tests for 'MutationState', the 'Mutation' class surface and its actions (#11494) 2026-09-13 15:01:20 +09:00
Wonsuk Choi
2fabf5dee5
test(query-core/notifyManager): add type tests for the manager's member keyset, readonly methods and 'batchCalls' constraint (#11493) 2026-09-13 15:01:03 +09:00
Wonsuk Choi
40f93fd759
test(query-core/mutationObserver): add type tests for 'MutationObserver' and its result branches (#11491) 2026-09-13 14:59:42 +09:00
Wonsuk Choi
21c8d450a6
test(query-core/hydration): add type tests for 'dehydrate', 'hydrate' and the dehydrated state types (#11489) 2026-09-13 14:59:29 +09:00
Wonsuk Choi
ac5e3fd68b
test(query-core/retryer): add type tests for 'createRetryer', its config and retry value types (#11488) 2026-09-13 14:56:54 +09:00
Wonsuk Choi
7e7fd51dc5
test(query-core/mutationCache): add type tests for 'MutationCache', its config and notify events (#11486) 2026-09-13 14:56:12 +09:00
Wonsuk Choi
7af539374b
test(query-core/timeoutManager): add type tests for 'TimeoutManager' and its provider types (#11484) 2026-09-13 14:55:32 +09:00
Wonsuk Choi
831c98ba9b
test(query-core/subscribable): add type tests for 'Subscribable' public and protected surface (#11482) 2026-09-13 14:54:30 +09:00
Wonsuk Choi
bef8218fc5
test(query-core/focusManager): add type tests for 'FocusManager' public surface (#11481) 2026-09-13 14:54:14 +09:00
Wonsuk Choi
320d3a57f7
test(query-core/onlineManager): add type tests for 'OnlineManager' public surface (#11480) 2026-09-13 14:54:00 +09:00
Wonsuk Choi
83aa427a5a
test(query-core/environmentManager): add type tests for its public surface (#11479)
* test(query-core/environmentManager): add type tests for its public surface

* test(query-core/environmentManager): assert the override shape by its literal type
2026-09-13 14:53:48 +09:00
Wonsuk Choi
3770e8fe78
test(query-core/queryObserver): add type tests for its public surface (#11478)
* test(query-core/queryObserver): add type tests for its public surface

* test(query-core/queryObserver): merge type tests that assert the same member

* test(query-core/queryObserver): merge the 'queryFn' context assertions into one test

* test(query-core/queryObserver): group its type tests by the member they assert

* test(query-core/queryObserver): group its type tests by the type they assert

* test(query-core/queryObserver): add type tests for the discriminant literals of each 'QueryObserverResult' branch

* test(query-core/queryObserver): split the result type test into one test per 'QueryObserverResult' branch

* test(query-core/queryObserver): group its type tests by the option and result member they assert

* test(query-core/queryObserver): group the branch type tests by their 'QueryObserverResult' member interface

* test(query-core/queryObserver): assert 'initialData' through the options it is given

* test(query-core/queryObserver): reuse the shared 'queryClient' in the 'placeholderData' tests

* test(query-core/queryObserver): add type tests for its default type parameters and queryKey constraint

* test(query-core/queryObserver): assert 'queryKey' is required and 'isInitialLoading' is a boolean

* test(query-core/queryObserver): assert 'subscribe' returns an unsubscribe function

* test(query-core/queryObserver): assert the return types of its callback options

* test(query-core/queryObserver): assert the remaining callback parameters of its options

* test(query-core/queryObserver): assert 'fetchFailureReason' carries the observed error type

* test(query-core/queryObserver): assert 'persister' through the options it is given

* test(query-core/queryObserver): assert the parameter types of 'getOptimisticResult', 'fetchOptimistic' and 'trackResult'

* test(query-core/queryObserver): assert the always-defaulted options of 'getOptimisticResult'

* test(query-core/queryObserver): assert the shape of 'RefetchOptions'

* test(query-core/queryObserver): assert 'networkMode' and 'meta' by their actual shape

* test(query-core/queryObserver): assert 'select' keeps the query data type on the options that precede it

* test(query-core/queryObserver): assert the internal options it reads from the defaulted options

* test(query-core/queryObserver): assert 'data' and 'error' on 'QueryObserverBaseResult'

* test(query-core/queryObserver): assert the discriminant flags and 'status' on 'QueryObserverBaseResult'

* test(query-core/queryObserver): assert the remaining fields of the query state it exposes

* test(query-core/queryObserver): assert 'queryHash' on the query it exposes

* test(query-core/queryObserver): assert the observed types on the 'options' field it exposes

* test(query-core/queryObserver): assert 'data' and 'refetch' are always declared on the base result

* test(query-core/queryObserver): assert 'data' is always declared on the query state

* test(query-core/queryObserver): assert the value branch of 'refetchInterval'

* test(query-core/queryObserver): assert the result properties stay writable

* test(query-core/queryObserver): assert the query and its state stay writable

* test(query-core/queryObserver): assert its options stay writable

* test(query-core/queryObserver): assert the type parameters it derives from the data type alone

* test(query-core/queryObserver): move the type parameter tests under the option and member they belong to

* test(query-core/queryObserver): group the base result tests under 'QueryObserverBaseResult'

* test(query-core/queryObserver): group the base result tests by the property they assert

* test(query-core/queryObserver): group the narrowing tests by the property they assert

* test(query-core/queryObserver): assert its 'persister' differs from the paged variant

* test(query-core/queryObserver): assert each result branch declares exactly the base and narrowed keys

* test(query-core/queryObserver): assert the composition of 'DefinedQueryObserverResult'
2026-09-13 14:53:31 +09:00
Wonsuk Choi
4fc07a098c
test(query-core/queryObserver): move 'select' type assertions from the runtime test to 'test-d' (#11475) 2026-09-12 21:27:12 +09:00
Wonsuk Choi
f37f7f06c3
test(query-core/notifyManager): add type tests for its batching, scheduling and configuration API (#11477) 2026-09-12 16:40:28 +09:00
Wonsuk Choi
1585f2f6d1
test(query-core/notifyManager): move 'batchCalls' signature type test to 'test-d' (#11476) 2026-09-12 14:45:44 +09:00
Wonsuk Choi
e57f8163b1
docs(query-core): add JSDoc across the package and expose it in generated reference docs (#11438)
* docs(query-core): add JSDoc across the package and expose it in generated reference docs

* docs(config.json): add sidebar entries for newly generated query-core reference docs

* docs(query-core): migrate remaining prose from the legacy 'docs/reference' pages into JSDoc

* docs(query-core): remove legacy 'docs/reference' pages superseded by the generated reference

* docs(query-core): regenerate reference docs after merging main

* docs(query-core): document missing default values for MutationOptions, combine, and QueryFilters.type

* fix(query-devtools): drop unnecessary 'query-core' project reference

* docs(query-core): document missing default values and normalize 'Defaults to' spacing

* docs(query-core): fix 'environmentManager' JSDoc example
2026-09-07 18:22:38 +02:00
Dominik Dorfmeister 🔮
a1119e5a3f
ref(hydration): remove outdated dehydratedAt fallback (#11436)
* ref(hydration): remove outdated dehydratedAt fallback

* ref: remove two more unnecessary dehydratedAt undefined checks

* fix constructing PersistedClient in test
2026-09-06 18:09:10 +02:00
KevinZhou
799a33cdad
test(query-core/retryer): add unit tests for 'createRetryer' (#11383)
* test(query-core): add unit tests for 'createRetryer'

* test(query-core/retryer): discard unused 'promise' binding in offline retry test

---------

Co-authored-by: pengzh1 <penzh1@qq.com>
Co-authored-by: Wonsuk Choi <sukvvon@gmail.com>
2026-09-04 23:35:49 +09:00
Choi Hyunjun
b4daab2653
test(query-core/removable): add unit tests for 'Removable' base class (#11365)
* test(query-core/removable): add unit tests for the Removable base class

* test(query-core/removable): restore server override in a finally block

---------

Co-authored-by: Wonsuk Choi <sukvvon@gmail.com>
2026-09-03 10:11:50 +09:00
Choi Hyunjun
645e4ac4a1
test(query-core/subscribable): add unit tests for 'Subscribable' base class (#11364)
test(query-core/subscribable): add unit tests for the Subscribable base class
2026-09-03 10:11:26 +09:00
Ciarán Curley
1566c16de7
chore: use infiniteQuery instead of fetchInfiniteQuery et al (#11344)
* chore: use infiniteQuery instead of fetchInfiniteQuery et al

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-31 14:06:43 +02:00
Ciarán Curley
6f31ef6c8b
test: replace 'prefetchQuery'/'fetchQuery'/'ensureQueryData' with 'query' (#11340)
chore: move internal tests to queryClient.query
2026-08-31 09:00:15 +02:00
Scott Cooper
fdae2ce4e5
ref(query-core): Reuse refetch interval resolver (#11332)
* perf(query-core): Reuse refetch interval resolver

Reuse the generic query option resolver added in #11302 for refetch intervals. Keeps callback and nullish fallback behavior while dropping the duplicate branch.

Co-Authored-By: OpenAI Codex <noreply@openai.com>

* test(query-core): Remove redundant interval test

Drop the cast-heavy timer spy coverage and keep the existing behavioral tests plus the disabled observer timer assertion.

Co-authored-by: OpenAI Codex <noreply@openai.com>

* ref: another instance for resolveQueryValue

---------

Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-08-30 20:52:14 +02:00
github-actions[bot]
2969edf32f
ci: Version Packages (#11316) 2026-08-28 01:03:02 +09:00