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

342 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
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
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
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
8f9dfcb30c
feat(angular-query-experimental/injectDevtoolsPanel): add the 'theme' and 'hideDisabledQueries' options (#12316) 2026-10-25 10:45:35 +09: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
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
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
github-actions[bot]
a8ecc8d42f
ci: Version Packages (#12128)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-19 18:54:46 +02:00
Dominik Dorfmeister 🔮
f608f933a3
fix(query-core): use supplied options for optimistic fetches (#12131) 2026-10-19 18:42:05 +02:00
Dominik Dorfmeister 🔮
1f8d134ea3
fix(react, preact): recompute mutation state snapshots (#12117)
* fix(react-query): recompute mutation state snapshots

* test(react-query): assert visible mutation counts

* fix(react-query): preserve mutation result references across renders

* fix(react-query): cache snapshots for non-plain selector results

* fix(preact-query): recompute mutation state snapshots

* Apply suggestion from @TkDodo

* fix: remove useMemo
2026-10-19 12:57:16 +02:00
github-actions[bot]
12199722dc
ci: Version Packages (#12062)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-17 19:51:17 +02:00
chungyoung kim
1fee0443db
fix(query-core): clear mutations before notifying subscribers (#11470)
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-10-17 19:46:13 +02:00
JeongHoon
c20886163a
fix(react-query): retry queries with falsy errors on mount (#11328)
* fix(react-query): retry queries with falsy errors on mount

* refactor(react-query): keep throwOnError constant

---------

Co-authored-by: TkDodo <office@dorfmeister.cc>
2026-10-17 19:26:30 +02:00
Jooyoung Shin
0addcd2a9a
fix(preact-query): retry on mount for falsy errors when throwOnError returns false (#11375)
* fix(preact-query): retry on mount for falsy errors when throwOnError returns false

`ensurePreventErrorBoundaryRetry` only evaluated a function-valued
`throwOnError` when `query.state.error` was truthy. For a query that
rejected with a falsy value (e.g. `undefined`), the callback was skipped
and the function itself was treated as truthy, so `retryOnMount` was
disabled even though `throwOnError` would have returned `false`.

Check `query.state.status === 'error'` instead so the callback runs for
every failed query. Ports #11328 to preact-query.

* refactor(preact-query): keep throwOnError constant

---------

Co-authored-by: TkDodo <office@dorfmeister.cc>
2026-10-17 19:23:55 +02:00
Seungtaek Oh
7ea0278558
fix(solid-query): subscribe to the new observer when the queryClient changes (#11920)
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-10-17 19:10:13 +02:00
곽지욱
fce89ddf7a
fix(query-core): preserve null infinite page params (#11527)
fix(query-core): preserve null infinite page params
2026-10-17 18:54:51 +02:00
Wonsuk Choi
b61abc2033
fix(query-devtools/Devtools): apply the 'hideDisabledQueries' prop to the query list (#11638) 2026-10-17 18:51:43 +02:00
Wonsuk Choi
fc3a3848f2
fix({preact,solid,svelte,angular-query-experimental}): switch to 'export type *' for type-only re-exports (#11251)
* fix({preact,solid,svelte,angular-query-experimental}): switch to 'export type *' for type-only re-exports

* chore(.changeset/export-type-star-adapters): trim redundant PR cross-reference from changeset body
2026-10-17 18:51:10 +02:00
Derrick Marcey
c8f5eac9df
fix(query-devtools): expose pressed state on the boolean value toggle button (#11983)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-10-17 18:34:57 +02:00
Minh Vu
1cf6eb4e9e
fix(eslint-plugin-query): detect aliased React hook dependencies (#11889)
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-10-17 18:24:06 +02:00
Wonsuk Choi
a10839824c
fix(react-query*): declare '@types/react' as an optional peer dependency (#11728)
* fix(react-query*): declare '@types/react' as a peer dependency like 'react-query-devtools'

* fix(react-query*): mark '@types/react' as an optional peer dependency
2026-10-17 18:07:05 +02:00
Wonsuk Choi
a5f1b092bb
refactor(eslint-plugin-query/exhaustive-deps): remove the unused 'fixable' from the rule metadata (#12044) 2026-10-17 18:02:55 +02:00
Wonsuk Choi
0992a92914
fix(react-query-devtools): create the devtools instance lazily with 'useState' initializer instead of on every render (#11722) 2026-10-17 18:02:24 +02:00
Wonsuk Choi
2bb82dfd23
fix(svelte-query/HydrationBoundary): make 'options' and 'queryClient' props optional (#12030) 2026-10-17 18:01:46 +02:00
Paul Nguyen
2ce51902de
fix(preact-query): do not go into optimistic fetching state when not subscribed (#11259)
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-10-17 17:42:13 +02:00
github-actions[bot]
ee47993724
ci: Version Packages (#11998)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-15 09:50:17 +02:00
Sviat Barbutsa
0f15bc925d
fix(query-core): preserve union narrowing in setQueryData updaters (#11935)
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-10-15 09:36:14 +02:00
Dami Oyeniyi
67705fd6ad
fix(vue-query-devtools): update client when prop changes (#11413) 2026-10-12 21:59:13 +02:00
Max Freedom Pollard
ed4d849731
fix(query-persist-client-core/createPersister): await 'storage.setItem' when persisting a query (#11410) 2026-10-12 21:54:43 +02:00
github-actions[bot]
b699b52d60
ci: Version Packages (#11849)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-11 21:32:27 +02:00
Jovi De Croock
a94c7caeec
feat(preact-query*): support Preact v11 (#11711)
* feat(preact-query*): support Preact v11

* fix(preact-query*): pass an initial value to 'useRef' and flush deferred unmount effect cleanups in tests for Preact v11

* chore(preact-query*): develop and test against Preact 11

Bump the preact catalog and the preact example to ^11.0.1, and
preact-render-to-string to ^6.8.0 (Preact 11 peers on >=6.7.0).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Kevin Van Cott <kevinvandy656@gmail.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-11 18:17:07 +01:00
Kirby
69e114aecf
fix(vue-query): export MutationResult type (#11796)
`UseMutationReturnType` uses `MutationResult` as the default for its
`TResult` parameter, but the alias was not exported. Projects that emit
declarations could not name the inferred return type of a `useMutation`
wrapper and failed with TS2883. Export it from the package root.

Fixes #11769

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Ciarán Curley <ciaran.curley.11.11@gmail.com>
2026-10-09 12:17:10 +01:00
Tiago Vilas Boas
03e8c3955d
fix(query-core): start queued scoped mutations while the window is not focused 🤖🤖🤖 (#11679)
fix(query-core): start queued scoped mutations while the window is not focused

A mutation queued behind another one in the same scope is started later
through retryer.continue(), which only resumes when canContinue() is true.
canContinue() requires the window to be focused, so with an unfocused tab
the next mutation stayed paused until the window got focus again.

Resume the initial start pause with canStart() instead, which is the same
check used to start the retryer right away. Retry pauses still use
canContinue().

Fixes #11642

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-10-03 20:25:15 +02:00
github-actions[bot]
29859ae60c
ci: Version Packages (#11806)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-02 12:02:10 +02:00
Ciarán Curley
ec060b6f74
fix(query-devtools): isolate signals on devtools instances (#11799)
* fix(query-devtools): isolate mounted devtools instances

* refactor(query-devtools): encapsulate instance cache subscriptions

* refactor(query-devtools): inline provider state with explicit interfaces

* refactor(query-devtools): separate contexts and providers

* chore: update query devtools
2026-10-02 11:57:30 +02:00
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
a0ee654cd8
chore(angular-query): migrate to tsdown (#11649)
* chore(angular-query): migrate to tsdown

* Add changeset

* Fix types

* Fix attw
2026-09-26 09:59:39 +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
1c9693eac7
fix(codemods): update codemods build script (#11647)
* fix(codemods): update codemods build script

* Add changeset
2026-09-26 07:47:49 +10:00