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

5,264 commits

Author SHA1 Message Date
Damian Osipiuk
f1f659260a
fix(vue-query): types should now properly accept computed queryOptions (#7631) 2024-06-27 00:24:31 +02:00
Igor Shevchenko
52cc7b2162
docs: typo (#7628) 2024-06-26 23:39:38 +02:00
reslear
832d07adeb
docs(vue): up-to-date devtools information (#7578)
* docs(vue):  up-to-date devtools information

need to help users clarify their current status

* Update devtools.md

* Update devtools.md

* Update devtools.md

* docs: restructure devtools page

---------

Co-authored-by: Damian Osipiuk <osipiukd+git@gmail.com>
2024-06-26 22:48:57 +02:00
Tanner Linsley
09382a4b43 release: v5.48.0 v5.48.0 2024-06-25 14:14:27 +00:00
John
31b9ab49af
feat(core): Add possibility to pass a callback to enabled. (#7566)
* Add possibility to pass a callback to enabled.

* Refactor into using the same pattern as resolving staletime, with the use of a resolveEnabled util function

* Update tests for enabled option as a callback

* update docs

* remove typo

* Update enabled type in docs

* remove duplicated test case

* Fix eslint errors

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Co-authored-by: John Pettersson <john.pettersson@carnegie.se>
2024-06-25 16:10:16 +02:00
Tanner Linsley
461f3af34b release: v5.47.0 v5.47.0 2024-06-25 12:27:37 +00:00
Dominik Dorfmeister
fbfe9409ca
feat(react-query): usePrefetchQuery (#7582)
* feat: usePrefetchQuery

* refactor: switch to actual prefetching

* refactor: remove ensureInfiniteQueryData function

will do in a separate PR

* chore: add tests for usePrefetchQuery and usePrefetchInfiniteQuery (#7586)

* chore: add tests for usePrefetchQuery and usePrefetchInfiniteQuery

* chore: update tests to assert the alternative spy is not called

* chore: add some new tests

* chore: remove it.only whoops

* chore: call mockClear after fetching

* chore: improve waterfall test by asserting fallback calls instead of loading node query

* chore: improve code repetition

* chore: add some generics to helper functions

* usePrefetchQuery type tests and docs (#7592)

* chore: add type tests and docs

* chore: update hooks to use FetchQueryOptions and FetchInfiniteQueryOptions

* chore: update tests

* chore: update docs

* chore: remove .md extension from link

* chore: add unknown default value to TQueryFnData

* Apply suggestions from code review

---------

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

* Apply suggestions from code review

Co-authored-by: Fredrik Höglund <fredrik.hoglund@gmail.com>

* chore: fix types in tests

* chore: add new tests (#7614)

* chore: add new tests

* Apply suggestions from code review

---------

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

---------

Co-authored-by: Bruno Lopes <88719327+brunolopesr@users.noreply.github.com>
Co-authored-by: Fredrik Höglund <fredrik.hoglund@gmail.com>
2024-06-25 14:25:28 +02:00
Lachlan Collins
6355244984
ci: Prevent uploading coverage files found in Nx cache (#7619) 2024-06-25 21:20:39 +10:00
Lachlan Collins
15e42ba445
ci: Add tests for TS 4.7, 4.8, 4.9 (#7618)
* ci: Add tests for TS 4.7, 4.8, 4.9

* Capitalise
2024-06-25 21:18:27 +10:00
Lachlan Collins
8253a80b6f
ci: Add TS version tests (#7605)
* Simplify implementation

* Add to remaining packages
2024-06-24 06:51:03 +10:00
Lachlan Collins
32bce35ae0
chore: Update typescript-eslint to v7 (#7610)
* chore: Update typescript-eslint to v7

* pnpm dedupe

* Fix new errors
2024-06-22 22:07:42 +10:00
Tanner Linsley
51d3e8f0cb release: v5.46.2 v5.46.2 2024-06-21 15:04:39 +00:00
Shahar Har-Shuv
cc474175b6
fix(angular-query): run mutation callback in injection context (#7360)
* fix(angular-query-experimental): run mutation callback in injection context

Previously, the injectMutation callback was run in injection context only if accessed in the same task as the component initialization (i.e. before the `effect` callback run). By running the effect run in injection context, it is ensured that the callback will always run in injection context, and any `inject` calls will not fail.

Note there is a separate issue here, and it's that the callback is always run twice - once synchronously when initialization the mutation, and secondly as the first callback of the `effect`. This is something that can potentially be improved.

No breaking changes, any code that worked before should still work.

* run prettier

* Catch error in test

---------

Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com>
2024-06-21 17:00:47 +02:00
Tanner Linsley
62e262036b release: v5.46.1 v5.46.1 2024-06-21 14:32:32 +00:00
Arthur Petrie
b7aaa03f1e
refactor(angular-query): align inject-query and inject-infinite-query + clean-up create-base-query + add query correct type tests (#7593) 2024-06-21 16:28:58 +02:00
Lachlan Collins
ea26f261b7
chore(svelte-query): Move tests folder (#7603) 2024-06-21 19:59:16 +10:00
Tanner Linsley
a65b222ba9 release: v5.46.0 v5.46.0 2024-06-21 08:52:04 +00:00
Kevin
1c7739eb46
feat(react-query-next-experimental): introduce nonce prop (#7575)
allow the inline script to be executed when CSP is enforced by including nonce to the script

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-06-21 10:48:47 +02:00
Arnoud
89e1fbe5ef
docs(angular-query): angular zoneless support (#7600) 2024-06-21 00:57:31 +02:00
Arnoud
ad176cf1ce
chore(angular-query): prettier ignore api report (#7598) 2024-06-21 00:38:15 +02:00
Dominik Dorfmeister
bda8a54ae0 chore: prettier 2024-06-19 08:40:56 +02:00
Natan Deitch
0ae229bba3
docs(react-query): queryFn must be a function calling (#7572)
* docs: queryFn must be a function calling

* Update docs/framework/react/guides/advanced-ssr.md
2024-06-18 14:55:38 +02:00
Lachlan Collins
49795a3952
ci: Update Nx and @tanstack/config (#7580)
* ci: Update Nx and @tanstack/config

* Undo prettier change
2024-06-17 12:40:23 +10:00
Tanner Linsley
80a03229f4 release: v5.45.1 v5.45.1 2024-06-16 20:16:54 +00:00
GwanSik Kim
77a7b28668
refactor(react-query): improve type inference for useSuspenseQueries with skipToken (#7564)
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-06-16 22:12:48 +02:00
Paul Ashioya
8d69ef4940
docs: fix grammar mistake on migrating-to-v5.md (#7556)
Fixed grammar mistake on migrating-to-v5.md

Very small change but makes the documentation better than it already is
2024-06-15 20:33:31 +02:00
Tanner Linsley
ac8f48a6a1 release: v5.45.0 v5.45.0 2024-06-12 12:35:38 +00:00
Julius Marminge
9a030b6408
feat: hydrate.transformPromise (#7538)
* hydrate.deserialize

* rm logs

* test

* commit what i got

* async await is king

* rev

* rev

* rm unused

* make thenable work

* comment usage

* docs

* simplify

* fix docs

* tsx

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

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

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-06-12 14:32:00 +02:00
MinhoPark
bd094f8ace
docs(advanced-ssr): delete unused import (#7553) 2024-06-11 16:35:04 +02:00
Tanner Linsley
b157fe445b release: v5.44.0 v5.44.0 2024-06-11 13:13:39 +00:00
Dominik Dorfmeister
96a743eec7
feat(query-core): staleTime as a function (#7541)
* feat: staleTime as a function

* test: staleTime as a function

* refactor: types

* docs: staleTime as function
2024-06-11 15:11:40 +02:00
Tanner Linsley
ef72cd5091 release: v5.43.1 v5.43.1 2024-06-10 15:54:03 +00:00
David Jebing
0a03d6f30a
fix: peer dependencies for eslint-plugin-query (#7546) 2024-06-10 17:51:35 +02:00
Tanner Linsley
908c37a169 release: v5.43.0 v5.43.0 2024-06-10 14:24:18 +00:00
David Jebing
1c0d0f07f1
feat: ESLint v9 Support (#7543)
* update to latest packages

* remove duplicated test case

* fix rule types

* migrate to `sourceCode.getAncestors`

* rename type

* remove unused export

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-06-10 16:20:43 +02:00
Dominik Dorfmeister
a42a2ed20e chore: fully exclude examples and integrations for sherif checks 2024-06-10 15:10:00 +02:00
Tanner Linsley
f353ef8d3d release: v5.42.0 v5.42.0 2024-06-10 07:25:05 +00:00
Valerii Smirnov
2a6e447856
feat(solid-query): infiniteQueryOptions (#7404)
* feat(solid-query): implemented infiniteQueryOptions

* removed useless TOptions type

* fix formatting

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-06-10 09:21:40 +02:00
Mandeep56Singh
62841b6217
docs(installation):remove prompt symbol from installation commands(#7293) (#7540)
Installation commands for various framework includes prompt symbol.
On execution of same commands IDE throws error
as IDEs by default includes prompt symbol.
This commit resolve this issue
2024-06-10 07:01:06 +02:00
Joshua Rogan
40fcb54fa4
docs: Update migrating-to-v5.md (#7539)
* docs: Update migrating-to-v5.md

* docs: Update migrating-to-v5.md

* docs: Update migrating-to-v5.md
2024-06-09 17:11:25 +02:00
Tanner Linsley
bf500aee13 release: v5.41.0 v5.41.0 2024-06-08 18:46:34 +00:00
Dominik Dorfmeister
97bc113143 chore: fix test syntax 2024-06-08 20:43:34 +02:00
Luiz
f2db185dfb
docs: Update optimistic-updates.md (#7450)
Fixed code snippet to match explanation

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-06-08 19:41:38 +02:00
Davide Segullo
c73eb30981
feat(vue-query): add support for infiniteQueryOptions (#7257)
* feat(vue-query): ✨ add support for infiniteQueryOptions

* test(vue-query): ✅ add infiniteQueryOptions types tests

* test(vue-query): ✅ add test for infiniteQueryOptions

* test: ✅ add more infiniteQueryOptions test

* fix: ✅ fix failing test
2024-06-08 19:38:41 +02:00
Hwang Taehwan
4e1a04b506
refactor(react-query-next-experimental): use isServer to determine server environment (#7536)
* docs: use isServer on ssr guides

* refactor: use isServer on nextjs examples

* refactor(react-query-next-experimental): use isServer instead of typeof window

* chore(docs): fix prettier

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-06-08 19:37:05 +02:00
Tanner Linsley
dd4ee0a568 release: v5.40.3 v5.40.3 2024-06-08 17:32:26 +00:00
Randall71
f8ce2ba7c1
docs: add Expo dev tools (#7461) 2024-06-08 19:30:13 +02:00
ynnsuis / 장윤수
b8cdb8972b
fix(svelte-query): infer query data type in queryOptions (#7537)
* fix(svelte-query): infer query data type in queryOptions

* test(svelte-query): add tests for queryOptions type inference
2024-06-08 19:28:08 +02:00
Tanner Linsley
281f386cce release: v5.40.2 v5.40.2 2024-06-08 03:21:11 +00:00
David Bieregger
de0f306681
fix(solid-query): Retry query on client when SSR query fails 2024-06-07 23:16:50 -04:00