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
58fe2eb1ad
chore(vue-query-devtools): Use tanstackBuildConfig from @tanstack/config (#6638)
* Experimental vite build

* Finalise changes

* Move to its own file

* Better wrapper input

* Implement feedback

* Allow customising excluded directories

* Update build script

* Use getViteConfig for vue-query-devtools

* Fix type error in getViteConfig

* Rename to viteBuildConfig

* Simplify relative paths

* Demo snapshot testing build output

* Remove snapshot testing

* Undo testing

* Remove local config

* Bump @tanstack/config

* Undo react-query changes

* Bump @tanstack/config

* Bump @tanstack/config

* Undo lockfile changes

---------

Co-authored-by: Damian Osipiuk <osipiukd+git@gmail.com>
2024-01-13 00:23:10 +01:00
Tanner Linsley
02477c377e release: v5.17.10 v5.17.10 2024-01-12 22:51:22 +00:00
Manuel Schiller
9d1fd2916a
fix(query-core): replaceEqualDeep now handles objects with the same number of properties and one property being undefined (#6693)
this was previously fixed in router: https://github.com/TanStack/router/pull/903
2024-01-12 23:44:37 +01:00
Arnoud
91fb1eb428
chore(angular-query): add query options tests (#6677) 2024-01-10 20:14:12 +01:00
Tanner Linsley
7eb49eb8e3 release: v5.17.9 v5.17.9 2024-01-08 00:54:03 +00:00
Rares Golea
e423ebfdd4
fix(angular-query): type narrowing on query and mutation results (#6662)
* chore(angular-query): query and mutation type tests

* chore(angular-query): fix type narrowing for a better DX experience

chore(angular-query): fix linting

* chore(angular-query): fix knip issues

---------

Co-authored-by: Arnoud de Vries <6420061+arnoud-dv@users.noreply.github.com>
2024-01-08 01:43:56 +01:00
Jonghyeon Ko
a8f5db0f75
chore(query-core): rename QueryStore's methods' parameter queryKey as queryHash correctly (#6661) 2024-01-07 22:54:17 +01:00
Tanner Linsley
22f7f76422 release: v5.17.8 v5.17.8 2024-01-07 09:50:53 +00:00
Jonghyeon Ko
1317aa5518
refactor(query-core): use constructor shorthand to remove duplicated code (#6660) 2024-01-07 10:44:20 +01:00
Lachlan Collins
df089941a1
chore: Fix incorrect npm tag for previous version release (#6658) 2024-01-07 08:04:49 +11:00
Tanner Linsley
b680581796 release: v5.17.7 v5.17.7 2024-01-06 13:26:18 +00:00
Dominik Dorfmeister
0f6477f41d
fix: trigger release
RELEASE_ALL
2024-01-06 14:23:48 +01:00
Tanner Linsley
c40a98450b release: v5.17.6 v5.17.6 2024-01-06 02:29:30 +00:00
Arnoud
c6a78d14b7
fix(angular-query): align types to React Query (#6654) 2024-01-06 03:26:30 +01:00
Tanner Linsley
41598cfb41 release: v5.17.5 v5.17.5 2024-01-05 23:46:29 +00:00
Lachlan Collins
e5f23fcea2
fix: Remove unnecessary tsconfig options (#6653) 2024-01-06 10:39:43 +11:00
Tanner Linsley
d26cb41005 release: v5.17.4 v5.17.4 2024-01-05 21:42:57 +00:00
Dominik Dorfmeister
24719c16ae
fix: revert early bailout improvements (#6652) 2024-01-05 22:40:45 +01:00
Tanner Linsley
3fecf710a8 release: v5.17.3 v5.17.3 2024-01-05 21:05:07 +00:00
Dominik Dorfmeister
9e0bfa8b74
fix(queriesObserver): always use latest combine function (#6651)
* fix(queriesObserver): always use latest combine function

computing the optimistic result didn't use the latest combine function, but the one set from setOptions (which runs in an effect, but is too late)

* fix: don't forget about svelte
2024-01-05 22:03:02 +01:00
Dominik Dorfmeister
f43d2ad9b5 chore: fix prettier 2024-01-05 12:14:41 +01:00
angeloaltamiranom
971bd6f8d4
docs(useSuspenseQueries): add stale time caveat (#6641)
* docs(useSuspenseQueries): add stale time caveat

* Update docs/react/reference/useSuspenseQueries.md

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-01-05 12:04:51 +01:00
Jonghyeon Ko
694cfdbcbd
chore(tsconfig): remove unnecessary strictNullChecks (#6642) 2024-01-05 11:59:46 +01:00
Tanner Linsley
0007e258a6 release: v5.17.2 v5.17.2 2024-01-05 10:57:59 +00:00
Lachlan Collins
8f4aa64fb1
fix: Correctly exit publish script (#6647)
* fix: Correctly exit publish script

* Remove ts-expect-error
2024-01-05 21:51:22 +11:00
Lachlan Collins
ca6102b854
ci: Avoid uploading coverage files in Nx cache (#6644)
* ci: Avoid uploading coverage files in Nx cache

* Clean up config
2024-01-05 13:23:46 +11:00
Lachlan Collins
422cbed783
ci: Use publish function from @tanstack/config (#6643)
* ci: Use publish function from @tanstack/config

* Remove type-fest
2024-01-05 12:01:37 +11:00
Tanner Linsley
9028c7459b release: v5.17.1 v5.17.1 2024-01-03 14:08:09 +00:00
Arnoud
07d40df1fa
fix(angular-query): add notifyManager to query and mutation (#6633) 2024-01-03 15:05:46 +01:00
Lachlan Collins
e6cb6df568
chore: Enable coverage and typecheck in vitest config (#6624)
* Better vitest config

* Update other packages

* Delete unused files
2024-01-01 09:49:17 +11:00
Tanner Linsley
ca6ad31c19 release: v5.17.0 v5.17.0 2023-12-31 12:31:29 +00:00
Nathan Huisman
3265ec3262
feat(notifyManager): setScheduler configuration (#6600)
* feat(notifyManager): add batch method configuration

add the method setBatchMethod on the notifyManager to configure the
batching method. Inspiration taken from redux[^redux]

[^redux]: https://redux-toolkit.js.org/api/autoBatchEnhancer#autobatchenhancer-1

* fix(notifyManager): remove scheduleMicrotask import for test:eslint

* fix(notifyManager): fix eslint (incorrectly) complaining

* feat(notifyManager): ability to add custom schedule function

* feat(examples/solid): demonstrate layout shift

* feat(notifyManager): add tests for setBatchMethod

* refactor(utils): remove unnecessary scheduleMicrotask

* feat(notifyManager): add docs

* fix(pnpm-lock.yaml): Revert accidentally updated lockfile

* fix: run prettier

* docs(notifyManager): add requestAnimationFrame mdn link

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

* fix: revert pnpm-lock.yaml

* feat(notifyManager): simplify setBatchMethod interface, rename to setScheduler

* fix(solid-start-streaming): fix batch-methods example

* refactor: init scheduleFn when declaring it

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-12-31 13:25:02 +01:00
Lachlan Collins
50230c5626
chore: Update Nx caching inputs (#6619)
* chore: Update Nx caching inputs

* More descriptive CI task names
2023-12-31 09:42:33 +11:00
Lachlan Collins
a8d7bd2b85
chore: Update Node to latest v18 release for CI (#6618)
* Bump node to latest v18

* Only run CI on query repo
2023-12-31 09:22:38 +11:00
Jonghyeon Ko
4957e54d7b
chore(ci): update version of actions/setup-node (#6616) 2023-12-30 11:49:15 +01:00
Lachlan Collins
eb25c7b386
chore: Remove entries field from script config (#6615) 2023-12-30 14:20:14 +11:00
Tanner Linsley
d05817f64c release: v5.16.1 v5.16.1 2023-12-30 02:55:10 +00:00
Michael Be
d6be91f0ad
refactor(angular-query): remove dependency to ngxtension (#6558)
* refactor(angular-query): remove dependency to ngxtension

* Update packages/angular-query-experimental/src/util/create-injection-token/create-injection-token.ts

Co-authored-by: Garrett Darnell <12160067+garrettld@users.noreply.github.com>

* attribution and remove unused code

* linting and formatting

* Knip fixes

---------

Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com>
Co-authored-by: Garrett Darnell <12160067+garrettld@users.noreply.github.com>
2023-12-30 03:53:33 +01:00
Tanner Linsley
f6968e7d12 release: v5.16.0 v5.16.0 2023-12-30 00:09:44 +00:00
Arnoud
5e8c532752
feat(angular-query): split injectMutation signal (#6598)
Provides better development experience and finer grained reactivity
2023-12-30 01:03:59 +01:00
Tanner Linsley
9a240c5577 release: v5.15.5 v5.15.5 2023-12-29 23:10:59 +00:00
Dominik Dorfmeister
6ec6ee82b9
fix(queriesObserver): do not bail-out of calling setResult for empty queries (#6614)
* fix(core): make sure to call setResult before the early bail-out

The initial fix for #6369 (#6431) introduced a regression where we'd always call combine with an empty array initially.

Turns out it was actually on purpose that we didn't call combine in the constructor, but delayed that until the `setQueries` call - because there, we already have complete query result structures available

However, there is an optimization that bails out early without calling this.#setResult if "nothing changed"; however, if we call useQueries with an empty array, that means nothing every changes, and the #combinedResult is actually never set, leading to structural sharing never having anything to share with, thus yielding a new reference every time (this is the root issue for #6369).

This fix reverts those changes (to avoid calling combine with an empty array every time, thus fixing #6612) and makes sure #setResult is always invoked before bailing out, so that #combinedResult is set correctly even for this case

* fix: add a special length check to the bail-out case

we only want to stop bailing out if we have no queries; moving the #setResult call unconditionally before the bail-out leads to more re-renders for other useQueries calls

now, we only stop the bail-out when the special empty case sets in, which is what fixes #6612
2023-12-30 00:09:11 +01:00
Tanner Linsley
da38f64434 release: v5.15.4 v5.15.4 2023-12-29 21:43:28 +00:00
Dominik Dorfmeister
639c725bfd
fix(react): don't set options before suspending (#6611)
* fix(react): don't set options before suspending

setting options right before suspending is a side effect, and it has repercussions if used in transitions where the component stays mounted

to fix #6392 in a different way, we can't rely on `observer.getCurrentQuery()` when reading for error boundaries / suspense, because it can lag behind; instead, we can just read from the queryCache directly to get the latest values

* chore: fix prettier

* chore: test for 6486
2023-12-29 22:41:20 +01:00
Tanner Linsley
7f1f8e42b6 release: v5.15.3 v5.15.3 2023-12-29 10:27:23 +00:00
Lachlan Collins
2ed47791a8
fix(vue-query-devtools): Use vue-tsc to test types (#6610)
* Run vue-tsc for test:types

* Remove shims-vue

* Fix peerDependencies
2023-12-29 21:26:00 +11:00
이효범
9973e8d455
docs: Update QueryCache.md (#6608) 2023-12-29 11:05:20 +01:00
Alex Liu
a83c5a2b2b
docs: update examples for new version compatibility (#6605)
* docs: update examples for new version compatibility

* chore: format
2023-12-29 11:04:41 +01:00
Lachlan Collins
425aaf6680
chore: Ensure each package has Vite framework adapter (#6609)
* Add react plugin

* Add vue and solid plugins

* Add angular plugin

* Rename to vite.config.ts

* Angular can do whatever it wants
2023-12-29 20:49:16 +11:00
Lachlan Collins
ddf5539869
chore: Add type checking to integrations (#6607)
* Add TS to vue-vite integration

* Explicitly exclude examples

* Merge test:bundle into build

* Update gitignore

* Update codesandbox build step

* Wow npm is annoying
2023-12-29 08:29:31 +11:00