-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(query-core): Show correct placeholderData when request in cache #6357
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 86b23ed. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution
Sent with 💌 from NxCloud. |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 86b23ed:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅ ❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
... and 12 files with indirect coverage changes 📢 Thoughts on this report? Let us know! |
[![Mend Renovate logo banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@tanstack/react-query](https://tanstack.com/query) ([source](https://togithub.com/TanStack/query)) | [`5.4.3` -> `5.8.3`](https://renovatebot.com/diffs/npm/@tanstack%2freact-query/5.4.3/5.8.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@tanstack%2freact-query/5.8.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@tanstack%2freact-query/5.8.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@tanstack%2freact-query/5.4.3/5.8.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@tanstack%2freact-query/5.4.3/5.8.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>TanStack/query (@​tanstack/react-query)</summary> ### [`v5.8.3`](https://togithub.com/TanStack/query/releases/tag/v5.8.3) [Compare Source](https://togithub.com/TanStack/query/compare/5.8.2...v5.8.3) Version 5.8.3 - 11/13/2023, 8:49 AM #### Changes Manual Release: v5.8.3 #### Packages - [@​tanstack/eslint-plugin-query](https://togithub.com/tanstack/eslint-plugin-query)[@​5](https://togithub.com/5).8.3 - [@​tanstack/query-async-storage-persister](https://togithub.com/tanstack/query-async-storage-persister)[@​5](https://togithub.com/5).8.3 - [@​tanstack/query-broadcast-client-experimental](https://togithub.com/tanstack/query-broadcast-client-experimental)[@​5](https://togithub.com/5).8.3 - [@​tanstack/query-core](https://togithub.com/tanstack/query-core)[@​5](https://togithub.com/5).8.3 - [@​tanstack/query-devtools](https://togithub.com/tanstack/query-devtools)[@​5](https://togithub.com/5).8.3 - [@​tanstack/query-persist-client-core](https://togithub.com/tanstack/query-persist-client-core)[@​5](https://togithub.com/5).8.3 - [@​tanstack/query-sync-storage-persister](https://togithub.com/tanstack/query-sync-storage-persister)[@​5](https://togithub.com/5).8.3 - [@​tanstack/react-query](https://togithub.com/tanstack/react-query)[@​5](https://togithub.com/5).8.3 - [@​tanstack/react-query-devtools](https://togithub.com/tanstack/react-query-devtools)[@​5](https://togithub.com/5).8.3 - [@​tanstack/react-query-persist-client](https://togithub.com/tanstack/react-query-persist-client)[@​5](https://togithub.com/5).8.3 - [@​tanstack/react-query-next-experimental](https://togithub.com/tanstack/react-query-next-experimental)[@​5](https://togithub.com/5).8.3 - [@​tanstack/solid-query](https://togithub.com/tanstack/solid-query)[@​5](https://togithub.com/5).8.3 - [@​tanstack/solid-query-devtools](https://togithub.com/tanstack/solid-query-devtools)[@​5](https://togithub.com/5).8.3 - [@​tanstack/solid-query-persist-client](https://togithub.com/tanstack/solid-query-persist-client)[@​5](https://togithub.com/5).8.3 - [@​tanstack/svelte-query](https://togithub.com/tanstack/svelte-query)[@​5](https://togithub.com/5).8.3 - [@​tanstack/svelte-query-devtools](https://togithub.com/tanstack/svelte-query-devtools)[@​5](https://togithub.com/5).8.3 - [@​tanstack/svelte-query-persist-client](https://togithub.com/tanstack/svelte-query-persist-client)[@​5](https://togithub.com/5).8.3 - [@​tanstack/vue-query](https://togithub.com/tanstack/vue-query)[@​5](https://togithub.com/5).8.3 - [@​tanstack/vue-query-devtools](https://togithub.com/tanstack/vue-query-devtools)[@​5](https://togithub.com/5).8.3 ### [`v5.8.2`](https://togithub.com/TanStack/query/releases/tag/v5.8.2): 5.8.2 [Compare Source](https://togithub.com/TanStack/query/compare/v5.8.1...5.8.2) ##### fixes fix(query-core): Show correct placeholderData when request in cache ([https://github.com/TanStack/query/pull/6357](https://togithub.com/TanStack/query/pull/6357) [https://github.com/TanStack/query/pull/6357](https://togithub.com/TanStack/query/pull/6357)) - fix(query-core): Show correct placeholderData when reuest in cache ### [`v5.8.1`](https://togithub.com/TanStack/query/releases/tag/v5.8.1) [Compare Source](https://togithub.com/TanStack/query/compare/v5.7.2...v5.8.1) Version 5.8.1 - 11/8/2023, 8:03 AM ##### Changes ##### Fix - core: make sure queries that re-subscribe will have the correct result ([#​6334](https://togithub.com/TanStack/query/issues/6334)) ([`4774f03`](https://togithub.com/TanStack/query/commit/4774f030)) by Dominik Dorfmeister ##### Docs - vue-query: import nuxt composables from #imports ([#​6329](https://togithub.com/TanStack/query/issues/6329)) ([`4266f0b`](https://togithub.com/TanStack/query/commit/4266f0b7)) by Daniel Roe - QueryClient.md: fix typo immuatable → immutable ([#​6330](https://togithub.com/TanStack/query/issues/6330)) ([`e3a0003`](https://togithub.com/TanStack/query/commit/e3a00034)) by Mihai Crisan - add missing useQueryClient to the documentation ([#​6322](https://togithub.com/TanStack/query/issues/6322)) ([`b384c4e`](https://togithub.com/TanStack/query/commit/b384c4e2)) by [@​EmmanuelDemey](https://togithub.com/EmmanuelDemey) ##### Test - asyncThrottle: migrated to useFakeTimers ([#​6324](https://togithub.com/TanStack/query/issues/6324)) ([`55d70c7`](https://togithub.com/TanStack/query/commit/55d70c74)) by wildOrlik ##### Packages - [@​tanstack/query-async-storage-persister](https://togithub.com/tanstack/query-async-storage-persister)[@​5](https://togithub.com/5).8.1 - [@​tanstack/query-core](https://togithub.com/tanstack/query-core)[@​5](https://togithub.com/5).8.1 - [@​tanstack/query-broadcast-client-experimental](https://togithub.com/tanstack/query-broadcast-client-experimental)[@​5](https://togithub.com/5).8.1 - [@​tanstack/query-persist-client-core](https://togithub.com/tanstack/query-persist-client-core)[@​5](https://togithub.com/5).8.1 - [@​tanstack/query-sync-storage-persister](https://togithub.com/tanstack/query-sync-storage-persister)[@​5](https://togithub.com/5).8.1 - [@​tanstack/react-query](https://togithub.com/tanstack/react-query)[@​5](https://togithub.com/5).8.1 - [@​tanstack/react-query-devtools](https://togithub.com/tanstack/react-query-devtools)[@​5](https://togithub.com/5).8.1 - [@​tanstack/react-query-persist-client](https://togithub.com/tanstack/react-query-persist-client)[@​5](https://togithub.com/5).8.1 - [@​tanstack/react-query-next-experimental](https://togithub.com/tanstack/react-query-next-experimental)[@​5](https://togithub.com/5).8.1 - [@​tanstack/solid-query](https://togithub.com/tanstack/solid-query)[@​5](https://togithub.com/5).8.1 - [@​tanstack/solid-query-devtools](https://togithub.com/tanstack/solid-query-devtools)[@​5](https://togithub.com/5).8.1 - [@​tanstack/solid-query-persist-client](https://togithub.com/tanstack/solid-query-persist-client)[@​5](https://togithub.com/5).8.1 - [@​tanstack/svelte-query](https://togithub.com/tanstack/svelte-query)[@​5](https://togithub.com/5).8.1 - [@​tanstack/svelte-query-devtools](https://togithub.com/tanstack/svelte-query-devtools)[@​5](https://togithub.com/5).8.1 - [@​tanstack/svelte-query-persist-client](https://togithub.com/tanstack/svelte-query-persist-client)[@​5](https://togithub.com/5).8.1 - [@​tanstack/vue-query](https://togithub.com/tanstack/vue-query)[@​5](https://togithub.com/5).8.1 ### [`v5.7.2`](https://togithub.com/TanStack/query/releases/tag/v5.7.2) [Compare Source](https://togithub.com/TanStack/query/compare/v5.7.1...v5.7.2) Version 5.7.2 - 11/5/2023, 3:32 PM #### Changes ##### Fix - types: remove `suspense` from `defaultOptions` ([#​6301](https://togithub.com/TanStack/query/issues/6301)) ([`6ee0671`](https://togithub.com/TanStack/query/commit/6ee06719)) by Dominik Dorfmeister ##### Docs - Update devtools.md ([#​5950](https://togithub.com/TanStack/query/issues/5950)) ([`ecdd927`](https://togithub.com/TanStack/query/commit/ecdd927c)) by callmedukey #### Packages - [@​tanstack/query-core](https://togithub.com/tanstack/query-core)[@​5](https://togithub.com/5).7.2 - [@​tanstack/query-broadcast-client-experimental](https://togithub.com/tanstack/query-broadcast-client-experimental)[@​5](https://togithub.com/5).7.2 - [@​tanstack/query-persist-client-core](https://togithub.com/tanstack/query-persist-client-core)[@​5](https://togithub.com/5).7.2 - [@​tanstack/query-sync-storage-persister](https://togithub.com/tanstack/query-sync-storage-persister)[@​5](https://togithub.com/5).7.2 - [@​tanstack/react-query](https://togithub.com/tanstack/react-query)[@​5](https://togithub.com/5).7.2 - [@​tanstack/react-query-devtools](https://togithub.com/tanstack/react-query-devtools)[@​5](https://togithub.com/5).7.2 - [@​tanstack/react-query-persist-client](https://togithub.com/tanstack/react-query-persist-client)[@​5](https://togithub.com/5).7.2 - [@​tanstack/react-query-next-experimental](https://togithub.com/tanstack/react-query-next-experimental)[@​5](https://togithub.com/5).7.2 - [@​tanstack/solid-query](https://togithub.com/tanstack/solid-query)[@​5](https://togithub.com/5).7.2 - [@​tanstack/solid-query-devtools](https://togithub.com/tanstack/solid-query-devtools)[@​5](https://togithub.com/5).7.2 - [@​tanstack/solid-query-persist-client](https://togithub.com/tanstack/solid-query-persist-client)[@​5](https://togithub.com/5).7.2 - [@​tanstack/svelte-query](https://togithub.com/tanstack/svelte-query)[@​5](https://togithub.com/5).7.2 - [@​tanstack/svelte-query-devtools](https://togithub.com/tanstack/svelte-query-devtools)[@​5](https://togithub.com/5).7.2 - [@​tanstack/svelte-query-persist-client](https://togithub.com/tanstack/svelte-query-persist-client)[@​5](https://togithub.com/5).7.2 - [@​tanstack/vue-query](https://togithub.com/tanstack/vue-query)[@​5](https://togithub.com/5).7.2 - [@​tanstack/query-async-storage-persister](https://togithub.com/tanstack/query-async-storage-persister)[@​5](https://togithub.com/5).7.2 ### [`v5.7.1`](https://togithub.com/TanStack/query/releases/tag/v5.7.1) [Compare Source](https://togithub.com/TanStack/query/compare/v5.7.0...v5.7.1) Version 5.7.1 - 11/5/2023, 11:04 AM #### Changes ##### Fix - react-query: non continuous suspense with useSuspenseQueries ([#​6298](https://togithub.com/TanStack/query/issues/6298)) ([#​6303](https://togithub.com/TanStack/query/issues/6303)) ([`e4138ec`](https://togithub.com/TanStack/query/commit/e4138ecd)) by Maciej Baruch ##### Docs - Fix svelte playground example reactivity ([#​6311](https://togithub.com/TanStack/query/issues/6311)) ([`fe49dd3`](https://togithub.com/TanStack/query/commit/fe49dd35)) by Lachlan Collins - changed import path in react prefetching example ([#​6307](https://togithub.com/TanStack/query/issues/6307)) ([`d90dc8f`](https://togithub.com/TanStack/query/commit/d90dc8f7)) by [@​dmswl98](https://togithub.com/dmswl98) #### Packages - [@​tanstack/react-query](https://togithub.com/tanstack/react-query)[@​5](https://togithub.com/5).7.1 - [@​tanstack/react-query-devtools](https://togithub.com/tanstack/react-query-devtools)[@​5](https://togithub.com/5).7.1 - [@​tanstack/react-query-persist-client](https://togithub.com/tanstack/react-query-persist-client)[@​5](https://togithub.com/5).7.1 - [@​tanstack/react-query-next-experimental](https://togithub.com/tanstack/react-query-next-experimental)[@​5](https://togithub.com/5).7.1 ### [`v5.7.0`](https://togithub.com/TanStack/query/releases/tag/v5.7.0) [Compare Source](https://togithub.com/TanStack/query/compare/v5.4.3...v5.7.0) Version 5.7.0 - 11/4/2023, 3:39 PM #### Changes ##### Feat - react-query: better error in development mode to identify bad useQuery calls ([#​6288](https://togithub.com/TanStack/query/issues/6288)) ([`8a86182`](https://togithub.com/TanStack/query/commit/8a86182c)) by GLabat #### Packages - [@​tanstack/react-query](https://togithub.com/tanstack/react-query)[@​5](https://togithub.com/5).7.0 - [@​tanstack/react-query-devtools](https://togithub.com/tanstack/react-query-devtools)[@​5](https://togithub.com/5).7.0 - [@​tanstack/react-query-persist-client](https://togithub.com/tanstack/react-query-persist-client)[@​5](https://togithub.com/5).7.0 - [@​tanstack/react-query-next-experimental](https://togithub.com/tanstack/react-query-next-experimental)[@​5](https://togithub.com/5).7.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/ariakit/ariakit). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMS41IiwidXBkYXRlZEluVmVyIjoiMzcuNDYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…anStack#6357) * fix(query-core): Show correct placeholderData when reuest in cache * Fix formatting --------- Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Fixes #6341
The issue was the logic to set the lastQueryWithDefinedData was one level lower than expected so the branch was never executed for previous requests existing in the cache. I have included the test case and it works as expected now