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

5,040 commits

Author SHA1 Message Date
Wonsuk Choi
97db5d2447
test(query-core/utils): split 'isValidTimeout' rejection cases into separate 'it' blocks (#11071) 2026-07-17 13:26:43 +09:00
Wonsuk Choi
80b833ecbd
test(query-core/utils): assert exact booleans with 'toBe' instead of 'toEqual' (#11070) 2026-07-17 12:50:37 +09:00
whizzkid1452
a9aa23f823
test(query-core/utils): add tests for 'undefined' key properties and 'isValidTimeout' validation (#11013)
* test(query-core): cover query key undefined and timeout validation

Clarify isValidTimeout with Number.isFinite, add regression tests for undefined query-key object properties, and fix TanStack branding in community resources.

* Update docs/community-resources.md

* Update packages/query-core/src/utils.ts

---------

Co-authored-by: HURRAEY <ajvl33333@gmail.com>
Co-authored-by: Wonsuk Choi <sukvvon@gmail.com>
2026-07-17 12:35:51 +09:00
Kobi Hikri
1d972e78d4
docs(CONTRIBUTING): update pnpm version from 'v10' to 'v11' (#11066)
docs: CONTRIBUTING says pnpm v10 but the repo uses pnpm v11
2026-07-16 09:35:35 +09:00
max
79d2384db5
docs(*): fix 'homogenous', 'stoage', 'supressed', 'compoennts' spelling typos (#11040)
* fix: correct spelling typos across docs, examples, and source comments

- homogenous -> homogeneous in 7 useQueries/createQueries source files
- stoage -> storage in react and vue createPersister docs
- supressed -> suppressed in react and angular pagination examples
- compoennts -> components in solid-start-streaming example

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

* docs(react-query/useSuspenseQueries): correct 'homogenous' typo to 'homogeneous' in comment

---------

Co-authored-by: maxtaran2010 <ocotifuzo727@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Wonsuk Choi <sukvvon@gmail.com>
2026-07-13 14:06:03 +09:00
Samuel Wai Weng Yong
f6cf12002a
docs({react,solid}-query): add missing 'errorUpdateCount' to 'useQuery' return signature (#11041)
* docs(react-query): add missing errorUpdateCount to useQuery return signature

* docs(react-query): move errorUpdateCount after errorUpdatedAt

* docs(react-query): keep 'errorUpdateCount' before 'errorUpdatedAt' to preserve alphabetical order

---------

Co-authored-by: Wonsuk Choi <sukvvon@gmail.com>
2026-07-13 03:28:00 +09:00
Wonsuk Choi
045c947f2a
test(*): assert exact values instead of loose matchers (#11057) 2026-07-13 02:27:36 +09:00
Wonsuk Choi
fb8f4745d7
test(vue-query/{usePrefetchQuery,usePrefetchInfiniteQuery}): assert exact prefetch options instead of 'objectContaining' (#11056) 2026-07-13 01:56:30 +09:00
Wonsuk Choi
b2ce5bcecb
test(query-core): assert exact cache event payloads in subscribe callbacks (#11053)
test(query-core): assert exact cache event arguments in subscribe callbacks
2026-07-12 13:26:02 +09:00
Wonsuk Choi
8773a1501f
test(query-devtools/PiPContext): assert exact spy arguments instead of 'objectContaining'/'stringContaining' (#11052) 2026-07-12 12:28:02 +09:00
Wonsuk Choi
aa1f9d7bf1
test({vue,angular}-query): pin the reactive refetch call with 'toHaveBeenNthCalledWith' (#11051) 2026-07-12 12:09:38 +09:00
Wonsuk Choi
0a852e0d74
test({react,preact,solid}-query/useMutation): improve callback assertions with 'toHaveBeenNthCalledWith' (#11050) 2026-07-11 15:37:03 +09:00
Wonsuk Choi
72e90c88eb
test(vue-query/vueQueryPlugin): assert exact booleans with 'toBe' instead of 'toBeTruthy'/'toBeFalsy' (#11049) 2026-07-11 15:03:21 +09:00
Wonsuk Choi
0cdfdea388
test(query-core/utils,vue-query/mutationOptions): assert reference identity with 'toBe' (#11048) 2026-07-11 14:52:39 +09:00
Wonsuk Choi
7bc34156b0
test(solid-query-persist-client/PersistQueryClientProvider): use 'toStrictEqual' to assert the exact state shape (#11047) 2026-07-11 13:51:36 +09:00
Wonsuk Choi
f79938ea08
test(vue-query/useQueries): replace 'toMatchObject' with 'toEqual' (#11046) 2026-07-11 13:32:40 +09:00
Wonsuk Choi
969772dabd
test(query-core/hydration): assert the exact infinite query result with 'toEqual' (#11045) 2026-07-11 13:32:18 +09:00
Wonsuk Choi
bd0733945f
test(solid-query-persist-client/PersistQueryClientProvider): replace 'toMatchObject' with 'toEqual' (#11044) 2026-07-11 13:28:58 +09:00
Wonsuk Choi
dea3698b52
test(query-core): assert exact booleans with 'toBe' instead of 'toBeTruthy'/'toBeFalsy' (#11043) 2026-07-11 11:43:57 +09:00
Wonsuk Choi
64241b8778
test(query-core/{hydration,queriesObserver}): remove unnecessary 'async' from tests without 'await' (#11035) 2026-07-08 10:39:30 +09:00
Wonsuk Choi
bb68fa0aa1
test(solid-query-devtools/devtoolsPanel): assert the default 'onClose' is a no-op instead of 'expect.any(Function)' (#11030) 2026-07-05 00:20:30 +09:00
Wonsuk Choi
c47678129d
test({react,preact}-query-devtools): assert the forwarded 'onClose' callback in the panel instead of 'expect.any(Function)' (#11029) 2026-07-05 00:20:20 +09:00
Wonsuk Choi
27e680fe34
test(solid-query-devtools): extract shared test setup into 'beforeEach' (#11028) 2026-07-04 15:33:23 +09:00
Wonsuk Choi
ee301adc6e
test(preact-query-devtools): extract shared test setup into 'beforeEach' (#11027)
* test(preact-query-devtools): extract shared test setup into 'beforeEach'

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-04 15:29:26 +09:00
Wonsuk Choi
6a5bc45f92
test(react-query-devtools): extract shared test setup into 'beforeEach' (#11026) 2026-07-04 15:28:45 +09:00
Wonsuk Choi
be8f11b22b
test(solid-query-devtools/devtools): add tests for forwarding option changes after mount (#11021)
* test(solid-query-devtools/devtools): add tests for forwarding option changes after mount

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-03 12:51:09 +09:00
Wonsuk Choi
6ec2ebcbe6
test(preact-query-devtools/PreactQueryDevtools): add tests for forwarding option changes after mount (#11020)
* test(preact-query-devtools/PreactQueryDevtools): add tests for forwarding option changes after mount

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-03 12:44:31 +09:00
Wonsuk Choi
cb115eaf02
test(react-query-devtools/ReactQueryDevtools): add tests for forwarding option changes after mount (#11019)
* test(react-query-devtools/ReactQueryDevtools): add tests for forwarding option changes after mount

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-03 10:40:02 +09:00
Wonsuk Choi
d6798b56b4
docs(angular-query/devtools): add the 'theme' option (#11002) 2026-06-29 12:10:31 +09:00
Wonsuk Choi
8d979dad83
test(angular-query/devtools): add test for reactive 'theme' update (#10999) 2026-06-29 11:54:05 +09:00
Wonsuk Choi
41b775fe6a
test(query-core/queryObserver): add test for pending state with a synchronous queryFn (#10998) 2026-06-29 10:30:53 +09:00
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