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

5,165 commits

Author SHA1 Message Date
Wonsuk Choi
217b67a4b7
test(query-devtools/Devtools): add test for 'pip_open' reset when the popup is blocked (#10761) 2026-05-23 14:26:26 +09:00
Wonsuk Choi
a00c0d2226
test(query-devtools/Devtools): add tests for opening a picture-in-picture window (#10760) 2026-05-23 14:02:58 +09:00
OrbisAI Security
b94b24ec99
fix: upgrade @sveltejs/kit to 2.57.1 (CVE-2026-40073) (#10637)
* fix: CVE-2026-40073 security vulnerability

Automated dependency upgrade by Orbis Security AI

* Address review feedback (1 comments)

* Address review feedback (1 comments)

* fix package json

---------

Co-authored-by: TkDodo <office@dorfmeister.cc>
2026-05-23 00:05:25 +02:00
github-actions[bot]
05cf2bc0a4
ci: Version Packages (#10758) release-2026-05-22-1920 @tanstack/angular-query-experimental@5.100.13 @tanstack/eslint-plugin-query@5.100.13 @tanstack/lit-query@0.2.5 @tanstack/preact-query-devtools@5.100.13 @tanstack/preact-query-persist-client@5.100.13 @tanstack/preact-query@5.100.13 @tanstack/query-async-storage-persister@5.100.13 @tanstack/query-broadcast-client-experimental@5.100.13 @tanstack/query-core@5.100.13 @tanstack/query-devtools@5.100.13 @tanstack/query-persist-client-core@5.100.13 @tanstack/query-sync-storage-persister@5.100.13 @tanstack/react-query-devtools@5.100.13 @tanstack/react-query-next-experimental@5.100.13 @tanstack/react-query-persist-client@5.100.13 @tanstack/react-query@5.100.13 @tanstack/solid-query-devtools@5.100.13 @tanstack/solid-query-persist-client@5.100.13 @tanstack/solid-query@5.100.13 @tanstack/svelte-query-devtools@6.1.32 @tanstack/svelte-query-persist-client@6.1.32 @tanstack/svelte-query@6.1.32 @tanstack/vue-query-devtools@6.1.32 @tanstack/vue-query@5.100.13
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-22 21:16:14 +02:00
Ben Younes
d423168f62
fix(query-core): use built-in NoInfer for generic indexed-access types (#10593)
* fix(query-core): use built-in NoInfer to support generic indexed-access types

The local `NoInfer<T> = [T][T extends any ? 0 : never]` trick breaks down
when `T` is a generic indexed-access type such as `DataTypeToEntity[DT]`,
producing errors like "Type '[DataTypeToEntity[DT]]' is not assignable to
type 'DataTypeToEntity'".

Since the project already requires TypeScript >= 5.4, delegate the public
`NoInfer<T>` alias to TypeScript's built-in `NoInfer` (introduced in 5.4).
A small `noInfer.ts` helper exposes it as `IntrinsicNoInfer<T>` to avoid
the local-shadow recursion problem.

Vue's `setQueryData` implementation now forwards the `<TData>` generic to
`super.setQueryData<TData>(...)` so its declared `NoInfer<TData> | undefined`
return type stays satisfied under the stricter built-in `NoInfer`.

Fixes #9937

* test(react-query): move 'generic indexed access TData' describe out of 'initialData'

Block was nested inside `describe('initialData', ...)` but is unrelated
to initialData behavior. Lift it to sibling level under
`describe('useQuery', ...)` so test output groups it correctly.

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

* test(react-query): document implicit regression guard for generic indexed-access NoInfer

Per CodeRabbit nitpick: clarify that the `getLabel(props.dataType, data)` call
itself is the regression guard. With the previous hand-rolled NoInfer, this
call failed to type-check; with built-in NoInfer (TS 5.4+), it compiles.

An explicit `expectTypeOf(data).toEqualTypeOf<...>()` / `toMatchTypeOf<...>()`
cannot work here — vitest's type-relation checks reduce to
`Extends<NoInfer<T>, T>` which TS leaves unresolved under a generic
`TDataType extends DataType` constraint.

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

* refactor(query-core): drop NoInfer re-export, use built-in everywhere

Per @TkDodo's review: TypeScript's intrinsic NoInfer (TS ≥ 5.4) is the
canonical type, and the package already requires TS ≥ 5.4. Removing the
re-export sidesteps the self-shadowing issue entirely and avoids
encouraging consumers to import a duplicate.

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-05-22 21:09:35 +02:00
github-actions[bot]
5ff4f6936b
ci: Version Packages (#10755) release-2026-05-22-1855 @tanstack/angular-query-experimental@5.100.12 @tanstack/eslint-plugin-query@5.100.12 @tanstack/lit-query@0.2.4 @tanstack/preact-query-devtools@5.100.12 @tanstack/preact-query-persist-client@5.100.12 @tanstack/preact-query@5.100.12 @tanstack/query-async-storage-persister@5.100.12 @tanstack/query-broadcast-client-experimental@5.100.12 @tanstack/query-core@5.100.12 @tanstack/query-devtools@5.100.12 @tanstack/query-persist-client-core@5.100.12 @tanstack/query-sync-storage-persister@5.100.12 @tanstack/react-query-devtools@5.100.12 @tanstack/react-query-next-experimental@5.100.12 @tanstack/react-query-persist-client@5.100.12 @tanstack/react-query@5.100.12 @tanstack/solid-query-devtools@5.100.12 @tanstack/solid-query-persist-client@5.100.12 @tanstack/solid-query@5.100.12 @tanstack/svelte-query-devtools@6.1.31 @tanstack/svelte-query-persist-client@6.1.31 @tanstack/svelte-query@6.1.31 @tanstack/vue-query-devtools@6.1.31 @tanstack/vue-query@5.100.12
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-22 20:50:43 +02:00
Vinamra Bhonsle
2ccdae8c37
fix(eslint-plugin-query): handle array-destructured useQueries results in no-unstable-deps (fix #10746) (#10747)
* fix(eslint-plugin-query): handle array-destructured useQueries results in no-unstable-deps

The `collectVariableNames` function in the `no-unstable-deps` rule only
handled `Identifier` patterns. When users array-destructure `useQueries`
or `useSuspenseQueries` results (e.g. `const [q1, q2] = useQueries(...)`),
the individual variables were not tracked as unstable. This meant passing
them directly to React hook dependency arrays was never flagged.

Extend `collectVariableNames` to also handle `ArrayPattern` — including
plain identifier elements and rest elements.

Fixes #10746

* ci: apply automated fixes

---------

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-22 20:43:55 +02:00
Dominik Dorfmeister 🔮
b9eb3afa9e
chore: pin chokidar to 5.0.0 (#10757) 2026-05-22 20:36:09 +02:00
Dominik Dorfmeister 🔮
ab9f0d5932
fix: trust vite v6.4.1 (#10756)
* fix: trust vite v6.4.1

* fix: update detect-agent because it has pinned setup actions
2026-05-22 20:04:59 +02:00
Cam Jackson
b125ba9c5c
docs(react-query): undefined vs. null in query-functions.md (#10008)
* docs(react-query): undefined vs. null in query-functions.md

* Apply suggestion from @TkDodo

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2026-05-22 18:37:05 +02:00
Flo
c066ab8ab5
chore: enforce pnpm 11 (#10749)
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-05-22 18:31:11 +02:00
Flo
f0865fd20c
security: stricter pnpm config blockExoticSubdeps & trustPolicy (#10719)
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-05-22 18:30:43 +02:00
Rayan Salhab
bb4556a688
fix(eslint-plugin-query): allow suspense queries combine deps (#10642)
Co-authored-by: cyphercodes <cyphercodes@users.noreply.github.com>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-05-22 18:25:28 +02:00
0Jaemin0
98fd431f7c
docs(reference/QueryClient): clarify query client query methods (#10725)
* docs(reference): clarify query client query methods

* Apply suggestions from code review

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>

---------

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-05-22 18:07:42 +02:00
Seydi Charyyev
d9b2ca7051
docs: correct refetchOnReconnect default in JSDoc (#10632) 2026-05-22 18:00:20 +02:00
Harry Whorlow
87013d5188
chore(pnpm): update pnpm to v11 (#10699)
Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2026-05-22 17:56:10 +02:00
Stephen Gibler
ae054a0e9a
docs: update Next.js TypeScript docs reference (#10753)
Co-authored-by: Stephen Gibler <261876204+sgibler-droid@users.noreply.github.com>
2026-05-22 16:18:07 +02:00
github-actions[bot]
eff8f740a4
ci: Version Packages (#10754) release-2026-05-22-1327 @tanstack/lit-query@0.2.3
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-22 15:24:46 +02:00
Raashish Aggarwal
f532bdab65
fix(lit-query): avoid redundant function option updates (#10716)
fix(lit-query): avoid redundant option updates

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-05-22 13:02:03 +02:00
Wonsuk Choi
c00ea27eb5
test(query-devtools/{DevtoolsComponent,DevtoolsPanelComponent}): add tests for rendering with all props (#10752) 2026-05-22 14:01:26 +09:00
Wonsuk Choi
fe54a9caf4
test(query-devtools/Devtools): add test for 'static' indicator on a query with 'staleTime: static' (#10748) 2026-05-21 20:28:51 +09:00
Wonsuk Choi
3a5753f94e
test(query-devtools/Devtools): add tests for clearing edit error on refocus and 'Cancel' button (#10745)
* test(query-devtools/Devtools): add tests for clearing edit error on refocus and 'Cancel' button

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-21 14:49:01 +09:00
Wonsuk Choi
ec4a59a473
test(query-devtools/Explorer): add test for action buttons rendered inside a paginated page (#10743)
* test(query-devtools/Explorer): add test for action buttons rendered inside a paginated page

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-20 20:50:25 +09:00
Wonsuk Choi
e196f9fc35
test(query-devtools/Explorer): add test for deleting fields via inline delete buttons (#10742) 2026-05-20 20:02:28 +09:00
Wonsuk Choi
48b7d660fa
test(query-devtools/Explorer): add tests for resetting 'CopyButton' state after success and failure (#10738) 2026-05-20 10:38:47 +09:00
Wonsuk Choi
e3ebf3f242
test(query-devtools/Explorer): add test for independently toggling two pages (#10737) 2026-05-20 10:12:36 +09:00
Wonsuk Choi
359184ebc1
test(query-devtools/Explorer): add test for 'CopyButton' error state on clipboard failure (#10734) 2026-05-19 21:53:48 +09:00
Wonsuk Choi
a4cebdb45a
test(query-devtools/Explorer): add tests for inline edit on primitive rows (#10731)
* test(query-devtools/Explorer): add tests for inline edit on primitive rows

* test(query-devtools/Explorer): explicitly provide 'valueAsNumber' in change event payload
2026-05-19 11:15:50 +09:00
Wonsuk Choi
57f8ec7b49
test(query-devtools/Explorer): add tests for action menu buttons (#10729)
* test(query-devtools/Explorer): add tests for action menu buttons

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-19 10:29:15 +09:00
Wonsuk Choi
caace8526d
test(query-devtools/Explorer): add tests for 'defaultExpanded' and pagination behavior (#10727) 2026-05-19 09:57:19 +09:00
github-actions[bot]
3e85350749
ci: Version Packages (#10706) release-2026-05-18-1948 @tanstack/angular-query-experimental@5.100.11 @tanstack/eslint-plugin-query@5.100.11 @tanstack/lit-query@0.2.2 @tanstack/preact-query-devtools@5.100.11 @tanstack/preact-query-persist-client@5.100.11 @tanstack/preact-query@5.100.11 @tanstack/query-async-storage-persister@5.100.11 @tanstack/query-broadcast-client-experimental@5.100.11 @tanstack/query-core@5.100.11 @tanstack/query-devtools@5.100.11 @tanstack/query-persist-client-core@5.100.11 @tanstack/query-sync-storage-persister@5.100.11 @tanstack/react-query-devtools@5.100.11 @tanstack/react-query-next-experimental@5.100.11 @tanstack/react-query-persist-client@5.100.11 @tanstack/react-query@5.100.11 @tanstack/solid-query-devtools@5.100.11 @tanstack/solid-query-persist-client@5.100.11 @tanstack/solid-query@5.100.11 @tanstack/svelte-query-devtools@6.1.30 @tanstack/svelte-query-persist-client@6.1.30 @tanstack/svelte-query@6.1.30 @tanstack/vue-query-devtools@6.1.30 @tanstack/vue-query@5.100.11
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-18 21:44:23 +02:00
Wonsuk Choi
334161f2f5
test(query-devtools/Explorer): add tests for 'Map' and iterable rendering branches (#10721) 2026-05-18 09:38:20 +09:00
Wonsuk Choi
3ed5d63a7b
test(query-devtools/Explorer): add tests for primitive values and basic collection rendering (#10714) 2026-05-18 09:11:24 +09:00
Corbin Crutchley
65b9b72713
chore: add CODEOWNERS file (#10703)
* chore: add CODEOWNERS file

* chore: add Nx configs

* chore: add NPMRC
2026-05-14 00:06:25 -06:00
palkim
139e67ccab
fix(vue-query): allow computed ref as queryKey property in queryOptions (#10530)
* fix(vue-query): allow computed ref as queryKey property in queryOptions

Closes #10525

* fix(vue-query): widen queryKey to MaybeRefOrGetter to match enabled

toValueDeep already calls `() => T` at runtime, so the queryKey type
should accept the same reactive forms as enabled: Ref, ComputedRef,
and getters. Adds a getter test and updates the changeset.

---------

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
Co-authored-by: Damian Osipiuk <osipiukd+git@gmail.com>
2026-05-13 23:12:23 +02:00
Dami Oyeniyi
299447b060
fix(vue-query-devtools): use class attribute in templates (#10635)
Co-authored-by: Damian Osipiuk <osipiukd+git@gmail.com>
2026-05-13 23:06:20 +02:00
Wonsuk Choi
57f7301c5f
test(query-devtools/Devtools): add test for clamping the width when resizing below min width (#10702)
* test(query-devtools/Devtools): add test for clamping the width when resizing below min width

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-14 02:13:17 +09:00
Wonsuk Choi
28177f5287
test(query-devtools/Devtools): add test for restoring previous query options after 'Trigger Loading' is clicked (#10701)
* test(query-devtools/Devtools): add test for restoring previous query options after 'Trigger Loading' is clicked

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-14 01:34:15 +09:00
Wonsuk Choi
5dce547b66
test(query-devtools/Devtools): add test for query details panel auto-close when resizing below min height (#10698)
* test(query-devtools/Devtools): add test for query details panel auto-close when resizing below min height

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-14 01:03:45 +09:00
Flo
e220149fcc
ci: add zizmor workflow (#10700)
* ci: add zizmor workflow

* ci: clarify release checkout credentials

* Update .github/workflows/release.yml
2026-05-13 20:17:39 +10:00
TkDodo
6840460591 pull_request_target -> pull_request 2026-05-12 08:22:21 +02:00
Sean Cassiere
65b8e31227
chore: change pull_request_target to pull_request event for labeler workflow 2026-05-12 11:00:41 +12:00
github-actions[bot]
9d2692cec4
ci: Version Packages (#10695)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-11 16:08:01 +02:00
Dominik Dorfmeister 🔮
4d130b992d
fix(query-devtools): remove experimentalDts to prevent solid-js type leak (#10694)
* fix(query-devtools): remove experimentalDts to prevent solid-js type leak

* changeset

Co-authored by @namgi2386
2026-05-11 16:02:15 +02:00
Wonsuk Choi
55c6b8ad17
test(query-devtools/Devtools): add test for hiding the panel when the 'TANSTACK' logo is clicked (#10693) 2026-05-11 12:13:08 +09:00
Wonsuk Choi
c84c9d06d7
test(query-devtools/Devtools): add tests for online toggle (#10692)
* test(query-devtools/Devtools): add tests for online toggle

* test(query-devtools/Devtools): remove redundant 'should set "onlineManager" offline' covered by label swap test
2026-05-11 10:47:12 +09:00
Wonsuk Choi
ba58314b8d
test(query-devtools/Devtools): add tests for resize handle (#10691)
* test(query-devtools/Devtools): add tests for resize handle

* test(query-devtools/Devtools): assert 'panel' is 'HTMLElement' instead of 'not.toBeNull' for stronger 'getBoundingClientRect' guarantee

* test(query-devtools/Devtools): assert non-null before parsing 'localStorage' value to prevent 'Number(null) === 0' false positive in decrease assertions
2026-05-11 10:11:10 +09:00
Wonsuk Choi
fdea97d2e6
test(query-devtools/Devtools): add tests for settings menu (#10690)
* test(query-devtools/Devtools): add tests for settings menu

* ci: apply automated fixes

* test(query-devtools/Devtools): fail fast with 'expect' instead of conditional guards on selector lookups

* test(query-devtools/Devtools): coerce 'el.textContent' to string for 'TS18047' under strict 'vue-tsc' build

* test(query-devtools/Devtools): remove redundant 'should render the settings button' covered by other settings menu tests

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-11 03:10:21 +09:00
Wonsuk Choi
3e74fcb13c
test(query-devtools/Devtools): add tests for sort dropdown, hide disabled queries, and sort order toggle (#10689)
* test(query-devtools/Devtools): add tests for sort dropdown, hide disabled queries, and sort order toggle

* ci: apply automated fixes

* test(query-devtools/Devtools): assert exact 'sortOrder' values ('1' and '-1') across consecutive toggles

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-11 02:34:23 +09:00
Wonsuk Choi
7e459768b2
test(query-devtools/Devtools): add tests for 'errorTypes' prop and error trigger via select (#10688)
* test(query-devtools/Devtools): add tests for 'errorTypes' prop and error trigger via select

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-11 02:05:47 +09:00