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

5,034 commits

Author SHA1 Message Date
Lachlan Collins
f1cdea94af
tests(svelte-query): Reorganise for multiple components per test (#7654)
* Move tests

* Add useIsFetching test, disabled createQuery test

* Add QueryCacheProvider test
2024-07-01 22:09:36 +10:00
Tanner Linsley
46bed749c6 release: v5.49.2 v5.49.2 2024-06-30 06:12:09 +00:00
Tanner Linsley
56fad109ea
fix(react-query): experimental before/after query options (#7652) 2024-06-30 00:08:09 -06:00
Tanner Linsley
4be599fd8e
fix(react-query): experimental before/after query options (#7651) 2024-06-30 00:00:08 -06:00
Tanner Linsley
3ee5bd87b5 release: v5.49.1 v5.49.1 2024-06-30 05:49:16 +00:00
Tanner Linsley
8927e4cc29
fix(react-query): add experimental beforeQuery/afterQuery client options (#7650) 2024-06-29 23:46:59 -06:00
Lachlan Collins
f454bf1cfb
docs(examples): Update Next.js version (#7649) 2024-06-30 12:54:28 +10:00
Lachlan Collins
a80cea3896
ci: Optimise Nx workflow (#7648)
* ci: Optimise Nx workflow

* Merge test:build and test:attw
2024-06-30 12:18:25 +10:00
Tanner Linsley
b5272df513 release: v5.49.0 v5.49.0 2024-06-29 06:22:08 +00:00
Lachlan Collins
033e739bd9
ci: Use Node 20 for CodeSandbox examples (#7646)
* ci: Try to use Node 20 for CSB

* Simplify install/build scripts

* Fix installCommand

* Remove installCommand

* Undo

* Remove install:csb
2024-06-29 16:19:57 +10:00
Julius Marminge
8cbe7d5dc1
feat(hydration): dehydrate.serialize and hydrate.deserialize (#7615)
* add transformData to restore resolved prefetches

* add failing test

* fix test

* remove transformPromise

* fix

* rev

* rm log

* fix test

* add another test

* serialize/deserialize

* chore: docs + minor refactor

* indentation

* chore: prettier

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-06-29 07:10:45 +02:00
Lachlan Collins
003e1a8c47
tests: Use recommended @testing-library/svelte setup (#7645) 2024-06-29 12:59:12 +10:00
Alexander Svendsen
87c8e01e4c
docs: remove suspense reference to useQuery (#7640)
useQuery has no suspense option
2024-06-28 14:41:20 +02:00
Lachlan Collins
febbde676d
chore: Update ESLint config (#7637)
* chore: Update ESLint config

* Fix errors

* Fix knip
2024-06-28 11:17:57 +10:00
Lachlan Collins
e6a0fdd89e
chore: Migrate to ESLint flat config (#7636)
* chore: Migrate to ESLint flat config

* Migrate more packages

* angular and solid

* svelte packages

* Hopefully more fixes

* react packages

* vue packages

* Fix typescript errors

* Update Nx config
2024-06-27 23:34:37 +10:00
Azi Muth
8d75aaa37d
docs(examples): code refactoring and type improvement (#7634)
* refactor: minor code refactoring and type improvement for react-native example

* chore: slice the movie with original value
2024-06-27 14:48:34 +02:00
Kenrick Beckett
8b899410c8
docs: Remove the variable assignment from example code (#7623)
* Remove the variable assignment from example code

* remove variable assignment in prefetch query docs

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-06-27 14:48:18 +02:00
Tanner Linsley
e100e5d0de release: v5.48.2 v5.48.2 2024-06-26 22:55:31 +00:00
Damian Osipiuk
11e979e933
fix(vue-query): useQueries type inference (#7416) 2024-06-27 00:53:49 +02:00
Tanner Linsley
bec24e7883 release: v5.48.1 v5.48.1 2024-06-26 22:26:43 +00:00
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