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

5,014 commits

Author SHA1 Message Date
Lachlan Collins
93a9d71e91
docs(examples): update star-wars and rick-morty examples (#9696) 2025-09-27 12:31:46 +10:00
Lachlan Collins
8e429262f2
ci: add danielroe/provenance-action (#9693) 2025-09-26 22:53:48 +10:00
Lachlan Collins
89be1895e3
chore: update svelte examples and tests from runes PR 2025-09-26 22:51:17 +10:00
Lachlan Collins
db60bddc96
chore: update eslint-plugin-vue (#9691) 2025-09-26 22:02:02 +10:00
Lachlan Collins
4b40dd9367
fix-versioning (#9690) 2025-09-26 19:55:05 +10:00
Lachlan Collins
2a15f36576
ci: introduce changesets (#9502)
* ci: introduce changesets

* Avoid using changesets/action

* Remove PR permission

* Update PR template

* Update link
2025-09-26 17:32:23 +10:00
Cam Jackson
cd290631ab
docs(react-query): add caveat for typing getQueriesData (#9684) 2025-09-24 14:41:36 +02:00
Tanner Linsley
4d8da1e29e release: v5.90.3 v5.90.3 2025-09-24 11:40:30 +00:00
Kaung Zin Hein
865095ddfe
fix(solid-query): export queryOptions without type errors (#9668)
* fix(solid-query): add missing generic error type

* refactor(solid-query): remove unused generic type

* test(solid-query): add case for error tag

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2025-09-24 13:33:08 +02:00
Tanner Linsley
0eaafe0821 release: v5.90.2 v5.90.2 2025-09-23 07:38:07 +00:00
Dominik Dorfmeister
2cf3ec9eda
fix(types): onMutateResult is always defined in onSuccess callback (#9677)
* fix(types): onMutateResult is always defined in onSuccess callback

this is guaranteed because if onMutate fails or rejects, onSuccess is never called. if onMutate is not present, the type will be unknown

* chore: fix tests
2025-09-23 09:35:49 +02:00
Tanner Linsley
fcd23c9b1a release: v5.90.1 v5.90.1 2025-09-22 06:41:39 +00:00
hriday330
49243c852b
fix(vue-query): Support infiniteQueryOptions for MaybeRef argument (#9634)
* test(vue-query): add type-check test for useInfiniteQuery with infiniteQueryOptions

* fix(vue-query): wrap useInfiniteQuery options in MaybeRefOrGetter

* remove type problem example

* test(vue-query): add test for plain options getter

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Damian Osipiuk <osipiukd+git@gmail.com>
2025-09-22 08:38:52 +02:00
renovate[bot]
cd4ef5c304
chore(deps): update marocchino/sticky-pull-request-comment digest to fd19551 (#9674)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-22 11:06:26 +09:00
Lachlan Collins
cbf0896b7a
ci: update checkout action (#9673) 2025-09-22 11:06:18 +09:00
Lachlan Collins
fb48985f63
ci: update workspace config (#9671)
* chore: update workspace config

* Update more deps

* Fix issues
2025-09-21 23:26:52 +10:00
Arnoud
06e555072b
docs(angular-query): add testing guide (#9669) 2025-09-21 02:38:17 +02:00
Tanner Linsley
5d7c90e144 release: v5.90.0 v5.90.0 2025-09-20 16:47:26 +00:00
Arnoud
3bf9268770
feat(angular-query): integrate with Angular v19+ PendingTasks for whenStable() support (#9666)
Integrates TanStack Query for Angular with Angular's PendingTasks API to properly track
asynchronous operations, ensuring ApplicationRef.whenStable() waits for queries and
mutations to complete before resolving.

Features:
- Cross-version compatibility (Angular v16+ with graceful degradation)
- Tracks query fetchStatus and mutation isPending state
- Automatic cleanup on component destruction
- Comprehensive test coverage including edge cases

Benefits:
- Improved SSR: Server waits for data fetching before rendering
- Better testing: fixture.whenStable() properly waits for async operations
- Zoneless support: Correct change detection timing
2025-09-20 18:46:18 +02:00
Sarah
7d370b91f9
docs: Improve README image responsiveness (#9665)
* Enhance partner logos with responsive images

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-09-19 18:37:54 +02:00
Corbin Crutchley
ed21249708
fix(angular-query) fix injectQueries types
* fix(angular-query-experimental): typings for injectQueries should now behave properly

* fix(angular-query-experimental): behaviors of injectQuery now work at runtime

Mostly

* ci: apply automated fixes

* add signal proxy

* ci: apply automated fixes

* update @testing-library/angular

* fix build

* rename test file

* ci: apply automated fixes

* fix type error

* apply corerabbit suggestions

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Arnoud de Vries <6420061+arnoud-dv@users.noreply.github.com>
2025-09-18 19:50:58 +02:00
Tanner Linsley
2a00fb6504 release: v5.89.0 v5.89.0 2025-09-16 08:27:49 +00:00
Josh
a2151d28e1
feat(query-core): add context to mutationfn & mutation callbacks (#9615)
* feat(query-core): add context to mutationfn

Co-Authored-By: travikk <627275+travikk@users.noreply.github.com>

* fix(query-core): mutation onSuccess scope param should also be undefined

Co-Authored-By: travikk <627275+travikk@users.noreply.github.com>

* feat: add scope deprecate context on mutation state

* feat(query-core): add mutation context to all mutation callbacks

* chore: pr amends

Co-Authored-By: Dominik Dorfmeister <1021430+TkDodo@users.noreply.github.com>

* test(unit): update to handle context in mutation callbacks

* chore: rename to onMutateResult

* chore: revert context deprecation on MutationState

---------

Co-authored-by: travikk <627275+travikk@users.noreply.github.com>
Co-authored-by: Dominik Dorfmeister <1021430+TkDodo@users.noreply.github.com>
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2025-09-16 10:22:43 +02:00
renovate[bot]
0e99327e15
chore(deps): update marocchino/sticky-pull-request-comment digest to a071bc9 (#9627)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-16 10:13:05 +02:00
Tanner Linsley
66df21102f release: v5.88.0 v5.88.0 2025-09-15 22:12:11 +00:00
Arnoud
e75a5f9d55
feat(angular-query): move devtools to conditional sub-paths (#9270)
* feat(angular-query-devtools): move devtools to conditional sub-paths, improves tree shaking and dependency injection

* Fix compatibility with moduleResolution node

* ci: apply automated fixes

* fix preview release for angular-query

* Fix angular-query preview release

* Revert some changes made obsolete by better Vite based alternative

* Update export paths

* Fix production exports and publishconfig

* knip config

* remove postpack

* Generate API reference docs

* type declarations in correct directory

* Update documentation

* knip config

* Optional core devtools dependency

* ci: apply automated fixes

* regenerate api reference docs

* ci: apply automated fixes

* ci: apply automated fixes (attempt 2/3)

* regenerate api reference docs

* formatting

* apply coderabbit suggestions

* Improve unit tests

* docs

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-09-16 00:07:53 +02:00
Tanner Linsley
2b0d97abc6 release: v5.87.5 v5.87.5 2025-09-15 00:36:06 +00:00
Arnoud
ca56514d39
refactor(angular-query): move injectQueries to sub-path export (#9655) 2025-09-15 02:33:04 +02:00
Sarah
6492aed7be
docs: Readme fix (#9652)
* remove css and fix layout

* fix readme and remove css

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-09-14 08:48:04 +02:00
Arnoud
94ee0ebeff
docs(angular-query): improve mutationOptions jsdoc code example (#9648) 2025-09-12 17:11:19 +02:00
Arnoud
e3b40d4d0d
chore(angular-query): remove standalone component markers as it's now the default (#9647) 2025-09-12 15:09:42 +02:00
Sarah
d179168d74
docs: README Updates (#9640)
* readme updates

* fix devtools link

* Apply suggestion from @coderabbitai[bot]

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update README.md

Co-authored-by: Sarah <hello@sarahgerrard.me>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2025-09-12 11:20:50 +02:00
Arnoud
2492ed1d9b
docs(angular-query): fix error in code snippet (#9645) 2025-09-12 01:31:48 +02:00
Pascal Weyrich
7f0e7161e4
docs(angular-query): use signal input in placeholder-query-data.md (#9641) 2025-09-12 00:16:24 +02:00
Tanner Linsley
230435d112 release: v5.87.4 v5.87.4 2025-09-10 14:10:04 +00:00
Minha Kang
19445a00c0
fix(query-core): infinite re-renders in useQueries (#9639)
* test(useQueries): add test for preventing infinite re-renders

* fix(query-core): resolve infinite re-renders in queriesObserver

* style(useQueries): remove unnecessary comments

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-09-10 16:05:43 +02:00
Wonsuk Choi
ccedf3328f
test(svelte-query/createMutation): improve callback assertions with 'toHaveBeenNthCalledWith' and apply shorthand property syntax in FailureExample (#9630) 2025-09-08 14:58:06 +02:00
Tanner Linsley
2bf8fa3175 release: v5.87.3 v5.87.3 2025-09-08 12:51:41 +00:00
Ji-hoon Choi
af50368d76
fix(query-devtools): add work break to code element to prevent DevPanel from expanding (#9625)
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2025-09-08 14:48:04 +02:00
amir hossein Agha alikhani
f023881656
docs: update fetchNextPage condition in Example component (#9626)
Co-authored-by: Alikhani <alikhani.am@yepco.ir>
2025-09-08 14:36:18 +02:00
Zakaria Abu Sarah ザカリヤ
f49cc75e4a
docs: Remove fragment in disabling-queries guide (#9619)
Fragment is not needed here
2025-09-05 16:48:13 +02:00
Tanner Linsley
92d6b7bc86 release: v5.87.2 v5.87.2 2025-09-05 14:37:39 +00:00
Alem Tuzlak
3af530d657
fix(solid-query-devtools): fix typing issue (#9621)
* fix: fix issue with solid devtools

* fix: add correct jsx typing from solid

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-09-05 16:18:21 +02:00
Tanner Linsley
bc2c87fceb release: v5.87.1 v5.87.1 2025-09-05 14:15:20 +00:00
Dominik Dorfmeister
1c8a921677
fix(query-core): update initialData when an observer mounts while a Query without data exists (#9620)
initialData gives the guarantee that data cannot be undefined, but this falls short when you create a Query via prefetching, and then mount the observer that has initialData set.

That's because initialData is only doing something in the constructor of the Query, so if the Observer isn't the one who creates the Query, it does nothing

This fix makes sure that when new options are applied on a Query (which e.g. happens when an observer mounts), initialData is taken into account when the Query doesn't have any data yet
2025-09-05 16:13:31 +02:00
Tanner Linsley
b43af57cd2 release: v5.87.0 v5.87.0 2025-09-05 11:55:19 +00:00
Jake Teton-Landis
a0b96db937
feat(query-core): add timeoutManager to allow changing setTimeout/setInterval (#9612)
* add timeoutManager class

* add additional types & export functions

* convert all setTimeout/setInterval to managed versions

* tweaks

* add claude-generated tests

* tests

* revert changes in query-async-storage-persister: no path to import query-core

* re-export more types

* console.warn -> non-production console.error

* query-async-storage-persister: use query-core managedSetTimeout

* pdate pnpm-lock for new dependency edge

* sleep: always managedSetTimeout

* remove managed* functions, call method directly

* remove runtime coercion and accept unsafe any within TimeoutManager class

* cleanup; fix test after changes

* name is __TEST_ONLY__

* notifyManager: default scheduler === systemSetTimeoutZero

* Improve TimeoutCallback comment since ai was confused

* remove unnecessary timeoutManager-related exports

* prettier-ify index.ts (seems my editor messed with it already this pr?)

* continue to export defaultTimeoutProvider for tests

* oops missing import

* fix: export systemSetTimeoutZero from core

* ref: use notifyManager.schedule in createPersister

because it needs to work with whatever scheduleFn we have set there

* ref: move provider check behind env check

* docs

* doc tweaks

* doc tweaks

* docs: reference timeoutManager in discussion of 24 day setTimout limit

* Apply suggestion from @TkDodo

* Apply suggestion from @TkDodo

* chore: fix broken links

* docs: syntax fix

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2025-09-05 13:37:09 +02:00
Arnoud
2283633684
docs(angular-query): update Angular Zoneless doc (#9616) 2025-09-04 14:05:23 +02:00
Tanner Linsley
1599bb4742 release: v5.86.0 v5.86.0 2025-09-04 09:27:33 +00:00
Dominik Dorfmeister
b25412a9e3
ref: rename queryFn to streamFn in streamedQuery (#9606)
* ref: rename queryFn to streamFn in streamedQuery

this avoids the weirdly double-nested queryFn naming

* chore: docs

* fix: docs
2025-09-04 11:19:15 +02:00