0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-18 19:33:22 +00:00
Commit graph

5,909 commits

Author SHA1 Message Date
github-actions[bot]
610e8d1684
ci: Version Packages (#10996) release-2026-06-27-2033 @tanstack/angular-query-experimental@5.101.2 @tanstack/eslint-plugin-query@5.101.2 @tanstack/lit-query@0.2.9 @tanstack/preact-query-devtools@5.101.2 @tanstack/preact-query-persist-client@5.101.2 @tanstack/preact-query@5.101.2 @tanstack/query-async-storage-persister@5.101.2 @tanstack/query-broadcast-client-experimental@5.101.2 @tanstack/query-core@5.101.2 @tanstack/query-devtools@5.101.2 @tanstack/query-persist-client-core@5.101.2 @tanstack/query-sync-storage-persister@5.101.2 @tanstack/react-query-devtools@5.101.2 @tanstack/react-query-next-experimental@5.101.2 @tanstack/react-query-persist-client@5.101.2 @tanstack/react-query@5.101.2 @tanstack/solid-query-devtools@5.101.2 @tanstack/solid-query-persist-client@5.101.2 @tanstack/solid-query@5.101.2 @tanstack/svelte-query-devtools@6.1.36 @tanstack/svelte-query-persist-client@6.1.36 @tanstack/svelte-query@6.1.36 @tanstack/vue-query-devtools@6.1.36 @tanstack/vue-query@5.101.2
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-27 22:28:10 +02:00
Kamil Bażanow
49012dbd51
fix(query-devtools): set window.__nonce__ in setupStyleSheet (#10736)
* fix(query-devtools): set window.__nonce__ in setupStyleSheet

* test(query-devtools): add tests for window.__nonce__ in setupStyleSheet

* chore: add changeset

* fix: merge conflicts

* formatting

* 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-06-27 22:12:25 +02:00
Wonsuk Choi
a4587b64ce
test(query-core/hydration): replace 'vi.waitFor' with 'vi.advanceTimersByTimeAsync' and use 'queryKey' helper for infinite query tests (#10944) 2026-06-28 05:03:14 +09:00
Dmytro Borysov
ad57c81fd3
docs(devtools): make markdown consistent (#10987)
Currently there is a bug, which prevents proper rendering of the links if there are both MD & HTML syntax in the same line (see https://tanstack.com/query/latest/docs/framework/react/devtools), probably should be fixed in @tanstack/markdown. Not sure that the source code of this package is published?

In the meantime, I just converted all links to html.

Converting everything (logos) to markdown won't work because we need to set width/height, which can't be done in markdown
2026-06-27 21:50:32 +02:00
Li Duoyang
ceec8f0a82
fix(devtools): add transform: translateZ(0) for Safari overflow rendering (#10638)
Safari has a known issue where overflow: hidden with border-radius
doesn't work correctly without hardware acceleration. Adding
transform: translateZ(0) forces GPU compositing which fixes the
icon rendering issue.

Fixes #10633
2026-06-27 21:48:26 +02:00
Wonsuk Choi
ecd89c8faf
fix(query-devtools/utils): scope the 'setupStyleSheet' dedup check to the target so a 'shadowDOMTarget' still receives its own '#_goober' style tag when 'document.head' already has one (#10815) 2026-06-27 21:43:19 +02:00
Wonsuk Choi
01c763444e
fix(query-devtools/Devtools): correct the Theme sub-trigger className from 'position' to 'theme' (#10811) 2026-06-27 21:41:59 +02:00
Wonsuk Choi
f5bf180d93
fix(query-devtools/PiPContext): reset 'pip_open' in 'localStore' from 'closePipWindow' so the auto-open createEffect does not reopen the window after a programmatic close (#10813) 2026-06-27 21:40:58 +02:00
Wonsuk Choi
25cdd975fe
fix(query-devtools/utils): make 'last updated' sort return 0 for queries with equal 'dataUpdatedAt' to follow the standard comparator contract (#10812) 2026-06-27 21:39:30 +02:00
Dominik Dorfmeister 🔮
9cb8eac3fb
fix: lit produces dist-js which needs to be a prod build output (#10995) 2026-06-27 21:21:47 +02:00
Bartek Iwańczuk
b03390bfc8
docs: add Deno to installation instructions (#10971)
docs: add Deno to install instructions
2026-06-27 17:05:59 +02:00
Poetry Of Code
661c1afe79
docs(preact): add polling guide (#10991)
* docs(svelte): replace deprecated isLoading with isPending in overview

`isLoading` is a deprecated alias for `isPending && isFetching` and is
scheduled for removal in the next major version. The overview example
shows a standard (always-enabled) query, so `isPending` is the correct
flag. All other framework overview docs (React, Vue, Angular, Lit,
Preact) already use `isPending`.

Note: `isLoading` is intentionally retained in disabling-queries guides
where it is the right flag for disabled/lazy queries.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs(preact): add missing polling guide

The Polling guide existed for React, Vue, Solid, and Angular but was
missing from the Preact docs. Added the ref stub and wired it into
the nav config between Window Focus Refetching and Disabling Queries,
matching the ordering used by all other frameworks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 15:45:37 +02:00
Poetry Of Code
ac7a42d6a4
docs(svelte): replace deprecated isLoading with isPending in overview (#10990)
`isLoading` is a deprecated alias for `isPending && isFetching` and is
scheduled for removal in the next major version. The overview example
shows a standard (always-enabled) query, so `isPending` is the correct
flag. All other framework overview docs (React, Vue, Angular, Lit,
Preact) already use `isPending`.

Note: `isLoading` is intentionally retained in disabling-queries guides
where it is the right flag for disabled/lazy queries.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 15:40:35 +02:00
Benjamin Eckstein
fd495f2315
docs: add @codewithagents/openapi-react-query to community resources (#10974) 2026-06-27 15:32:07 +02:00
Jonghyeon Ko
1f84256a2e
docs: document the select typing caveat for parallel-queries hooks (#10984)
Inlining a `select` on a query object passed to `useQueries` /
`useSuspenseQueries` can't infer its `data` argument from the sibling
`queryFn` and falls back to `unknown` — a known TypeScript limitation
(TanStack/query#6556).

Document the two workarounds (annotate the `select` parameter, or define
the query with the `queryOptions` helper) in the React docs, and add type
tests guarding the behavior. Scoped to React for an easier review; the
other framework adapters can follow the same pattern in separate PRs.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 15:30:15 +02:00
Wonsuk Choi
0b6b827389
test(svelte-query/containers): add test for deleting a non-existent property (#10992) 2026-06-27 18:21:06 +09:00
Brenley Dueck
e6ad3fc404
fix(release): avoid pre dist tag for prereleases (#10986) 2026-06-26 14:09:58 +02:00
Hojeong Park
fcdcf8ac08
fix(svelte-query/containers): fix typo from 'Tanstack' to 'TanStack' (#10722)
Co-authored-by: Jonghyeon Ko <manudeli.ko@gmail.com>
2026-06-26 01:56:53 +09:00
Jonghyeon Ko
0298c909c0
test(query-core): keep setQueryData typecheck green on TypeScript 5.4 (#10985)
Under TypeScript 5.4, `NoInfer<T>` can't match an inline object literal
against the value branch of the `Updater` union in `setQueryData`, so it
falls back to the function branch and reports the literal as excess
properties (TS2353). TS >= 5.5 handles it correctly.

This surfaces in the `test:types:ts54` legacy typecheck via the project
reference chain (e.g. react-query-persist-client / react-query-devtools
build query-core's test sources). It is normally masked by the Nx remote
cache and only re-runs — and fails — when a dependent package's type
inputs change, so it can land on `main` unnoticed.

Annotate the value before passing it to `setQueryData` to sidestep the
5.4 limitation while preserving the assertions. Verified across TS
5.4–6.0.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 00:44:23 +09:00
Flo
4eb0ed9322
chore: update pnpm to 11.9.0 (#10978)
* chore: update pnpm to 11.9.0

* chore: document trust policy exclusions

* chore: raise minimum release age

---------

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-06-24 13:46:09 +02:00
Wonsuk Choi
982c6185a7
test(svelte-query/utils): add tests for 'watchChanges' first-run skip, array sources, and cleanup (#10979) 2026-06-24 10:55:40 +09:00
github-actions[bot]
b80929716f
ci: Version Packages (#10977) release-2026-06-23-1001 @tanstack/angular-query-experimental@5.101.1 @tanstack/eslint-plugin-query@5.101.1 @tanstack/lit-query@0.2.8 @tanstack/preact-query-devtools@5.101.1 @tanstack/preact-query-persist-client@5.101.1 @tanstack/preact-query@5.101.1 @tanstack/query-async-storage-persister@5.101.1 @tanstack/query-broadcast-client-experimental@5.101.1 @tanstack/query-core@5.101.1 @tanstack/query-devtools@5.101.1 @tanstack/query-persist-client-core@5.101.1 @tanstack/query-sync-storage-persister@5.101.1 @tanstack/react-query-devtools@5.101.1 @tanstack/react-query-next-experimental@5.101.1 @tanstack/react-query-persist-client@5.101.1 @tanstack/react-query@5.101.1 @tanstack/solid-query-devtools@5.101.1 @tanstack/solid-query-persist-client@5.101.1 @tanstack/solid-query@5.101.1 @tanstack/svelte-query-devtools@6.1.35 @tanstack/svelte-query-persist-client@6.1.35 @tanstack/svelte-query@6.1.35 @tanstack/vue-query-devtools@6.1.35 @tanstack/vue-query@5.101.1
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-23 11:57:22 +02:00
autofix-ci[bot]
c28b2f901e
ci: apply automated fixes 2026-06-23 09:29:36 +00:00
Dor Alagem
9eff92ed86
fix(hydration): set dataUpdatedAt when pending query resolves before hydration (#10610)
* fix(hydration): set dataUpdatedAt when pending query resolves before hydration

* test(hydration): add cases for dataUpdatedAt when streamed query resolves before hydration

* Add changeset

---------

Co-authored-by: Fredrik Höglund <fredrik.hoglund@gmail.com>
2026-06-23 11:28:35 +02:00
dfedoryshchev
4f11927ac5
docs(angular-query): fix "allows to" grammar in JSDoc comments (#10890) 2026-06-19 13:43:35 +02:00
Wonsuk Choi
0bed37a91e
test(query-core): replace deprecated 'toBeCalledWith' and 'toBeCalledTimes' with 'toHaveBeenCalledWith' and 'toHaveBeenCalledTimes' (#10967) 2026-06-17 19:52:08 +09:00
Wonsuk Choi
a7b783a5ed
test(vue-query): replace deprecated 'toBeCalledWith' with 'toHaveBeenCalledWith' (#10968) 2026-06-17 19:50:09 +09:00
Wonsuk Choi
835a299cea
test(vue-query/useMutation): replace 'vi.waitFor' with 'vi.advanceTimersByTimeAsync' in async 'mutateAsync' tests (#10966) 2026-06-17 19:43:02 +09:00
Wonsuk Choi
18d45046d9
test(solid-query/useQuery): add type test for generic indexed-access 'TData' regression guard (#10961) 2026-06-16 17:44:01 +09:00
Wonsuk Choi
84dbefa5d7
test(solid-query/useQuery): move type-only test to 'useQuery.test-d.tsx' (#10960)
* test(solid-query/useQuery): move type-only test to 'useQuery.test-d.tsx'

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-16 17:33:21 +09:00
Wonsuk Choi
784c2f0a07
test(solid-query/useQueries): move type-only tests to 'useQueries.test-d.tsx' (#10959) 2026-06-16 14:50:40 +09:00
Wonsuk Choi
ccc843ea44
test({react,preact}-query/useQueries): move type-only tests to 'useQueries.test-d.tsx' (#10958) 2026-06-16 14:01:52 +09:00
Wonsuk Choi
86b949b417
test(solid-query/useQueries): add test for using a provided custom 'queryClient' (#10952) 2026-06-15 04:45:34 +09:00
Wonsuk Choi
588b30f100
test(solid-query/useQueries): add test for not fetching during the restoring period when 'isRestoring' is true (#10951) 2026-06-15 04:36:36 +09:00
Wonsuk Choi
0e2bfe7dcd
test(solid-query): add 'renderWithClient' helper and replace inline 'QueryClientProvider' wrapping in tests (#10950) 2026-06-15 03:13:25 +09:00
Wonsuk Choi
6048592652
test(solid-query/useMutation): split 'should pass meta to mutation' into separate success and error tests (#10949) 2026-06-15 02:26:17 +09:00
Wonsuk Choi
415461346f
test({react,preact}-query/useMutation): split 'should handle conditional logic based on mutate success or failure' into separate success and error tests (#10948) 2026-06-15 02:03:09 +09:00
Wonsuk Choi
8bb5fdea3e
test({react,preact}-query/useMutation): split 'should pass meta to mutation' into separate success and error tests (#10947) 2026-06-15 01:57:35 +09:00
Wonsuk Choi
63d425bdba
fix(scripts): sort 'readFile' before 'readdir' in 'generate-docs' to satisfy 'sort-imports' (#10946) 2026-06-14 22:41:31 +09:00
Wonsuk Choi
ecc321f1a1
chore(knip): update '$schema' to 'knip@6' to match the installed major version (#10945) 2026-06-14 22:35:28 +09:00
Jakub Šimko
47e539a9f4
docs(react-query): recommend against using server actions in queryFn (#10927) 2026-06-14 13:04:16 +02:00
Wonsuk Choi
2555dd0926
test(lit-query): replace deprecated 'toThrowError' with 'toThrow' (#10942) 2026-06-14 19:52:26 +09:00
Wonsuk Choi
e5161df520
test(angular-query-experimental): replace deprecated 'toBeCalledWith' with 'toHaveBeenCalledWith' (#10941) 2026-06-14 19:44:55 +09:00
Wonsuk Choi
ee89b90238
test(query-async-storage-persister): replace deprecated 'toBeCalledTimes' with 'toHaveBeenCalledTimes' (#10940) 2026-06-14 19:41:02 +09:00
Wonsuk Choi
b266bdc525
test(preact-query): replace deprecated 'toBeCalledTimes' with 'toHaveBeenCalledTimes' (#10939) 2026-06-14 19:35:51 +09:00
Wonsuk Choi
c8ebcd7118
test(solid-query): replace deprecated 'toBeCalledTimes' with 'toHaveBeenCalledTimes' (#10938) 2026-06-14 19:30:00 +09:00
Wonsuk Choi
87426a3016
test(react-query): replace deprecated 'toBeCalledTimes' with 'toHaveBeenCalledTimes' (#10937) 2026-06-14 19:20:56 +09:00
Wonsuk Choi
43a4ea0650
test(vue-query): replace deprecated 'toBeCalledWith' and 'toBeCalled' with 'toHaveBeenCalledWith' and 'toHaveBeenCalled' (#10935) 2026-06-14 18:44:47 +09:00
Wonsuk Choi
feb1efd804
test(*): move 'vi.useRealTimers' to the end of 'afterEach' so cleanup runs under fake timers (#10920)
* test(*): move 'vi.useRealTimers' to the end of 'afterEach' so cleanup runs under fake timers

* test(*): move 'vi.useRealTimers' to the end of 'afterEach' in persist-client and devtools suites

* test(svelte-query/createQueries): move 'vi.useRealTimers' to the end of 'afterEach'
2026-06-11 12:08:15 +09:00
Wonsuk Choi
b552179a3b
test(solid-query/useIsMutating): centralize 'queryClient' setup with 'beforeEach' and rename injected/spied clients (#10919) 2026-06-11 10:56:43 +09:00