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

5,002 commits

Author SHA1 Message Date
Tanner Linsley
32414aab2f
Update README.md 2025-05-08 10:19:18 -06:00
xxziiko
3d64dc60f1
docs(react-query): ensure suspense example fallback renders correctly (#9119)
The previous suspense example incorrectly rendered null instead of the
fallback UI. This change moves the null check outside the Suspense
component to ensure the fallback is displayed as expected.

Fixes #9019
2025-05-08 13:17:25 +02:00
Jonghyeon Ko
66ea5f2fcc
chore: add typescript-eslint/require-await rule (#9116)
Co-authored-by: MINSEONG KIM <65233075+minseong0324@users.noreply.github.com>
2025-05-08 04:48:20 +09:00
김석진(poki)
2a62ea1ff1
test(react-query): improve branch coverage for useSuspenseQuery skipToken error handling (#9112)
Co-authored-by: Jonghyeon Ko <manudeli.ko@gmail.com>
2025-05-08 02:43:56 +09:00
김석진(poki)
b1cdbc3fd9
test(react-query): improve branch coverage for useSuspenseQueries skipToken error handling (#9113)
Co-authored-by: Jonghyeon Ko <manudeli.ko@gmail.com>
2025-05-08 02:38:24 +09:00
김석진(poki)
2496ba51bb
test(react-query): improve branch coverage for useSuspenseInfiniteQuery skipToken error handling (#9114)
Co-authored-by: Jonghyeon Ko <manudeli.ko@gmail.com>
2025-05-08 02:34:08 +09:00
Jonghyeon Ko
d0552afb0b
test(query-test-utils): init (internal package) (#9095)
* test(query-test-utils): init

* refactor(tests): replace createQueryClient with new QueryClient instantiation across test files

* refactor(tests): remove unused imports in utils test file

* refactor(tests): replace fetcher functions with sleep-based implementations in query tests

* refactor(tests): replace simpleFetcher with sleep-based implementations in query tests

* fix(query-core): update test:build script to remove pnpm prefix

* refactor(tests): extract query function into a variable for clarity in useQuery tests

* chore(tsconfig): remove temporary Vitest TypeScript configuration file

* chore: add @tanstack/query-test-utils as a devDependency in multiple packages

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2025-05-07 15:34:10 +02:00
Tanner Linsley
2cd0cebb1e release: v5.75.5 v5.75.5 2025-05-07 07:29:51 +00:00
Seyeong Jeon
373546be9a
fix(react-query): fix to show type error on wrong type annotation in useQuery (#8683)
* fix(react-query): fix no error on wrong type annotation

* test(react-query): remove an unused var

* feat: use NoInfer from query-core

* ci: apply automated fixes

* fix: fix eslint error (disable)

---------

Co-authored-by: Jonghyeon Ko <manudeli.ko@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-05-07 09:25:08 +02:00
MINSEONG KIM
732089e719
test(query-core): add test case for infiniteQueryBehavior (#9101)
Co-authored-by: Jonghyeon Ko <manudeli.ko@gmail.com>
2025-05-07 04:51:01 +09:00
Jonghyeon Ko
6f8d57b7bf
ci(*): update vitest/expect-expect rule as error (#9111) 2025-05-07 03:21:51 +09:00
Jonghyeon Ko
62faf10f5c
ci(react-query): update vitest/expect-expect rule as error (#9110) 2025-05-07 01:52:07 +09:00
Jonghyeon Ko
06ac87ecdc
ci(angular-query, query-core): update vitest/expect-expect rule as error (#9109) 2025-05-06 21:15:16 +09:00
Jonghyeon Ko
0943575ae7
ci(*): init ESLint configurations to include 'vitest/expect-expect' rule as error across multiple packages gradually (#9104)
* chore(*): init ESLint configurations to include 'vitest/expect-expect' rule as error across multiple packages gradually

* chore(query-core): remove unused import from ESLint configuration

* chore(angular-query-experimental): update eslint rule

* chore: integrate vitest ESLint plugin and apply recommended rules across multiple packages

* chore(react-query-devtools): add vitest ESLint plugin to configuration
2025-05-06 17:15:13 +09:00
Eric Yancey Dauenhauer
127bd0110a
docs: Clarify that useQuery results are immutable (#9108) 2025-05-06 09:46:04 +02:00
Tanner Linsley
8d027847a2 release: v5.75.4 v5.75.4 2025-05-06 07:29:50 +00:00
Dominik Dorfmeister
5c7927d320
fix(types): useSuspenseQuery should type-narrow the Error field (#9105)
* fix(types): useSuspenseQuery should type-narrow the Error field

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

Co-authored-by: Jonghyeon Ko <manudeli.ko@gmail.com>

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

Co-authored-by: Jonghyeon Ko <manudeli.ko@gmail.com>

* ref: use DistributiveOmit from query-core in vue-query

* chore: fix type error in tests

---------

Co-authored-by: Jonghyeon Ko <manudeli.ko@gmail.com>
2025-05-06 09:27:15 +02:00
Tanner Linsley
89846b71eb release: v5.75.3 v5.75.3 2025-05-05 18:47:49 +00:00
Arnoud
d82fb69082
refactor(angular-query): use factory for IS_RESTORING default value (#9107) 2025-05-05 20:45:13 +02:00
Dominik Dorfmeister
21218362d4
chore: nextJs versions (#9103) 2025-05-04 11:23:30 +02:00
Tanner Linsley
0cad1da43f release: v5.75.2 v5.75.2 2025-05-04 08:14:36 +00:00
Jonghyeon Ko
91b75a9d3e
chore(react-query): isRestoring -> IsRestoreProvider like QueryClientProvider (#8717) 2025-05-04 10:09:16 +02:00
gopnik5
674f83e4e8
fix: (query-broadcast-client-experimental) - removing query from one tab doesn't remove it from all tabs (#9017)
* fix(solid-query): client() doesn't return undefined

* fix: (query-broadcast-client-experimental) - removing query from one tab doesn't remove it from all tabs

* fix: (query-broadcast-client-experimental) - removing query from one tab doesn't remove it from all tabs

* isolated tests

* chore: add test config

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2025-05-04 10:08:18 +02:00
MINSEONG KIM
18af64367c
test(react-query): add test case for useSuspenseQuery (#8731)
Co-authored-by: Jonghyeon Ko <manudeli.ko@gmail.com>
2025-05-03 02:41:32 +09:00
Tanner Linsley
ea74c2784f release: v5.75.1 v5.75.1 2025-05-02 11:20:03 +00:00
Raman Paulau
a535a46cde
fix(vue-query): reorder queryOptions and useQuery function overloads to fix type inference (#9088)
* fix(vue-query): more specific function overloads for queryOptions and useQuery to come before general ones (#9069)

This instructs TypeScript to pick correct function overload when initialData is defined.

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-05-02 13:16:23 +02:00
Jonghyeon Ko
df8e02b47f
test(react-query): use fake timers for useQuery.test.tsx (#9086) 2025-05-02 01:43:37 +09:00
Jonghyeon Ko
fd34b98700
test(react-query): use fake timers for useMutation.test.tsx (#9094) 2025-05-02 01:27:07 +09:00
Tanner Linsley
b416643f9c release: v5.75.0 v5.75.0 2025-05-01 13:29:37 +00:00
Dominik Dorfmeister
ff0131b142
feat(query-core): refetchMode “replace” for streamedQuery (#9092)
* refetchmode replace

* feat: refetchMode replace for streamedQuery

* test: should allow arrays
2025-05-01 15:24:59 +02:00
novice0840
a9fe406e98
chore: remove unused common type (#8989)
* refactor(query-core): make common type more readable

* fix: revert WithRequired type

* fix: remove blank

* refactor(query-core): change Omitkeyof to Omit

* refactor: remove unused common type

* fix: revert type WithRequired
2025-05-01 15:03:02 +02:00
renovate[bot]
7d25373b93
chore(deps): update dependency vite to v6.2.7 [security] (#9090)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-01 03:01:24 +00:00
Tanner Linsley
9883f1b43d release: v5.74.11 v5.74.11 2025-04-29 17:52:40 +00:00
Yoomin Kang
aa60c07462
fix(angular-query): fix injectInfiniteQuery to narrow type after isSuccess (#9016) 2025-04-29 19:47:50 +02:00
Jonghyeon Ko
3111e8afd3
test(react-query): use test-d file for useQuery (#9082) 2025-04-29 23:58:53 +09:00
Tanner Linsley
a507c5f3f5 release: v5.74.10 v5.74.10 2025-04-29 14:49:09 +00:00
Arnoud
f9e4f6ba1b
fix(angular-query): align query options with react-query (#9084) 2025-04-29 16:45:09 +02:00
Jonghyeon Ko
eb5816eee2
test(solid-query): use fake timers for useMutation.test.tsx (#9081) 2025-04-29 23:06:51 +09:00
Jonghyeon Ko
e786913dbf
test(solid-query): simplify type inference tests in useQueryOptions (#9080) 2025-04-29 20:26:12 +09:00
Tanner Linsley
8226d41ba8 release: v5.74.9 v5.74.9 2025-04-29 10:50:19 +00:00
Dominik Dorfmeister
10493efa8a
refactor(core): switch from Object.defineProperty to Proxies (#9079)
* ref: switch from Object.defineProperty to Proxies

* test: improve the test that tracks property access
2025-04-29 12:48:29 +02:00
Emma Segal-Grossman
8c7df6369f
docs: Fix broken links on QueryCache reference page (#9033)
* Fix broken link to TkDodo's Blog page from QueryCache page

It looks like the `docs` part of the url was being removed, so there's now one less `../` in the relative url.

* Fix other broken links on page & add `.md` extension to relative links
as suggested by @TkDodo
2025-04-29 11:18:25 +02:00
Tanner Linsley
c8baa4c92b release: v5.74.8 v5.74.8 2025-04-29 08:04:24 +00:00
차승하
66151ca851
fix(vue-query): fix initialData Type Inference Bug in useQuery (#9077)
* fix: Correct bug where non-undefined values in initialData are not treated as defined

* test: Update test to ensure data is TData only when initialData is defined

* fix: Modified to recognize UndefinedInitialQueryOptions when a function returning undefined is used in initialData.

* test: update test result values for case where a function returning TData is passed to initialData
2025-04-29 10:01:28 +02:00
Jonghyeon Ko
b397fba936
test(react-query): use test-d file for useMutationState (#9075) 2025-04-28 09:21:01 +09:00
Tanner Linsley
fcb3d4add6 release: v5.74.7 v5.74.7 2025-04-27 15:02:14 +00:00
Sol Lee
e45dea84a7
fix(vue-query): update initialData type to allow InitialDataFunction and NonUndefinedGuard, similar to react-query (#9073)
* fix(vue-query): update `initialData` type to allow InitialDataFunction and NonUndefinedGuard, similar to react-query

* ci: apply automated fixes

* test: update types to include `undefined` in useQueries and useQuery tests in vue-query

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-04-27 16:54:28 +02:00
Jonghyeon Ko
b8ea29ef82
test(react-query): use fake timers for QueryClientProvider.test.tsx (#9074) 2025-04-26 20:43:23 +02:00
MINSEONG KIM
83f01cd2c9
test(query-persist-client-core): use fake timers for createPersister.test.ts (#9067)
* test(query-persist-client-core): use fake timers for createPersister.test.ts

* refactor: remove unnecessary export

---------

Co-authored-by: Jonghyeon Ko <manudeli.ko@gmail.com>
2025-04-26 19:29:06 +09:00
Jonghyeon Ko
62f02fcd3c
test(react-query): use fake timers for useMutationState.test.tsx (#9055) 2025-04-26 19:19:33 +09:00