diff --git a/examples/angular/auto-refetching/package.json b/examples/angular/auto-refetching/package.json index 2ebca143355..74f052cfcbb 100644 --- a/examples/angular/auto-refetching/package.json +++ b/examples/angular/auto-refetching/package.json @@ -14,7 +14,7 @@ "@angular/core": "^19.2.4", "@angular/platform-browser": "^19.2.4", "@angular/platform-browser-dynamic": "^19.2.4", - "@tanstack/angular-query-experimental": "^5.74.3", + "@tanstack/angular-query-experimental": "^5.74.4", "rxjs": "^7.8.2", "tslib": "^2.8.1", "zone.js": "0.15.0" diff --git a/examples/angular/basic-persister/package.json b/examples/angular/basic-persister/package.json index 44cda2c0ec8..989bbb5c0d5 100644 --- a/examples/angular/basic-persister/package.json +++ b/examples/angular/basic-persister/package.json @@ -14,9 +14,9 @@ "@angular/core": "^19.2.4", "@angular/platform-browser": "^19.2.4", "@angular/platform-browser-dynamic": "^19.2.4", - "@tanstack/angular-query-experimental": "^5.74.3", + "@tanstack/angular-query-experimental": "^5.74.4", "@tanstack/angular-query-persist-client": "^5.62.7", - "@tanstack/query-sync-storage-persister": "^5.74.3", + "@tanstack/query-sync-storage-persister": "^5.74.4", "rxjs": "^7.8.2", "tslib": "^2.8.1", "zone.js": "^0.15.0" diff --git a/examples/angular/basic/package.json b/examples/angular/basic/package.json index d431dea2006..3b86dc0a63a 100644 --- a/examples/angular/basic/package.json +++ b/examples/angular/basic/package.json @@ -14,7 +14,7 @@ "@angular/core": "^19.2.4", "@angular/platform-browser": "^19.2.4", "@angular/platform-browser-dynamic": "^19.2.4", - "@tanstack/angular-query-experimental": "^5.74.3", + "@tanstack/angular-query-experimental": "^5.74.4", "rxjs": "^7.8.2", "tslib": "^2.8.1", "zone.js": "0.15.0" diff --git a/examples/angular/devtools-panel/package.json b/examples/angular/devtools-panel/package.json index 76d49f76d81..508bf82de8e 100644 --- a/examples/angular/devtools-panel/package.json +++ b/examples/angular/devtools-panel/package.json @@ -15,8 +15,8 @@ "@angular/platform-browser": "^19.2.4", "@angular/platform-browser-dynamic": "^19.2.4", "@angular/router": "^19.2.4", - "@tanstack/angular-query-devtools-experimental": "^5.74.3", - "@tanstack/angular-query-experimental": "^5.74.3", + "@tanstack/angular-query-devtools-experimental": "^5.74.4", + "@tanstack/angular-query-experimental": "^5.74.4", "rxjs": "^7.8.2", "tslib": "^2.8.1", "zone.js": "0.15.0" diff --git a/examples/angular/infinite-query-with-max-pages/package.json b/examples/angular/infinite-query-with-max-pages/package.json index e09100b7a43..2ce0c811012 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": "^19.2.4", "@angular/platform-browser": "^19.2.4", "@angular/platform-browser-dynamic": "^19.2.4", - "@tanstack/angular-query-experimental": "^5.74.3", + "@tanstack/angular-query-experimental": "^5.74.4", "rxjs": "^7.8.2", "tslib": "^2.8.1", "zone.js": "0.15.0" diff --git a/examples/angular/optimistic-updates/package.json b/examples/angular/optimistic-updates/package.json index c87fb3bb9fc..4258636ddd2 100644 --- a/examples/angular/optimistic-updates/package.json +++ b/examples/angular/optimistic-updates/package.json @@ -15,7 +15,7 @@ "@angular/forms": "^19.2.4", "@angular/platform-browser": "^19.2.4", "@angular/platform-browser-dynamic": "^19.2.4", - "@tanstack/angular-query-experimental": "^5.74.3", + "@tanstack/angular-query-experimental": "^5.74.4", "rxjs": "^7.8.2", "tslib": "^2.8.1", "zone.js": "0.15.0" diff --git a/examples/angular/pagination/package.json b/examples/angular/pagination/package.json index e6f4f13bd43..e6e567d27fb 100644 --- a/examples/angular/pagination/package.json +++ b/examples/angular/pagination/package.json @@ -14,7 +14,7 @@ "@angular/core": "^19.2.4", "@angular/platform-browser": "^19.2.4", "@angular/platform-browser-dynamic": "^19.2.4", - "@tanstack/angular-query-experimental": "^5.74.3", + "@tanstack/angular-query-experimental": "^5.74.4", "rxjs": "^7.8.2", "tslib": "^2.8.1", "zone.js": "0.15.0" diff --git a/examples/angular/query-options-from-a-service/package.json b/examples/angular/query-options-from-a-service/package.json index 67b6a41f8f9..4602bf1d1de 100644 --- a/examples/angular/query-options-from-a-service/package.json +++ b/examples/angular/query-options-from-a-service/package.json @@ -15,7 +15,7 @@ "@angular/platform-browser": "^19.2.4", "@angular/platform-browser-dynamic": "^19.2.4", "@angular/router": "^19.2.4", - "@tanstack/angular-query-experimental": "^5.74.3", + "@tanstack/angular-query-experimental": "^5.74.4", "rxjs": "^7.8.2", "tslib": "^2.8.1", "zone.js": "0.15.0" diff --git a/examples/angular/router/package.json b/examples/angular/router/package.json index d44d96598f6..abaface857d 100644 --- a/examples/angular/router/package.json +++ b/examples/angular/router/package.json @@ -15,7 +15,7 @@ "@angular/platform-browser": "^19.2.4", "@angular/platform-browser-dynamic": "^19.2.4", "@angular/router": "^19.2.4", - "@tanstack/angular-query-experimental": "^5.74.3", + "@tanstack/angular-query-experimental": "^5.74.4", "rxjs": "^7.8.2", "tslib": "^2.8.1", "zone.js": "0.15.0" diff --git a/examples/angular/rxjs/package.json b/examples/angular/rxjs/package.json index 07df94e2c0e..f683453ae5b 100644 --- a/examples/angular/rxjs/package.json +++ b/examples/angular/rxjs/package.json @@ -15,7 +15,7 @@ "@angular/forms": "^19.2.4", "@angular/platform-browser": "^19.2.4", "@angular/platform-browser-dynamic": "^19.2.4", - "@tanstack/angular-query-experimental": "^5.74.3", + "@tanstack/angular-query-experimental": "^5.74.4", "rxjs": "^7.8.2", "tslib": "^2.8.1", "zone.js": "0.15.0" diff --git a/examples/angular/simple/package.json b/examples/angular/simple/package.json index 7089177878b..c1771c9b2ae 100644 --- a/examples/angular/simple/package.json +++ b/examples/angular/simple/package.json @@ -14,7 +14,7 @@ "@angular/core": "^19.2.4", "@angular/platform-browser": "^19.2.4", "@angular/platform-browser-dynamic": "^19.2.4", - "@tanstack/angular-query-experimental": "^5.74.3", + "@tanstack/angular-query-experimental": "^5.74.4", "rxjs": "^7.8.2", "tslib": "^2.8.1", "zone.js": "0.15.0" diff --git a/examples/react/algolia/package.json b/examples/react/algolia/package.json index 5c524755607..405b91d284c 100644 --- a/examples/react/algolia/package.json +++ b/examples/react/algolia/package.json @@ -9,8 +9,8 @@ }, "dependencies": { "@algolia/client-search": "5.2.1", - "@tanstack/react-query": "^5.74.3", - "@tanstack/react-query-devtools": "^5.74.3", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-query-devtools": "^5.74.4", "react": "^19.0.0", "react-dom": "^19.0.0" }, diff --git a/examples/react/auto-refetching/package.json b/examples/react/auto-refetching/package.json index 7b47151ee35..106703d3e57 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.74.3", - "@tanstack/react-query-devtools": "^5.74.3", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-query-devtools": "^5.74.4", "next": "^15.1.2", "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 1ab4680f67b..7f2fd8eb661 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.74.3", - "@tanstack/react-query-devtools": "^5.74.3", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-query-devtools": "^5.74.4", "graphql": "^16.9.0", "graphql-request": "^7.1.2", "react": "^19.0.0", diff --git a/examples/react/basic/package.json b/examples/react/basic/package.json index b1fdaa44761..ea60f3f7b05 100644 --- a/examples/react/basic/package.json +++ b/examples/react/basic/package.json @@ -9,10 +9,10 @@ "test:eslint": "eslint ./src" }, "dependencies": { - "@tanstack/query-sync-storage-persister": "^5.74.3", - "@tanstack/react-query": "^5.74.3", - "@tanstack/react-query-devtools": "^5.74.3", - "@tanstack/react-query-persist-client": "^5.74.3", + "@tanstack/query-sync-storage-persister": "^5.74.4", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-query-devtools": "^5.74.4", + "@tanstack/react-query-persist-client": "^5.74.4", "react": "^19.0.0", "react-dom": "^19.0.0" }, diff --git a/examples/react/chat/package.json b/examples/react/chat/package.json index b7bd1ba9734..174d2d7ac9b 100644 --- a/examples/react/chat/package.json +++ b/examples/react/chat/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.74.3", - "@tanstack/react-query-devtools": "^5.74.3", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-query-devtools": "^5.74.4", "react": "^19.0.0", "react-dom": "^19.0.0" }, diff --git a/examples/react/default-query-function/package.json b/examples/react/default-query-function/package.json index 08ee4ca92ef..37009a11594 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.74.3", - "@tanstack/react-query-devtools": "^5.74.3", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-query-devtools": "^5.74.4", "react": "^19.0.0", "react-dom": "^19.0.0" }, diff --git a/examples/react/devtools-panel/package.json b/examples/react/devtools-panel/package.json index f5473f6a35c..39dd5096be7 100644 --- a/examples/react/devtools-panel/package.json +++ b/examples/react/devtools-panel/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.74.3", - "@tanstack/react-query-devtools": "^5.74.3", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-query-devtools": "^5.74.4", "react": "^19.0.0", "react-dom": "^19.0.0" }, diff --git a/examples/react/eslint-legacy/package.json b/examples/react/eslint-legacy/package.json index b58428dc4f4..22b02baab7a 100644 --- a/examples/react/eslint-legacy/package.json +++ b/examples/react/eslint-legacy/package.json @@ -9,10 +9,10 @@ "test:eslint": "ESLINT_USE_FLAT_CONFIG=false eslint ./src/**/*.tsx" }, "dependencies": { - "@tanstack/query-sync-storage-persister": "^5.74.3", - "@tanstack/react-query": "^5.74.3", - "@tanstack/react-query-devtools": "^5.74.3", - "@tanstack/react-query-persist-client": "^5.74.3", + "@tanstack/query-sync-storage-persister": "^5.74.4", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-query-devtools": "^5.74.4", + "@tanstack/react-query-persist-client": "^5.74.4", "react": "^19.0.0", "react-dom": "^19.0.0" }, diff --git a/examples/react/infinite-query-with-max-pages/package.json b/examples/react/infinite-query-with-max-pages/package.json index 3ff2fc4d22e..b880fb4b69b 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.74.3", - "@tanstack/react-query-devtools": "^5.74.3", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-query-devtools": "^5.74.4", "next": "^15.1.2", "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 6c6af8f70c0..9bb5beedba3 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.74.3", - "@tanstack/react-query-devtools": "^5.74.3", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-query-devtools": "^5.74.4", "next": "^15.1.2", "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 ac35c1bd0e2..ff6eb44b89f 100644 --- a/examples/react/nextjs-app-prefetching/package.json +++ b/examples/react/nextjs-app-prefetching/package.json @@ -8,8 +8,8 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.74.3", - "@tanstack/react-query-devtools": "^5.74.3", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-query-devtools": "^5.74.4", "next": "^15.1.2", "react": "^19.0.0", "react-dom": "^19.0.0" diff --git a/examples/react/nextjs-suspense-streaming/package.json b/examples/react/nextjs-suspense-streaming/package.json index 697a49db39a..cbe59f7bd08 100644 --- a/examples/react/nextjs-suspense-streaming/package.json +++ b/examples/react/nextjs-suspense-streaming/package.json @@ -8,9 +8,9 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.74.3", - "@tanstack/react-query-devtools": "^5.74.3", - "@tanstack/react-query-next-experimental": "^5.74.3", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-query-devtools": "^5.74.4", + "@tanstack/react-query-next-experimental": "^5.74.4", "next": "^15.1.2", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/examples/react/nextjs/package.json b/examples/react/nextjs/package.json index 60c55ce7d6a..24b6daa18a0 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.74.3", - "@tanstack/react-query-devtools": "^5.74.3", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-query-devtools": "^5.74.4", "next": "^15.1.2", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/examples/react/offline/package.json b/examples/react/offline/package.json index df671403b57..34eafa96755 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.74.3", + "@tanstack/query-sync-storage-persister": "^5.74.4", "@tanstack/react-location": "^3.7.4", - "@tanstack/react-query": "^5.74.3", - "@tanstack/react-query-devtools": "^5.74.3", - "@tanstack/react-query-persist-client": "^5.74.3", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-query-devtools": "^5.74.4", + "@tanstack/react-query-persist-client": "^5.74.4", "msw": "^2.6.6", "react": "^19.0.0", "react-dom": "^19.0.0", diff --git a/examples/react/optimistic-updates-cache/package.json b/examples/react/optimistic-updates-cache/package.json index d593d1bb703..cc9dece18b3 100755 --- a/examples/react/optimistic-updates-cache/package.json +++ b/examples/react/optimistic-updates-cache/package.json @@ -8,8 +8,8 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.74.3", - "@tanstack/react-query-devtools": "^5.74.3", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-query-devtools": "^5.74.4", "next": "^15.1.2", "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 fa19f59902b..06e8088600e 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.74.3", - "@tanstack/react-query-devtools": "^5.74.3", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-query-devtools": "^5.74.4", "next": "^15.1.2", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/examples/react/pagination/package.json b/examples/react/pagination/package.json index cbc607235af..babd2e48b05 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.74.3", - "@tanstack/react-query-devtools": "^5.74.3", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-query-devtools": "^5.74.4", "next": "^15.1.2", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/examples/react/playground/package.json b/examples/react/playground/package.json index d8079614c4f..11aad6df289 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.74.3", - "@tanstack/react-query-devtools": "^5.74.3", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-query-devtools": "^5.74.4", "react": "^19.0.0", "react-dom": "^19.0.0" }, diff --git a/examples/react/prefetching/package.json b/examples/react/prefetching/package.json index 8adc0bdb94b..482df28259d 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.74.3", - "@tanstack/react-query-devtools": "^5.74.3", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-query-devtools": "^5.74.4", "next": "^15.1.2", "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 31402b0340d..84e08e18878 100644 --- a/examples/react/react-native/package.json +++ b/examples/react/react-native/package.json @@ -14,8 +14,8 @@ "@react-native-community/netinfo": "^11.4.1", "@react-navigation/native": "^6.1.18", "@react-navigation/stack": "^6.4.1", - "@tanstack/react-query": "^5.74.3", - "@tanstack/react-query-devtools": "^5.74.3", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-query-devtools": "^5.74.4", "expo": "^52.0.11", "expo-constants": "^17.0.3", "expo-status-bar": "^2.0.0", diff --git a/examples/react/react-router/package.json b/examples/react/react-router/package.json index 0bb35631aa5..feb324e7782 100644 --- a/examples/react/react-router/package.json +++ b/examples/react/react-router/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.74.3", - "@tanstack/react-query-devtools": "^5.74.3", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-query-devtools": "^5.74.4", "localforage": "^1.10.0", "match-sorter": "^6.3.4", "react": "^19.0.0", diff --git a/examples/react/rick-morty/package.json b/examples/react/rick-morty/package.json index a99c45d1982..22dce73a157 100644 --- a/examples/react/rick-morty/package.json +++ b/examples/react/rick-morty/package.json @@ -12,8 +12,8 @@ "@emotion/styled": "^11.13.5", "@mui/material": "^6.1.8", "@mui/styles": "^6.1.8", - "@tanstack/react-query": "^5.74.3", - "@tanstack/react-query-devtools": "^5.74.3", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-query-devtools": "^5.74.4", "react": "^19.0.0", "react-dom": "^19.0.0", "react-router": "^6.25.1", diff --git a/examples/react/shadow-dom/package.json b/examples/react/shadow-dom/package.json index edcf1456d4d..ac5298233b6 100644 --- a/examples/react/shadow-dom/package.json +++ b/examples/react/shadow-dom/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.74.3", - "@tanstack/react-query-devtools": "^5.74.3", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-query-devtools": "^5.74.4", "react": "^19.0.0", "react-dom": "^19.0.0" }, diff --git a/examples/react/simple/package.json b/examples/react/simple/package.json index e6295c01960..cfc921359d5 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.74.3", - "@tanstack/react-query-devtools": "^5.74.3", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-query-devtools": "^5.74.4", "react": "^19.0.0", "react-dom": "^19.0.0" }, diff --git a/examples/react/star-wars/package.json b/examples/react/star-wars/package.json index 0b6ea5d701c..242ee1cad76 100644 --- a/examples/react/star-wars/package.json +++ b/examples/react/star-wars/package.json @@ -12,8 +12,8 @@ "@emotion/styled": "^11.13.5", "@mui/material": "^6.1.8", "@mui/styles": "^6.1.8", - "@tanstack/react-query": "^5.74.3", - "@tanstack/react-query-devtools": "^5.74.3", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-query-devtools": "^5.74.4", "react": "^19.0.0", "react-dom": "^19.0.0", "react-router": "^6.25.1", diff --git a/examples/react/suspense/package.json b/examples/react/suspense/package.json index 9b1f90c9316..ce1455a56ca 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.74.3", - "@tanstack/react-query-devtools": "^5.74.3", + "@tanstack/react-query": "^5.74.4", + "@tanstack/react-query-devtools": "^5.74.4", "font-awesome": "^4.7.0", "react": "^19.0.0", "react-dom": "^19.0.0", diff --git a/examples/solid/astro/package.json b/examples/solid/astro/package.json index 7faa41c2062..a81e1af0f37 100644 --- a/examples/solid/astro/package.json +++ b/examples/solid/astro/package.json @@ -15,8 +15,8 @@ "@astrojs/solid-js": "^5.0.7", "@astrojs/tailwind": "^6.0.2", "@astrojs/vercel": "^8.1.3", - "@tanstack/solid-query": "^5.74.3", - "@tanstack/solid-query-devtools": "^5.74.3", + "@tanstack/solid-query": "^5.74.4", + "@tanstack/solid-query-devtools": "^5.74.4", "astro": "^5.5.6", "solid-js": "^1.9.5", "tailwindcss": "^3.4.7", diff --git a/examples/solid/basic-graphql-request/package.json b/examples/solid/basic-graphql-request/package.json index 4d0de0a2df8..5bb95b71fa9 100644 --- a/examples/solid/basic-graphql-request/package.json +++ b/examples/solid/basic-graphql-request/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/solid-query": "^5.74.3", - "@tanstack/solid-query-devtools": "^5.74.3", + "@tanstack/solid-query": "^5.74.4", + "@tanstack/solid-query-devtools": "^5.74.4", "graphql": "^16.9.0", "graphql-request": "^7.1.2", "solid-js": "^1.9.5" diff --git a/examples/solid/basic/package.json b/examples/solid/basic/package.json index 64f17a66528..ddb4555513a 100644 --- a/examples/solid/basic/package.json +++ b/examples/solid/basic/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/solid-query": "^5.74.3", - "@tanstack/solid-query-devtools": "^5.74.3", + "@tanstack/solid-query": "^5.74.4", + "@tanstack/solid-query-devtools": "^5.74.4", "solid-js": "^1.9.5" }, "devDependencies": { diff --git a/examples/solid/default-query-function/package.json b/examples/solid/default-query-function/package.json index c753cc213c1..f9dd8dea110 100644 --- a/examples/solid/default-query-function/package.json +++ b/examples/solid/default-query-function/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/solid-query": "^5.74.3", - "@tanstack/solid-query-devtools": "^5.74.3", + "@tanstack/solid-query": "^5.74.4", + "@tanstack/solid-query-devtools": "^5.74.4", "solid-js": "^1.9.5" }, "devDependencies": { diff --git a/examples/solid/simple/package.json b/examples/solid/simple/package.json index 6e9376b0729..8489d213a27 100644 --- a/examples/solid/simple/package.json +++ b/examples/solid/simple/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/solid-query": "^5.74.3", - "@tanstack/solid-query-devtools": "^5.74.3", + "@tanstack/solid-query": "^5.74.4", + "@tanstack/solid-query-devtools": "^5.74.4", "solid-js": "^1.9.5" }, "devDependencies": { diff --git a/examples/solid/solid-start-streaming/package.json b/examples/solid/solid-start-streaming/package.json index c0eba9d8b29..3d4b04c0de1 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.15.3", "@solidjs/start": "^1.1.3", - "@tanstack/solid-query": "^5.74.3", - "@tanstack/solid-query-devtools": "^5.74.3", + "@tanstack/solid-query": "^5.74.4", + "@tanstack/solid-query-devtools": "^5.74.4", "solid-js": "^1.9.5", "vinxi": "^0.5.3" }, diff --git a/examples/svelte/auto-refetching/package.json b/examples/svelte/auto-refetching/package.json index a70c23053a7..3f11a57d157 100644 --- a/examples/svelte/auto-refetching/package.json +++ b/examples/svelte/auto-refetching/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/svelte-query": "^5.74.3", - "@tanstack/svelte-query-devtools": "^5.74.3" + "@tanstack/svelte-query": "^5.74.4", + "@tanstack/svelte-query-devtools": "^5.74.4" }, "devDependencies": { "@sveltejs/adapter-auto": "^6.0.0", diff --git a/examples/svelte/basic/package.json b/examples/svelte/basic/package.json index 9968232f12a..31d9b5e831e 100644 --- a/examples/svelte/basic/package.json +++ b/examples/svelte/basic/package.json @@ -8,10 +8,10 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/query-sync-storage-persister": "^5.74.3", - "@tanstack/svelte-query": "^5.74.3", - "@tanstack/svelte-query-devtools": "^5.74.3", - "@tanstack/svelte-query-persist-client": "^5.74.3" + "@tanstack/query-sync-storage-persister": "^5.74.4", + "@tanstack/svelte-query": "^5.74.4", + "@tanstack/svelte-query-devtools": "^5.74.4", + "@tanstack/svelte-query-persist-client": "^5.74.4" }, "devDependencies": { "@sveltejs/adapter-auto": "^6.0.0", diff --git a/examples/svelte/load-more-infinite-scroll/package.json b/examples/svelte/load-more-infinite-scroll/package.json index ecd1321d82d..cdb798d0105 100644 --- a/examples/svelte/load-more-infinite-scroll/package.json +++ b/examples/svelte/load-more-infinite-scroll/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/svelte-query": "^5.74.3", - "@tanstack/svelte-query-devtools": "^5.74.3" + "@tanstack/svelte-query": "^5.74.4", + "@tanstack/svelte-query-devtools": "^5.74.4" }, "devDependencies": { "@sveltejs/adapter-auto": "^6.0.0", diff --git a/examples/svelte/optimistic-updates/package.json b/examples/svelte/optimistic-updates/package.json index 7924909eb13..d266bd14f12 100644 --- a/examples/svelte/optimistic-updates/package.json +++ b/examples/svelte/optimistic-updates/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/svelte-query": "^5.74.3", - "@tanstack/svelte-query-devtools": "^5.74.3" + "@tanstack/svelte-query": "^5.74.4", + "@tanstack/svelte-query-devtools": "^5.74.4" }, "devDependencies": { "@sveltejs/adapter-auto": "^6.0.0", diff --git a/examples/svelte/playground/package.json b/examples/svelte/playground/package.json index ad748023b73..bdc91638a3d 100644 --- a/examples/svelte/playground/package.json +++ b/examples/svelte/playground/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/svelte-query": "^5.74.3", - "@tanstack/svelte-query-devtools": "^5.74.3" + "@tanstack/svelte-query": "^5.74.4", + "@tanstack/svelte-query-devtools": "^5.74.4" }, "devDependencies": { "@sveltejs/adapter-auto": "^6.0.0", diff --git a/examples/svelte/simple/package.json b/examples/svelte/simple/package.json index f010d403474..4c4a35c923a 100644 --- a/examples/svelte/simple/package.json +++ b/examples/svelte/simple/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/svelte-query": "^5.74.3", - "@tanstack/svelte-query-devtools": "^5.74.3" + "@tanstack/svelte-query": "^5.74.4", + "@tanstack/svelte-query-devtools": "^5.74.4" }, "devDependencies": { "@sveltejs/vite-plugin-svelte": "^5.0.3", diff --git a/examples/svelte/ssr/package.json b/examples/svelte/ssr/package.json index 7c5e3fec2d1..ca0da904e56 100644 --- a/examples/svelte/ssr/package.json +++ b/examples/svelte/ssr/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/svelte-query": "^5.74.3", - "@tanstack/svelte-query-devtools": "^5.74.3" + "@tanstack/svelte-query": "^5.74.4", + "@tanstack/svelte-query-devtools": "^5.74.4" }, "devDependencies": { "@sveltejs/adapter-auto": "^6.0.0", diff --git a/examples/svelte/star-wars/package.json b/examples/svelte/star-wars/package.json index 3706a1722ab..1d595e7f47a 100644 --- a/examples/svelte/star-wars/package.json +++ b/examples/svelte/star-wars/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/svelte-query": "^5.74.3", - "@tanstack/svelte-query-devtools": "^5.74.3" + "@tanstack/svelte-query": "^5.74.4", + "@tanstack/svelte-query-devtools": "^5.74.4" }, "devDependencies": { "@sveltejs/adapter-auto": "^6.0.0", diff --git a/examples/vue/2.6-basic/package.json b/examples/vue/2.6-basic/package.json index 7636e761706..807d5d72836 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.74.3", + "@tanstack/vue-query": "^5.74.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 452e0ab46cf..e7e39d668bd 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.74.3", + "@tanstack/vue-query": "^5.74.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 b2f10b50c33..553c6137e52 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.74.3", - "@tanstack/vue-query-devtools": "^5.74.3", + "@tanstack/vue-query": "^5.74.4", + "@tanstack/vue-query-devtools": "^5.74.4", "vue": "^3.4.27" }, "devDependencies": { diff --git a/examples/vue/dependent-queries/package.json b/examples/vue/dependent-queries/package.json index 90142c35789..8e8ddb1668c 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.74.3", + "@tanstack/vue-query": "^5.74.4", "vue": "^3.4.27" }, "devDependencies": { diff --git a/examples/vue/nuxt3/package.json b/examples/vue/nuxt3/package.json index 24555de8bc8..5a3a1c4bd01 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.74.3" + "@tanstack/vue-query": "^5.74.4" }, "devDependencies": { "nuxt": "^3.12.4" diff --git a/examples/vue/persister/package.json b/examples/vue/persister/package.json index 79bb8d779ed..e66ac6be19c 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.74.3", - "@tanstack/query-persist-client-core": "^5.74.3", - "@tanstack/query-sync-storage-persister": "^5.74.3", - "@tanstack/vue-query": "^5.74.3", + "@tanstack/query-core": "^5.74.4", + "@tanstack/query-persist-client-core": "^5.74.4", + "@tanstack/query-sync-storage-persister": "^5.74.4", + "@tanstack/vue-query": "^5.74.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 1163b9a03d9..c0362ff6478 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.74.3", - "@tanstack/vue-query-devtools": "^5.74.3", + "@tanstack/vue-query": "^5.74.4", + "@tanstack/vue-query-devtools": "^5.74.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 4d6cda1a7ca..e189271a43f 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.74.3", + "version": "5.74.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 a0501b63776..cb9fdebbad3 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.74.3", + "version": "5.74.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 0c97c45599a..6eb7882db49 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.74.3", + "version": "5.74.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 dcef763a545..9392aa0861c 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.74.3", + "version": "5.74.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 4c6c5ecfc2b..69d154e7a58 100644 --- a/packages/query-core/package.json +++ b/packages/query-core/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/query-core", - "version": "5.74.3", + "version": "5.74.4", "description": "The framework agnostic core that powers TanStack Query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/query-core/src/__tests__/hydration.test.tsx b/packages/query-core/src/__tests__/hydration.test.tsx index 0a7bb8909ba..ed9a1a2a290 100644 --- a/packages/query-core/src/__tests__/hydration.test.tsx +++ b/packages/query-core/src/__tests__/hydration.test.tsx @@ -133,7 +133,7 @@ describe('dehydration and rehydration', () => { hydrationClient.clear() }) - test('should not dehydrate queries if dehydrateQueries is set to false', async () => { + test('should not dehydrate queries if dehydrateQueries is set to false', () => { const queryCache = new QueryCache() const queryClient = createQueryClient({ queryCache }) vi.waitFor(() => diff --git a/packages/query-core/src/__tests__/queryClient.test-d.tsx b/packages/query-core/src/__tests__/queryClient.test-d.tsx index e06d5829bd7..c9d953a973d 100644 --- a/packages/query-core/src/__tests__/queryClient.test-d.tsx +++ b/packages/query-core/src/__tests__/queryClient.test-d.tsx @@ -113,6 +113,19 @@ describe('setQueryData', () => { expectTypeOf(data).toEqualTypeOf() }) + + it('should preserve updater parameter type inference when used in functions with explicit return types', () => { + const queryKey = ['key'] as DataTag, number> + const queryClient = new QueryClient() + + // Simulate usage inside a function with explicit return type + // The outer function returns 'unknown' but this shouldn't affect the updater's type inference + ;(() => + queryClient.setQueryData(queryKey, (data) => { + expectTypeOf(data).toEqualTypeOf() + return data + })) satisfies () => unknown + }) }) describe('getQueryState', () => { @@ -590,3 +603,28 @@ describe('resetQueries', () => { }) }) }) +type SuccessCallback = () => unknown +it('should infer types correctly with expression body arrow functions', () => { + const queryKey = ['key'] as DataTag, number> + const queryClient = new QueryClient() + + // @ts-expect-error + const callbackTest: SuccessCallback = () => + queryClient.setQueryData(queryKey, (data) => { + expectTypeOf(data).toEqualTypeOf() + return data + }) +}) + +it('should infer types correctly with block body arrow functions', () => { + const queryKey = ['key'] as DataTag, number> + const queryClient = new QueryClient() + + // @ts-expect-error + const callbackTest2: SuccessCallback = () => { + queryClient.setQueryData(queryKey, (data) => { + expectTypeOf(data).toEqualTypeOf() + return data + }) + } +}) diff --git a/packages/query-core/src/queryClient.ts b/packages/query-core/src/queryClient.ts index ad920601fc9..3406bbf7d2d 100644 --- a/packages/query-core/src/queryClient.ts +++ b/packages/query-core/src/queryClient.ts @@ -185,7 +185,7 @@ export class QueryClient { NoInfer | undefined >, options?: SetDataOptions, - ): TInferredQueryFnData | undefined { + ): NoInfer | undefined { const defaultedOptions = this.defaultQueryOptions< any, any, diff --git a/packages/query-persist-client-core/package.json b/packages/query-persist-client-core/package.json index ca05998bfc3..5522576ee56 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.74.3", + "version": "5.74.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 6db6365fafe..97192df266b 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.74.3", + "version": "5.74.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 3df4e8cefb1..dd54f784dfa 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.74.3", + "version": "5.74.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 783c6aa64b3..4c4c52281da 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.74.3", + "version": "5.74.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 e847cc439ca..c7801225cff 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.74.3", + "version": "5.74.4", "description": "React bindings to work with persisters in TanStack/react-query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/react-query-persist-client/src/__tests__/PersistQueryClientProvider.test.tsx b/packages/react-query-persist-client/src/__tests__/PersistQueryClientProvider.test.tsx index ece78d4b23e..e47a1f75f44 100644 --- a/packages/react-query-persist-client/src/__tests__/PersistQueryClientProvider.test.tsx +++ b/packages/react-query-persist-client/src/__tests__/PersistQueryClientProvider.test.tsx @@ -19,7 +19,7 @@ const createMockPersister = (): Persister => { let storedState: PersistedClient | undefined return { - async persistClient(persistClient: PersistedClient) { + persistClient(persistClient: PersistedClient) { storedState = persistClient }, async restoreClient() { @@ -706,7 +706,7 @@ describe('PersistQueryClientProvider', () => { let storedState: PersistedClient | undefined return { - async persistClient(persistClient) { + persistClient(persistClient) { storedState = persistClient }, async restoreClient() { diff --git a/packages/react-query/package.json b/packages/react-query/package.json index f86eabe9677..326efebbee0 100644 --- a/packages/react-query/package.json +++ b/packages/react-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/react-query", - "version": "5.74.3", + "version": "5.74.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 6d7572e3999..b60332f24b4 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.74.3", + "version": "5.74.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 238a8da6534..c4e599751ca 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.74.3", + "version": "5.74.4", "description": "Solid.js bindings to work with persisters in TanStack/solid-query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/solid-query-persist-client/src/__tests__/PersistQueryClientProvider.test.tsx b/packages/solid-query-persist-client/src/__tests__/PersistQueryClientProvider.test.tsx index 0274e4db3c6..164a387d406 100644 --- a/packages/solid-query-persist-client/src/__tests__/PersistQueryClientProvider.test.tsx +++ b/packages/solid-query-persist-client/src/__tests__/PersistQueryClientProvider.test.tsx @@ -15,7 +15,7 @@ const createMockPersister = (): Persister => { let storedState: PersistedClient | undefined return { - async persistClient(persistClient: PersistedClient) { + persistClient(persistClient: PersistedClient) { storedState = persistClient }, async restoreClient() { diff --git a/packages/solid-query/package.json b/packages/solid-query/package.json index 79030ff54cc..bffecd557b2 100644 --- a/packages/solid-query/package.json +++ b/packages/solid-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/solid-query", - "version": "5.74.3", + "version": "5.74.4", "description": "Primitives for managing, caching and syncing asynchronous and remote data in Solid", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/solid-query/src/__tests__/useMutation.test.tsx b/packages/solid-query/src/__tests__/useMutation.test.tsx index 3a80e4b45f7..4c23bf383e7 100644 --- a/packages/solid-query/src/__tests__/useMutation.test.tsx +++ b/packages/solid-query/src/__tests__/useMutation.test.tsx @@ -316,11 +316,11 @@ describe('useMutation', () => { function Page() { const mutation = useMutation(() => ({ - mutationFn: async (text: string) => text, - onSuccess: async () => { + mutationFn: (text: string) => Promise.resolve(text), + onSuccess: () => { callbacks.push('useMutation.onSuccess') }, - onSettled: async () => { + onSettled: () => { callbacks.push('useMutation.onSettled') }, })) @@ -330,10 +330,10 @@ describe('useMutation', () => { setActTimeout(async () => { try { const result = await mutateAsync('todo', { - onSuccess: async () => { + onSuccess: () => { callbacks.push('mutateAsync.onSuccess') }, - onSettled: async () => { + onSettled: () => { callbacks.push('mutateAsync.onSettled') }, }) @@ -369,10 +369,10 @@ describe('useMutation', () => { const mutation = useMutation(() => ({ mutationFn: async (_text: string) => Promise.reject(new Error('oops')), - onError: async () => { + onError: () => { callbacks.push('useMutation.onError') }, - onSettled: async () => { + onSettled: () => { callbacks.push('useMutation.onSettled') }, })) @@ -382,10 +382,10 @@ describe('useMutation', () => { setActTimeout(async () => { try { await mutateAsync('todo', { - onError: async () => { + onError: () => { callbacks.push('mutateAsync.onError') }, - onSettled: async () => { + onSettled: () => { callbacks.push('mutateAsync.onSettled') }, }) @@ -756,7 +756,7 @@ describe('useMutation', () => { }) }) - it('should not change state if unmounted', async () => { + it('should not change state if unmounted', () => { function Mutates() { const mutation = useMutation(() => ({ mutationFn: () => sleep(10) })) return @@ -901,11 +901,11 @@ describe('useMutation', () => { function Page() { const mutationSucceed = useMutation(() => ({ - mutationFn: async () => '', + mutationFn: () => Promise.resolve(''), meta: { metaSuccessMessage }, })) const mutationError = useMutation(() => ({ - mutationFn: async () => { + mutationFn: () => { throw new Error('') }, meta: { metaErrorMessage }, diff --git a/packages/solid-query/src/__tests__/useQueries.test.tsx b/packages/solid-query/src/__tests__/useQueries.test.tsx index 46ee666d425..fcdae15d842 100644 --- a/packages/solid-query/src/__tests__/useQueries.test.tsx +++ b/packages/solid-query/src/__tests__/useQueries.test.tsx @@ -69,7 +69,7 @@ describe('useQueries', () => { expect(results[2]).toMatchObject([{ data: 1 }, { data: 2 }]) }) - it('handles type parameter - tuple of tuples', async () => { + it('handles type parameter - tuple of tuples', () => { const key1 = queryKey() const key2 = queryKey() const key3 = queryKey() @@ -174,7 +174,7 @@ describe('useQueries', () => { } }) - it('handles type parameter - tuple of objects', async () => { + it('handles type parameter - tuple of objects', () => { const key1 = queryKey() const key2 = queryKey() const key3 = queryKey() @@ -315,7 +315,7 @@ describe('useQueries', () => { } }) - it('handles array literal without type parameter to infer result type', async () => { + it('handles array literal without type parameter to infer result type', () => { const key1 = queryKey() const key2 = queryKey() const key3 = queryKey() @@ -544,7 +544,7 @@ describe('useQueries', () => { type QueryKeyA = ['queryA'] const getQueryKeyA = (): QueryKeyA => ['queryA'] type GetQueryFunctionA = () => QueryFunction - const getQueryFunctionA: GetQueryFunctionA = () => async () => { + const getQueryFunctionA: GetQueryFunctionA = () => () => { return 1 } type SelectorA = (data: number) => [number, string] @@ -553,7 +553,7 @@ describe('useQueries', () => { type QueryKeyB = ['queryB', string] const getQueryKeyB = (id: string): QueryKeyB => ['queryB', id] type GetQueryFunctionB = () => QueryFunction - const getQueryFunctionB: GetQueryFunctionB = () => async () => { + const getQueryFunctionB: GetQueryFunctionB = () => () => { return '1' } type SelectorB = (data: string) => [string, number] diff --git a/packages/solid-query/src/__tests__/useQuery.test.tsx b/packages/solid-query/src/__tests__/useQuery.test.tsx index 70914603b7d..7a1547bf458 100644 --- a/packages/solid-query/src/__tests__/useQuery.test.tsx +++ b/packages/solid-query/src/__tests__/useQuery.test.tsx @@ -72,7 +72,7 @@ describe('useQuery', () => { // it should provide the result type in the configuration useQuery(() => ({ queryKey: [key], - queryFn: async () => true, + queryFn: () => true, })) // it should be possible to specify a union type as result type @@ -117,7 +117,7 @@ describe('useQuery', () => { type MyData = number type MyQueryKey = readonly ['my-data', number] - const getMyDataArrayKey: QueryFunction = async ({ + const getMyDataArrayKey: QueryFunction = ({ queryKey: [, n], }) => { return n + 42 @@ -128,9 +128,7 @@ describe('useQuery', () => { queryFn: getMyDataArrayKey, })) - const getMyDataStringKey: QueryFunction = async ( - context, - ) => { + const getMyDataStringKey: QueryFunction = (context) => { expectTypeOf(context.queryKey).toEqualTypeOf<['1']>() return Number(context.queryKey[0]) + 42 } @@ -170,7 +168,7 @@ describe('useQuery', () => { queryFn: () => fetcher(qk[1], 'token'), ...options, })) - const test = useWrappedQuery([''], async () => '1') + const test = useWrappedQuery([''], () => Promise.resolve('1')) expectTypeOf(test.data).toEqualTypeOf() // handles wrapped queries with custom fetcher passed directly to useQuery @@ -188,7 +186,9 @@ describe('useQuery', () => { 'safely' >, ) => useQuery(() => ({ queryKey: qk, queryFn: fetcher, ...options })) - const testFuncStyle = useWrappedFuncStyleQuery([''], async () => true) + const testFuncStyle = useWrappedFuncStyleQuery([''], () => + Promise.resolve(true), + ) expectTypeOf(testFuncStyle.data).toEqualTypeOf() } }) @@ -1854,7 +1854,7 @@ describe('useQuery', () => { }) // See https://github.com/tannerlinsley/react-query/issues/137 - it('should not override initial data in dependent queries', async () => { + it('should not override initial data in dependent queries', () => { const key1 = queryKey() const key2 = queryKey() @@ -1895,7 +1895,7 @@ describe('useQuery', () => { rendered.getByText('Second Status: success') }) - it('should update query options', async () => { + it('should update query options', () => { const key = queryKey() const queryFn = async () => { @@ -2018,7 +2018,7 @@ describe('useQuery', () => { }) // See https://github.com/tannerlinsley/react-query/issues/144 - it('should be in "pending" state by default', async () => { + it('should be in "pending" state by default', () => { const key = queryKey() function Page() { @@ -3403,7 +3403,7 @@ describe('useQuery', () => { const query = useQuery(() => ({ queryKey: key, - queryFn: async () => { + queryFn: () => { if (counter < 2) { counter++ throw new Error('error') @@ -3753,7 +3753,7 @@ describe('useQuery', () => { expect(results[2]).toMatchObject({ data: 'fetched data', isStale: false }) }) - it('should support enabled:false in query object syntax', async () => { + it('should support enabled:false in query object syntax', () => { const key = queryKey() const queryFn = vi.fn<(...args: Array) => string>() queryFn.mockImplementation(() => 'data') @@ -5916,7 +5916,7 @@ describe('useQuery', () => { const states: Array> = [] const error = new Error('oops') - const queryFn = async (): Promise => { + const queryFn = (): Promise => { throw error } @@ -5996,7 +5996,7 @@ describe('useQuery', () => { function Page() { const state = useQuery(() => ({ queryKey: key, - queryFn: async (): Promise => { + queryFn: (): Promise => { throw error }, retry: false, diff --git a/packages/svelte-query-devtools/package.json b/packages/svelte-query-devtools/package.json index 45ba42b01a0..d6d1aaa40f3 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.74.3", + "version": "5.74.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 efb05aac492..256d06150dc 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.74.3", + "version": "5.74.4", "description": "Svelte bindings to work with persisters in TanStack/svelte-query", "author": "Lachlan Collins", "license": "MIT", diff --git a/packages/svelte-query-persist-client/tests/PersistQueryClientProvider.test.ts b/packages/svelte-query-persist-client/tests/PersistQueryClientProvider.test.ts index 98f449d93e9..a52c40078c8 100644 --- a/packages/svelte-query-persist-client/tests/PersistQueryClientProvider.test.ts +++ b/packages/svelte-query-persist-client/tests/PersistQueryClientProvider.test.ts @@ -22,7 +22,7 @@ const createMockPersister = (): Persister => { let storedState: PersistedClient | undefined return { - async persistClient(persistClient: PersistedClient) { + persistClient(persistClient: PersistedClient) { storedState = persistClient }, async restoreClient() { diff --git a/packages/svelte-query/package.json b/packages/svelte-query/package.json index ac16d802d95..b1f311a30ae 100644 --- a/packages/svelte-query/package.json +++ b/packages/svelte-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/svelte-query", - "version": "5.74.3", + "version": "5.74.4", "description": "Primitives for managing, caching and syncing asynchronous and remote data in Svelte", "author": "Lachlan Collins", "license": "MIT", diff --git a/packages/svelte-query/tests/useMutationState/useMutationState.test.ts b/packages/svelte-query/tests/useMutationState/useMutationState.test.ts index c2190cfb14f..24bc261cc9e 100644 --- a/packages/svelte-query/tests/useMutationState/useMutationState.test.ts +++ b/packages/svelte-query/tests/useMutationState/useMutationState.test.ts @@ -3,7 +3,7 @@ import { fireEvent, render, waitFor } from '@testing-library/svelte' import BaseExample from './BaseExample.svelte' describe('useMutationState', () => { - test('Run few mutation functions and check from useMutationState ', async () => { + test('Run few mutation functions and check from useMutationState', async () => { const successMutationFn = vi.fn() const errorMutationFn = vi.fn().mockImplementation(() => { diff --git a/packages/vue-query-devtools/package.json b/packages/vue-query-devtools/package.json index 80bb595c8db..0b6ada34343 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.74.3", + "version": "5.74.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 e91707b04a4..e24389b6ae7 100644 --- a/packages/vue-query/package.json +++ b/packages/vue-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/vue-query", - "version": "5.74.3", + "version": "5.74.4", "description": "Hooks for managing, caching and syncing asynchronous and remote data in Vue", "author": "Damian Osipiuk", "license": "MIT", diff --git a/packages/vue-query/src/__tests__/mutationCache.test.ts b/packages/vue-query/src/__tests__/mutationCache.test.ts index b7b97640960..ab70f834598 100644 --- a/packages/vue-query/src/__tests__/mutationCache.test.ts +++ b/packages/vue-query/src/__tests__/mutationCache.test.ts @@ -10,7 +10,7 @@ describe('MutationCache', () => { }) describe('find', () => { - test('should properly unwrap parameters', async () => { + test('should properly unwrap parameters', () => { const mutationCache = new MutationCache() mutationCache.find({ @@ -24,7 +24,7 @@ describe('MutationCache', () => { }) describe('findAll', () => { - test('should properly unwrap parameters', async () => { + test('should properly unwrap parameters', () => { const mutationCache = new MutationCache() mutationCache.findAll({ diff --git a/packages/vue-query/src/__tests__/queryCache.test.ts b/packages/vue-query/src/__tests__/queryCache.test.ts index 74336b924e7..f18047066dc 100644 --- a/packages/vue-query/src/__tests__/queryCache.test.ts +++ b/packages/vue-query/src/__tests__/queryCache.test.ts @@ -10,7 +10,7 @@ describe('QueryCache', () => { }) describe('find', () => { - test('should properly unwrap parameters', async () => { + test('should properly unwrap parameters', () => { const queryCache = new QueryCache() queryCache.find({ @@ -24,7 +24,7 @@ describe('QueryCache', () => { }) describe('findAll', () => { - test('should properly unwrap two parameters', async () => { + test('should properly unwrap two parameters', () => { const queryCache = new QueryCache() queryCache.findAll({ @@ -36,7 +36,7 @@ describe('QueryCache', () => { }) }) - test('should default to empty filters', async () => { + test('should default to empty filters', () => { const queryCache = new QueryCache() queryCache.findAll() diff --git a/packages/vue-query/src/__tests__/queryClient.test-d.ts b/packages/vue-query/src/__tests__/queryClient.test-d.ts index fbfdd02a7a3..ae50680d342 100644 --- a/packages/vue-query/src/__tests__/queryClient.test-d.ts +++ b/packages/vue-query/src/__tests__/queryClient.test-d.ts @@ -96,6 +96,19 @@ describe('setQueryData', () => { expectTypeOf(data).toEqualTypeOf() }) + + it('should preserve updater parameter type inference when used in functions with explicit return types', () => { + const queryKey = ['key'] as DataTag, number> + const queryClient = new QueryClient() + + // Simulate usage inside a function with explicit return type + // The outer function returns 'unknown' but this shouldn't affect the updater's type inference + ;(() => + queryClient.setQueryData(queryKey, (data) => { + expectTypeOf(data).toEqualTypeOf() + return data + })) satisfies () => unknown + }) }) describe('fetchInfiniteQuery', () => { diff --git a/packages/vue-query/src/__tests__/queryClient.test.ts b/packages/vue-query/src/__tests__/queryClient.test.ts index 45b508e5b10..544d1ca90b0 100644 --- a/packages/vue-query/src/__tests__/queryClient.test.ts +++ b/packages/vue-query/src/__tests__/queryClient.test.ts @@ -14,7 +14,7 @@ const fn = () => 'mock' describe('QueryCache', () => { describe('isFetching', () => { - test('should properly unwrap 1 parameter', async () => { + test('should properly unwrap 1 parameter', () => { const queryClient = new QueryClient() queryClient.isFetching({ @@ -28,7 +28,7 @@ describe('QueryCache', () => { }) describe('isMutating', () => { - test('should properly unwrap 1 parameter', async () => { + test('should properly unwrap 1 parameter', () => { const queryClient = new QueryClient() queryClient.isMutating({ @@ -42,7 +42,7 @@ describe('QueryCache', () => { }) describe('getQueryData', () => { - test('should properly unwrap 1 parameter', async () => { + test('should properly unwrap 1 parameter', () => { const queryClient = new QueryClient() queryClient.getQueryData(queryKeyRef) @@ -54,7 +54,7 @@ describe('QueryCache', () => { }) describe('getQueriesData', () => { - test('should properly unwrap queryKey param', async () => { + test('should properly unwrap queryKey param', () => { const queryClient = new QueryClient() queryClient.getQueriesData({ queryKey: queryKeyRef }) @@ -64,7 +64,7 @@ describe('QueryCache', () => { }) }) - test('should properly unwrap filters param', async () => { + test('should properly unwrap filters param', () => { const queryClient = new QueryClient() queryClient.getQueriesData({ queryKey: queryKeyRef }) @@ -76,7 +76,7 @@ describe('QueryCache', () => { }) describe('setQueryData', () => { - test('should properly unwrap 3 parameter', async () => { + test('should properly unwrap 3 parameter', () => { const queryClient = new QueryClient() queryClient.setQueryData(queryKeyRef, fn, { @@ -92,7 +92,7 @@ describe('QueryCache', () => { }) describe('setQueriesData', () => { - test('should properly unwrap params with queryKey', async () => { + test('should properly unwrap params with queryKey', () => { const queryClient = new QueryClient() queryClient.setQueriesData({ queryKey: queryKeyRef }, fn, { @@ -106,7 +106,7 @@ describe('QueryCache', () => { ) }) - test('should properly unwrap params with filters', async () => { + test('should properly unwrap params with filters', () => { const queryClient = new QueryClient() queryClient.setQueriesData({ queryKey: queryKeyRef }, fn, { @@ -122,7 +122,7 @@ describe('QueryCache', () => { }) describe('getQueryState', () => { - test('should properly unwrap 1 parameter', async () => { + test('should properly unwrap 1 parameter', () => { const queryClient = new QueryClient() queryClient.getQueryState(queryKeyRef) @@ -134,7 +134,7 @@ describe('QueryCache', () => { }) describe('removeQueries', () => { - test('should properly unwrap 1 parameter', async () => { + test('should properly unwrap 1 parameter', () => { const queryClient = new QueryClient() queryClient.removeQueries({ @@ -148,7 +148,7 @@ describe('QueryCache', () => { }) describe('resetQueries', () => { - test('should properly unwrap 2 parameter', async () => { + test('should properly unwrap 2 parameter', () => { const queryClient = new QueryClient() queryClient.resetQueries( @@ -168,7 +168,7 @@ describe('QueryCache', () => { }) describe('cancelQueries', () => { - test('should properly unwrap 2 parameter', async () => { + test('should properly unwrap 2 parameter', () => { const queryClient = new QueryClient() queryClient.cancelQueries( @@ -259,7 +259,7 @@ describe('QueryCache', () => { }) describe('refetchQueries', () => { - test('should properly unwrap 2 parameter', async () => { + test('should properly unwrap 2 parameter', () => { const queryClient = new QueryClient() queryClient.refetchQueries( @@ -279,7 +279,7 @@ describe('QueryCache', () => { }) describe('fetchQuery', () => { - test('should properly unwrap parameter', async () => { + test('should properly unwrap parameter', () => { const queryClient = new QueryClient() queryClient.fetchQuery({ @@ -293,7 +293,7 @@ describe('QueryCache', () => { }) describe('prefetchQuery', () => { - test('should properly unwrap parameters', async () => { + test('should properly unwrap parameters', () => { const queryClient = new QueryClient() queryClient.prefetchQuery({ queryKey: queryKeyRef, queryFn: fn }) @@ -306,7 +306,7 @@ describe('QueryCache', () => { }) describe('fetchInfiniteQuery', () => { - test('should properly unwrap parameter', async () => { + test('should properly unwrap parameter', () => { const queryClient = new QueryClient() queryClient.fetchInfiniteQuery({ @@ -319,7 +319,7 @@ describe('QueryCache', () => { queryKey: queryKeyUnref, }) }) - test('should properly unwrap parameter using infiniteQueryOptions with unref', async () => { + test('should properly unwrap parameter using infiniteQueryOptions with unref', () => { const queryClient = new QueryClient() const options = infiniteQueryOptions({ @@ -338,7 +338,7 @@ describe('QueryCache', () => { }) describe('prefetchInfiniteQuery', () => { - test('should properly unwrap parameters', async () => { + test('should properly unwrap parameters', () => { const queryClient = new QueryClient() queryClient.prefetchInfiniteQuery({ @@ -356,7 +356,7 @@ describe('QueryCache', () => { }) describe('setDefaultOptions', () => { - test('should properly unwrap parameters', async () => { + test('should properly unwrap parameters', () => { const queryClient = new QueryClient() queryClient.setDefaultOptions({ @@ -374,7 +374,7 @@ describe('QueryCache', () => { }) describe('setQueryDefaults', () => { - test('should properly unwrap parameters', async () => { + test('should properly unwrap parameters', () => { const queryClient = new QueryClient() queryClient.setQueryDefaults(queryKeyRef, { @@ -391,7 +391,7 @@ describe('QueryCache', () => { }) describe('getQueryDefaults', () => { - test('should properly unwrap parameters', async () => { + test('should properly unwrap parameters', () => { const queryClient = new QueryClient() queryClient.getQueryDefaults(queryKeyRef) @@ -403,7 +403,7 @@ describe('QueryCache', () => { }) describe('setMutationDefaults', () => { - test('should properly unwrap parameters', async () => { + test('should properly unwrap parameters', () => { const queryClient = new QueryClient() queryClient.setMutationDefaults(queryKeyRef, { @@ -420,7 +420,7 @@ describe('QueryCache', () => { }) describe('getMutationDefaults', () => { - test('should properly unwrap parameters', async () => { + test('should properly unwrap parameters', () => { const queryClient = new QueryClient() queryClient.getMutationDefaults(queryKeyRef) diff --git a/packages/vue-query/src/__tests__/useIsMutating.test.ts b/packages/vue-query/src/__tests__/useIsMutating.test.ts index 3600014c1b1..9a0f203c41b 100644 --- a/packages/vue-query/src/__tests__/useIsMutating.test.ts +++ b/packages/vue-query/src/__tests__/useIsMutating.test.ts @@ -83,7 +83,7 @@ describe('useIsMutating', () => { }) describe('useMutationState', () => { - it('should return variables after calling mutate 1', async () => { + it('should return variables after calling mutate 1', () => { const mutationKey = ['mutation'] const variables = 'foo123' @@ -102,7 +102,7 @@ describe('useMutationState', () => { expect(mutationState.value).toEqual([variables]) }) - it('should return variables after calling mutate 2', async () => { + it('should return variables after calling mutate 2', () => { const queryClient = useQueryClient() queryClient.clear() const mutationKey = ['mutation'] diff --git a/packages/vue-query/src/queryClient.ts b/packages/vue-query/src/queryClient.ts index ca0fe3953d8..dc0bff131d2 100644 --- a/packages/vue-query/src/queryClient.ts +++ b/packages/vue-query/src/queryClient.ts @@ -114,17 +114,17 @@ export class QueryClient extends QC { NoInfer | undefined >, options?: MaybeRefDeep, - ): TInferredQueryFnData | undefined + ): NoInfer | undefined setQueryData>( queryKey: MaybeRefDeep, updater: Updater | undefined, NoInfer | undefined>, options?: MaybeRefDeep, - ): TData | undefined + ): NoInfer | undefined setQueryData( queryKey: MaybeRefDeep, updater: Updater, options: MaybeRefDeep = {}, - ): TData | undefined { + ): NoInfer | undefined { return super.setQueryData( cloneDeepUnref(queryKey), updater,