From 23b9a196c46caab314bc73024af4f031c6dfc328 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=84=9D=EC=A7=84=28poki=29?= <102217654+SEOKKAMONI@users.noreply.github.com> Date: Tue, 16 Jul 2024 21:13:11 +0900 Subject: [PATCH 1/8] chore: update knip schema to v5 (#7740) --- knip.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/knip.json b/knip.json index 6eac949264..2e75d9154a 100644 --- a/knip.json +++ b/knip.json @@ -1,5 +1,5 @@ { - "$schema": "https://unpkg.com/knip@4/schema.json", + "$schema": "https://unpkg.com/knip@5/schema.json", "ignore": [".pnpmfile.cjs"], "ignoreWorkspaces": ["examples/**", "integrations/**"], "workspaces": { From a3f5a0aafe3d18a1095ec8eda9ca9b1e380e1216 Mon Sep 17 00:00:00 2001 From: Andy Li Date: Wed, 17 Jul 2024 04:29:46 +0800 Subject: [PATCH 2/8] fix(vue-query): export `InitialQueryOptions` types (#7720) --- packages/vue-query/src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/vue-query/src/index.ts b/packages/vue-query/src/index.ts index c3ea3e98e0..5ea6e26f83 100644 --- a/packages/vue-query/src/index.ts +++ b/packages/vue-query/src/index.ts @@ -24,6 +24,8 @@ export type { UseQueryOptions, UseQueryReturnType, UseQueryDefinedReturnType, + UndefinedInitialQueryOptions, + DefinedInitialQueryOptions, } from './useQuery' export type { UseInfiniteQueryOptions, From eb21d1e7b6bf35e0c6213a139aced9b660916d65 Mon Sep 17 00:00:00 2001 From: Tanner Linsley Date: Tue, 16 Jul 2024 20:33:10 +0000 Subject: [PATCH 3/8] release: v5.51.3 --- examples/angular/basic/package.json | 4 +- .../package.json | 4 +- examples/angular/router/package.json | 4 +- examples/angular/simple/package.json | 4 +- examples/react/algolia/package.json | 4 +- examples/react/auto-refetching/package.json | 4 +- .../react/basic-graphql-request/package.json | 4 +- examples/react/basic/package.json | 8 +- .../react/default-query-function/package.json | 4 +- .../package.json | 4 +- .../load-more-infinite-scroll/package.json | 4 +- .../react/nextjs-app-prefetching/package.json | 4 +- .../nextjs-suspense-streaming/package.json | 6 +- examples/react/nextjs/package.json | 4 +- examples/react/offline/package.json | 8 +- .../optimistic-updates-cache/package.json | 4 +- .../react/optimistic-updates-ui/package.json | 4 +- examples/react/pagination/package.json | 4 +- examples/react/playground/package.json | 4 +- examples/react/prefetching/package.json | 4 +- examples/react/react-native/package.json | 4 +- examples/react/react-router/package.json | 4 +- examples/react/rick-morty/package.json | 4 +- examples/react/shadow-dom/package.json | 4 +- examples/react/simple/package.json | 4 +- examples/react/star-wars/package.json | 4 +- examples/react/suspense/package.json | 4 +- examples/solid/astro/package.json | 4 +- .../solid/basic-graphql-request/package.json | 4 +- examples/solid/basic/package.json | 4 +- .../solid/default-query-function/package.json | 4 +- examples/solid/simple/package.json | 4 +- .../solid/solid-start-streaming/package.json | 4 +- examples/svelte/auto-refetching/package.json | 4 +- examples/svelte/basic/package.json | 4 +- .../load-more-infinite-scroll/package.json | 4 +- .../package.json | 4 +- examples/svelte/playground/package.json | 4 +- examples/svelte/simple/package.json | 4 +- examples/svelte/ssr/package.json | 4 +- examples/svelte/star-wars/package.json | 4 +- examples/vue/2.6-basic/package.json | 2 +- examples/vue/2.7-basic/package.json | 2 +- examples/vue/basic/package.json | 4 +- examples/vue/dependent-queries/package.json | 2 +- examples/vue/nuxt3/package.json | 2 +- examples/vue/persister/package.json | 8 +- examples/vue/simple/package.json | 4 +- .../package.json | 2 +- .../angular-query-experimental/package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- packages/query-core/package.json | 2 +- .../query-persist-client-core/package.json | 2 +- .../query-sync-storage-persister/package.json | 2 +- packages/react-query-devtools/package.json | 2 +- .../package.json | 2 +- .../react-query-persist-client/package.json | 2 +- packages/react-query/package.json | 2 +- packages/solid-query-devtools/package.json | 2 +- .../solid-query-persist-client/package.json | 2 +- packages/solid-query/package.json | 2 +- packages/svelte-query-devtools/package.json | 2 +- .../svelte-query-persist-client/package.json | 2 +- packages/svelte-query/package.json | 2 +- packages/vue-query-devtools/package.json | 2 +- packages/vue-query/package.json | 2 +- pnpm-lock.yaml | 192 +++++++++--------- 68 files changed, 214 insertions(+), 214 deletions(-) diff --git a/examples/angular/basic/package.json b/examples/angular/basic/package.json index 2335988273..5c1a213d12 100644 --- a/examples/angular/basic/package.json +++ b/examples/angular/basic/package.json @@ -14,7 +14,7 @@ "@angular/core": "^17.3.10", "@angular/platform-browser": "^17.3.10", "@angular/platform-browser-dynamic": "^17.3.10", - "@tanstack/angular-query-experimental": "^5.51.1", + "@tanstack/angular-query-experimental": "^5.51.3", "rxjs": "^7.8.1", "tslib": "^2.6.2", "zone.js": "^0.14.6" @@ -23,7 +23,7 @@ "@angular-devkit/build-angular": "^17.3.8", "@angular/cli": "^17.3.8", "@angular/compiler-cli": "^17.3.10", - "@tanstack/angular-query-devtools-experimental": "^5.51.1", + "@tanstack/angular-query-devtools-experimental": "^5.51.3", "typescript": "5.3.3" } } diff --git a/examples/angular/infinite-query-with-max-pages/package.json b/examples/angular/infinite-query-with-max-pages/package.json index 4af2e2ddb2..1f996c4322 100644 --- a/examples/angular/infinite-query-with-max-pages/package.json +++ b/examples/angular/infinite-query-with-max-pages/package.json @@ -14,7 +14,7 @@ "@angular/core": "^17.3.10", "@angular/platform-browser": "^17.3.10", "@angular/platform-browser-dynamic": "^17.3.10", - "@tanstack/angular-query-experimental": "^5.51.1", + "@tanstack/angular-query-experimental": "^5.51.3", "rxjs": "^7.8.1", "tslib": "^2.6.2", "zone.js": "^0.14.6" @@ -23,7 +23,7 @@ "@angular-devkit/build-angular": "^17.3.8", "@angular/cli": "^17.3.8", "@angular/compiler-cli": "^17.3.10", - "@tanstack/angular-query-devtools-experimental": "^5.51.1", + "@tanstack/angular-query-devtools-experimental": "^5.51.3", "typescript": "5.3.3" } } diff --git a/examples/angular/router/package.json b/examples/angular/router/package.json index b55033d53f..d3bab0077f 100644 --- a/examples/angular/router/package.json +++ b/examples/angular/router/package.json @@ -15,7 +15,7 @@ "@angular/platform-browser": "^17.3.10", "@angular/platform-browser-dynamic": "^17.3.10", "@angular/router": "^17.3.10", - "@tanstack/angular-query-experimental": "^5.51.1", + "@tanstack/angular-query-experimental": "^5.51.3", "rxjs": "^7.8.1", "tslib": "^2.6.2", "zone.js": "^0.14.6" @@ -24,7 +24,7 @@ "@angular-devkit/build-angular": "^17.3.8", "@angular/cli": "^17.3.8", "@angular/compiler-cli": "^17.3.10", - "@tanstack/angular-query-devtools-experimental": "^5.51.1", + "@tanstack/angular-query-devtools-experimental": "^5.51.3", "typescript": "5.3.3" } } diff --git a/examples/angular/simple/package.json b/examples/angular/simple/package.json index 30fa619250..680ec29941 100644 --- a/examples/angular/simple/package.json +++ b/examples/angular/simple/package.json @@ -15,7 +15,7 @@ "@angular/platform-browser": "^17.3.10", "@angular/platform-browser-dynamic": "^17.3.10", "@angular/router": "^17.3.10", - "@tanstack/angular-query-experimental": "^5.51.1", + "@tanstack/angular-query-experimental": "^5.51.3", "rxjs": "^7.8.1", "tslib": "^2.6.2", "zone.js": "^0.14.6" @@ -24,7 +24,7 @@ "@angular-devkit/build-angular": "^17.3.8", "@angular/cli": "^17.3.8", "@angular/compiler-cli": "^17.3.10", - "@tanstack/angular-query-devtools-experimental": "^5.51.1", + "@tanstack/angular-query-devtools-experimental": "^5.51.3", "typescript": "5.3.3" } } diff --git a/examples/react/algolia/package.json b/examples/react/algolia/package.json index c59ef462d4..4e04ca35ff 100644 --- a/examples/react/algolia/package.json +++ b/examples/react/algolia/package.json @@ -11,8 +11,8 @@ "dependencies": { "@algolia/client-search": "4.23.3", "@algolia/transporter": "4.23.3", - "@tanstack/react-query": "^5.51.1", - "@tanstack/react-query-devtools": "^5.51.1", + "@tanstack/react-query": "^5.51.3", + "@tanstack/react-query-devtools": "^5.51.3", "algoliasearch": "4.23.3", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522" diff --git a/examples/react/auto-refetching/package.json b/examples/react/auto-refetching/package.json index 16f1e6503b..1a30f476da 100644 --- a/examples/react/auto-refetching/package.json +++ b/examples/react/auto-refetching/package.json @@ -8,8 +8,8 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.51.1", - "@tanstack/react-query-devtools": "^5.51.1", + "@tanstack/react-query": "^5.51.3", + "@tanstack/react-query-devtools": "^5.51.3", "next": "^14.2.4", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/examples/react/basic-graphql-request/package.json b/examples/react/basic-graphql-request/package.json index f3a3b60101..9909b4281a 100644 --- a/examples/react/basic-graphql-request/package.json +++ b/examples/react/basic-graphql-request/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.51.1", - "@tanstack/react-query-devtools": "^5.51.1", + "@tanstack/react-query": "^5.51.3", + "@tanstack/react-query-devtools": "^5.51.3", "graphql": "^16.8.1", "graphql-request": "^7.0.1", "react": "19.0.0-rc-4c2e457c7c-20240522", diff --git a/examples/react/basic/package.json b/examples/react/basic/package.json index 62cf9f88b0..11cac7cdfa 100644 --- a/examples/react/basic/package.json +++ b/examples/react/basic/package.json @@ -9,10 +9,10 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/query-sync-storage-persister": "^5.51.1", - "@tanstack/react-query": "^5.51.1", - "@tanstack/react-query-devtools": "^5.51.1", - "@tanstack/react-query-persist-client": "^5.51.1", + "@tanstack/query-sync-storage-persister": "^5.51.3", + "@tanstack/react-query": "^5.51.3", + "@tanstack/react-query-devtools": "^5.51.3", + "@tanstack/react-query-persist-client": "^5.51.3", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522" }, diff --git a/examples/react/default-query-function/package.json b/examples/react/default-query-function/package.json index 4d8153c285..d8663e58a2 100644 --- a/examples/react/default-query-function/package.json +++ b/examples/react/default-query-function/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.51.1", - "@tanstack/react-query-devtools": "^5.51.1", + "@tanstack/react-query": "^5.51.3", + "@tanstack/react-query-devtools": "^5.51.3", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522" }, diff --git a/examples/react/infinite-query-with-max-pages/package.json b/examples/react/infinite-query-with-max-pages/package.json index 0abc7c8b15..7ac1c95f14 100644 --- a/examples/react/infinite-query-with-max-pages/package.json +++ b/examples/react/infinite-query-with-max-pages/package.json @@ -8,8 +8,8 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.51.1", - "@tanstack/react-query-devtools": "^5.51.1", + "@tanstack/react-query": "^5.51.3", + "@tanstack/react-query-devtools": "^5.51.3", "next": "^14.2.4", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/examples/react/load-more-infinite-scroll/package.json b/examples/react/load-more-infinite-scroll/package.json index c26b648e12..4cf12171ed 100644 --- a/examples/react/load-more-infinite-scroll/package.json +++ b/examples/react/load-more-infinite-scroll/package.json @@ -8,8 +8,8 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.51.1", - "@tanstack/react-query-devtools": "^5.51.1", + "@tanstack/react-query": "^5.51.3", + "@tanstack/react-query-devtools": "^5.51.3", "next": "^14.2.4", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/examples/react/nextjs-app-prefetching/package.json b/examples/react/nextjs-app-prefetching/package.json index 897d8237ea..7f5dcf91c7 100644 --- a/examples/react/nextjs-app-prefetching/package.json +++ b/examples/react/nextjs-app-prefetching/package.json @@ -9,8 +9,8 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/react-query": "^5.51.1", - "@tanstack/react-query-devtools": "^5.51.1", + "@tanstack/react-query": "^5.51.3", + "@tanstack/react-query-devtools": "^5.51.3", "next": "^15.0.0-rc.0", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522" diff --git a/examples/react/nextjs-suspense-streaming/package.json b/examples/react/nextjs-suspense-streaming/package.json index 4a1e1fffc2..6dc2d187d2 100644 --- a/examples/react/nextjs-suspense-streaming/package.json +++ b/examples/react/nextjs-suspense-streaming/package.json @@ -9,9 +9,9 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/react-query": "^5.51.1", - "@tanstack/react-query-devtools": "^5.51.1", - "@tanstack/react-query-next-experimental": "^5.51.1", + "@tanstack/react-query": "^5.51.3", + "@tanstack/react-query-devtools": "^5.51.3", + "@tanstack/react-query-next-experimental": "^5.51.3", "next": "^14.2.4", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/examples/react/nextjs/package.json b/examples/react/nextjs/package.json index bcf471f148..8183d5dfcd 100644 --- a/examples/react/nextjs/package.json +++ b/examples/react/nextjs/package.json @@ -8,8 +8,8 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.51.1", - "@tanstack/react-query-devtools": "^5.51.1", + "@tanstack/react-query": "^5.51.3", + "@tanstack/react-query-devtools": "^5.51.3", "next": "^14.2.4", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/examples/react/offline/package.json b/examples/react/offline/package.json index 0324c944ac..81a8acd5cf 100644 --- a/examples/react/offline/package.json +++ b/examples/react/offline/package.json @@ -8,11 +8,11 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/query-sync-storage-persister": "^5.51.1", + "@tanstack/query-sync-storage-persister": "^5.51.3", "@tanstack/react-location": "^3.7.4", - "@tanstack/react-query": "^5.51.1", - "@tanstack/react-query-devtools": "^5.51.1", - "@tanstack/react-query-persist-client": "^5.51.1", + "@tanstack/react-query": "^5.51.3", + "@tanstack/react-query-devtools": "^5.51.3", + "@tanstack/react-query-persist-client": "^5.51.3", "msw": "^2.3.0", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522", diff --git a/examples/react/optimistic-updates-cache/package.json b/examples/react/optimistic-updates-cache/package.json index 864a75b1a9..28bad7e6d0 100755 --- a/examples/react/optimistic-updates-cache/package.json +++ b/examples/react/optimistic-updates-cache/package.json @@ -9,8 +9,8 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/react-query": "^5.51.1", - "@tanstack/react-query-devtools": "^5.51.1", + "@tanstack/react-query": "^5.51.3", + "@tanstack/react-query-devtools": "^5.51.3", "next": "^14.2.4", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/examples/react/optimistic-updates-ui/package.json b/examples/react/optimistic-updates-ui/package.json index b9c4339614..e6d35aa3d2 100755 --- a/examples/react/optimistic-updates-ui/package.json +++ b/examples/react/optimistic-updates-ui/package.json @@ -8,8 +8,8 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.51.1", - "@tanstack/react-query-devtools": "^5.51.1", + "@tanstack/react-query": "^5.51.3", + "@tanstack/react-query-devtools": "^5.51.3", "next": "^14.2.4", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/examples/react/pagination/package.json b/examples/react/pagination/package.json index c83ea5808f..c003b85a81 100644 --- a/examples/react/pagination/package.json +++ b/examples/react/pagination/package.json @@ -8,8 +8,8 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.51.1", - "@tanstack/react-query-devtools": "^5.51.1", + "@tanstack/react-query": "^5.51.3", + "@tanstack/react-query-devtools": "^5.51.3", "next": "^14.2.4", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/examples/react/playground/package.json b/examples/react/playground/package.json index a74257aef0..ceb2265579 100644 --- a/examples/react/playground/package.json +++ b/examples/react/playground/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.51.1", - "@tanstack/react-query-devtools": "^5.51.1", + "@tanstack/react-query": "^5.51.3", + "@tanstack/react-query-devtools": "^5.51.3", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522" }, diff --git a/examples/react/prefetching/package.json b/examples/react/prefetching/package.json index 0be903f43a..95d11d8735 100644 --- a/examples/react/prefetching/package.json +++ b/examples/react/prefetching/package.json @@ -8,8 +8,8 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.51.1", - "@tanstack/react-query-devtools": "^5.51.1", + "@tanstack/react-query": "^5.51.3", + "@tanstack/react-query-devtools": "^5.51.3", "next": "^14.2.4", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/examples/react/react-native/package.json b/examples/react/react-native/package.json index 9d5f91d908..baac3e3162 100644 --- a/examples/react/react-native/package.json +++ b/examples/react/react-native/package.json @@ -14,8 +14,8 @@ "@react-native-community/netinfo": "^11.3.1", "@react-navigation/native": "^6.1.6", "@react-navigation/stack": "^6.3.16", - "@tanstack/react-query": "^5.51.1", - "@tanstack/react-query-devtools": "^5.51.1", + "@tanstack/react-query": "^5.51.3", + "@tanstack/react-query-devtools": "^5.51.3", "expo": "^51.0.8", "expo-constants": "^16.0.1", "expo-status-bar": "^1.12.1", diff --git a/examples/react/react-router/package.json b/examples/react/react-router/package.json index 57f392a2f5..de2fe41c26 100644 --- a/examples/react/react-router/package.json +++ b/examples/react/react-router/package.json @@ -9,8 +9,8 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/react-query": "^5.51.1", - "@tanstack/react-query-devtools": "^5.51.1", + "@tanstack/react-query": "^5.51.3", + "@tanstack/react-query-devtools": "^5.51.3", "localforage": "^1.10.0", "match-sorter": "^6.3.4", "react": "19.0.0-rc-4c2e457c7c-20240522", diff --git a/examples/react/rick-morty/package.json b/examples/react/rick-morty/package.json index e6c3846eb3..28e96b325f 100644 --- a/examples/react/rick-morty/package.json +++ b/examples/react/rick-morty/package.json @@ -12,8 +12,8 @@ "@emotion/styled": "^11.11.5", "@mui/material": "^5.15.18", "@mui/styles": "^5.15.18", - "@tanstack/react-query": "^5.51.1", - "@tanstack/react-query-devtools": "^5.51.1", + "@tanstack/react-query": "^5.51.3", + "@tanstack/react-query-devtools": "^5.51.3", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522", "react-router": "^6.23.1", diff --git a/examples/react/shadow-dom/package.json b/examples/react/shadow-dom/package.json index e014173a3b..d134ec2135 100644 --- a/examples/react/shadow-dom/package.json +++ b/examples/react/shadow-dom/package.json @@ -9,8 +9,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.51.1", - "@tanstack/react-query-devtools": "^5.51.1", + "@tanstack/react-query": "^5.51.3", + "@tanstack/react-query-devtools": "^5.51.3", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522" }, diff --git a/examples/react/simple/package.json b/examples/react/simple/package.json index 0b8affa0fe..c38eca14c9 100644 --- a/examples/react/simple/package.json +++ b/examples/react/simple/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.51.1", - "@tanstack/react-query-devtools": "^5.51.1", + "@tanstack/react-query": "^5.51.3", + "@tanstack/react-query-devtools": "^5.51.3", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522" }, diff --git a/examples/react/star-wars/package.json b/examples/react/star-wars/package.json index 9ee8adfe00..a2244834f0 100644 --- a/examples/react/star-wars/package.json +++ b/examples/react/star-wars/package.json @@ -12,8 +12,8 @@ "@emotion/styled": "^11.11.5", "@mui/material": "^5.15.18", "@mui/styles": "^5.15.18", - "@tanstack/react-query": "^5.51.1", - "@tanstack/react-query-devtools": "^5.51.1", + "@tanstack/react-query": "^5.51.3", + "@tanstack/react-query-devtools": "^5.51.3", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522", "react-router": "^6.23.1", diff --git a/examples/react/suspense/package.json b/examples/react/suspense/package.json index 6831d68d11..ce447a320a 100644 --- a/examples/react/suspense/package.json +++ b/examples/react/suspense/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.51.1", - "@tanstack/react-query-devtools": "^5.51.1", + "@tanstack/react-query": "^5.51.3", + "@tanstack/react-query-devtools": "^5.51.3", "font-awesome": "^4.7.0", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522", diff --git a/examples/solid/astro/package.json b/examples/solid/astro/package.json index 5867053873..67c828cd51 100644 --- a/examples/solid/astro/package.json +++ b/examples/solid/astro/package.json @@ -15,8 +15,8 @@ "@astrojs/solid-js": "^4.2.0", "@astrojs/tailwind": "^5.1.0", "@astrojs/vercel": "^7.6.0", - "@tanstack/solid-query": "^5.51.2", - "@tanstack/solid-query-devtools": "^5.51.2", + "@tanstack/solid-query": "^5.51.3", + "@tanstack/solid-query-devtools": "^5.51.3", "astro": "^4.8.6", "solid-js": "^1.8.17", "tailwindcss": "^3.4.3", diff --git a/examples/solid/basic-graphql-request/package.json b/examples/solid/basic-graphql-request/package.json index da6ad684c0..b1fe7e2857 100644 --- a/examples/solid/basic-graphql-request/package.json +++ b/examples/solid/basic-graphql-request/package.json @@ -9,8 +9,8 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/solid-query": "^5.51.2", - "@tanstack/solid-query-devtools": "^5.51.2", + "@tanstack/solid-query": "^5.51.3", + "@tanstack/solid-query-devtools": "^5.51.3", "graphql": "^16.8.1", "graphql-request": "^7.0.1", "solid-js": "^1.8.17" diff --git a/examples/solid/basic/package.json b/examples/solid/basic/package.json index 4a87efcbe0..d3bdcb4202 100644 --- a/examples/solid/basic/package.json +++ b/examples/solid/basic/package.json @@ -9,8 +9,8 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/solid-query": "^5.51.2", - "@tanstack/solid-query-devtools": "^5.51.2", + "@tanstack/solid-query": "^5.51.3", + "@tanstack/solid-query-devtools": "^5.51.3", "solid-js": "^1.8.17" }, "devDependencies": { diff --git a/examples/solid/default-query-function/package.json b/examples/solid/default-query-function/package.json index 4d96b6b162..a8d435f728 100644 --- a/examples/solid/default-query-function/package.json +++ b/examples/solid/default-query-function/package.json @@ -9,8 +9,8 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/solid-query": "^5.51.2", - "@tanstack/solid-query-devtools": "^5.51.2", + "@tanstack/solid-query": "^5.51.3", + "@tanstack/solid-query-devtools": "^5.51.3", "solid-js": "^1.8.17" }, "devDependencies": { diff --git a/examples/solid/simple/package.json b/examples/solid/simple/package.json index 4530d31e5c..cb54881e80 100644 --- a/examples/solid/simple/package.json +++ b/examples/solid/simple/package.json @@ -9,8 +9,8 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/solid-query": "^5.51.2", - "@tanstack/solid-query-devtools": "^5.51.2", + "@tanstack/solid-query": "^5.51.3", + "@tanstack/solid-query-devtools": "^5.51.3", "solid-js": "^1.8.17" }, "devDependencies": { diff --git a/examples/solid/solid-start-streaming/package.json b/examples/solid/solid-start-streaming/package.json index 90164cef42..203476e69a 100644 --- a/examples/solid/solid-start-streaming/package.json +++ b/examples/solid/solid-start-streaming/package.json @@ -12,8 +12,8 @@ "@solidjs/meta": "^0.29.4", "@solidjs/router": "^0.13.3", "@solidjs/start": "^1.0.0-rc.1", - "@tanstack/solid-query": "^5.51.2", - "@tanstack/solid-query-devtools": "^5.51.2", + "@tanstack/solid-query": "^5.51.3", + "@tanstack/solid-query-devtools": "^5.51.3", "solid-js": "^1.8.17", "vinxi": "^0.3.10" }, diff --git a/examples/svelte/auto-refetching/package.json b/examples/svelte/auto-refetching/package.json index 77767290ac..6b5efe0f3d 100644 --- a/examples/svelte/auto-refetching/package.json +++ b/examples/svelte/auto-refetching/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.51.1", - "@tanstack/svelte-query-devtools": "^5.51.1" + "@tanstack/svelte-query": "^5.51.3", + "@tanstack/svelte-query-devtools": "^5.51.3" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.2", diff --git a/examples/svelte/basic/package.json b/examples/svelte/basic/package.json index 5bd81108ee..79bec7bf4d 100644 --- a/examples/svelte/basic/package.json +++ b/examples/svelte/basic/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.51.1", - "@tanstack/svelte-query-devtools": "^5.51.1" + "@tanstack/svelte-query": "^5.51.3", + "@tanstack/svelte-query-devtools": "^5.51.3" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.2", diff --git a/examples/svelte/load-more-infinite-scroll/package.json b/examples/svelte/load-more-infinite-scroll/package.json index 3da82ab086..c628821356 100644 --- a/examples/svelte/load-more-infinite-scroll/package.json +++ b/examples/svelte/load-more-infinite-scroll/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.51.1", - "@tanstack/svelte-query-devtools": "^5.51.1" + "@tanstack/svelte-query": "^5.51.3", + "@tanstack/svelte-query-devtools": "^5.51.3" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.2", diff --git a/examples/svelte/optimistic-updates-typescript/package.json b/examples/svelte/optimistic-updates-typescript/package.json index d9ab77a92c..0c2f3f263d 100644 --- a/examples/svelte/optimistic-updates-typescript/package.json +++ b/examples/svelte/optimistic-updates-typescript/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.51.1", - "@tanstack/svelte-query-devtools": "^5.51.1" + "@tanstack/svelte-query": "^5.51.3", + "@tanstack/svelte-query-devtools": "^5.51.3" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.2", diff --git a/examples/svelte/playground/package.json b/examples/svelte/playground/package.json index b21b1c61e0..749472ea06 100644 --- a/examples/svelte/playground/package.json +++ b/examples/svelte/playground/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.51.1", - "@tanstack/svelte-query-devtools": "^5.51.1" + "@tanstack/svelte-query": "^5.51.3", + "@tanstack/svelte-query-devtools": "^5.51.3" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.2", diff --git a/examples/svelte/simple/package.json b/examples/svelte/simple/package.json index ed564e2b6e..c985c8d118 100644 --- a/examples/svelte/simple/package.json +++ b/examples/svelte/simple/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.51.1", - "@tanstack/svelte-query-devtools": "^5.51.1" + "@tanstack/svelte-query": "^5.51.3", + "@tanstack/svelte-query-devtools": "^5.51.3" }, "devDependencies": { "@sveltejs/vite-plugin-svelte": "^3.1.0", diff --git a/examples/svelte/ssr/package.json b/examples/svelte/ssr/package.json index 1be428cdea..b73845c0df 100644 --- a/examples/svelte/ssr/package.json +++ b/examples/svelte/ssr/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.51.1", - "@tanstack/svelte-query-devtools": "^5.51.1" + "@tanstack/svelte-query": "^5.51.3", + "@tanstack/svelte-query-devtools": "^5.51.3" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.2", diff --git a/examples/svelte/star-wars/package.json b/examples/svelte/star-wars/package.json index 52b9b53061..e4036d532b 100644 --- a/examples/svelte/star-wars/package.json +++ b/examples/svelte/star-wars/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.51.1", - "@tanstack/svelte-query-devtools": "^5.51.1" + "@tanstack/svelte-query": "^5.51.3", + "@tanstack/svelte-query-devtools": "^5.51.3" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.2", diff --git a/examples/vue/2.6-basic/package.json b/examples/vue/2.6-basic/package.json index ffbcd0ae43..1b3cb77d7b 100644 --- a/examples/vue/2.6-basic/package.json +++ b/examples/vue/2.6-basic/package.json @@ -8,7 +8,7 @@ "_preview": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.51.1", + "@tanstack/vue-query": "^5.51.3", "@vue/composition-api": "1.7.2", "vue": "2.6.14", "vue-template-compiler": "2.6.14" diff --git a/examples/vue/2.7-basic/package.json b/examples/vue/2.7-basic/package.json index 68bd9eaf34..20c034b14c 100644 --- a/examples/vue/2.7-basic/package.json +++ b/examples/vue/2.7-basic/package.json @@ -8,7 +8,7 @@ "_serve": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.51.1", + "@tanstack/vue-query": "^5.51.3", "vue": "2.7.16", "vue-template-compiler": "2.7.16" }, diff --git a/examples/vue/basic/package.json b/examples/vue/basic/package.json index 643adc1144..4751aebf8b 100644 --- a/examples/vue/basic/package.json +++ b/examples/vue/basic/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.51.1", - "@tanstack/vue-query-devtools": "^5.51.1", + "@tanstack/vue-query": "^5.51.3", + "@tanstack/vue-query-devtools": "^5.51.3", "vue": "^3.4.27" }, "devDependencies": { diff --git a/examples/vue/dependent-queries/package.json b/examples/vue/dependent-queries/package.json index a42cf0b635..795ffdd079 100644 --- a/examples/vue/dependent-queries/package.json +++ b/examples/vue/dependent-queries/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.51.1", + "@tanstack/vue-query": "^5.51.3", "vue": "^3.4.27" }, "devDependencies": { diff --git a/examples/vue/nuxt3/package.json b/examples/vue/nuxt3/package.json index b6dff0f906..64f1d8c67a 100644 --- a/examples/vue/nuxt3/package.json +++ b/examples/vue/nuxt3/package.json @@ -7,7 +7,7 @@ "_start": "node .output/server/index.mjs" }, "dependencies": { - "@tanstack/vue-query": "^5.51.1" + "@tanstack/vue-query": "^5.51.3" }, "devDependencies": { "nuxt": "^3.5.2" diff --git a/examples/vue/persister/package.json b/examples/vue/persister/package.json index 0297c528b3..ffe3f0301d 100644 --- a/examples/vue/persister/package.json +++ b/examples/vue/persister/package.json @@ -8,10 +8,10 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/query-core": "^5.51.1", - "@tanstack/query-persist-client-core": "^5.51.1", - "@tanstack/query-sync-storage-persister": "^5.51.1", - "@tanstack/vue-query": "^5.51.1", + "@tanstack/query-core": "^5.51.3", + "@tanstack/query-persist-client-core": "^5.51.3", + "@tanstack/query-sync-storage-persister": "^5.51.3", + "@tanstack/vue-query": "^5.51.3", "idb-keyval": "^6.2.1", "vue": "^3.4.27" }, diff --git a/examples/vue/simple/package.json b/examples/vue/simple/package.json index 213d446581..5e86cec500 100644 --- a/examples/vue/simple/package.json +++ b/examples/vue/simple/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.51.1", - "@tanstack/vue-query-devtools": "^5.51.1", + "@tanstack/vue-query": "^5.51.3", + "@tanstack/vue-query-devtools": "^5.51.3", "vue": "^3.4.27" }, "devDependencies": { diff --git a/packages/angular-query-devtools-experimental/package.json b/packages/angular-query-devtools-experimental/package.json index 937161b731..30bdfe6b7a 100644 --- a/packages/angular-query-devtools-experimental/package.json +++ b/packages/angular-query-devtools-experimental/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/angular-query-devtools-experimental", - "version": "5.51.1", + "version": "5.51.3", "description": "Developer tools to interact with and visualize the TanStack/angular-query cache", "author": "Arnoud de Vries", "license": "MIT", diff --git a/packages/angular-query-experimental/package.json b/packages/angular-query-experimental/package.json index 089a73d930..f794780389 100644 --- a/packages/angular-query-experimental/package.json +++ b/packages/angular-query-experimental/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/angular-query-experimental", - "version": "5.51.1", + "version": "5.51.3", "description": "Signals for managing, caching and syncing asynchronous and remote data in Angular", "author": "Arnoud de Vries", "license": "MIT", diff --git a/packages/query-async-storage-persister/package.json b/packages/query-async-storage-persister/package.json index ab8e0c8ee9..ea48848776 100644 --- a/packages/query-async-storage-persister/package.json +++ b/packages/query-async-storage-persister/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/query-async-storage-persister", - "version": "5.51.1", + "version": "5.51.3", "description": "A persister for asynchronous storages, to be used with TanStack/Query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/query-broadcast-client-experimental/package.json b/packages/query-broadcast-client-experimental/package.json index 6060e80075..77c0dc7df4 100644 --- a/packages/query-broadcast-client-experimental/package.json +++ b/packages/query-broadcast-client-experimental/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/query-broadcast-client-experimental", - "version": "5.51.1", + "version": "5.51.3", "description": "An experimental plugin to for broadcasting the state of your queryClient between browser tabs/windows", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/query-core/package.json b/packages/query-core/package.json index a1b6adb93a..4649ea7e85 100644 --- a/packages/query-core/package.json +++ b/packages/query-core/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/query-core", - "version": "5.51.1", + "version": "5.51.3", "description": "The framework agnostic core that powers TanStack Query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/query-persist-client-core/package.json b/packages/query-persist-client-core/package.json index 2ceb5ac923..f6250f28e4 100644 --- a/packages/query-persist-client-core/package.json +++ b/packages/query-persist-client-core/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/query-persist-client-core", - "version": "5.51.1", + "version": "5.51.3", "description": "Set of utilities for interacting with persisters, which can save your queryClient for later use", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/query-sync-storage-persister/package.json b/packages/query-sync-storage-persister/package.json index 4bd16ff255..83d762f35d 100644 --- a/packages/query-sync-storage-persister/package.json +++ b/packages/query-sync-storage-persister/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/query-sync-storage-persister", - "version": "5.51.1", + "version": "5.51.3", "description": "A persister for synchronous storages, to be used with TanStack/Query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/react-query-devtools/package.json b/packages/react-query-devtools/package.json index 9ae289d50e..be6e46847c 100644 --- a/packages/react-query-devtools/package.json +++ b/packages/react-query-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/react-query-devtools", - "version": "5.51.1", + "version": "5.51.3", "description": "Developer tools to interact with and visualize the TanStack/react-query cache", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/react-query-next-experimental/package.json b/packages/react-query-next-experimental/package.json index 0c0cccaee1..c2608f1997 100644 --- a/packages/react-query-next-experimental/package.json +++ b/packages/react-query-next-experimental/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/react-query-next-experimental", - "version": "5.51.1", + "version": "5.51.3", "description": "Hydration utils for React Query in the NextJs app directory", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/react-query-persist-client/package.json b/packages/react-query-persist-client/package.json index 9b8c2225cb..39a3b6f305 100644 --- a/packages/react-query-persist-client/package.json +++ b/packages/react-query-persist-client/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/react-query-persist-client", - "version": "5.51.1", + "version": "5.51.3", "description": "React bindings to work with persisters in TanStack/react-query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/react-query/package.json b/packages/react-query/package.json index b393fc07be..22de9621bb 100644 --- a/packages/react-query/package.json +++ b/packages/react-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/react-query", - "version": "5.51.1", + "version": "5.51.3", "description": "Hooks for managing, caching and syncing asynchronous and remote data in React", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/solid-query-devtools/package.json b/packages/solid-query-devtools/package.json index 0862ef2715..8be3db878b 100644 --- a/packages/solid-query-devtools/package.json +++ b/packages/solid-query-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/solid-query-devtools", - "version": "5.51.2", + "version": "5.51.3", "description": "Developer tools to interact with and visualize the TanStack/solid-query Query cache", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/solid-query-persist-client/package.json b/packages/solid-query-persist-client/package.json index eefc9164e2..c6e9a856b8 100644 --- a/packages/solid-query-persist-client/package.json +++ b/packages/solid-query-persist-client/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/solid-query-persist-client", - "version": "5.51.2", + "version": "5.51.3", "description": "Solid.js bindings to work with persisters in TanStack/solid-query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/solid-query/package.json b/packages/solid-query/package.json index 7040cb759f..c44a85142e 100644 --- a/packages/solid-query/package.json +++ b/packages/solid-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/solid-query", - "version": "5.51.2", + "version": "5.51.3", "description": "Primitives for managing, caching and syncing asynchronous and remote data in Solid", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/svelte-query-devtools/package.json b/packages/svelte-query-devtools/package.json index eb1c341d99..78012e1403 100644 --- a/packages/svelte-query-devtools/package.json +++ b/packages/svelte-query-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/svelte-query-devtools", - "version": "5.51.1", + "version": "5.51.3", "description": "Developer tools to interact with and visualize the TanStack/svelte-query cache", "author": "Lachlan Collins", "license": "MIT", diff --git a/packages/svelte-query-persist-client/package.json b/packages/svelte-query-persist-client/package.json index c3b0f5fdce..d82211da6c 100644 --- a/packages/svelte-query-persist-client/package.json +++ b/packages/svelte-query-persist-client/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/svelte-query-persist-client", - "version": "5.51.1", + "version": "5.51.3", "description": "Svelte bindings to work with persisters in TanStack/svelte-query", "author": "Lachlan Collins", "license": "MIT", diff --git a/packages/svelte-query/package.json b/packages/svelte-query/package.json index 917abff529..db6a8c7f99 100644 --- a/packages/svelte-query/package.json +++ b/packages/svelte-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/svelte-query", - "version": "5.51.1", + "version": "5.51.3", "description": "Primitives for managing, caching and syncing asynchronous and remote data in Svelte", "author": "Lachlan Collins", "license": "MIT", diff --git a/packages/vue-query-devtools/package.json b/packages/vue-query-devtools/package.json index 6de48633c6..536c7a462e 100644 --- a/packages/vue-query-devtools/package.json +++ b/packages/vue-query-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/vue-query-devtools", - "version": "5.51.1", + "version": "5.51.3", "description": "Developer tools to interact with and visualize the TanStack/vue-query cache", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/vue-query/package.json b/packages/vue-query/package.json index 19573f0567..4480be90a5 100644 --- a/packages/vue-query/package.json +++ b/packages/vue-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/vue-query", - "version": "5.51.1", + "version": "5.51.3", "description": "Hooks for managing, caching and syncing asynchronous and remote data in Vue", "author": "Damian Osipiuk", "license": "MIT", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6a99d8abcd..8cbb76ee53 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -151,7 +151,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/compiler@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(@angular/platform-browser@17.3.10(@angular/animations@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))) '@tanstack/angular-query-experimental': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/angular-query-experimental rxjs: specifier: ^7.8.1 @@ -173,7 +173,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/compiler@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(typescript@5.3.3) '@tanstack/angular-query-devtools-experimental': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/angular-query-devtools-experimental typescript: specifier: 5.3.3 @@ -197,7 +197,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/compiler@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(@angular/platform-browser@17.3.10(@angular/animations@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))) '@tanstack/angular-query-experimental': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/angular-query-experimental rxjs: specifier: ^7.8.1 @@ -219,7 +219,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/compiler@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(typescript@5.3.3) '@tanstack/angular-query-devtools-experimental': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/angular-query-devtools-experimental typescript: specifier: 5.3.3 @@ -246,7 +246,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(@angular/platform-browser@17.3.10(@angular/animations@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(rxjs@7.8.1) '@tanstack/angular-query-experimental': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/angular-query-experimental rxjs: specifier: ^7.8.1 @@ -268,7 +268,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/compiler@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(typescript@5.3.3) '@tanstack/angular-query-devtools-experimental': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/angular-query-devtools-experimental typescript: specifier: 5.3.3 @@ -295,7 +295,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(@angular/platform-browser@17.3.10(@angular/animations@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(rxjs@7.8.1) '@tanstack/angular-query-experimental': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/angular-query-experimental rxjs: specifier: ^7.8.1 @@ -317,7 +317,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/compiler@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(typescript@5.3.3) '@tanstack/angular-query-devtools-experimental': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/angular-query-devtools-experimental typescript: specifier: 5.3.3 @@ -332,10 +332,10 @@ importers: specifier: 4.23.3 version: 4.23.3 '@tanstack/react-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query-devtools algoliasearch: specifier: 4.23.3 @@ -369,10 +369,10 @@ importers: examples/react/auto-refetching: dependencies: '@tanstack/react-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query-devtools next: specifier: ^14.2.4 @@ -397,16 +397,16 @@ importers: examples/react/basic: dependencies: '@tanstack/query-sync-storage-persister': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/query-sync-storage-persister '@tanstack/react-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query-devtools '@tanstack/react-query-persist-client': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query-persist-client react: specifier: 19.0.0-rc-4c2e457c7c-20240522 @@ -440,10 +440,10 @@ importers: examples/react/basic-graphql-request: dependencies: '@tanstack/react-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query-devtools graphql: specifier: ^16.8.1 @@ -468,10 +468,10 @@ importers: examples/react/default-query-function: dependencies: '@tanstack/react-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query-devtools react: specifier: 19.0.0-rc-4c2e457c7c-20240522 @@ -493,10 +493,10 @@ importers: examples/react/infinite-query-with-max-pages: dependencies: '@tanstack/react-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query-devtools next: specifier: ^14.2.4 @@ -521,10 +521,10 @@ importers: examples/react/load-more-infinite-scroll: dependencies: '@tanstack/react-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query-devtools next: specifier: ^14.2.4 @@ -552,10 +552,10 @@ importers: examples/react/nextjs: dependencies: '@tanstack/react-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query-devtools next: specifier: ^14.2.4 @@ -580,10 +580,10 @@ importers: examples/react/nextjs-app-prefetching: dependencies: '@tanstack/react-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query-devtools next: specifier: ^15.0.0-rc.0 @@ -608,13 +608,13 @@ importers: examples/react/nextjs-suspense-streaming: dependencies: '@tanstack/react-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query-devtools '@tanstack/react-query-next-experimental': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query-next-experimental next: specifier: ^14.2.4 @@ -636,19 +636,19 @@ importers: examples/react/offline: dependencies: '@tanstack/query-sync-storage-persister': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/query-sync-storage-persister '@tanstack/react-location': specifier: ^3.7.4 version: 3.7.4(react-dom@19.0.0-rc-4c2e457c7c-20240522(react@19.0.0-rc-4c2e457c7c-20240522))(react@19.0.0-rc-4c2e457c7c-20240522) '@tanstack/react-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query-devtools '@tanstack/react-query-persist-client': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query-persist-client msw: specifier: ^2.3.0 @@ -676,10 +676,10 @@ importers: examples/react/optimistic-updates-cache: dependencies: '@tanstack/react-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query-devtools next: specifier: ^14.2.4 @@ -704,10 +704,10 @@ importers: examples/react/optimistic-updates-ui: dependencies: '@tanstack/react-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query-devtools next: specifier: ^14.2.4 @@ -732,10 +732,10 @@ importers: examples/react/pagination: dependencies: '@tanstack/react-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query-devtools next: specifier: ^14.2.4 @@ -760,10 +760,10 @@ importers: examples/react/playground: dependencies: '@tanstack/react-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query-devtools react: specifier: 19.0.0-rc-4c2e457c7c-20240522 @@ -785,10 +785,10 @@ importers: examples/react/prefetching: dependencies: '@tanstack/react-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query-devtools next: specifier: ^14.2.4 @@ -822,10 +822,10 @@ importers: specifier: ^6.3.16 version: 6.3.16(yri22tnekttmcucjv33ecr33bu) '@tanstack/react-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query-devtools expo: specifier: ^51.0.8 @@ -874,10 +874,10 @@ importers: examples/react/react-router: dependencies: '@tanstack/react-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query-devtools localforage: specifier: ^1.10.0 @@ -938,10 +938,10 @@ importers: specifier: ^5.15.18 version: 5.15.18(react@19.0.0-rc-4c2e457c7c-20240522)(types-react@19.0.0-rc.1) '@tanstack/react-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query-devtools react: specifier: 19.0.0-rc-4c2e457c7c-20240522 @@ -969,10 +969,10 @@ importers: examples/react/shadow-dom: dependencies: '@tanstack/react-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query-devtools react: specifier: 19.0.0-rc-4c2e457c7c-20240522 @@ -1015,10 +1015,10 @@ importers: examples/react/simple: dependencies: '@tanstack/react-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query-devtools react: specifier: 19.0.0-rc-4c2e457c7c-20240522 @@ -1052,10 +1052,10 @@ importers: specifier: ^5.15.18 version: 5.15.18(react@19.0.0-rc-4c2e457c7c-20240522)(types-react@19.0.0-rc.1) '@tanstack/react-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query-devtools react: specifier: 19.0.0-rc-4c2e457c7c-20240522 @@ -1083,10 +1083,10 @@ importers: examples/react/suspense: dependencies: '@tanstack/react-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/react-query-devtools font-awesome: specifier: ^4.7.0 @@ -1129,10 +1129,10 @@ importers: specifier: ^7.6.0 version: 7.6.0(astro@4.9.1(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)(typescript@5.3.3))(encoding@0.1.13)(next@14.2.4(@babel/core@7.24.6)(react-dom@19.0.0-rc-4c2e457c7c-20240522(react@19.0.0-rc-4c2e457c7c-20240522))(react@18.3.1)(sass@1.71.1))(react@18.3.1) '@tanstack/solid-query': - specifier: ^5.51.2 + specifier: ^5.51.3 version: link:../../../packages/solid-query '@tanstack/solid-query-devtools': - specifier: ^5.51.2 + specifier: ^5.51.3 version: link:../../../packages/solid-query-devtools astro: specifier: ^4.8.6 @@ -1150,10 +1150,10 @@ importers: examples/solid/basic: dependencies: '@tanstack/solid-query': - specifier: ^5.51.2 + specifier: ^5.51.3 version: link:../../../packages/solid-query '@tanstack/solid-query-devtools': - specifier: ^5.51.2 + specifier: ^5.51.3 version: link:../../../packages/solid-query-devtools solid-js: specifier: ^1.8.17 @@ -1172,10 +1172,10 @@ importers: examples/solid/basic-graphql-request: dependencies: '@tanstack/solid-query': - specifier: ^5.51.2 + specifier: ^5.51.3 version: link:../../../packages/solid-query '@tanstack/solid-query-devtools': - specifier: ^5.51.2 + specifier: ^5.51.3 version: link:../../../packages/solid-query-devtools graphql: specifier: ^16.8.1 @@ -1200,10 +1200,10 @@ importers: examples/solid/default-query-function: dependencies: '@tanstack/solid-query': - specifier: ^5.51.2 + specifier: ^5.51.3 version: link:../../../packages/solid-query '@tanstack/solid-query-devtools': - specifier: ^5.51.2 + specifier: ^5.51.3 version: link:../../../packages/solid-query-devtools solid-js: specifier: ^1.8.17 @@ -1222,10 +1222,10 @@ importers: examples/solid/simple: dependencies: '@tanstack/solid-query': - specifier: ^5.51.2 + specifier: ^5.51.3 version: link:../../../packages/solid-query '@tanstack/solid-query-devtools': - specifier: ^5.51.2 + specifier: ^5.51.3 version: link:../../../packages/solid-query-devtools solid-js: specifier: ^1.8.17 @@ -1256,10 +1256,10 @@ importers: specifier: ^1.0.0-rc.1 version: 1.0.0(@testing-library/jest-dom@6.4.6(vitest@2.0.3(@types/node@20.14.10)(jsdom@24.1.0)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(rollup@4.14.1)(solid-js@1.8.17)(vinxi@0.3.11(@types/node@20.14.10)(idb-keyval@6.2.1)(ioredis@5.3.2)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) '@tanstack/solid-query': - specifier: ^5.51.2 + specifier: ^5.51.3 version: link:../../../packages/solid-query '@tanstack/solid-query-devtools': - specifier: ^5.51.2 + specifier: ^5.51.3 version: link:../../../packages/solid-query-devtools solid-js: specifier: ^1.8.17 @@ -1271,10 +1271,10 @@ importers: examples/svelte/auto-refetching: dependencies: '@tanstack/svelte-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1302,10 +1302,10 @@ importers: examples/svelte/basic: dependencies: '@tanstack/svelte-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1333,10 +1333,10 @@ importers: examples/svelte/load-more-infinite-scroll: dependencies: '@tanstack/svelte-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1364,10 +1364,10 @@ importers: examples/svelte/optimistic-updates-typescript: dependencies: '@tanstack/svelte-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1395,10 +1395,10 @@ importers: examples/svelte/playground: dependencies: '@tanstack/svelte-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1426,10 +1426,10 @@ importers: examples/svelte/simple: dependencies: '@tanstack/svelte-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/vite-plugin-svelte': @@ -1454,10 +1454,10 @@ importers: examples/svelte/ssr: dependencies: '@tanstack/svelte-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1485,10 +1485,10 @@ importers: examples/svelte/star-wars: dependencies: '@tanstack/svelte-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1525,10 +1525,10 @@ importers: examples/vue/basic: dependencies: '@tanstack/vue-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/vue-query '@tanstack/vue-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/vue-query-devtools vue: specifier: ^3.4.27 @@ -1547,7 +1547,7 @@ importers: examples/vue/dependent-queries: dependencies: '@tanstack/vue-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/vue-query vue: specifier: ^3.4.27 @@ -1566,16 +1566,16 @@ importers: examples/vue/persister: dependencies: '@tanstack/query-core': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/query-core '@tanstack/query-persist-client-core': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/query-persist-client-core '@tanstack/query-sync-storage-persister': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/query-sync-storage-persister '@tanstack/vue-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/vue-query idb-keyval: specifier: ^6.2.1 @@ -1597,10 +1597,10 @@ importers: examples/vue/simple: dependencies: '@tanstack/vue-query': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/vue-query '@tanstack/vue-query-devtools': - specifier: ^5.51.1 + specifier: ^5.51.3 version: link:../../../packages/vue-query-devtools vue: specifier: ^3.4.27 From 95d814afdab934f36ea463861802c48308ceb963 Mon Sep 17 00:00:00 2001 From: MinhoPark Date: Wed, 17 Jul 2024 18:49:46 +0900 Subject: [PATCH 4/8] chore(utils): Ensure consistent declaration style of utility functions and standardize parameters for the sleep method (#7554) * refactor: Changed parameter names to match those in other sleep utility functions. * refactor: Most utility functions are defined as regular functions, updated this one to match. * fix: formatting --- packages/query-core/src/__tests__/utils.ts | 4 ++-- packages/query-core/src/utils.ts | 8 ++++---- packages/query-persist-client-core/src/__tests__/utils.ts | 4 ++-- packages/react-query/src/__tests__/utils.tsx | 4 ++-- packages/solid-query/src/__tests__/utils.tsx | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/query-core/src/__tests__/utils.ts b/packages/query-core/src/__tests__/utils.ts index 1beace1bde..8d876afc3c 100644 --- a/packages/query-core/src/__tests__/utils.ts +++ b/packages/query-core/src/__tests__/utils.ts @@ -32,11 +32,11 @@ export function sleep(timeout: number): Promise { }) } -export const executeMutation = ( +export function executeMutation( queryClient: QueryClient, options: MutationOptions, variables: TVariables, -) => { +) { return queryClient .getMutationCache() .build(queryClient, options) diff --git a/packages/query-core/src/utils.ts b/packages/query-core/src/utils.ts index 8b498ae1e4..f84fdcd775 100644 --- a/packages/query-core/src/utils.ts +++ b/packages/query-core/src/utils.ts @@ -340,9 +340,9 @@ function hasObjectPrototype(o: any): boolean { return Object.prototype.toString.call(o) === '[object Object]' } -export function sleep(ms: number): Promise { +export function sleep(timeout: number): Promise { return new Promise((resolve) => { - setTimeout(resolve, ms) + setTimeout(resolve, timeout) }) } @@ -378,7 +378,7 @@ export function addToStart(items: Array, item: T, max = 0): Array { export const skipToken = Symbol() export type SkipToken = typeof skipToken -export const ensureQueryFn = < +export function ensureQueryFn< TQueryFnData = unknown, TQueryKey extends QueryKey = QueryKey, >( @@ -387,7 +387,7 @@ export const ensureQueryFn = < queryHash?: string }, fetchOptions?: FetchOptions, -): QueryFunction => { +): QueryFunction { if (process.env.NODE_ENV !== 'production') { if (options.queryFn === skipToken) { console.error( diff --git a/packages/query-persist-client-core/src/__tests__/utils.ts b/packages/query-persist-client-core/src/__tests__/utils.ts index 7f05c27545..d633cf7268 100644 --- a/packages/query-persist-client-core/src/__tests__/utils.ts +++ b/packages/query-persist-client-core/src/__tests__/utils.ts @@ -13,7 +13,7 @@ export function sleep(timeout: number): Promise { }) } -export const createMockPersister = (): Persister => { +export function createMockPersister(): Persister { let storedState: PersistedClient | undefined return { @@ -30,7 +30,7 @@ export const createMockPersister = (): Persister => { } } -export const createSpyPersister = (): Persister => { +export function createSpyPersister(): Persister { return { persistClient: vi.fn(), restoreClient: vi.fn(), diff --git a/packages/react-query/src/__tests__/utils.tsx b/packages/react-query/src/__tests__/utils.tsx index 4544c39a3c..7e25177768 100644 --- a/packages/react-query/src/__tests__/utils.tsx +++ b/packages/react-query/src/__tests__/utils.tsx @@ -22,13 +22,13 @@ export function renderWithClient( } as any } -export const Blink = ({ +export function Blink({ duration, children, }: { duration: number children: React.ReactNode -}) => { +}) { const [shouldShow, setShouldShow] = React.useState(true) React.useEffect(() => { diff --git a/packages/solid-query/src/__tests__/utils.tsx b/packages/solid-query/src/__tests__/utils.tsx index 7cfaff843f..98bd80b57e 100644 --- a/packages/solid-query/src/__tests__/utils.tsx +++ b/packages/solid-query/src/__tests__/utils.tsx @@ -12,11 +12,11 @@ export function queryKey() { return [`query_${queryKeyCount}`] } -export const Blink = ( +export function Blink( props: { duration: number } & ParentProps, -) => { +) { const [shouldShow, setShouldShow] = createSignal(true) createEffect(() => { From a1ce3c4ad7024156acad5d05f08d6767459219d1 Mon Sep 17 00:00:00 2001 From: Ryan Miller Date: Wed, 17 Jul 2024 19:53:10 +1000 Subject: [PATCH 5/8] docs: Update Streaming with Server Components docs to reflect correct usage (#7725) * chore: update Streaming with Server Components docs to reflect correct usage * chore: update Streaming with Server Components to show moving the getQueryClient function * chore: fix prettier styling --------- Co-authored-by: Dominik Dorfmeister --- docs/framework/react/guides/advanced-ssr.md | 30 +++++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/docs/framework/react/guides/advanced-ssr.md b/docs/framework/react/guides/advanced-ssr.md index 10ac86c69c..bbbac63208 100644 --- a/docs/framework/react/guides/advanced-ssr.md +++ b/docs/framework/react/guides/advanced-ssr.md @@ -365,7 +365,9 @@ With the prefetching patterns described above, React Query is perfectly compatib As of React Query v5.40.0, you don't have to `await` all prefetches for this to work, as `pending` Queries can also be dehydrated and sent to the client. This lets you kick off prefetches as early as possible without letting them block an entire Suspense boundary, and streams the _data_ to the client as the query finishes. This can be useful for example if you want to prefetch some content that is only visible after some user interaction, or say if you want to `await` and render the first page of an infinite query, but start prefetching page 2 without blocking rendering. -To make this work, we have to instruct the `queryClient` to also `dehydrate` pending Queries. We can do this globally, or by passing that option directly to `hydrate`: +To make this work, we have to instruct the `queryClient` to also `dehydrate` pending Queries. We can do this globally, or by passing that option directly to `hydrate`. + +We will also need to move the `getQueryClient()` function out of our `app/providers.jsx` file as we want to use it in our server component and our client provider. ```tsx // app/get-query-client.ts @@ -378,8 +380,7 @@ function makeQueryClient() { staleTime: 60 * 1000, }, dehydrate: { - // per default, only successful Queries are included, - // this includes pending Queries as well + // include pending queries in dehydration shouldDehydrateQuery: (query) => defaultShouldDehydrateQuery(query) || query.state.status === 'pending', @@ -387,6 +388,22 @@ function makeQueryClient() { }, }) } + +let browserQueryClient: QueryClient | undefined = undefined + +export function getQueryClient() { + if (isServer) { + // Server: always make a new query client + return makeQueryClient() + } else { + // Browser: make a new query client if we don't already have one + // This is very important, so we don't re-make a new client if React + // suspends during the initial render. This may not be needed if we + // have a suspense boundary BELOW the creation of the query client + if (!browserQueryClient) browserQueryClient = makeQueryClient() + return browserQueryClient + } +} ``` > Note: This works in NextJs and Server Components because React can serialize Promises over the wire when you pass them down to Client Components. @@ -439,7 +456,7 @@ If you're using non-JSON data types and serialize the query results on the serve import { QueryClient, defaultShouldDehydrateQuery } from '@tanstack/react-query' import { deserialize, serialize } from './transformer' -export function makeQueryClient() { +function makeQueryClient() { return new QueryClient({ defaultOptions: { // ... @@ -452,6 +469,8 @@ export function makeQueryClient() { }, }) } + +// ... ``` ```tsx @@ -461,11 +480,12 @@ import { HydrationBoundary, QueryClient, } from '@tanstack/react-query' +import { getQueryClient } from './get-query-client' import { serialize } from './transformer' import Posts from './posts' export default function PostsPage() { - const queryClient = new QueryClient() + const queryClient = getQueryClient() // look ma, no await queryClient.prefetchQuery({ From 7edf587418b0dcc240c5a5be22e626b01b4c7cd1 Mon Sep 17 00:00:00 2001 From: Dominik Dorfmeister Date: Wed, 17 Jul 2024 13:09:00 +0200 Subject: [PATCH 6/8] fix(core): do not invoke getNextPageParam or getPreviousPageParam if there is we have empty pages in the cache (#7743) --- .../__tests__/infiniteQueryObserver.test.tsx | 35 +++++++++++++++++++ .../query-core/src/infiniteQueryBehavior.ts | 23 ++++++------ 2 files changed, 46 insertions(+), 12 deletions(-) diff --git a/packages/query-core/src/__tests__/infiniteQueryObserver.test.tsx b/packages/query-core/src/__tests__/infiniteQueryObserver.test.tsx index cdc0049ee8..334e3a5550 100644 --- a/packages/query-core/src/__tests__/infiniteQueryObserver.test.tsx +++ b/packages/query-core/src/__tests__/infiniteQueryObserver.test.tsx @@ -103,6 +103,41 @@ describe('InfiniteQueryObserver', () => { expect(all).toEqual(['next0', 'next0,1', 'prev0,1']) }) + test('should not invoke getNextPageParam and getPreviousPageParam on empty pages', async () => { + const key = queryKey() + + const getNextPageParam = vi.fn() + const getPreviousPageParam = vi.fn() + + const observer = new InfiniteQueryObserver(queryClient, { + queryKey: key, + queryFn: ({ pageParam }) => String(pageParam), + initialPageParam: 1, + getNextPageParam: getNextPageParam.mockImplementation( + (_, __, lastPageParam) => { + return lastPageParam + 1 + }, + ), + getPreviousPageParam: getPreviousPageParam.mockImplementation( + (_, __, firstPageParam) => { + return firstPageParam - 1 + }, + ), + }) + + const unsubscribe = observer.subscribe(() => {}) + + getNextPageParam.mockClear() + getPreviousPageParam.mockClear() + + queryClient.setQueryData(key, { pages: [], pageParams: [] }) + + expect(getNextPageParam).toHaveBeenCalledTimes(0) + expect(getPreviousPageParam).toHaveBeenCalledTimes(0) + + unsubscribe() + }) + test('should stop refetching if undefined is returned from getNextPageParam', async () => { const key = queryKey() let next: number | undefined = 2 diff --git a/packages/query-core/src/infiniteQueryBehavior.ts b/packages/query-core/src/infiniteQueryBehavior.ts index 57bcfa2312..90bf8af2a4 100644 --- a/packages/query-core/src/infiniteQueryBehavior.ts +++ b/packages/query-core/src/infiniteQueryBehavior.ts @@ -133,24 +133,23 @@ function getNextPageParam( { pages, pageParams }: InfiniteData, ): unknown | undefined { const lastIndex = pages.length - 1 - return options.getNextPageParam( - pages[lastIndex], - pages, - pageParams[lastIndex], - pageParams, - ) + return pages.length > 0 + ? options.getNextPageParam( + pages[lastIndex], + pages, + pageParams[lastIndex], + pageParams, + ) + : undefined } function getPreviousPageParam( options: InfiniteQueryPageParamsOptions, { pages, pageParams }: InfiniteData, ): unknown | undefined { - return options.getPreviousPageParam?.( - pages[0], - pages, - pageParams[0], - pageParams, - ) + return pages.length > 0 + ? options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams) + : undefined } /** From 5c50ca730eae9888c107965d643a175c8c63ac64 Mon Sep 17 00:00:00 2001 From: Tanner Linsley Date: Wed, 17 Jul 2024 11:11:07 +0000 Subject: [PATCH 7/8] release: v5.51.4 --- examples/angular/basic/package.json | 4 +- .../package.json | 4 +- examples/angular/router/package.json | 4 +- examples/angular/simple/package.json | 4 +- examples/react/algolia/package.json | 4 +- examples/react/auto-refetching/package.json | 4 +- .../react/basic-graphql-request/package.json | 4 +- examples/react/basic/package.json | 8 +- .../react/default-query-function/package.json | 4 +- .../package.json | 4 +- .../load-more-infinite-scroll/package.json | 4 +- .../react/nextjs-app-prefetching/package.json | 4 +- .../nextjs-suspense-streaming/package.json | 6 +- examples/react/nextjs/package.json | 4 +- examples/react/offline/package.json | 8 +- .../optimistic-updates-cache/package.json | 4 +- .../react/optimistic-updates-ui/package.json | 4 +- examples/react/pagination/package.json | 4 +- examples/react/playground/package.json | 4 +- examples/react/prefetching/package.json | 4 +- examples/react/react-native/package.json | 4 +- examples/react/react-router/package.json | 4 +- examples/react/rick-morty/package.json | 4 +- examples/react/shadow-dom/package.json | 4 +- examples/react/simple/package.json | 4 +- examples/react/star-wars/package.json | 4 +- examples/react/suspense/package.json | 4 +- examples/solid/astro/package.json | 4 +- .../solid/basic-graphql-request/package.json | 4 +- examples/solid/basic/package.json | 4 +- .../solid/default-query-function/package.json | 4 +- examples/solid/simple/package.json | 4 +- .../solid/solid-start-streaming/package.json | 4 +- examples/svelte/auto-refetching/package.json | 4 +- examples/svelte/basic/package.json | 4 +- .../load-more-infinite-scroll/package.json | 4 +- .../package.json | 4 +- examples/svelte/playground/package.json | 4 +- examples/svelte/simple/package.json | 4 +- examples/svelte/ssr/package.json | 4 +- examples/svelte/star-wars/package.json | 4 +- examples/vue/2.6-basic/package.json | 2 +- examples/vue/2.7-basic/package.json | 2 +- examples/vue/basic/package.json | 4 +- examples/vue/dependent-queries/package.json | 2 +- examples/vue/nuxt3/package.json | 2 +- examples/vue/persister/package.json | 8 +- examples/vue/simple/package.json | 4 +- .../package.json | 2 +- .../angular-query-experimental/package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- packages/query-core/package.json | 2 +- .../query-persist-client-core/package.json | 2 +- .../query-sync-storage-persister/package.json | 2 +- packages/react-query-devtools/package.json | 2 +- .../package.json | 2 +- .../react-query-persist-client/package.json | 2 +- packages/react-query/package.json | 2 +- packages/solid-query-devtools/package.json | 2 +- .../solid-query-persist-client/package.json | 2 +- packages/solid-query/package.json | 2 +- packages/svelte-query-devtools/package.json | 2 +- .../svelte-query-persist-client/package.json | 2 +- packages/svelte-query/package.json | 2 +- packages/vue-query-devtools/package.json | 2 +- packages/vue-query/package.json | 2 +- pnpm-lock.yaml | 192 +++++++++--------- 68 files changed, 214 insertions(+), 214 deletions(-) diff --git a/examples/angular/basic/package.json b/examples/angular/basic/package.json index 5c1a213d12..199cdfc637 100644 --- a/examples/angular/basic/package.json +++ b/examples/angular/basic/package.json @@ -14,7 +14,7 @@ "@angular/core": "^17.3.10", "@angular/platform-browser": "^17.3.10", "@angular/platform-browser-dynamic": "^17.3.10", - "@tanstack/angular-query-experimental": "^5.51.3", + "@tanstack/angular-query-experimental": "^5.51.4", "rxjs": "^7.8.1", "tslib": "^2.6.2", "zone.js": "^0.14.6" @@ -23,7 +23,7 @@ "@angular-devkit/build-angular": "^17.3.8", "@angular/cli": "^17.3.8", "@angular/compiler-cli": "^17.3.10", - "@tanstack/angular-query-devtools-experimental": "^5.51.3", + "@tanstack/angular-query-devtools-experimental": "^5.51.4", "typescript": "5.3.3" } } diff --git a/examples/angular/infinite-query-with-max-pages/package.json b/examples/angular/infinite-query-with-max-pages/package.json index 1f996c4322..1da442fd94 100644 --- a/examples/angular/infinite-query-with-max-pages/package.json +++ b/examples/angular/infinite-query-with-max-pages/package.json @@ -14,7 +14,7 @@ "@angular/core": "^17.3.10", "@angular/platform-browser": "^17.3.10", "@angular/platform-browser-dynamic": "^17.3.10", - "@tanstack/angular-query-experimental": "^5.51.3", + "@tanstack/angular-query-experimental": "^5.51.4", "rxjs": "^7.8.1", "tslib": "^2.6.2", "zone.js": "^0.14.6" @@ -23,7 +23,7 @@ "@angular-devkit/build-angular": "^17.3.8", "@angular/cli": "^17.3.8", "@angular/compiler-cli": "^17.3.10", - "@tanstack/angular-query-devtools-experimental": "^5.51.3", + "@tanstack/angular-query-devtools-experimental": "^5.51.4", "typescript": "5.3.3" } } diff --git a/examples/angular/router/package.json b/examples/angular/router/package.json index d3bab0077f..4e599dc635 100644 --- a/examples/angular/router/package.json +++ b/examples/angular/router/package.json @@ -15,7 +15,7 @@ "@angular/platform-browser": "^17.3.10", "@angular/platform-browser-dynamic": "^17.3.10", "@angular/router": "^17.3.10", - "@tanstack/angular-query-experimental": "^5.51.3", + "@tanstack/angular-query-experimental": "^5.51.4", "rxjs": "^7.8.1", "tslib": "^2.6.2", "zone.js": "^0.14.6" @@ -24,7 +24,7 @@ "@angular-devkit/build-angular": "^17.3.8", "@angular/cli": "^17.3.8", "@angular/compiler-cli": "^17.3.10", - "@tanstack/angular-query-devtools-experimental": "^5.51.3", + "@tanstack/angular-query-devtools-experimental": "^5.51.4", "typescript": "5.3.3" } } diff --git a/examples/angular/simple/package.json b/examples/angular/simple/package.json index 680ec29941..44cb75aed6 100644 --- a/examples/angular/simple/package.json +++ b/examples/angular/simple/package.json @@ -15,7 +15,7 @@ "@angular/platform-browser": "^17.3.10", "@angular/platform-browser-dynamic": "^17.3.10", "@angular/router": "^17.3.10", - "@tanstack/angular-query-experimental": "^5.51.3", + "@tanstack/angular-query-experimental": "^5.51.4", "rxjs": "^7.8.1", "tslib": "^2.6.2", "zone.js": "^0.14.6" @@ -24,7 +24,7 @@ "@angular-devkit/build-angular": "^17.3.8", "@angular/cli": "^17.3.8", "@angular/compiler-cli": "^17.3.10", - "@tanstack/angular-query-devtools-experimental": "^5.51.3", + "@tanstack/angular-query-devtools-experimental": "^5.51.4", "typescript": "5.3.3" } } diff --git a/examples/react/algolia/package.json b/examples/react/algolia/package.json index 4e04ca35ff..3ed09724f9 100644 --- a/examples/react/algolia/package.json +++ b/examples/react/algolia/package.json @@ -11,8 +11,8 @@ "dependencies": { "@algolia/client-search": "4.23.3", "@algolia/transporter": "4.23.3", - "@tanstack/react-query": "^5.51.3", - "@tanstack/react-query-devtools": "^5.51.3", + "@tanstack/react-query": "^5.51.4", + "@tanstack/react-query-devtools": "^5.51.4", "algoliasearch": "4.23.3", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522" diff --git a/examples/react/auto-refetching/package.json b/examples/react/auto-refetching/package.json index 1a30f476da..cb56b082e3 100644 --- a/examples/react/auto-refetching/package.json +++ b/examples/react/auto-refetching/package.json @@ -8,8 +8,8 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.51.3", - "@tanstack/react-query-devtools": "^5.51.3", + "@tanstack/react-query": "^5.51.4", + "@tanstack/react-query-devtools": "^5.51.4", "next": "^14.2.4", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/examples/react/basic-graphql-request/package.json b/examples/react/basic-graphql-request/package.json index 9909b4281a..065567683a 100644 --- a/examples/react/basic-graphql-request/package.json +++ b/examples/react/basic-graphql-request/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.51.3", - "@tanstack/react-query-devtools": "^5.51.3", + "@tanstack/react-query": "^5.51.4", + "@tanstack/react-query-devtools": "^5.51.4", "graphql": "^16.8.1", "graphql-request": "^7.0.1", "react": "19.0.0-rc-4c2e457c7c-20240522", diff --git a/examples/react/basic/package.json b/examples/react/basic/package.json index 11cac7cdfa..7e6bd61fd4 100644 --- a/examples/react/basic/package.json +++ b/examples/react/basic/package.json @@ -9,10 +9,10 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/query-sync-storage-persister": "^5.51.3", - "@tanstack/react-query": "^5.51.3", - "@tanstack/react-query-devtools": "^5.51.3", - "@tanstack/react-query-persist-client": "^5.51.3", + "@tanstack/query-sync-storage-persister": "^5.51.4", + "@tanstack/react-query": "^5.51.4", + "@tanstack/react-query-devtools": "^5.51.4", + "@tanstack/react-query-persist-client": "^5.51.4", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522" }, diff --git a/examples/react/default-query-function/package.json b/examples/react/default-query-function/package.json index d8663e58a2..97cb35b4f7 100644 --- a/examples/react/default-query-function/package.json +++ b/examples/react/default-query-function/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.51.3", - "@tanstack/react-query-devtools": "^5.51.3", + "@tanstack/react-query": "^5.51.4", + "@tanstack/react-query-devtools": "^5.51.4", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522" }, diff --git a/examples/react/infinite-query-with-max-pages/package.json b/examples/react/infinite-query-with-max-pages/package.json index 7ac1c95f14..8946a56dc9 100644 --- a/examples/react/infinite-query-with-max-pages/package.json +++ b/examples/react/infinite-query-with-max-pages/package.json @@ -8,8 +8,8 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.51.3", - "@tanstack/react-query-devtools": "^5.51.3", + "@tanstack/react-query": "^5.51.4", + "@tanstack/react-query-devtools": "^5.51.4", "next": "^14.2.4", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/examples/react/load-more-infinite-scroll/package.json b/examples/react/load-more-infinite-scroll/package.json index 4cf12171ed..04fd7cf6ee 100644 --- a/examples/react/load-more-infinite-scroll/package.json +++ b/examples/react/load-more-infinite-scroll/package.json @@ -8,8 +8,8 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.51.3", - "@tanstack/react-query-devtools": "^5.51.3", + "@tanstack/react-query": "^5.51.4", + "@tanstack/react-query-devtools": "^5.51.4", "next": "^14.2.4", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/examples/react/nextjs-app-prefetching/package.json b/examples/react/nextjs-app-prefetching/package.json index 7f5dcf91c7..b9319338ad 100644 --- a/examples/react/nextjs-app-prefetching/package.json +++ b/examples/react/nextjs-app-prefetching/package.json @@ -9,8 +9,8 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/react-query": "^5.51.3", - "@tanstack/react-query-devtools": "^5.51.3", + "@tanstack/react-query": "^5.51.4", + "@tanstack/react-query-devtools": "^5.51.4", "next": "^15.0.0-rc.0", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522" diff --git a/examples/react/nextjs-suspense-streaming/package.json b/examples/react/nextjs-suspense-streaming/package.json index 6dc2d187d2..c8c0b7abdc 100644 --- a/examples/react/nextjs-suspense-streaming/package.json +++ b/examples/react/nextjs-suspense-streaming/package.json @@ -9,9 +9,9 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/react-query": "^5.51.3", - "@tanstack/react-query-devtools": "^5.51.3", - "@tanstack/react-query-next-experimental": "^5.51.3", + "@tanstack/react-query": "^5.51.4", + "@tanstack/react-query-devtools": "^5.51.4", + "@tanstack/react-query-next-experimental": "^5.51.4", "next": "^14.2.4", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/examples/react/nextjs/package.json b/examples/react/nextjs/package.json index 8183d5dfcd..0753b99187 100644 --- a/examples/react/nextjs/package.json +++ b/examples/react/nextjs/package.json @@ -8,8 +8,8 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.51.3", - "@tanstack/react-query-devtools": "^5.51.3", + "@tanstack/react-query": "^5.51.4", + "@tanstack/react-query-devtools": "^5.51.4", "next": "^14.2.4", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/examples/react/offline/package.json b/examples/react/offline/package.json index 81a8acd5cf..f5ac9ce1f6 100644 --- a/examples/react/offline/package.json +++ b/examples/react/offline/package.json @@ -8,11 +8,11 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/query-sync-storage-persister": "^5.51.3", + "@tanstack/query-sync-storage-persister": "^5.51.4", "@tanstack/react-location": "^3.7.4", - "@tanstack/react-query": "^5.51.3", - "@tanstack/react-query-devtools": "^5.51.3", - "@tanstack/react-query-persist-client": "^5.51.3", + "@tanstack/react-query": "^5.51.4", + "@tanstack/react-query-devtools": "^5.51.4", + "@tanstack/react-query-persist-client": "^5.51.4", "msw": "^2.3.0", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522", diff --git a/examples/react/optimistic-updates-cache/package.json b/examples/react/optimistic-updates-cache/package.json index 28bad7e6d0..2998e933f6 100755 --- a/examples/react/optimistic-updates-cache/package.json +++ b/examples/react/optimistic-updates-cache/package.json @@ -9,8 +9,8 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/react-query": "^5.51.3", - "@tanstack/react-query-devtools": "^5.51.3", + "@tanstack/react-query": "^5.51.4", + "@tanstack/react-query-devtools": "^5.51.4", "next": "^14.2.4", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/examples/react/optimistic-updates-ui/package.json b/examples/react/optimistic-updates-ui/package.json index e6d35aa3d2..4b14a6996a 100755 --- a/examples/react/optimistic-updates-ui/package.json +++ b/examples/react/optimistic-updates-ui/package.json @@ -8,8 +8,8 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.51.3", - "@tanstack/react-query-devtools": "^5.51.3", + "@tanstack/react-query": "^5.51.4", + "@tanstack/react-query-devtools": "^5.51.4", "next": "^14.2.4", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/examples/react/pagination/package.json b/examples/react/pagination/package.json index c003b85a81..a5f5adb7be 100644 --- a/examples/react/pagination/package.json +++ b/examples/react/pagination/package.json @@ -8,8 +8,8 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.51.3", - "@tanstack/react-query-devtools": "^5.51.3", + "@tanstack/react-query": "^5.51.4", + "@tanstack/react-query-devtools": "^5.51.4", "next": "^14.2.4", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/examples/react/playground/package.json b/examples/react/playground/package.json index ceb2265579..0024afca4d 100644 --- a/examples/react/playground/package.json +++ b/examples/react/playground/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.51.3", - "@tanstack/react-query-devtools": "^5.51.3", + "@tanstack/react-query": "^5.51.4", + "@tanstack/react-query-devtools": "^5.51.4", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522" }, diff --git a/examples/react/prefetching/package.json b/examples/react/prefetching/package.json index 95d11d8735..2215b063cc 100644 --- a/examples/react/prefetching/package.json +++ b/examples/react/prefetching/package.json @@ -8,8 +8,8 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.51.3", - "@tanstack/react-query-devtools": "^5.51.3", + "@tanstack/react-query": "^5.51.4", + "@tanstack/react-query-devtools": "^5.51.4", "next": "^14.2.4", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/examples/react/react-native/package.json b/examples/react/react-native/package.json index baac3e3162..388bac5370 100644 --- a/examples/react/react-native/package.json +++ b/examples/react/react-native/package.json @@ -14,8 +14,8 @@ "@react-native-community/netinfo": "^11.3.1", "@react-navigation/native": "^6.1.6", "@react-navigation/stack": "^6.3.16", - "@tanstack/react-query": "^5.51.3", - "@tanstack/react-query-devtools": "^5.51.3", + "@tanstack/react-query": "^5.51.4", + "@tanstack/react-query-devtools": "^5.51.4", "expo": "^51.0.8", "expo-constants": "^16.0.1", "expo-status-bar": "^1.12.1", diff --git a/examples/react/react-router/package.json b/examples/react/react-router/package.json index de2fe41c26..964d0eafb2 100644 --- a/examples/react/react-router/package.json +++ b/examples/react/react-router/package.json @@ -9,8 +9,8 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/react-query": "^5.51.3", - "@tanstack/react-query-devtools": "^5.51.3", + "@tanstack/react-query": "^5.51.4", + "@tanstack/react-query-devtools": "^5.51.4", "localforage": "^1.10.0", "match-sorter": "^6.3.4", "react": "19.0.0-rc-4c2e457c7c-20240522", diff --git a/examples/react/rick-morty/package.json b/examples/react/rick-morty/package.json index 28e96b325f..a90399786f 100644 --- a/examples/react/rick-morty/package.json +++ b/examples/react/rick-morty/package.json @@ -12,8 +12,8 @@ "@emotion/styled": "^11.11.5", "@mui/material": "^5.15.18", "@mui/styles": "^5.15.18", - "@tanstack/react-query": "^5.51.3", - "@tanstack/react-query-devtools": "^5.51.3", + "@tanstack/react-query": "^5.51.4", + "@tanstack/react-query-devtools": "^5.51.4", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522", "react-router": "^6.23.1", diff --git a/examples/react/shadow-dom/package.json b/examples/react/shadow-dom/package.json index d134ec2135..58d5db45f4 100644 --- a/examples/react/shadow-dom/package.json +++ b/examples/react/shadow-dom/package.json @@ -9,8 +9,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.51.3", - "@tanstack/react-query-devtools": "^5.51.3", + "@tanstack/react-query": "^5.51.4", + "@tanstack/react-query-devtools": "^5.51.4", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522" }, diff --git a/examples/react/simple/package.json b/examples/react/simple/package.json index c38eca14c9..9c43f8a41b 100644 --- a/examples/react/simple/package.json +++ b/examples/react/simple/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.51.3", - "@tanstack/react-query-devtools": "^5.51.3", + "@tanstack/react-query": "^5.51.4", + "@tanstack/react-query-devtools": "^5.51.4", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522" }, diff --git a/examples/react/star-wars/package.json b/examples/react/star-wars/package.json index a2244834f0..6c1bbfbe3f 100644 --- a/examples/react/star-wars/package.json +++ b/examples/react/star-wars/package.json @@ -12,8 +12,8 @@ "@emotion/styled": "^11.11.5", "@mui/material": "^5.15.18", "@mui/styles": "^5.15.18", - "@tanstack/react-query": "^5.51.3", - "@tanstack/react-query-devtools": "^5.51.3", + "@tanstack/react-query": "^5.51.4", + "@tanstack/react-query-devtools": "^5.51.4", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522", "react-router": "^6.23.1", diff --git a/examples/react/suspense/package.json b/examples/react/suspense/package.json index ce447a320a..04743561ab 100644 --- a/examples/react/suspense/package.json +++ b/examples/react/suspense/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.51.3", - "@tanstack/react-query-devtools": "^5.51.3", + "@tanstack/react-query": "^5.51.4", + "@tanstack/react-query-devtools": "^5.51.4", "font-awesome": "^4.7.0", "react": "19.0.0-rc-4c2e457c7c-20240522", "react-dom": "19.0.0-rc-4c2e457c7c-20240522", diff --git a/examples/solid/astro/package.json b/examples/solid/astro/package.json index 67c828cd51..e70c60633c 100644 --- a/examples/solid/astro/package.json +++ b/examples/solid/astro/package.json @@ -15,8 +15,8 @@ "@astrojs/solid-js": "^4.2.0", "@astrojs/tailwind": "^5.1.0", "@astrojs/vercel": "^7.6.0", - "@tanstack/solid-query": "^5.51.3", - "@tanstack/solid-query-devtools": "^5.51.3", + "@tanstack/solid-query": "^5.51.4", + "@tanstack/solid-query-devtools": "^5.51.4", "astro": "^4.8.6", "solid-js": "^1.8.17", "tailwindcss": "^3.4.3", diff --git a/examples/solid/basic-graphql-request/package.json b/examples/solid/basic-graphql-request/package.json index b1fe7e2857..47582ca154 100644 --- a/examples/solid/basic-graphql-request/package.json +++ b/examples/solid/basic-graphql-request/package.json @@ -9,8 +9,8 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/solid-query": "^5.51.3", - "@tanstack/solid-query-devtools": "^5.51.3", + "@tanstack/solid-query": "^5.51.4", + "@tanstack/solid-query-devtools": "^5.51.4", "graphql": "^16.8.1", "graphql-request": "^7.0.1", "solid-js": "^1.8.17" diff --git a/examples/solid/basic/package.json b/examples/solid/basic/package.json index d3bdcb4202..9cb37fba06 100644 --- a/examples/solid/basic/package.json +++ b/examples/solid/basic/package.json @@ -9,8 +9,8 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/solid-query": "^5.51.3", - "@tanstack/solid-query-devtools": "^5.51.3", + "@tanstack/solid-query": "^5.51.4", + "@tanstack/solid-query-devtools": "^5.51.4", "solid-js": "^1.8.17" }, "devDependencies": { diff --git a/examples/solid/default-query-function/package.json b/examples/solid/default-query-function/package.json index a8d435f728..e5100392ef 100644 --- a/examples/solid/default-query-function/package.json +++ b/examples/solid/default-query-function/package.json @@ -9,8 +9,8 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/solid-query": "^5.51.3", - "@tanstack/solid-query-devtools": "^5.51.3", + "@tanstack/solid-query": "^5.51.4", + "@tanstack/solid-query-devtools": "^5.51.4", "solid-js": "^1.8.17" }, "devDependencies": { diff --git a/examples/solid/simple/package.json b/examples/solid/simple/package.json index cb54881e80..c778359be6 100644 --- a/examples/solid/simple/package.json +++ b/examples/solid/simple/package.json @@ -9,8 +9,8 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/solid-query": "^5.51.3", - "@tanstack/solid-query-devtools": "^5.51.3", + "@tanstack/solid-query": "^5.51.4", + "@tanstack/solid-query-devtools": "^5.51.4", "solid-js": "^1.8.17" }, "devDependencies": { diff --git a/examples/solid/solid-start-streaming/package.json b/examples/solid/solid-start-streaming/package.json index 203476e69a..07d02e3355 100644 --- a/examples/solid/solid-start-streaming/package.json +++ b/examples/solid/solid-start-streaming/package.json @@ -12,8 +12,8 @@ "@solidjs/meta": "^0.29.4", "@solidjs/router": "^0.13.3", "@solidjs/start": "^1.0.0-rc.1", - "@tanstack/solid-query": "^5.51.3", - "@tanstack/solid-query-devtools": "^5.51.3", + "@tanstack/solid-query": "^5.51.4", + "@tanstack/solid-query-devtools": "^5.51.4", "solid-js": "^1.8.17", "vinxi": "^0.3.10" }, diff --git a/examples/svelte/auto-refetching/package.json b/examples/svelte/auto-refetching/package.json index 6b5efe0f3d..32823519d0 100644 --- a/examples/svelte/auto-refetching/package.json +++ b/examples/svelte/auto-refetching/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.51.3", - "@tanstack/svelte-query-devtools": "^5.51.3" + "@tanstack/svelte-query": "^5.51.4", + "@tanstack/svelte-query-devtools": "^5.51.4" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.2", diff --git a/examples/svelte/basic/package.json b/examples/svelte/basic/package.json index 79bec7bf4d..ba8002d047 100644 --- a/examples/svelte/basic/package.json +++ b/examples/svelte/basic/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.51.3", - "@tanstack/svelte-query-devtools": "^5.51.3" + "@tanstack/svelte-query": "^5.51.4", + "@tanstack/svelte-query-devtools": "^5.51.4" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.2", diff --git a/examples/svelte/load-more-infinite-scroll/package.json b/examples/svelte/load-more-infinite-scroll/package.json index c628821356..e4816ddd0f 100644 --- a/examples/svelte/load-more-infinite-scroll/package.json +++ b/examples/svelte/load-more-infinite-scroll/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.51.3", - "@tanstack/svelte-query-devtools": "^5.51.3" + "@tanstack/svelte-query": "^5.51.4", + "@tanstack/svelte-query-devtools": "^5.51.4" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.2", diff --git a/examples/svelte/optimistic-updates-typescript/package.json b/examples/svelte/optimistic-updates-typescript/package.json index 0c2f3f263d..15dc1b7eb2 100644 --- a/examples/svelte/optimistic-updates-typescript/package.json +++ b/examples/svelte/optimistic-updates-typescript/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.51.3", - "@tanstack/svelte-query-devtools": "^5.51.3" + "@tanstack/svelte-query": "^5.51.4", + "@tanstack/svelte-query-devtools": "^5.51.4" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.2", diff --git a/examples/svelte/playground/package.json b/examples/svelte/playground/package.json index 749472ea06..342501e133 100644 --- a/examples/svelte/playground/package.json +++ b/examples/svelte/playground/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.51.3", - "@tanstack/svelte-query-devtools": "^5.51.3" + "@tanstack/svelte-query": "^5.51.4", + "@tanstack/svelte-query-devtools": "^5.51.4" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.2", diff --git a/examples/svelte/simple/package.json b/examples/svelte/simple/package.json index c985c8d118..837c7be087 100644 --- a/examples/svelte/simple/package.json +++ b/examples/svelte/simple/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.51.3", - "@tanstack/svelte-query-devtools": "^5.51.3" + "@tanstack/svelte-query": "^5.51.4", + "@tanstack/svelte-query-devtools": "^5.51.4" }, "devDependencies": { "@sveltejs/vite-plugin-svelte": "^3.1.0", diff --git a/examples/svelte/ssr/package.json b/examples/svelte/ssr/package.json index b73845c0df..518d5c299d 100644 --- a/examples/svelte/ssr/package.json +++ b/examples/svelte/ssr/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.51.3", - "@tanstack/svelte-query-devtools": "^5.51.3" + "@tanstack/svelte-query": "^5.51.4", + "@tanstack/svelte-query-devtools": "^5.51.4" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.2", diff --git a/examples/svelte/star-wars/package.json b/examples/svelte/star-wars/package.json index e4036d532b..9f76715d0f 100644 --- a/examples/svelte/star-wars/package.json +++ b/examples/svelte/star-wars/package.json @@ -9,8 +9,8 @@ "test:types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { - "@tanstack/svelte-query": "^5.51.3", - "@tanstack/svelte-query-devtools": "^5.51.3" + "@tanstack/svelte-query": "^5.51.4", + "@tanstack/svelte-query-devtools": "^5.51.4" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.2", diff --git a/examples/vue/2.6-basic/package.json b/examples/vue/2.6-basic/package.json index 1b3cb77d7b..97537b91e2 100644 --- a/examples/vue/2.6-basic/package.json +++ b/examples/vue/2.6-basic/package.json @@ -8,7 +8,7 @@ "_preview": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.51.3", + "@tanstack/vue-query": "^5.51.4", "@vue/composition-api": "1.7.2", "vue": "2.6.14", "vue-template-compiler": "2.6.14" diff --git a/examples/vue/2.7-basic/package.json b/examples/vue/2.7-basic/package.json index 20c034b14c..5e87ee8880 100644 --- a/examples/vue/2.7-basic/package.json +++ b/examples/vue/2.7-basic/package.json @@ -8,7 +8,7 @@ "_serve": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.51.3", + "@tanstack/vue-query": "^5.51.4", "vue": "2.7.16", "vue-template-compiler": "2.7.16" }, diff --git a/examples/vue/basic/package.json b/examples/vue/basic/package.json index 4751aebf8b..0bc2c7cb81 100644 --- a/examples/vue/basic/package.json +++ b/examples/vue/basic/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.51.3", - "@tanstack/vue-query-devtools": "^5.51.3", + "@tanstack/vue-query": "^5.51.4", + "@tanstack/vue-query-devtools": "^5.51.4", "vue": "^3.4.27" }, "devDependencies": { diff --git a/examples/vue/dependent-queries/package.json b/examples/vue/dependent-queries/package.json index 795ffdd079..4f7ec412ec 100644 --- a/examples/vue/dependent-queries/package.json +++ b/examples/vue/dependent-queries/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.51.3", + "@tanstack/vue-query": "^5.51.4", "vue": "^3.4.27" }, "devDependencies": { diff --git a/examples/vue/nuxt3/package.json b/examples/vue/nuxt3/package.json index 64f1d8c67a..6ada97b463 100644 --- a/examples/vue/nuxt3/package.json +++ b/examples/vue/nuxt3/package.json @@ -7,7 +7,7 @@ "_start": "node .output/server/index.mjs" }, "dependencies": { - "@tanstack/vue-query": "^5.51.3" + "@tanstack/vue-query": "^5.51.4" }, "devDependencies": { "nuxt": "^3.5.2" diff --git a/examples/vue/persister/package.json b/examples/vue/persister/package.json index ffe3f0301d..d8a2d554a0 100644 --- a/examples/vue/persister/package.json +++ b/examples/vue/persister/package.json @@ -8,10 +8,10 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/query-core": "^5.51.3", - "@tanstack/query-persist-client-core": "^5.51.3", - "@tanstack/query-sync-storage-persister": "^5.51.3", - "@tanstack/vue-query": "^5.51.3", + "@tanstack/query-core": "^5.51.4", + "@tanstack/query-persist-client-core": "^5.51.4", + "@tanstack/query-sync-storage-persister": "^5.51.4", + "@tanstack/vue-query": "^5.51.4", "idb-keyval": "^6.2.1", "vue": "^3.4.27" }, diff --git a/examples/vue/simple/package.json b/examples/vue/simple/package.json index 5e86cec500..1bb7645a52 100644 --- a/examples/vue/simple/package.json +++ b/examples/vue/simple/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.51.3", - "@tanstack/vue-query-devtools": "^5.51.3", + "@tanstack/vue-query": "^5.51.4", + "@tanstack/vue-query-devtools": "^5.51.4", "vue": "^3.4.27" }, "devDependencies": { diff --git a/packages/angular-query-devtools-experimental/package.json b/packages/angular-query-devtools-experimental/package.json index 30bdfe6b7a..7e3ea6a041 100644 --- a/packages/angular-query-devtools-experimental/package.json +++ b/packages/angular-query-devtools-experimental/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/angular-query-devtools-experimental", - "version": "5.51.3", + "version": "5.51.4", "description": "Developer tools to interact with and visualize the TanStack/angular-query cache", "author": "Arnoud de Vries", "license": "MIT", diff --git a/packages/angular-query-experimental/package.json b/packages/angular-query-experimental/package.json index f794780389..4d6d024f95 100644 --- a/packages/angular-query-experimental/package.json +++ b/packages/angular-query-experimental/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/angular-query-experimental", - "version": "5.51.3", + "version": "5.51.4", "description": "Signals for managing, caching and syncing asynchronous and remote data in Angular", "author": "Arnoud de Vries", "license": "MIT", diff --git a/packages/query-async-storage-persister/package.json b/packages/query-async-storage-persister/package.json index ea48848776..cc6b7e7b1c 100644 --- a/packages/query-async-storage-persister/package.json +++ b/packages/query-async-storage-persister/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/query-async-storage-persister", - "version": "5.51.3", + "version": "5.51.4", "description": "A persister for asynchronous storages, to be used with TanStack/Query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/query-broadcast-client-experimental/package.json b/packages/query-broadcast-client-experimental/package.json index 77c0dc7df4..6ea4a4e589 100644 --- a/packages/query-broadcast-client-experimental/package.json +++ b/packages/query-broadcast-client-experimental/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/query-broadcast-client-experimental", - "version": "5.51.3", + "version": "5.51.4", "description": "An experimental plugin to for broadcasting the state of your queryClient between browser tabs/windows", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/query-core/package.json b/packages/query-core/package.json index 4649ea7e85..3ef2c52844 100644 --- a/packages/query-core/package.json +++ b/packages/query-core/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/query-core", - "version": "5.51.3", + "version": "5.51.4", "description": "The framework agnostic core that powers TanStack Query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/query-persist-client-core/package.json b/packages/query-persist-client-core/package.json index f6250f28e4..63b35532c7 100644 --- a/packages/query-persist-client-core/package.json +++ b/packages/query-persist-client-core/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/query-persist-client-core", - "version": "5.51.3", + "version": "5.51.4", "description": "Set of utilities for interacting with persisters, which can save your queryClient for later use", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/query-sync-storage-persister/package.json b/packages/query-sync-storage-persister/package.json index 83d762f35d..43d6d638d5 100644 --- a/packages/query-sync-storage-persister/package.json +++ b/packages/query-sync-storage-persister/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/query-sync-storage-persister", - "version": "5.51.3", + "version": "5.51.4", "description": "A persister for synchronous storages, to be used with TanStack/Query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/react-query-devtools/package.json b/packages/react-query-devtools/package.json index be6e46847c..e7d01104f0 100644 --- a/packages/react-query-devtools/package.json +++ b/packages/react-query-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/react-query-devtools", - "version": "5.51.3", + "version": "5.51.4", "description": "Developer tools to interact with and visualize the TanStack/react-query cache", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/react-query-next-experimental/package.json b/packages/react-query-next-experimental/package.json index c2608f1997..9a87077e56 100644 --- a/packages/react-query-next-experimental/package.json +++ b/packages/react-query-next-experimental/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/react-query-next-experimental", - "version": "5.51.3", + "version": "5.51.4", "description": "Hydration utils for React Query in the NextJs app directory", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/react-query-persist-client/package.json b/packages/react-query-persist-client/package.json index 39a3b6f305..93d26b46b8 100644 --- a/packages/react-query-persist-client/package.json +++ b/packages/react-query-persist-client/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/react-query-persist-client", - "version": "5.51.3", + "version": "5.51.4", "description": "React bindings to work with persisters in TanStack/react-query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/react-query/package.json b/packages/react-query/package.json index 22de9621bb..a60ce3639e 100644 --- a/packages/react-query/package.json +++ b/packages/react-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/react-query", - "version": "5.51.3", + "version": "5.51.4", "description": "Hooks for managing, caching and syncing asynchronous and remote data in React", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/solid-query-devtools/package.json b/packages/solid-query-devtools/package.json index 8be3db878b..23003e5686 100644 --- a/packages/solid-query-devtools/package.json +++ b/packages/solid-query-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/solid-query-devtools", - "version": "5.51.3", + "version": "5.51.4", "description": "Developer tools to interact with and visualize the TanStack/solid-query Query cache", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/solid-query-persist-client/package.json b/packages/solid-query-persist-client/package.json index c6e9a856b8..2665f69625 100644 --- a/packages/solid-query-persist-client/package.json +++ b/packages/solid-query-persist-client/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/solid-query-persist-client", - "version": "5.51.3", + "version": "5.51.4", "description": "Solid.js bindings to work with persisters in TanStack/solid-query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/solid-query/package.json b/packages/solid-query/package.json index c44a85142e..ba07b1ca3b 100644 --- a/packages/solid-query/package.json +++ b/packages/solid-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/solid-query", - "version": "5.51.3", + "version": "5.51.4", "description": "Primitives for managing, caching and syncing asynchronous and remote data in Solid", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/svelte-query-devtools/package.json b/packages/svelte-query-devtools/package.json index 78012e1403..d91de3c5c6 100644 --- a/packages/svelte-query-devtools/package.json +++ b/packages/svelte-query-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/svelte-query-devtools", - "version": "5.51.3", + "version": "5.51.4", "description": "Developer tools to interact with and visualize the TanStack/svelte-query cache", "author": "Lachlan Collins", "license": "MIT", diff --git a/packages/svelte-query-persist-client/package.json b/packages/svelte-query-persist-client/package.json index d82211da6c..7ae16acf96 100644 --- a/packages/svelte-query-persist-client/package.json +++ b/packages/svelte-query-persist-client/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/svelte-query-persist-client", - "version": "5.51.3", + "version": "5.51.4", "description": "Svelte bindings to work with persisters in TanStack/svelte-query", "author": "Lachlan Collins", "license": "MIT", diff --git a/packages/svelte-query/package.json b/packages/svelte-query/package.json index db6a8c7f99..4fa42f7da7 100644 --- a/packages/svelte-query/package.json +++ b/packages/svelte-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/svelte-query", - "version": "5.51.3", + "version": "5.51.4", "description": "Primitives for managing, caching and syncing asynchronous and remote data in Svelte", "author": "Lachlan Collins", "license": "MIT", diff --git a/packages/vue-query-devtools/package.json b/packages/vue-query-devtools/package.json index 536c7a462e..59ec97f7ab 100644 --- a/packages/vue-query-devtools/package.json +++ b/packages/vue-query-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/vue-query-devtools", - "version": "5.51.3", + "version": "5.51.4", "description": "Developer tools to interact with and visualize the TanStack/vue-query cache", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/vue-query/package.json b/packages/vue-query/package.json index 4480be90a5..22f0e3cb39 100644 --- a/packages/vue-query/package.json +++ b/packages/vue-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/vue-query", - "version": "5.51.3", + "version": "5.51.4", "description": "Hooks for managing, caching and syncing asynchronous and remote data in Vue", "author": "Damian Osipiuk", "license": "MIT", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8cbb76ee53..357aade683 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -151,7 +151,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/compiler@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(@angular/platform-browser@17.3.10(@angular/animations@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))) '@tanstack/angular-query-experimental': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/angular-query-experimental rxjs: specifier: ^7.8.1 @@ -173,7 +173,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/compiler@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(typescript@5.3.3) '@tanstack/angular-query-devtools-experimental': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/angular-query-devtools-experimental typescript: specifier: 5.3.3 @@ -197,7 +197,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/compiler@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(@angular/platform-browser@17.3.10(@angular/animations@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))) '@tanstack/angular-query-experimental': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/angular-query-experimental rxjs: specifier: ^7.8.1 @@ -219,7 +219,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/compiler@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(typescript@5.3.3) '@tanstack/angular-query-devtools-experimental': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/angular-query-devtools-experimental typescript: specifier: 5.3.3 @@ -246,7 +246,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(@angular/platform-browser@17.3.10(@angular/animations@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(rxjs@7.8.1) '@tanstack/angular-query-experimental': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/angular-query-experimental rxjs: specifier: ^7.8.1 @@ -268,7 +268,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/compiler@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(typescript@5.3.3) '@tanstack/angular-query-devtools-experimental': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/angular-query-devtools-experimental typescript: specifier: 5.3.3 @@ -295,7 +295,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(@angular/platform-browser@17.3.10(@angular/animations@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(@angular/common@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6))(rxjs@7.8.1))(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(rxjs@7.8.1) '@tanstack/angular-query-experimental': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/angular-query-experimental rxjs: specifier: ^7.8.1 @@ -317,7 +317,7 @@ importers: specifier: ^17.3.10 version: 17.3.10(@angular/compiler@17.3.10(@angular/core@17.3.10(rxjs@7.8.1)(zone.js@0.14.6)))(typescript@5.3.3) '@tanstack/angular-query-devtools-experimental': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/angular-query-devtools-experimental typescript: specifier: 5.3.3 @@ -332,10 +332,10 @@ importers: specifier: 4.23.3 version: 4.23.3 '@tanstack/react-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query-devtools algoliasearch: specifier: 4.23.3 @@ -369,10 +369,10 @@ importers: examples/react/auto-refetching: dependencies: '@tanstack/react-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query-devtools next: specifier: ^14.2.4 @@ -397,16 +397,16 @@ importers: examples/react/basic: dependencies: '@tanstack/query-sync-storage-persister': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/query-sync-storage-persister '@tanstack/react-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query-devtools '@tanstack/react-query-persist-client': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query-persist-client react: specifier: 19.0.0-rc-4c2e457c7c-20240522 @@ -440,10 +440,10 @@ importers: examples/react/basic-graphql-request: dependencies: '@tanstack/react-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query-devtools graphql: specifier: ^16.8.1 @@ -468,10 +468,10 @@ importers: examples/react/default-query-function: dependencies: '@tanstack/react-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query-devtools react: specifier: 19.0.0-rc-4c2e457c7c-20240522 @@ -493,10 +493,10 @@ importers: examples/react/infinite-query-with-max-pages: dependencies: '@tanstack/react-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query-devtools next: specifier: ^14.2.4 @@ -521,10 +521,10 @@ importers: examples/react/load-more-infinite-scroll: dependencies: '@tanstack/react-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query-devtools next: specifier: ^14.2.4 @@ -552,10 +552,10 @@ importers: examples/react/nextjs: dependencies: '@tanstack/react-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query-devtools next: specifier: ^14.2.4 @@ -580,10 +580,10 @@ importers: examples/react/nextjs-app-prefetching: dependencies: '@tanstack/react-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query-devtools next: specifier: ^15.0.0-rc.0 @@ -608,13 +608,13 @@ importers: examples/react/nextjs-suspense-streaming: dependencies: '@tanstack/react-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query-devtools '@tanstack/react-query-next-experimental': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query-next-experimental next: specifier: ^14.2.4 @@ -636,19 +636,19 @@ importers: examples/react/offline: dependencies: '@tanstack/query-sync-storage-persister': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/query-sync-storage-persister '@tanstack/react-location': specifier: ^3.7.4 version: 3.7.4(react-dom@19.0.0-rc-4c2e457c7c-20240522(react@19.0.0-rc-4c2e457c7c-20240522))(react@19.0.0-rc-4c2e457c7c-20240522) '@tanstack/react-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query-devtools '@tanstack/react-query-persist-client': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query-persist-client msw: specifier: ^2.3.0 @@ -676,10 +676,10 @@ importers: examples/react/optimistic-updates-cache: dependencies: '@tanstack/react-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query-devtools next: specifier: ^14.2.4 @@ -704,10 +704,10 @@ importers: examples/react/optimistic-updates-ui: dependencies: '@tanstack/react-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query-devtools next: specifier: ^14.2.4 @@ -732,10 +732,10 @@ importers: examples/react/pagination: dependencies: '@tanstack/react-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query-devtools next: specifier: ^14.2.4 @@ -760,10 +760,10 @@ importers: examples/react/playground: dependencies: '@tanstack/react-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query-devtools react: specifier: 19.0.0-rc-4c2e457c7c-20240522 @@ -785,10 +785,10 @@ importers: examples/react/prefetching: dependencies: '@tanstack/react-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query-devtools next: specifier: ^14.2.4 @@ -822,10 +822,10 @@ importers: specifier: ^6.3.16 version: 6.3.16(yri22tnekttmcucjv33ecr33bu) '@tanstack/react-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query-devtools expo: specifier: ^51.0.8 @@ -874,10 +874,10 @@ importers: examples/react/react-router: dependencies: '@tanstack/react-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query-devtools localforage: specifier: ^1.10.0 @@ -938,10 +938,10 @@ importers: specifier: ^5.15.18 version: 5.15.18(react@19.0.0-rc-4c2e457c7c-20240522)(types-react@19.0.0-rc.1) '@tanstack/react-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query-devtools react: specifier: 19.0.0-rc-4c2e457c7c-20240522 @@ -969,10 +969,10 @@ importers: examples/react/shadow-dom: dependencies: '@tanstack/react-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query-devtools react: specifier: 19.0.0-rc-4c2e457c7c-20240522 @@ -1015,10 +1015,10 @@ importers: examples/react/simple: dependencies: '@tanstack/react-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query-devtools react: specifier: 19.0.0-rc-4c2e457c7c-20240522 @@ -1052,10 +1052,10 @@ importers: specifier: ^5.15.18 version: 5.15.18(react@19.0.0-rc-4c2e457c7c-20240522)(types-react@19.0.0-rc.1) '@tanstack/react-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query-devtools react: specifier: 19.0.0-rc-4c2e457c7c-20240522 @@ -1083,10 +1083,10 @@ importers: examples/react/suspense: dependencies: '@tanstack/react-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query '@tanstack/react-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/react-query-devtools font-awesome: specifier: ^4.7.0 @@ -1129,10 +1129,10 @@ importers: specifier: ^7.6.0 version: 7.6.0(astro@4.9.1(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)(typescript@5.3.3))(encoding@0.1.13)(next@14.2.4(@babel/core@7.24.6)(react-dom@19.0.0-rc-4c2e457c7c-20240522(react@19.0.0-rc-4c2e457c7c-20240522))(react@18.3.1)(sass@1.71.1))(react@18.3.1) '@tanstack/solid-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/solid-query '@tanstack/solid-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/solid-query-devtools astro: specifier: ^4.8.6 @@ -1150,10 +1150,10 @@ importers: examples/solid/basic: dependencies: '@tanstack/solid-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/solid-query '@tanstack/solid-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/solid-query-devtools solid-js: specifier: ^1.8.17 @@ -1172,10 +1172,10 @@ importers: examples/solid/basic-graphql-request: dependencies: '@tanstack/solid-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/solid-query '@tanstack/solid-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/solid-query-devtools graphql: specifier: ^16.8.1 @@ -1200,10 +1200,10 @@ importers: examples/solid/default-query-function: dependencies: '@tanstack/solid-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/solid-query '@tanstack/solid-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/solid-query-devtools solid-js: specifier: ^1.8.17 @@ -1222,10 +1222,10 @@ importers: examples/solid/simple: dependencies: '@tanstack/solid-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/solid-query '@tanstack/solid-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/solid-query-devtools solid-js: specifier: ^1.8.17 @@ -1256,10 +1256,10 @@ importers: specifier: ^1.0.0-rc.1 version: 1.0.0(@testing-library/jest-dom@6.4.6(vitest@2.0.3(@types/node@20.14.10)(jsdom@24.1.0)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)))(rollup@4.14.1)(solid-js@1.8.17)(vinxi@0.3.11(@types/node@20.14.10)(idb-keyval@6.2.1)(ioredis@5.3.2)(less@4.2.0)(sass@1.71.1)(terser@5.29.1))(vite@5.3.3(@types/node@20.14.10)(less@4.2.0)(sass@1.71.1)(terser@5.29.1)) '@tanstack/solid-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/solid-query '@tanstack/solid-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/solid-query-devtools solid-js: specifier: ^1.8.17 @@ -1271,10 +1271,10 @@ importers: examples/svelte/auto-refetching: dependencies: '@tanstack/svelte-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1302,10 +1302,10 @@ importers: examples/svelte/basic: dependencies: '@tanstack/svelte-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1333,10 +1333,10 @@ importers: examples/svelte/load-more-infinite-scroll: dependencies: '@tanstack/svelte-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1364,10 +1364,10 @@ importers: examples/svelte/optimistic-updates-typescript: dependencies: '@tanstack/svelte-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1395,10 +1395,10 @@ importers: examples/svelte/playground: dependencies: '@tanstack/svelte-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1426,10 +1426,10 @@ importers: examples/svelte/simple: dependencies: '@tanstack/svelte-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/vite-plugin-svelte': @@ -1454,10 +1454,10 @@ importers: examples/svelte/ssr: dependencies: '@tanstack/svelte-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1485,10 +1485,10 @@ importers: examples/svelte/star-wars: dependencies: '@tanstack/svelte-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/svelte-query '@tanstack/svelte-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/svelte-query-devtools devDependencies: '@sveltejs/adapter-auto': @@ -1525,10 +1525,10 @@ importers: examples/vue/basic: dependencies: '@tanstack/vue-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/vue-query '@tanstack/vue-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/vue-query-devtools vue: specifier: ^3.4.27 @@ -1547,7 +1547,7 @@ importers: examples/vue/dependent-queries: dependencies: '@tanstack/vue-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/vue-query vue: specifier: ^3.4.27 @@ -1566,16 +1566,16 @@ importers: examples/vue/persister: dependencies: '@tanstack/query-core': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/query-core '@tanstack/query-persist-client-core': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/query-persist-client-core '@tanstack/query-sync-storage-persister': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/query-sync-storage-persister '@tanstack/vue-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/vue-query idb-keyval: specifier: ^6.2.1 @@ -1597,10 +1597,10 @@ importers: examples/vue/simple: dependencies: '@tanstack/vue-query': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/vue-query '@tanstack/vue-query-devtools': - specifier: ^5.51.3 + specifier: ^5.51.4 version: link:../../../packages/vue-query-devtools vue: specifier: ^3.4.27 From 01212de25c0d5fbaba6b5a3e4e970cc61b75d771 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Wed, 17 Jul 2024 23:08:19 +1000 Subject: [PATCH 8/8] test(svelte-query): Refactor test logic (#7744) * test(svelte-query): Simplify test logic * Improve createQueries tests --- .../auto-refetching/src/routes/+page.svelte | 2 +- .../src/lib/LoadMore.svelte | 4 +- .../AwaitOnSuccess/AwaitOnSuccess.svelte | 11 +- .../tests/AwaitOnSuccess/Provider.svelte | 3 +- .../tests/FreshData/FreshData.svelte | 13 +-- .../tests/FreshData/Provider.svelte | 3 +- .../tests/InitialData/InitialData.svelte | 13 +-- .../tests/InitialData/Provider.svelte | 3 +- .../tests/OnSuccess/OnSuccess.svelte | 12 +-- .../tests/OnSuccess/Provider.svelte | 3 +- .../tests/PersistQueryClientProvider.test.ts | 31 ++---- .../tests/RemoveCache/Provider.svelte | 3 +- .../tests/RemoveCache/RemoveCache.svelte | 12 +-- .../tests/RestoreCache/Provider.svelte | 3 +- .../tests/RestoreCache/RestoreCache.svelte | 13 +-- .../tests/UseQueries/Provider.svelte | 3 +- .../tests/UseQueries/UseQueries.svelte | 13 +-- .../tests/utils.ts | 6 -- .../QueryClientProvider/ChildComponent.svelte | 4 +- .../QueryClientProvider.test.ts | 2 +- .../createInfiniteQuery/BaseExample.svelte | 7 +- .../createInfiniteQuery.test.ts | 101 +++++++++++++++--- .../tests/createQueries/BaseExample.svelte | 20 +--- .../tests/createQueries/CombineExample.svelte | 32 ++++++ .../tests/createQueries/createQueries.test.ts | 37 ++----- .../tests/createQuery/BaseExample.svelte | 9 +- .../tests/createQuery/DisabledExample.svelte | 12 ++- .../tests/createQuery/PlaceholderData.svelte | 4 +- .../tests/createQuery/createQuery.test.ts | 64 ++++++++--- .../tests/useIsFetching/BaseExample.svelte | 13 +-- .../tests/useIsMutating/BaseExample.svelte | 4 +- packages/svelte-query/tests/utils.ts | 7 -- 32 files changed, 262 insertions(+), 205 deletions(-) create mode 100644 packages/svelte-query/tests/createQueries/CombineExample.svelte diff --git a/examples/svelte/auto-refetching/src/routes/+page.svelte b/examples/svelte/auto-refetching/src/routes/+page.svelte index a72534d714..b395580cd0 100644 --- a/examples/svelte/auto-refetching/src/routes/+page.svelte +++ b/examples/svelte/auto-refetching/src/routes/+page.svelte @@ -53,7 +53,7 @@ transition:: {!$todos.isFetching ? 'all .3s ease' : 'none'}; border-radius: 100%; transform: 'scale(2)" - /> + >

Todo List

diff --git a/examples/svelte/load-more-infinite-scroll/src/lib/LoadMore.svelte b/examples/svelte/load-more-infinite-scroll/src/lib/LoadMore.svelte index 1ff2e5819f..79c602e672 100644 --- a/examples/svelte/load-more-infinite-scroll/src/lib/LoadMore.svelte +++ b/examples/svelte/load-more-infinite-scroll/src/lib/LoadMore.svelte @@ -21,15 +21,13 @@ return undefined }, }) - - const { error }: { error: any } = $query {#if $query.isPending} Loading... {/if} {#if $query.error} - Error: {error.message} + Error: {$query.error.message} {/if} {#if $query.isSuccess}
diff --git a/packages/svelte-query-persist-client/tests/AwaitOnSuccess/AwaitOnSuccess.svelte b/packages/svelte-query-persist-client/tests/AwaitOnSuccess/AwaitOnSuccess.svelte index 3e95c2416d..06230edd15 100644 --- a/packages/svelte-query-persist-client/tests/AwaitOnSuccess/AwaitOnSuccess.svelte +++ b/packages/svelte-query-persist-client/tests/AwaitOnSuccess/AwaitOnSuccess.svelte @@ -3,11 +3,10 @@ import { sleep } from '../utils' import type { Writable } from 'svelte/store' - export let key: Array export let states: Writable> - const state = createQuery({ - queryKey: key, + const query = createQuery({ + queryKey: ['test'], queryFn: async () => { states.update((s) => [...s, 'fetching']) await sleep(10) @@ -17,7 +16,5 @@ }) -
-

{$state.data}

-

fetchStatus: {$state.fetchStatus}

-
+
{$query.data}
+
fetchStatus: {$query.fetchStatus}
diff --git a/packages/svelte-query-persist-client/tests/AwaitOnSuccess/Provider.svelte b/packages/svelte-query-persist-client/tests/AwaitOnSuccess/Provider.svelte index e94ef3616a..c3087ac2fa 100644 --- a/packages/svelte-query-persist-client/tests/AwaitOnSuccess/Provider.svelte +++ b/packages/svelte-query-persist-client/tests/AwaitOnSuccess/Provider.svelte @@ -7,11 +7,10 @@ export let queryClient: QueryClient export let persistOptions: OmitKeyof - export let key: Array export let onSuccess: () => Promise export let states: Writable> - + diff --git a/packages/svelte-query-persist-client/tests/FreshData/FreshData.svelte b/packages/svelte-query-persist-client/tests/FreshData/FreshData.svelte index d2a863c707..387a34ac0e 100644 --- a/packages/svelte-query-persist-client/tests/FreshData/FreshData.svelte +++ b/packages/svelte-query-persist-client/tests/FreshData/FreshData.svelte @@ -4,12 +4,11 @@ import type { Writable } from 'svelte/store' import type { StatusResult } from '../utils' - export let key: Array export let states: Writable>> export let fetched: Writable - const state = createQuery({ - queryKey: key, + const query = createQuery({ + queryKey: ['test'], queryFn: async () => { fetched.set(true) await sleep(10) @@ -19,10 +18,8 @@ staleTime: Infinity, }) - $: states.update((prev) => [...prev, $state]) + $: states.update((prev) => [...prev, $query]) -
-

data: {$state.data ?? 'null'}

-

fetchStatus: {$state.fetchStatus}

-
+
data: {$query.data ?? 'null'}
+
fetchStatus: {$query.fetchStatus}
diff --git a/packages/svelte-query-persist-client/tests/FreshData/Provider.svelte b/packages/svelte-query-persist-client/tests/FreshData/Provider.svelte index 8500e62e4b..4c91c2a2c6 100644 --- a/packages/svelte-query-persist-client/tests/FreshData/Provider.svelte +++ b/packages/svelte-query-persist-client/tests/FreshData/Provider.svelte @@ -8,11 +8,10 @@ export let queryClient: QueryClient export let persistOptions: OmitKeyof - export let key: Array export let states: Writable>> export let fetched: Writable - + diff --git a/packages/svelte-query-persist-client/tests/InitialData/InitialData.svelte b/packages/svelte-query-persist-client/tests/InitialData/InitialData.svelte index 055dc5a433..2095508dd1 100644 --- a/packages/svelte-query-persist-client/tests/InitialData/InitialData.svelte +++ b/packages/svelte-query-persist-client/tests/InitialData/InitialData.svelte @@ -4,11 +4,10 @@ import type { Writable } from 'svelte/store' import type { StatusResult } from '../utils' - export let key: Array export let states: Writable>> - const state = createQuery({ - queryKey: key, + const query = createQuery({ + queryKey: ['test'], queryFn: async () => { await sleep(10) return 'fetched' @@ -20,10 +19,8 @@ initialDataUpdatedAt: 1, }) - $: states.update((prev) => [...prev, $state]) + $: states.update((prev) => [...prev, $query]) -
-

{$state.data}

-

fetchStatus: {$state.fetchStatus}

-
+
{$query.data}
+
fetchStatus: {$query.fetchStatus}
diff --git a/packages/svelte-query-persist-client/tests/InitialData/Provider.svelte b/packages/svelte-query-persist-client/tests/InitialData/Provider.svelte index 8a4f9011b0..bb7c585027 100644 --- a/packages/svelte-query-persist-client/tests/InitialData/Provider.svelte +++ b/packages/svelte-query-persist-client/tests/InitialData/Provider.svelte @@ -8,10 +8,9 @@ export let queryClient: QueryClient export let persistOptions: OmitKeyof - export let key: Array export let states: Writable>> - + diff --git a/packages/svelte-query-persist-client/tests/OnSuccess/OnSuccess.svelte b/packages/svelte-query-persist-client/tests/OnSuccess/OnSuccess.svelte index 335f44741a..2ae8e7d970 100644 --- a/packages/svelte-query-persist-client/tests/OnSuccess/OnSuccess.svelte +++ b/packages/svelte-query-persist-client/tests/OnSuccess/OnSuccess.svelte @@ -2,10 +2,8 @@ import { createQuery } from '@tanstack/svelte-query' import { sleep } from '../utils' - export let key: Array - - const state = createQuery({ - queryKey: key, + const query = createQuery({ + queryKey: ['test'], queryFn: async () => { await sleep(10) return 'fetched' @@ -13,7 +11,5 @@ }) -
-

{$state.data}

-

fetchStatus: {$state.fetchStatus}

-
+
{$query.data}
+
fetchStatus: {$query.fetchStatus}
diff --git a/packages/svelte-query-persist-client/tests/OnSuccess/Provider.svelte b/packages/svelte-query-persist-client/tests/OnSuccess/Provider.svelte index 8da03b9ca2..c0d2792771 100644 --- a/packages/svelte-query-persist-client/tests/OnSuccess/Provider.svelte +++ b/packages/svelte-query-persist-client/tests/OnSuccess/Provider.svelte @@ -6,10 +6,9 @@ export let queryClient: QueryClient export let persistOptions: OmitKeyof - export let key: Array export let onSuccess: () => void - + diff --git a/packages/svelte-query-persist-client/tests/PersistQueryClientProvider.test.ts b/packages/svelte-query-persist-client/tests/PersistQueryClientProvider.test.ts index ab1bf7b515..0188d210e1 100644 --- a/packages/svelte-query-persist-client/tests/PersistQueryClientProvider.test.ts +++ b/packages/svelte-query-persist-client/tests/PersistQueryClientProvider.test.ts @@ -9,7 +9,7 @@ import InitialData from './InitialData/Provider.svelte' import RemoveCache from './RemoveCache/Provider.svelte' import RestoreCache from './RestoreCache/Provider.svelte' import UseQueries from './UseQueries/Provider.svelte' -import { createQueryClient, queryKey, sleep } from './utils' +import { createQueryClient, sleep } from './utils' import type { PersistedClient, @@ -56,12 +56,11 @@ const createMockErrorPersister = ( describe('PersistQueryClientProvider', () => { test('restores cache from persister', async () => { - const key = queryKey() const statesStore: Writable>> = writable([]) const queryClient = createQueryClient() await queryClient.prefetchQuery({ - queryKey: key, + queryKey: ['test'], queryFn: () => Promise.resolve('hydrated'), }) @@ -75,7 +74,6 @@ describe('PersistQueryClientProvider', () => { props: { queryClient, persistOptions: { persister }, - key, states: statesStore, }, }) @@ -113,12 +111,11 @@ describe('PersistQueryClientProvider', () => { }) test('should also put useQueries into idle state', async () => { - const key = queryKey() const statesStore: Writable>> = writable([]) const queryClient = createQueryClient() await queryClient.prefetchQuery({ - queryKey: key, + queryKey: ['test'], queryFn: () => Promise.resolve('hydrated'), }) @@ -132,7 +129,6 @@ describe('PersistQueryClientProvider', () => { props: { queryClient, persistOptions: { persister }, - key, states: statesStore, }, }) @@ -171,12 +167,11 @@ describe('PersistQueryClientProvider', () => { }) test('should show initialData while restoring', async () => { - const key = queryKey() const statesStore: Writable>> = writable([]) const queryClient = createQueryClient() await queryClient.prefetchQuery({ - queryKey: key, + queryKey: ['test'], queryFn: () => Promise.resolve('hydrated'), }) @@ -190,7 +185,6 @@ describe('PersistQueryClientProvider', () => { props: { queryClient, persistOptions: { persister }, - key, states: statesStore, }, }) @@ -228,12 +222,11 @@ describe('PersistQueryClientProvider', () => { }) test('should not refetch after restoring when data is fresh', async () => { - const key = queryKey() const statesStore: Writable>> = writable([]) const queryClient = createQueryClient() await queryClient.prefetchQuery({ - queryKey: key, + queryKey: ['test'], queryFn: () => Promise.resolve('hydrated'), }) @@ -249,7 +242,6 @@ describe('PersistQueryClientProvider', () => { props: { queryClient, persistOptions: { persister }, - key, states: statesStore, fetched, }, @@ -277,11 +269,9 @@ describe('PersistQueryClientProvider', () => { }) test('should call onSuccess after successful restoring', async () => { - const key = queryKey() - const queryClient = createQueryClient() await queryClient.prefetchQuery({ - queryKey: key, + queryKey: ['test'], queryFn: () => Promise.resolve('hydrated'), }) @@ -297,7 +287,6 @@ describe('PersistQueryClientProvider', () => { props: { queryClient, persistOptions: { persister }, - key, onSuccess, }, }) @@ -310,11 +299,9 @@ describe('PersistQueryClientProvider', () => { }) test('should await onSuccess after successful restoring', async () => { - const key = queryKey() - const queryClient = createQueryClient() await queryClient.prefetchQuery({ - queryKey: key, + queryKey: ['test'], queryFn: () => Promise.resolve('hydrated'), }) @@ -330,7 +317,6 @@ describe('PersistQueryClientProvider', () => { props: { queryClient, persistOptions: { persister }, - key, states: statesStore, onSuccess: async () => { statesStore.update((s) => [...s, 'onSuccess']) @@ -354,7 +340,6 @@ describe('PersistQueryClientProvider', () => { }) test('should remove cache after non-successful restoring', async () => { - const key = queryKey() const consoleMock = vi.spyOn(console, 'error') const consoleWarn = vi .spyOn(console, 'warn') @@ -367,7 +352,7 @@ describe('PersistQueryClientProvider', () => { const [error, persister] = createMockErrorPersister(removeClient) const rendered = render(RemoveCache, { - props: { queryClient, persistOptions: { persister }, key }, + props: { queryClient, persistOptions: { persister } }, }) await waitFor(() => rendered.getByText('fetched')) diff --git a/packages/svelte-query-persist-client/tests/RemoveCache/Provider.svelte b/packages/svelte-query-persist-client/tests/RemoveCache/Provider.svelte index b7b70d088f..8738e99bd5 100644 --- a/packages/svelte-query-persist-client/tests/RemoveCache/Provider.svelte +++ b/packages/svelte-query-persist-client/tests/RemoveCache/Provider.svelte @@ -6,9 +6,8 @@ export let queryClient: QueryClient export let persistOptions: OmitKeyof - export let key: Array - + diff --git a/packages/svelte-query-persist-client/tests/RemoveCache/RemoveCache.svelte b/packages/svelte-query-persist-client/tests/RemoveCache/RemoveCache.svelte index 335f44741a..2ae8e7d970 100644 --- a/packages/svelte-query-persist-client/tests/RemoveCache/RemoveCache.svelte +++ b/packages/svelte-query-persist-client/tests/RemoveCache/RemoveCache.svelte @@ -2,10 +2,8 @@ import { createQuery } from '@tanstack/svelte-query' import { sleep } from '../utils' - export let key: Array - - const state = createQuery({ - queryKey: key, + const query = createQuery({ + queryKey: ['test'], queryFn: async () => { await sleep(10) return 'fetched' @@ -13,7 +11,5 @@ }) -
-

{$state.data}

-

fetchStatus: {$state.fetchStatus}

-
+
{$query.data}
+
fetchStatus: {$query.fetchStatus}
diff --git a/packages/svelte-query-persist-client/tests/RestoreCache/Provider.svelte b/packages/svelte-query-persist-client/tests/RestoreCache/Provider.svelte index 59e864fac3..0613c9440f 100644 --- a/packages/svelte-query-persist-client/tests/RestoreCache/Provider.svelte +++ b/packages/svelte-query-persist-client/tests/RestoreCache/Provider.svelte @@ -8,10 +8,9 @@ export let queryClient: QueryClient export let persistOptions: OmitKeyof - export let key: Array export let states: Writable>> - + diff --git a/packages/svelte-query-persist-client/tests/RestoreCache/RestoreCache.svelte b/packages/svelte-query-persist-client/tests/RestoreCache/RestoreCache.svelte index 5122413166..7bae863702 100644 --- a/packages/svelte-query-persist-client/tests/RestoreCache/RestoreCache.svelte +++ b/packages/svelte-query-persist-client/tests/RestoreCache/RestoreCache.svelte @@ -4,21 +4,18 @@ import type { Writable } from 'svelte/store' import type { StatusResult } from '../utils' - export let key: Array export let states: Writable>> - const state = createQuery({ - queryKey: key, + const query = createQuery({ + queryKey: ['test'], queryFn: async () => { await sleep(10) return 'fetched' }, }) - $: states.update((prev) => [...prev, $state]) + $: states.update((prev) => [...prev, $query]) -
-

{$state.data}

-

fetchStatus: {$state.fetchStatus}

-
+
{$query.data}
+
fetchStatus: {$query.fetchStatus}
diff --git a/packages/svelte-query-persist-client/tests/UseQueries/Provider.svelte b/packages/svelte-query-persist-client/tests/UseQueries/Provider.svelte index 2a78229255..301eb1629e 100644 --- a/packages/svelte-query-persist-client/tests/UseQueries/Provider.svelte +++ b/packages/svelte-query-persist-client/tests/UseQueries/Provider.svelte @@ -8,10 +8,9 @@ export let queryClient: QueryClient export let persistOptions: OmitKeyof - export let key: Array export let states: Writable>> - + diff --git a/packages/svelte-query-persist-client/tests/UseQueries/UseQueries.svelte b/packages/svelte-query-persist-client/tests/UseQueries/UseQueries.svelte index 70ef9aceab..8cf6647442 100644 --- a/packages/svelte-query-persist-client/tests/UseQueries/UseQueries.svelte +++ b/packages/svelte-query-persist-client/tests/UseQueries/UseQueries.svelte @@ -4,13 +4,12 @@ import type { Writable } from 'svelte/store' import type { StatusResult } from '../utils' - export let key: Array export let states: Writable>> - const state = createQueries({ + const queries = createQueries({ queries: [ { - queryKey: key, + queryKey: ['test'], queryFn: async (): Promise => { await sleep(10) return 'fetched' @@ -19,10 +18,8 @@ ], }) - $: states.update((prev) => [...prev, $state[0]]) + $: states.update((prev) => [...prev, $queries[0]]) -
-

{$state[0].data}

-

fetchStatus: {$state[0].fetchStatus}

-
+
{$queries[0].data}
+
fetchStatus: {$queries[0].fetchStatus}
diff --git a/packages/svelte-query-persist-client/tests/utils.ts b/packages/svelte-query-persist-client/tests/utils.ts index c02d3110a0..b246d49a35 100644 --- a/packages/svelte-query-persist-client/tests/utils.ts +++ b/packages/svelte-query-persist-client/tests/utils.ts @@ -6,12 +6,6 @@ export function createQueryClient(config?: QueryClientConfig): QueryClient { return new QueryClient(config) } -let queryKeyCount = 0 -export function queryKey(): Array { - queryKeyCount++ - return [`query_${queryKeyCount}`] -} - export function sleep(timeout: number): Promise { return new Promise((resolve, _reject) => { setTimeout(resolve, timeout) diff --git a/packages/svelte-query/tests/QueryClientProvider/ChildComponent.svelte b/packages/svelte-query/tests/QueryClientProvider/ChildComponent.svelte index 1912606ecd..1debd7311a 100644 --- a/packages/svelte-query/tests/QueryClientProvider/ChildComponent.svelte +++ b/packages/svelte-query/tests/QueryClientProvider/ChildComponent.svelte @@ -5,10 +5,10 @@ const query = createQuery({ queryKey: ['hello'], queryFn: async () => { - await sleep(10) + await sleep(5) return 'test' }, }) -
{$query.data}
+
Data: {$query.data ?? 'undefined'}
diff --git a/packages/svelte-query/tests/QueryClientProvider/QueryClientProvider.test.ts b/packages/svelte-query/tests/QueryClientProvider/QueryClientProvider.test.ts index 86c9907cb7..f144e1c9f9 100644 --- a/packages/svelte-query/tests/QueryClientProvider/QueryClientProvider.test.ts +++ b/packages/svelte-query/tests/QueryClientProvider/QueryClientProvider.test.ts @@ -13,7 +13,7 @@ describe('QueryClientProvider', () => { }, }) - await waitFor(() => rendered.getByText('test')) + await waitFor(() => rendered.getByText('Data: test')) expect(queryCache.find({ queryKey: ['hello'] })).toBeDefined() }) diff --git a/packages/svelte-query/tests/createInfiniteQuery/BaseExample.svelte b/packages/svelte-query/tests/createInfiniteQuery/BaseExample.svelte index 613ca52223..9eb6377e6f 100644 --- a/packages/svelte-query/tests/createInfiniteQuery/BaseExample.svelte +++ b/packages/svelte-query/tests/createInfiniteQuery/BaseExample.svelte @@ -1,6 +1,10 @@ -
Data: {JSON.stringify($query.data)}
Status: {$query.status}
diff --git a/packages/svelte-query/tests/createInfiniteQuery/createInfiniteQuery.test.ts b/packages/svelte-query/tests/createInfiniteQuery/createInfiniteQuery.test.ts index 2d14e51f03..c991da6b58 100644 --- a/packages/svelte-query/tests/createInfiniteQuery/createInfiniteQuery.test.ts +++ b/packages/svelte-query/tests/createInfiniteQuery/createInfiniteQuery.test.ts @@ -1,19 +1,96 @@ -import { describe, test } from 'vitest' -import { render } from '@testing-library/svelte' - -import { sleep } from '../utils' +import { describe, expect, test } from 'vitest' +import { render, waitFor } from '@testing-library/svelte' +import { get, writable } from 'svelte/store' import BaseExample from './BaseExample.svelte' +import type { Writable } from 'svelte/store' +import type { QueryObserverResult } from '@tanstack/query-core' + +describe('createInfiniteQuery', () => { + test('Return the correct states for a successful query', async () => { + const statesStore: Writable> = writable([]) + + const rendered = render(BaseExample, { + props: { + states: statesStore, + }, + }) + + await waitFor(() => { + expect(rendered.queryByText('Status: success')).toBeInTheDocument() + }) -describe('createQuery', () => { - test('Render and wait for success', async () => { - const rendered = render(BaseExample) + const states = get(statesStore) - await rendered.findByText('Data: undefined') - await rendered.findByText('Status: pending') + expect(states).toHaveLength(2) - await sleep(20) + expect(states[0]).toEqual({ + data: undefined, + dataUpdatedAt: 0, + error: null, + errorUpdatedAt: 0, + failureCount: 0, + failureReason: null, + errorUpdateCount: 0, + fetchNextPage: expect.any(Function), + fetchPreviousPage: expect.any(Function), + hasNextPage: false, + hasPreviousPage: false, + isError: false, + isFetched: false, + isFetchedAfterMount: false, + isFetching: true, + isPaused: false, + isFetchNextPageError: false, + isFetchingNextPage: false, + isFetchPreviousPageError: false, + isFetchingPreviousPage: false, + isLoading: true, + isPending: true, + isInitialLoading: true, + isLoadingError: false, + isPlaceholderData: false, + isRefetchError: false, + isRefetching: false, + isStale: true, + isSuccess: false, + refetch: expect.any(Function), + status: 'pending', + fetchStatus: 'fetching', + }) - await rendered.findByText('Data: {"pages":[0],"pageParams":[0]}') - await rendered.findByText('Status: success') + expect(states[1]).toEqual({ + data: { pages: [0], pageParams: [0] }, + dataUpdatedAt: expect.any(Number), + error: null, + errorUpdatedAt: 0, + failureCount: 0, + failureReason: null, + errorUpdateCount: 0, + fetchNextPage: expect.any(Function), + fetchPreviousPage: expect.any(Function), + hasNextPage: true, + hasPreviousPage: false, + isError: false, + isFetched: true, + isFetchedAfterMount: true, + isFetching: false, + isPaused: false, + isFetchNextPageError: false, + isFetchingNextPage: false, + isFetchPreviousPageError: false, + isFetchingPreviousPage: false, + isLoading: false, + isPending: false, + isInitialLoading: false, + isLoadingError: false, + isPlaceholderData: false, + isRefetchError: false, + isRefetching: false, + isStale: true, + isSuccess: true, + refetch: expect.any(Function), + status: 'success', + fetchStatus: 'idle', + }) }) }) diff --git a/packages/svelte-query/tests/createQueries/BaseExample.svelte b/packages/svelte-query/tests/createQueries/BaseExample.svelte index 6401f34b10..7f285fbb18 100644 --- a/packages/svelte-query/tests/createQueries/BaseExample.svelte +++ b/packages/svelte-query/tests/createQueries/BaseExample.svelte @@ -1,27 +1,17 @@ -{#if Array.isArray($queries)} - {#each $queries as query, index} - {#if query.isPending} -
Loading {index + 1}
- {:else if query.isSuccess} -
{query.data}
- {/if} - {/each} -{:else if $queries.isPending} -
Loading
-{:else if $queries.isSuccess} -
{$queries.data}
-{/if} +{#each $queries as query, index} +
Status {index + 1}: {query.status}
+
Data {index + 1}: {query.data}
+{/each} diff --git a/packages/svelte-query/tests/createQueries/CombineExample.svelte b/packages/svelte-query/tests/createQueries/CombineExample.svelte new file mode 100644 index 0000000000..a37b266db1 --- /dev/null +++ b/packages/svelte-query/tests/createQueries/CombineExample.svelte @@ -0,0 +1,32 @@ + + +
isPending: {$queries.isPending}
+
Data: {$queries.data ?? 'undefined'}
diff --git a/packages/svelte-query/tests/createQueries/createQueries.test.ts b/packages/svelte-query/tests/createQueries/createQueries.test.ts index b5f5a59cd5..91a6f8da3b 100644 --- a/packages/svelte-query/tests/createQueries/createQueries.test.ts +++ b/packages/svelte-query/tests/createQueries/createQueries.test.ts @@ -3,6 +3,7 @@ import { render, waitFor } from '@testing-library/svelte' import { QueryClient } from '@tanstack/query-core' import { sleep } from '../utils' import BaseExample from './BaseExample.svelte' +import CombineExample from './CombineExample.svelte' describe('createQueries', () => { test('Render and wait for success', async () => { @@ -13,14 +14,14 @@ describe('createQueries', () => { { queryKey: ['key-1'], queryFn: async () => { - await sleep(10) + await sleep(5) return 'Success 1' }, }, { queryKey: ['key-2'], queryFn: async () => { - await sleep(10) + await sleep(5) return 'Success 2' }, }, @@ -31,47 +32,29 @@ describe('createQueries', () => { }) await waitFor(() => { - expect(rendered.getByText('Loading 1')).toBeInTheDocument() - expect(rendered.getByText('Loading 2')).toBeInTheDocument() + expect(rendered.getByText('Status 1: pending')).toBeInTheDocument() + expect(rendered.getByText('Status 2: pending')).toBeInTheDocument() }) await waitFor(() => { - expect(rendered.getByText('Success 1')).toBeInTheDocument() - expect(rendered.getByText('Success 2')).toBeInTheDocument() + expect(rendered.getByText('Status 1: success')).toBeInTheDocument() + expect(rendered.getByText('Status 2: success')).toBeInTheDocument() }) }) test('Combine queries', async () => { - const ids = [1, 2, 3] - - const rendered = render(BaseExample, { + const rendered = render(CombineExample, { props: { - options: { - queries: ids.map((id) => ({ - queryKey: [id], - queryFn: async () => { - await sleep(10) - return id - }, - })), - combine: (results) => { - return { - isPending: results.some((result) => result.isPending), - isSuccess: results.every((result) => result.isSuccess), - data: results.map((res) => res.data).join(','), - } - }, - }, queryClient: new QueryClient(), }, }) await waitFor(() => { - expect(rendered.getByText('Loading')).toBeInTheDocument() + expect(rendered.getByText('isPending: true')).toBeInTheDocument() }) await waitFor(() => { - expect(rendered.getByText('1,2,3')).toBeInTheDocument() + expect(rendered.getByText('Data: 1,2,3')).toBeInTheDocument() }) }) }) diff --git a/packages/svelte-query/tests/createQuery/BaseExample.svelte b/packages/svelte-query/tests/createQuery/BaseExample.svelte index ede107bcdd..ce196f4783 100644 --- a/packages/svelte-query/tests/createQuery/BaseExample.svelte +++ b/packages/svelte-query/tests/createQuery/BaseExample.svelte @@ -15,11 +15,4 @@
Status: {$query.status}
Failure Count: {$query.failureCount}
- -{#if $query.isPending} -
Loading
-{:else if $query.isError} -
Error
-{:else if $query.isSuccess} -
{$query.data}
-{/if} +
Data: {$query.data ?? 'undefined'}
diff --git a/packages/svelte-query/tests/createQuery/DisabledExample.svelte b/packages/svelte-query/tests/createQuery/DisabledExample.svelte index bcd5a99748..13b1895b69 100644 --- a/packages/svelte-query/tests/createQuery/DisabledExample.svelte +++ b/packages/svelte-query/tests/createQuery/DisabledExample.svelte @@ -2,14 +2,17 @@ import { QueryClient } from '@tanstack/query-core' import { derived, writable } from 'svelte/store' import { createQuery } from '../../src/createQuery' - import { queryKey, sleep } from '../utils' + import { sleep } from '../utils' + import type { QueryObserverResult } from '@tanstack/query-core' + import type { Writable } from 'svelte/store' + + export let states: Writable> const queryClient = new QueryClient() - const key = queryKey() const count = writable(0) const options = derived(count, ($count) => ({ - queryKey: [key, $count], + queryKey: ['test', $count], queryFn: async () => { await sleep(5) return $count @@ -18,8 +21,11 @@ })) const query = createQuery(options, queryClient) + + $: states.update((prev) => [...prev, $query]) +
Data: {$query.data ?? 'undefined'}
Count: {$count}
diff --git a/packages/svelte-query/tests/createQuery/PlaceholderData.svelte b/packages/svelte-query/tests/createQuery/PlaceholderData.svelte index b56fd40e78..e864f0d419 100644 --- a/packages/svelte-query/tests/createQuery/PlaceholderData.svelte +++ b/packages/svelte-query/tests/createQuery/PlaceholderData.svelte @@ -13,7 +13,7 @@ const options = derived(count, ($count) => ({ queryKey: ['test', $count], queryFn: async () => { - await sleep(10) + await sleep(5) return $count }, placeholderData: keepPreviousData, @@ -27,4 +27,4 @@
Status: {$query.status}
-
Data: {$query.data}
+
Data: {$query.data ?? 'undefined'}
diff --git a/packages/svelte-query/tests/createQuery/createQuery.test.ts b/packages/svelte-query/tests/createQuery/createQuery.test.ts index d1c6d7b5a4..ec6d2d5c77 100644 --- a/packages/svelte-query/tests/createQuery/createQuery.test.ts +++ b/packages/svelte-query/tests/createQuery/createQuery.test.ts @@ -16,7 +16,7 @@ describe('createQuery', () => { const options = { queryKey: ['test'], queryFn: async () => { - await sleep(10) + await sleep(5) return 'Success' }, } @@ -30,7 +30,7 @@ describe('createQuery', () => { }) await waitFor(() => { - expect(rendered.queryByText('Success')).toBeInTheDocument() + expect(rendered.queryByText('Status: success')).toBeInTheDocument() }) const states = get(statesStore) @@ -204,7 +204,7 @@ describe('createQuery', () => { const optionsStore = writable({ queryKey: ['test'], queryFn: async () => { - await sleep(10) + await sleep(5) return 'Success' }, }) @@ -218,7 +218,7 @@ describe('createQuery', () => { }) await waitFor(() => { - expect(rendered.queryByText('Success')).toBeInTheDocument() + expect(rendered.queryByText('Status: success')).toBeInTheDocument() }) }) @@ -230,7 +230,7 @@ describe('createQuery', () => { const derivedStore = derived(writableStore, ($store) => ({ queryKey: [$store], queryFn: async () => { - await sleep(10) + await sleep(5) return 'Success' }, })) @@ -244,7 +244,7 @@ describe('createQuery', () => { }) await waitFor(() => { - expect(rendered.queryByText('Success')).toBeInTheDocument() + expect(rendered.queryByText('Status: success')).toBeInTheDocument() }) }) @@ -256,8 +256,8 @@ describe('createQuery', () => { const derivedStore = derived(writableStore, ($store) => ({ queryKey: [$store], queryFn: async () => { - await sleep(10) - return `Success ${$store}` + await sleep(5) + return $store }, })) @@ -272,22 +272,22 @@ describe('createQuery', () => { }) await waitFor(() => { - expect(rendered.queryByText('Success 1')).toBeInTheDocument() - expect(rendered.queryByText('Success 2')).not.toBeInTheDocument() + expect(rendered.queryByText('Data: 1')).toBeInTheDocument() + expect(rendered.queryByText('Data: 2')).not.toBeInTheDocument() }) writableStore.set(2) await waitFor(() => { - expect(rendered.queryByText('Success 1')).not.toBeInTheDocument() - expect(rendered.queryByText('Success 2')).toBeInTheDocument() + expect(rendered.queryByText('Data: 1')).not.toBeInTheDocument() + expect(rendered.queryByText('Data: 2')).toBeInTheDocument() }) writableStore.set(1) await waitFor(() => { - expect(rendered.queryByText('Success 1')).toBeInTheDocument() - expect(rendered.queryByText('Success 2')).not.toBeInTheDocument() + expect(rendered.queryByText('Data: 1')).toBeInTheDocument() + expect(rendered.queryByText('Data: 2')).not.toBeInTheDocument() }) }) @@ -318,6 +318,7 @@ describe('createQuery', () => { isSuccess: false, isPlaceholderData: false, }) + // Fetched expect(states[1]).toMatchObject({ data: 0, @@ -325,6 +326,7 @@ describe('createQuery', () => { isSuccess: true, isPlaceholderData: false, }) + // Set state expect(states[2]).toMatchObject({ data: 0, @@ -332,6 +334,7 @@ describe('createQuery', () => { isSuccess: true, isPlaceholderData: true, }) + // New data expect(states[3]).toMatchObject({ data: 1, @@ -342,7 +345,13 @@ describe('createQuery', () => { }) test('Should not fetch when switching to a disabled query', async () => { - const rendered = render(DisabledExample) + const statesStore: Writable> = writable([]) + + const rendered = render(DisabledExample, { + props: { + states: statesStore, + }, + }) await waitFor(() => rendered.getByText('Data: 0')) @@ -352,5 +361,30 @@ describe('createQuery', () => { rendered.getByText('Count: 1') rendered.getByText('Data: undefined') }) + + const states = get(statesStore) + + expect(states).toHaveLength(3) + + // Fetch query + expect(states[0]).toMatchObject({ + data: undefined, + isFetching: true, + isSuccess: false, + }) + + // Fetched query + expect(states[1]).toMatchObject({ + data: 0, + isFetching: false, + isSuccess: true, + }) + + // Switch to disabled query + expect(states[2]).toMatchObject({ + data: undefined, + isFetching: false, + isSuccess: false, + }) }) }) diff --git a/packages/svelte-query/tests/useIsFetching/BaseExample.svelte b/packages/svelte-query/tests/useIsFetching/BaseExample.svelte index 97737ff37b..d485b7b69b 100644 --- a/packages/svelte-query/tests/useIsFetching/BaseExample.svelte +++ b/packages/svelte-query/tests/useIsFetching/BaseExample.svelte @@ -3,18 +3,17 @@ import { derived, writable } from 'svelte/store' import { createQuery } from '../../src/createQuery' import { useIsFetching } from '../../src/useIsFetching' - import { queryKey, sleep } from '../utils' + import { sleep } from '../utils' const queryClient = new QueryClient() - const key = queryKey() const ready = writable(false) const isFetching = useIsFetching(undefined, queryClient) const options = derived(ready, ($ready) => ({ - queryKey: [key], + queryKey: ['test'], queryFn: async () => { - await sleep(20) + await sleep(5) return 'test' }, enabled: $ready, @@ -24,8 +23,6 @@ -
isFetching: {$isFetching}
-{#if $query.isSuccess} - {$query.data} -{/if} +
isFetching: {$isFetching}
+
Data: {$query.data ?? 'undefined'}
diff --git a/packages/svelte-query/tests/useIsMutating/BaseExample.svelte b/packages/svelte-query/tests/useIsMutating/BaseExample.svelte index 7c30b57207..35dafba38c 100644 --- a/packages/svelte-query/tests/useIsMutating/BaseExample.svelte +++ b/packages/svelte-query/tests/useIsMutating/BaseExample.svelte @@ -9,9 +9,9 @@ const mutation = createMutation( { - mutationKey: ['mutation1'], + mutationKey: ['mutation-1'], mutationFn: async () => { - await sleep(20) + await sleep(5) return 'data' }, }, diff --git a/packages/svelte-query/tests/utils.ts b/packages/svelte-query/tests/utils.ts index e8c5baf88b..1a3a619a22 100644 --- a/packages/svelte-query/tests/utils.ts +++ b/packages/svelte-query/tests/utils.ts @@ -3,10 +3,3 @@ export function sleep(timeout: number): Promise { setTimeout(resolve, timeout) }) } - -let queryKeyCount = 0 - -export function queryKey(): string { - queryKeyCount += 1 - return `query_${queryKeyCount}` -}