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

716 commits

Author SHA1 Message Date
github-actions[bot]
d4033eb1e5
ci: Version Packages (#11651)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-26 13:53:37 +10:00
Lachlan Collins
5279b05211
chore(deps): update Vite from v6 to v8 (#11650)
* chore(deps): update Vite from v6 to v8

* Fix angular, vue-devtools

* Fix vue-devtools

* Fix knip, remove @tanstack/vite-config

* Update eslint config

* Disable false eslint errors

* Fix remaining errors

* Fix knip, dedupe esbuild

* Add changeset
2026-09-26 12:23:02 +10:00
github-actions[bot]
fe053bf8e9
ci: Version Packages (#11612)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-26 10:13:58 +10:00
Lachlan Collins
d86ac36663
chore(query-devtools): update dependencies (#11648)
* chore(query-devtools): update dependencies

* Add changeset

* Fix build
2026-09-26 08:45:38 +10:00
Lachlan Collins
f00aad602e
chore(deps): update dev dependencies (#11640)
chore(deps): update many dev dependencies
2026-09-26 07:30:31 +10:00
Wonsuk Choi
2443290fb5
test(*): rename 'console.error' spies to 'consoleErrorMock' (#11646) 2026-09-26 00:45:05 +09:00
Wonsuk Choi
fd64c13e68
test(*): rename 'console.warn' spies to 'consoleWarnMock' (#11645) 2026-09-26 00:28:28 +09:00
Wonsuk Choi
9ff2ee3bbd
docs(vue-query): document how 'suspense()' resolves and handles errors, and fix the 'suspense' SSR examples (#11629)
* docs(vue-query): document how 'suspense()' resolves, including the disabled query caveat on the server

* docs(vue-query/suspense): add error handling with 'throwOnError' and 'onErrorCaptured'

* docs(vue-query/ssr): fix the Nuxt examples that call 'suspense' without destructuring it and destructure a nonexistent 'data2'

* docs(vue-query/suspense): note that 'suspense()' can resolve before the query function finishes

* docs(vue-query/{ssr,suspense}): scope the disabled 'suspense()' caveat to queries that stay disabled

* docs(vue-query/{ssr,suspense}): scope the SSR caveat heading to queries that stay disabled

* docs(vue-query/ssr): use 'vue' code blocks for the SFC examples
2026-09-25 23:34:07 +09:00
Wonsuk Choi
ea2da8f631
test(vue-query/vueQueryPlugin): add test for not mounting the client on the server (#11631) 2026-09-25 17:01:37 +09:00
Wonsuk Choi
eb8ab6ed76
test(vue-query): replace mock type casts with 'vi.mocked' and remove unused 'getCurrentInstance' mocks (#11630) 2026-09-25 17:00:34 +09:00
Wonsuk Choi
edbe7b3633
test(vue-query/{useQuery,useQueries,useMutation}): add tests for the 'shallow' option (#11622)
* test(vue-query/{useQuery,useQueries,mutationOptions}): add tests for the 'shallow' option

* test(vue-query/{useQuery,useQueries,mutationOptions}): add tests for deeply reactive and readonly results when 'shallow' is not set

* test(vue-query/{useMutation,mutationOptions}): move the 'useMutation' 'shallow' tests to 'useMutation.test.ts'
2026-09-25 15:21:34 +09:00
Wonsuk Choi
b6da52620b
test(vue-query/{useQuery,useQueries,useIsMutating}): assert the query or mutation actually runs in the 'onScopeDispose' tests (#11626) 2026-09-25 15:17:20 +09:00
Wonsuk Choi
6ced66cf6a
test(vue-query/ssr): add test for resolving a dependent query whose 'queryKey' changed before 'suspense' in 'onServerPrefetch' (#11618) 2026-09-25 15:08:20 +09:00
Wonsuk Choi
7655a43ad5
test(vue-query/useMutation): add test for stopping listening to changes on 'onScopeDispose' (#11619)
* test(vue-query/useMutation): add test for stopping listening to changes on 'onScopeDispose'

* test(vue-query/useMutation): assert the mutation actually runs in the 'onScopeDispose' test with 'isMutating'
2026-09-25 15:03:47 +09:00
Wonsuk Choi
606968e01a
test(vue-query/queryClient): add tests for custom 'queryCache'/'mutationCache' and the arguments 'invalidateQueries' passes to 'refetchQueries' (#11621) 2026-09-25 14:56:29 +09:00
Wonsuk Choi
d649c4de42
test(vue-query/useIsMutating): add tests for filters wrapped in a 'ref' and a 'queryClient' passed as the second argument (#11620) 2026-09-25 14:53:59 +09:00
Wonsuk Choi
2ae71c17d7
test(vue-query/vueQueryPlugin): add tests for 'clientPersisterOnSuccess' and the 'unmount' returned by 'clientPersister' (#11623) 2026-09-25 14:39:43 +09:00
Wonsuk Choi
3e5e7eba46
test(vue-query/useQueries): add test for using the current 'queryKey' value when 'refetch' is called (#11617) 2026-09-25 14:32:14 +09:00
Lachlan Collins
57f40eb05b
chore(deps): update non-major dependencies (#11625)
* chore(deps): update non-major dependencies

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-09-25 15:15:46 +10:00
Wonsuk Choi
0d118a0694
test(vue-query/useMutation): assert the error watcher throw on both Vue 2 and Vue 3 (#11606)
* test(vue-query/useMutation): assert the error watcher throw on both Vue 2 and Vue 3

* test(vue-query/useMutation): remove the 'unhandledRejection' listener in 'onTestFinished' so it does not leak when the test fails

* test(vue-query/useMutation): assert the 'unhandledRejection' listener receives the rejected promise with 'expect.any(Promise)'
2026-09-25 11:29:48 +09:00
Wonsuk Choi
3d6144e42c
test(vue-query/utils): assert 'updateState' sets keys missing from the update to 'undefined' (#11609) 2026-09-25 11:25:39 +09:00
Wonsuk Choi
c9c86ff4db
test(vue-query/useQueries): assert the other query is not refetched when refetching a single query (#11608) 2026-09-25 11:24:30 +09:00
Wonsuk Choi
43dcbd99e0
test(vue-query/useIsMutating): use 'sleep(10)' so the 'onScopeDispose' test fails if the subscription is kept (#11607) 2026-09-25 11:24:13 +09:00
Wonsuk Choi
c420d59d66
test(vue-query/useQuery): assert the 'suspense' result in the enabled, default and 'throwOnError' tests (#11605)
* test(vue-query/useQuery): assert the 'suspense' result in the enabled, default and 'throwOnError' tests

* test(vue-query/useQuery): remove the 'unhandledRejection' listener in 'onTestFinished' so it does not leak when the test fails
2026-09-25 11:23:17 +09:00
Wonsuk Choi
7bfe142e8a
test(vue-query/useQuery): wire the mock 'queryFn' into the fresh-data 'suspense' test (#11600) 2026-09-24 13:23:28 +09:00
Wonsuk Choi
a43e741e04
test(vue-query): align mock names with react-query and the options they are passed to (#11599) 2026-09-24 13:11:27 +09:00
Wonsuk Choi
bf07891f8a
test(vue-query): add tests for a 'computed' 'queryFn' resolving to 'skipToken' and a whole-'queryKey' getter (#11427)
* fix(vue-query): widen 'SkipToken' to 'symbol' so it type-checks inside a whole-options getter

* chore(vue-query): add changeset for 'SkipToken' widening fix

* test(vue-query/useQuery): document that widening 'SkipToken' also accepts unrelated symbols

* fix(vue-query): unify 'UseQueryOptions' with 'QueryOptions' so 'queryFn' accepts a 'computed' resolving to 'skipToken'

* test(vue-query): add runtime coverage for 'skipToken' and bare-getter 'queryKey' across 'useQuery'/'useQueries'/'useInfiniteQuery'

* fix(vue-query): narrow 'queryOptions()' input back to only 'enabled'/'queryKey'/'queryFn' reactive

* test(vue-query/useQuery): verify 'TQueryFnData' inference for a computed 'queryFn' resolving to 'skipToken'

* test(vue-query): fill remaining type-coverage gaps for reactive 'queryFn'/'queryKey' and 'queryOptions()' input narrowing

* test(vue-query/queryOptions): verify skipToken ternary inside a whole-options getter

* test(vue-query/useQueries): import 'reactive' from 'vue' and 'computed'/'ref' from 'vue-demi'

* test(vue-query): downgrade 'computed' 'queryFn' assertions 'vue-tsc' can't resolve to 'assertType'

* chore(vue-query): shorten changeset summary to match PR title

* fix(vue-query/infiniteQueryOptions): separate plain output type from reactive input and allow a bare getter for 'queryKey'

* fix(vue-query/index): export 'InfiniteQueryOptions'

* fix(vue-query): restore 'enabled' plain-callback support on 'infiniteQueryOptions'

Narrowing 'InfiniteQueryOptions' to match 'QueryOptions' had also copied its
narrower 'enabled' union, which drops the plain '(query) => boolean' callback
that 'InfiniteQueryObserverOptions' allows. Restore 'enabled' to source from
'InfiniteQueryObserverOptions' directly so all four shapes keep working.

* docs(vue-query): correct inaccurate test comments flagged by CodeRabbit

The 'unrelated symbol' comment on 'useQuery.test-d.ts' claimed it behaves like
'skipToken' at runtime, but 'ensureQueryFn' only identity-checks the exact
'skipToken' value and returns anything else verbatim, so an unrelated symbol
throws once invoked as a function. Also note why the '@ts-expect-error' in
'queryOptions.test-d.ts' sits on 'queryKey' rather than 'staleTime': overload
resolution fails on the whole object literal, and TypeScript reports it at the
first property.

* chore(vue-query): re-sync changeset summary with PR title

The 'infiniteQueryOptions()' narrowing clause got appended to the changeset
only, drifting it back over the 100-char limit and out of sync with the PR
title again. The title's 'align queryOptions/infiniteQueryOptions input'
already covers it.

* test(vue-query/{useQuery,useQueries,useInfiniteQuery}): align the 'skipToken' and whole-'queryKey' getter tests with their neighboring tests

* test(vue-query/{useQuery,useQueries,useInfiniteQuery}): use a real 'sleep(10)' delay in the new 'skipToken' and whole-'queryKey' getter tests

* test(vue-query/{useQuery,useInfiniteQuery}): drop the whole-options getter 'skipToken' test and the 'useInfiniteQuery' whole-'queryKey' getter test
2026-09-24 12:49:49 +09:00
Wonsuk Choi
c74591ea22
test({angular,vue,solid}-query/queryOptions): add type tests for an optional 'initialData' object (#11593) 2026-09-23 19:11:07 +09:00
Wonsuk Choi
848b42129e
docs({react,preact,solid,vue}-query/useQuery): add 'initialDataUpdatedAt' to the seeding example (#11579) 2026-09-23 13:36:10 +09:00
Wonsuk Choi
96919caac5
docs(vue-query): correct 'initialData'/'select' JSDoc inaccuracy (#11575)
* docs(vue-query): correct 'initialData'/'select' JSDoc inaccuracy

* docs(vue-query): fix missed 'select' qualifier on 'DefinedInitialQueryOptions' JSDoc
2026-09-23 12:20:26 +09:00
Wonsuk Choi
129955c8fd
docs(vue-query): document 'queryKey'/'mutationKey' getter-entry unwrap gap (#11573) 2026-09-22 14:37:45 +09:00
github-actions[bot]
e0f6c5542f
ci: Version Packages (#11525)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-21 11:29:33 +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
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
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
Ahmet Tınastepe
12027efd5c
fix(vue-query): widen 'queryOptions' input to match 'useQuery' (#11439)
* fix(vue-query): widen 'queryOptions' input to match 'useQuery'

* chore: generate-docs

* chore: changeset

---------

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-09-15 09:00:40 +02:00
Bart Spaans
2bc8ecf39b
fix(vue-query): re-export core filter types (#11287)
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-09-14 16:12:52 +02:00
Wonsuk Choi
7452ef68a2
test({vue,svelte}-query): add type tests for inferring the result type from a generic 'queryFn' (#11464)
* test(vue-query/useQuery): add type test for inferring the result type from a generic 'queryFn'

* test(svelte-query/createQuery): add type test for inferring the result type from a generic 'queryFn'
2026-09-10 09:26:52 +09:00
Wonsuk Choi
16aed4e1a4
test(vue-query/useMutation): add tests for per-call callbacks passed as arguments of 'mutate'/'mutateAsync' (#11459) 2026-09-09 23:33:01 +09:00
Wonsuk Choi
1fd3f61895
test(vue-query/useMutation): add tests for 'MutationFunctionContext' passed to mutationFn and callbacks (#11444)
* test(vue-query/useMutation): add tests for 'MutationFunctionContext' passed to mutationFn and callbacks

* test(vue-query/useMutation): assert 'context' type for 'mutationFn' as well

* test(vue-query/useMutation): drop redundant type annotation from 'mutationFn' params in context test

* test(vue-query/useMutation): rename 'mutationFn' param to '_variables' for consistency
2026-09-09 09:39:53 +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
Wonsuk Choi
1a51bb80bf
docs(*): clarify 'Promise.all' only waits for all mutateAsync calls when they succeed (#11435) 2026-09-07 00:31:27 +09:00
Wonsuk Choi
1893a965d2
test(vue-query/useMutation): add tests for optimistic update rollback and concurrent 'mutate'/'mutateAsync' calls (#11403) 2026-09-05 15:52:47 +09:00
Wonsuk Choi
aeeded4c2e
test(vue-query/useInfiniteQuery): add tests for 'maxPages' getter reactivity, 'hasNextPage' transitions, and 'queryKey' getter rejection (#11402) 2026-09-05 15:52:32 +09:00
Wonsuk Choi
0da5ce88fc
test(vue-query/useQuery): add tests for 'select', 'enabled' getter, 'initialData', 'keepPreviousData', and 'queryKey' getter reactivity rules (#11401)
* test(vue-query/useQuery): add tests for 'select', 'enabled' getter, 'initialData', 'keepPreviousData', and 'queryKey' getter reactivity rules

* test(vue-query/useQuery): split 'initialData' test into seeding and background refetch cases
2026-09-05 15:52:14 +09:00
Wonsuk Choi
309508612a
docs(vue-query): add JSDoc and generate reference docs with TypeDoc (#11378)
* docs(vue-query): add JSDoc across the package

* docs(vue-query): generate reference docs with TypeDoc

* docs(config): register vue-query TypeDoc reference pages

* docs(vue-query): preserve dehydrate/hydrate option docs and fix reference links

* docs(config): reorder vue-query reference nav to list 'Functions' first

* docs(config): reorder vue-query 'Functions' entries to match react/preact grouping

* docs(vue-query): restore Suspense guide link and 'placeholderData' behavior note lost in TypeDoc migration

* docs(vue-query): correct JSDoc accuracy issues and reactivity bugs

* docs(vue-query): fix invalidateQueries example that invalidated every query, add whole-options getter example

* docs(vue-query): add examples for the mutationOptions and useInfiniteQuery getter overloads

* docs(vue-query): add react-parity examples for select, skipToken, keepPreviousData, optimistic updates, and infinite scroll

* docs(vue-query): add queryOptions select typing example to useQueries

* docs(vue-query): disconnect IntersectionObserver on unmount, drop non-null assertion in skipToken examples

* docs(vue-query): add 'skipToken' factory example to 'queryOptions'

* docs(vue-query): correct 'queryKey' reactive-getter claim in 'useQuery'/'useInfiniteQuery'

* docs(vue-query): correct 'queryKey' reactive-getter claim in 'QueryOptions' type JSDoc

* docs(vue-query): fix reversed claim that 'queryKey' entries can't be reactive getters
2026-09-05 13:29:11 +09:00
github-actions[bot]
2969edf32f
ci: Version Packages (#11316) 2026-08-28 01:03:02 +09:00
github-actions[bot]
2eb3c7c76f
ci: Version Packages (#11313)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-27 17:28:48 +09:00