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

5,975 commits

Author SHA1 Message Date
Lachlan Collins
01e63a5694
fix(svelte-query): ensure compatibility with NodeNext (#7825)
* fix(svelte-query): ensure compatibility with NodeNext

* Same for devtools and persist-client
2024-07-31 19:06:23 +10:00
renovate[bot]
74f10b773f
chore(deps): lock file maintenance (#7819)
* chore(deps): lock file maintenance

* Lock tsup version

* Fix eslint-plugin-react-compiler resolution

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2024-07-29 17:28:42 +10:00
renovate[bot]
e2315ccc94
chore(deps): update dependency react-intersection-observer to v9 (#7818)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-29 16:09:17 +10:00
renovate[bot]
4cdc2c8c90
chore(deps): update all non-major dependencies (#7817)
* chore(deps): update all non-major dependencies

* Fix eslint-plugin-query

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2024-07-29 15:48:18 +10:00
Lachlan Collins
216a9265a7
chore(deps): use prettier v3.3.3 (#7816) 2024-07-29 15:29:06 +10:00
Lachlan Collins
69931779ad ci(renovate): ignore vue2 and vue2.7 2024-07-29 15:06:13 +10:00
Lachlan Collins
6d8d203d06
ci(renovate): add renovate config (#7813) 2024-07-29 15:00:36 +10:00
Lachlan Collins
461876a24a
test(svelte-query): add refetch test for createQuery (#7810) 2024-07-28 14:20:50 +10:00
Lachlan Collins
99f1250d0c
docs(svelte-query): add persist to basic example (#7807) 2024-07-28 12:37:12 +10:00
Jonghyeon Ko
fcac011bb3
docs(solid-query): fix quick-start example (#7770) 2024-07-27 15:15:50 +10:00
Lachlan Collins
f2fd31853b
docs(typedoc): use sub-folders for reference docs (#7803) 2024-07-27 13:03:44 +10:00
Lachlan Collins
dac5da5416
docs(examples): Fix small errors in svelte examples (#7801) 2024-07-27 11:29:03 +10:00
Tanner Linsley
ec8e800c66 release: v5.51.15 v5.51.15 2024-07-26 11:47:45 +00:00
Ryan Kuruppu
cd6828015a
fix(query-core) export Mutation class instead of exporting it as a type (#7793)
* fix(query-core) export Mutation class instead of exporting it as a type

previously, attempting to create a Mutation in a vanilla JS project required the use of the Mutation class constructor but due to it being exported as a type, we run into a runtime error stating that the Mutation type is not a class resulting in us not being able to proceed despite the compilation process in TypeScript not throwing an issue. This change exposes the class instead of the type in order to accomodate this requirement in vanilla JS projects

fixes `Mutation` class isn't exposed from @tanstack/query-core #7785

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-07-26 12:19:19 +02:00
Tanner Linsley
fec324f7e3 release: v5.51.14 v5.51.14 2024-07-26 08:47:44 +00:00
Dominik Dorfmeister
3ef788786c
fix(query-core): abort fetch loop for infinite queries if getNextPageParam returns null or undefined (#7799)
The `fetchPage` function has a safeguard where it only returns the current data if pageParam == null, however, this means we still stay in the loop and call `getNextPageParam` unnecessarily.

This can be troublesome if you set `pages: Infinity` on queryClient.fetchInfiniteQuery to fetch an arbitrary amount of pages until the natural end is reached by returning null/undefined from getNextPageParam, because it would never actually escape the loop
2024-07-26 10:44:32 +02:00
Lich
34a567215c
refactor(react-query): add error message for skipToken in useSuspenseQueries and useSuspenseInfiniteQuery (#7797)
* refactor(react-query): add error message for skipToken in useSuspenseQueries

* refactor(react-query): add error message for skipToken in useSuspenseInfiniteQuery
2024-07-26 10:10:32 +02:00
Lachlan Collins
bd3296bfed
chore: Update @tanstack/config to v0.11.0 (#7795) 2024-07-26 10:56:33 +10:00
Lachlan Collins
1814f56ea1
chore(svelte-query): Tweak provider tests (#7794) 2024-07-26 10:30:54 +10:00
Tanner Linsley
81e1f2ca5a release: v5.51.13 v5.51.13 2024-07-25 15:57:50 +00:00
Jeroen Claassens
55486f1762
fix(eslint-plugin): strictly type config keys (#7780)
* fix(eslint-plugin): strictly type config keys

* fix: remove union for `recommended`
2024-07-25 17:54:57 +02:00
Lachlan Collins
5760f70021
ci: remove test:format from Nx workflow (#7775) 2024-07-23 11:23:58 +10:00
Lachlan Collins
ffd404f6ca
test(svelte-query): Better createMutation tests (#7773) 2024-07-22 10:15:47 +10:00
Tanner Linsley
0edbc4911c release: v5.51.12 v5.51.12 2024-07-20 11:10:06 +00:00
Ahmed Abdelbaset
404c2faeb1
fix(eslint-plugin): type config names (#7766)
* fix(eslint-plugin): type configs

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-07-20 20:51:44 +10:00
Tanner Linsley
c3dffbdeae release: v5.51.11 v5.51.11 2024-07-20 10:47:26 +00:00
Lachlan Collins
b76400966c
fix(svelte-query): Correct data type when initialData is set (#7769)
* Fix createQueries initialData type

* Fix createQuery types
2024-07-20 20:44:32 +10:00
Lachlan Collins
e4e65be850
docs(typedoc): Use generateReferenceDocs function (#7765)
* docs(typedoc): Use generateReferenceDocs function

* Fix type
2024-07-19 21:20:21 +10:00
Lachlan Collins
144d3a8d90
docs(typedoc): Update output filename (#7764)
* docs: Update typedoc output filename

* Run prettier
2024-07-19 19:52:50 +10:00
Minko Gechev
27861961bb
docs: update the syntax highlighting for angular (#7762) 2024-07-19 11:36:35 +02:00
Lachlan Collins
b189e3137c ci: Enable autofix on push to release branch 2024-07-19 19:06:20 +10:00
Oguz Kazkayasi
b970f671df
docs: Throw error or mutation doesn't see any the 500 coming from API (#7754)
* Throw error or mutation doesn't see any the 500 coming from API

* fix: prettier

* 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>
2024-07-18 14:58:26 +02:00
Andre Sander
98d127adb8
docs: Update paginated-queries.md (#7759)
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-07-18 14:50:17 +02:00
Tanner Linsley
f1c4ce7f0b release: v5.51.10 v5.51.10 2024-07-18 12:03:56 +00:00
Dominik Dorfmeister
e61edd21b2
fix(eslint-plugin-query): get scope from sourceCode (#7760)
in eslint v9, context.getScope() doesn't exist anymore. see: https://eslint.org/blog/2023/09/preparing-custom-rules-eslint-v9/#context.getscope()
2024-07-18 14:01:25 +02:00
Lachlan Collins
ae8738acdd
ci: Remove git pre-commit hook (#7756)
* ci: Remove git pre-commit hook

* Lock setup action digest
2024-07-18 17:51:29 +10:00
Tanner Linsley
70620ec724 release: v5.51.9 v5.51.9 2024-07-18 07:36:00 +00:00
Lachlan Collins
a5bfc30f00
ci: Add autofix.yml (#7755)
* ci: Add autofix.yml

* Intentionally break formatting :(

* [autofix.ci] apply automated fixes

* Update commit message

* Oops, very long line

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-07-18 08:59:10 +02:00
wing
0c671eecb7
fix(query-core): allow function value of notifyOnChangeProps query option to return undefined (#7441)
* fix(query-core): allow function value of `notifyOnChangeProps` query option to return `undefined`

`undefined` is a valid return value for the function value of `notifyOnChangeProps`. See linked issue for more details.

Fixes #7426.

* docs(react-query): update signature of `useQuery`'s `notifyOnChangeProps` option

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-07-18 08:52:20 +02:00
Lachlan Collins
d02e610ff3
docs(typedoc): Add frontmatter (#7753)
* docs(typedoc): Add frontmatter

* Update knip.json
2024-07-18 15:42:53 +10:00
Lachlan Collins
13817e9537
docs(svelte-query): Auto-generate reference docs (#7751)
* docs(svelte-query): Auto-generate reference docs

* Fix knip, update exclude
2024-07-18 12:40:19 +10:00
Robin Marillia
81ca333248
docs(query-core): add matchQuery and matchMutation utils (#7643)
* docs(query-core): add matchQuery and matchMutation mentions in filters documentation

* docs(query-core): clarifies filters type

* Format

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2024-07-18 11:03:34 +10:00
Tanner Linsley
d8ab55207e release: v5.51.7 v5.51.7 2024-07-17 23:55:21 +00:00
Eliya Cohen
4c503c5703
fix(eslint-plugin): handle ternary expressions in queryFn (#7747) 2024-07-18 09:51:44 +10:00
Tanner Linsley
f034d27805 release: v5.51.6 v5.51.6 2024-07-17 19:40:57 +00:00
Aryan Deora
ffb11b3547
fix(solid-query): Fix race condition issues with createQuery (#7748)
* fix(solid-query): Fix race condition issues with `createQuery`
2024-07-17 15:32:27 -04:00
Tanner Linsley
c101251139 release: v5.51.5 v5.51.5 2024-07-17 14:35:45 +00:00
Yannick Croissant
a87c2fe4a7
fix(query-core): widen QueriesObserver queries type (#7446) (#7492)
* fix(query-core): widen QueriesObserver queries type (#7446)

Widen the `QueriesObserver` queries type so we can assign `UseQueryOptions` to `QueryObserverOptions`.

The result from the `queryOptions` helper can now be passed to `QueriesObserver`.

* chore: prettier

* fix(types): QueryKey needs to default to `any`, too

---------

Co-authored-by: Yannick CROISSANT <yannick.croissant@canal-plus.com>
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-07-17 16:31:11 +02:00
Dhruv
91cfc10032
docs(solid-query): add optional chaining to prevent suspense bug (#7709)
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-07-17 16:04:07 +02:00
Lachlan Collins
01212de25c
test(svelte-query): Refactor test logic (#7744)
* test(svelte-query): Simplify test logic

* Improve createQueries tests
2024-07-17 23:08:19 +10:00