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

3,053 commits

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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-01 11:04:19 +01:00
VGontier
8be136b022
fix(query-persist-client-core): discard malformed persisted queries (#11919)
* fix(query-persist-client-core): handle nullish persisted query state

* fix(query-persist-client-core): validate deserialized queries

* fix(query-persist-client-core): validate persisted query fields

* fix(query-persist-client-core): narrow persisted entry validation

---------

Co-authored-by: Vivien Gontier <vivien.gontier@paygreen.fr>
Co-authored-by: Ciarán Curley <ciaran.curley.11.11@gmail.com>
2026-10-31 15:43:35 +00:00
Wonsuk Choi
d88ba6ec46
docs(lit): remove '@tanstack/query-core' and 'lit' from the install commands to install only '@tanstack/lit-query' (#12209)
* docs(lit): remove '@tanstack/query-core' from the install commands since 'lit-query' already depends on it

* docs(lit): remove 'lit' from the install commands since apps using Lit Query already have it
2026-11-01 00:39:26 +09:00
Wonsuk Choi
5c5c11c6e7
fix(lit-query/package.json): remove '@tanstack/query-core' from 'peerDependencies' and move 'lit' to 'devDependencies' (#12189)
* fix(lit-query/package.json): remove '@tanstack/query-core' from 'peerDependencies' since it is already a dependency

* docs(lit): restore the install commands to move them to a separate change

* fix(lit-query/package.json): move 'lit' from 'dependencies' to 'devDependencies' so it is declared only as a peer dependency
2026-11-01 00:38:03 +09:00
Wonsuk Choi
9be2e7049c
test({solid-query,solid-query-persist-client,svelte-query}): access query and mutation results through their object instead of destructuring them (#12464)
* test(solid-query): access query and mutation results through their object instead of destructuring them

* test(svelte-query): access query results through their object instead of destructuring them

* test(svelte-query/createInfiniteQuery): access the error booleans through the query object instead of destructuring them

* test(solid-query-persist-client/PersistQueryClientProvider): access the 'useQueries' result by index instead of destructuring it
2026-10-31 23:57:19 +09:00
Wonsuk Choi
979695d0a2
docs({react,preact,angular,solid,svelte,vue}-query): describe when the 'Defined' and 'Undefined' 'initialData' overloads are selected (#12460)
* docs({react,preact,angular,solid,svelte,vue}-query): describe the 'initialData' overloads as 'known to be defined' and 'omitted or may be undefined'

* docs({react,preact,angular,solid,svelte,vue}-query): regenerate reference docs

* docs({react,preact,angular,solid,svelte,vue}-query): mention an 'initialData' function that may return 'undefined' in the 'Undefined' overload descriptions

* docs({react,preact,angular,solid,svelte,vue}-query): regenerate reference docs
2026-10-30 16:41:25 +09:00
Wonsuk Choi
7ccba6e959
fix({react,preact,angular,solid,vue}-query/infiniteQueryOptions): correct the overload selected for a possibly-undefined 'initialData' (#11373)
* fix({react,preact,angular}-query): remove erroneous '| undefined' from 'DefinedInitialDataInfiniteOptions'

* test({react,preact,angular}-query/infiniteQueryOptions): use a non-literal condition for the ternary 'initialData' test

* fix({solid,vue}-query): accept a possibly-undefined 'initialData' in 'UndefinedInitialDataInfiniteOptions'

* fix(vue-query/infiniteQueryOptions): declare the 'Defined' overload first so a defined 'initialData' still selects it

* docs({react,preact,angular,solid,vue}-query): drop generated reference doc changes, regenerated by autofix after merge

* chore(.changeset): align the message with the PR title

* docs({react,preact,angular,solid,vue}-query/infiniteQueryOptions): describe overload selection by whether 'initialData' is known to be defined

* docs(framework/*/reference): regenerate reference docs

* docs(framework): restore the generated reference docs from main and leave them to autofix

* docs({react,preact,angular,solid,vue}-query): regenerate reference docs

* test({react,preact,angular,solid,vue}-query/infiniteQueryOptions): start test titles with 'should'
2026-10-30 10:06:32 +09:00
Wonsuk Choi
b9f369a23a
fix(solid-query/{queryOptions,useQuery}): correct the overload selected for 'initialData' (#11595)
* fix(solid-query/{queryOptions,useQuery}): correct the overload selected for 'initialData'

* ci: apply automated fixes

* docs(framework/*/reference): regenerate reference docs

* ci: apply automated fixes

* test(solid-query/queryOptions): assert the 'useQuery' data type when 'initialData' may be undefined

* docs(solid-query): regenerate reference docs

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-10-30 09:58:02 +09:00
Wonsuk Choi
1fa2f1bba1
chore(oxlint.config): add 'vueConfig' with native 'vue' rules for 'vue-query' and 'vue-query-devtools' (#12450) 2026-10-29 15:25:01 +09:00
Wonsuk Choi
5f37e7cb6b
refactor(svelte): declare '$props()' with 'let' and type them with 'Props', 'LayoutProps' and 'PageProps' in examples and tests (#12434)
* refactor(examples/svelte): declare '$props()' with 'let' and type them with 'Props', 'LayoutProps' and 'PageProps'

* test(svelte-query,svelte-query-persist-client): declare '$props()' with 'let' and type them with 'Props'

* refactor(svelte-query/HydrationBoundary): declare '$props()' with 'let'
2026-10-28 16:06:44 +09:00
Kazbek Askarov
db79da70ed
fix(query-persist-client-core): catch errors when persisting in 'persistQueryClientSubscribe' to prevent unhandled promise rejections, and log them in development (#11678)
* fix(query-persist-client-core): catch errors when persisting in 'persistQueryClientSubscribe' to prevent unhandled promise rejections, and log them in development

* test(query-persist-client-core): fix mock lint violations

---------

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-10-27 10:18:55 +01:00
Dominik Dorfmeister 🔮
ec19101885
fix(eslint-plugin-query): detect unstable clients in arrow functions and JSX (#12409) 2026-10-27 09:59:24 +01:00
Dominik Dorfmeister 🔮
6f8a48d543
ref(query-core): compare tracked result fields directly (#12406) 2026-10-26 17:24:25 +01:00
Dominik Dorfmeister 🔮
18e54bfac3
fix(query-core): exclude fetchStatus from fetching filters (#12390) 2026-10-26 11:17:57 +01:00
github-actions[bot]
5cc606e2e8
ci: Version Packages (#12301)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-26 10:28:34 +01:00
Wonsuk Choi
14cc3302e3
style(packages): write durations in 'count * unit * 1000' order (#12382)
* style(packages): write durations in 'count * unit * 1000' order

* docs(framework/*/reference): regenerate 'Query' reference for the 'isStaleByTime' example
2026-10-26 02:30:25 +09:00
Wonsuk Choi
4f3dba5782
refactor(vue-query/utils): type 'isPlainObject' as 'Record<PropertyKey, unknown>' instead of the 'Object' wrapper type, like 'query-core' (#12343) 2026-10-25 21:11:38 +09:00
Wonsuk Choi
d7c0418f87
chore(react-query/{useQuery,useInfiniteQuery}): remove the unused '@eslint-react/no-nested-component-definitions' disable and explain the remaining false positive (#12344) 2026-10-25 21:11:06 +09:00
Wonsuk Choi
aa3e26b4f0
chore(react-query/{HydrationBoundary,utils}): explain why 'react-hooks-js/refs' and 'react-hooks-js/set-state-in-effect' are disabled (#12342) 2026-10-25 20:21:53 +09:00
Wonsuk Choi
4c1384f122
test(solid-query/{useMutation,useIsMutating,useQueries}): assert that the work settles in the cache after unmount while the component state stays unchanged (#12341) 2026-10-25 20:18:56 +09:00
Wonsuk Choi
b4212cc9f8
test(preact-query/useMutation): assert that the mutation settles in the cache after unmount while the component state stays unchanged (#12340) 2026-10-25 20:18:48 +09:00
Wonsuk Choi
b2801aa76f
test(react-query/useMutation): assert that the mutation settles in the cache after unmount while the component state stays unchanged (#12339) 2026-10-25 20:18:30 +09:00
Wonsuk Choi
659431a5f5
test(query-devtools/utils): use English fixture values and fix the 'bolognese' typo instead of disabling 'cspell/spellchecker' (#12338) 2026-10-25 13:43:39 +09:00
Wonsuk Choi
e8ffa3f39a
test(query-core/streamedQuery): consume the signal with 'void context.signal' instead of an always-truthy condition, and explain the kept 'require-await' disables (#12337) 2026-10-25 13:41:54 +09:00
Wonsuk Choi
8429d10720
test(solid-query/{useMutation,useIsMutating,useQueries}): wait for the work to settle after unmount and assert that no error is logged (#12336) 2026-10-25 13:41:40 +09:00
Wonsuk Choi
a6211e3b2f
test(preact-query/useMutation): wait for the mutation to settle after unmount and assert that no error is logged (#12335) 2026-10-25 13:40:14 +09:00
Wonsuk Choi
43636c43e7
test(react-query/useMutation): wait for the mutation to settle after unmount and assert that no error is logged (#12334) 2026-10-25 13:39:49 +09:00
Wonsuk Choi
3700deff20
test(query-core/utils): assert with 'toBeCallableWith' that 'invalidateQueries' accepts a union of query keys with different lengths (#12333) 2026-10-25 13:39:35 +09:00
Wonsuk Choi
83aeaf054b
test(query-devtools/{Explorer,Devtools}): remove unnecessary type assertions and their 'oxlint-disable' comments (#12330) 2026-10-25 13:29:34 +09:00
Wonsuk Choi
f9931c130a
test(query-core): remove unnecessary type assertions and their 'oxlint-disable' comments, and explain the one kept in 'retryer.test-d' (#12331) 2026-10-25 13:29:08 +09:00
Wonsuk Choi
1eed9d9ef5
chore(*): explain why 'vitest-js/valid-expect' is disabled for the 'expectTypeOf<TQueryKey>(ctx.queryKey)' checks in the 'useQueries' type tests (#12332) 2026-10-25 13:28:51 +09:00
Wonsuk Choi
a155bb8c77
chore(query-core/query): explain why 'typescript/no-unnecessary-condition' is disabled for the 'state' check in 'setOptions' (#12326) 2026-10-25 12:49:57 +09:00
Wonsuk Choi
0c5ec0695a
chore(eslint-plugin-query/detect-react-query-imports): explain why 'typescript/no-unnecessary-condition' is disabled for the 'importKind' check (#12327) 2026-10-25 12:49:39 +09:00
Wonsuk Choi
016b83ecc0
chore(lit-query/{QueryClientProvider,BaseController}): explain why 'typescript/no-unnecessary-condition' is disabled for the 'client' checks (#12328) 2026-10-25 12:49:24 +09:00
Wonsuk Choi
42ae5caee8
chore(angular-query-experimental/createBaseQuery): explain why 'typescript/no-unnecessary-type-assertion' is disabled for the 'refetch' wrapper (#12329) 2026-10-25 12:49:13 +09:00
Wonsuk Choi
faa41e9c46
refactor(angular-query-experimental/injectQueries): remove the unnecessary 'QueryObserverOptions' assertion and its 'oxlint-disable' comment (#12324) 2026-10-25 12:43:36 +09:00
Wonsuk Choi
715574d87b
test(preact-query/ErrorBoundary): name the 'react/no-did-update-set-state' rule in the bare 'oxlint-disable-next-line' comment (#12323) 2026-10-25 12:13:05 +09:00
Wonsuk Choi
8f9dfcb30c
feat(angular-query-experimental/injectDevtoolsPanel): add the 'theme' and 'hideDisabledQueries' options (#12316) 2026-10-25 10:45:35 +09:00
Ciarán Curley
4a7386a470
chore(deps): upgrade vitest to v5 (#12317)
Bump vitest and @vitest/coverage-istanbul to 5.0.5 (root and
query-test-utils) and @vitest/eslint-plugin to 1.6.28.

Vitest 5's typecheck collector treats any name ending in Test as a test function, so notifyManagerTest in query-core/src/__tests__/notifyManager.test-d.tsx was renamed to localNotifyManager.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 19:26:03 +01:00
Wonsuk Choi
9e4253766f
fix(angular-query-experimental/withDevtools): forward an unset 'theme' to the devtools so removing it falls back to the theme selected in the devtools Settings menu (#12315) 2026-10-24 03:05:27 +09:00
Wonsuk Choi
a5d5e00458
docs(*-devtools): describe how the 'theme' prop interacts with the theme selected in the devtools Settings menu (#12314) 2026-10-24 02:53:19 +09:00
Wonsuk Choi
f232b75e35
fix(solid-query-devtools): stop defaulting the 'theme' prop to 'system' so the theme chosen in the devtools settings applies when the prop is omitted (#12310) 2026-10-24 02:48:21 +09:00
Wonsuk Choi
a282bf807a
fix(vue-query-devtools): stop defaulting the 'theme' prop to 'system' so the theme chosen in the devtools settings applies when the prop is omitted (#12312) 2026-10-24 02:47:34 +09:00
Wonsuk Choi
aff30e36bd
fix(svelte-query-devtools): stop defaulting the 'theme' prop to 'system' so the theme chosen in the devtools settings applies when the prop is omitted (#12313) 2026-10-24 02:46:23 +09:00
Wonsuk Choi
86740aed31
test(vue-query/queryOptions): add type tests for 'useQueries', 'query' with 'enabled: false' and 'skipToken', and undefined 'initialData' (#12309) 2026-10-24 02:13:37 +09:00
Wonsuk Choi
394ea297d0
test(vue-query-devtools/devtools): add tests for forwarding option changes to the devtools instance after mount (#12308) 2026-10-24 01:57:24 +09:00
Wonsuk Choi
7a10cda3e4
chore(vue-query-devtools/package.json): restore the 'test:lib' script removed in the Vite 8 update (#12307) 2026-10-24 01:54:09 +09:00
Wonsuk Choi
bdd50314f7
test(svelte-query-devtools): extract shared test setup into 'beforeEach' (#12306) 2026-10-24 01:49:33 +09:00
Wonsuk Choi
e1547fd10a
test(solid-query/useInfiniteQuery): match the 'skipToken' test timer advances to the 'queryFn' sleep of 10ms (#12305) 2026-10-24 01:49:12 +09:00
Wonsuk Choi
c5de051d61
fix(vue-query/queryClient): infer the data and error types of 'getQueryState' from a tagged query key (#11921)
* fix(vue-query/queryClient): infer the data and error types of 'getQueryState' from a tagged query key

* docs(vue-query): regenerate reference docs for 'getQueryState' overloads
2026-10-23 11:45:09 +02:00