diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index f712dc0f75..0bc87d976d 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -69,8 +69,8 @@ jobs: Sizes for commit ${{ env.COMMIT_SHA }}: | Branch | Bundle Size | |--------|--------| - | Main | [![](https://deno.bundlejs.com/badge?q=https://esm.sh/@tanstack/react-query/es2022/react-query.mjs&config={%22esbuild%22:{%22external%22:[%22react@^19.1.1/jsx-runtime?target=es2022%22,%22react@^19.1.1?target=es2022%22]}}&badge=detailed)](https://bundlejs.com/?q=https://esm.sh/@tanstack/react-query/es2022/react-query.mjs&config=%7B%22esbuild%22:%7B%22external%22:%5B%22react@%5E19.2.0/jsx-runtime?target=es2022%22,%22react@%5E19.2.0?target=es2022%22%5D%7D%7D) | - | This PR | [![](https://deno.bundlejs.com/badge?q=https://esm.sh/pr/@tanstack/react-query@${{ env.COMMIT_SHA }}/es2022/react-query.mjs&config={%22esbuild%22:{%22external%22:[%22react@^19.1.1/jsx-runtime?target=es2022%22,%22react@^19.1.1?target=es2022%22]}}&badge=detailed)](https://bundlejs.com/?q=https://esm.sh/pr/@tanstack/react-query@${{ env.COMMIT_SHA }}/es2022/react-query.mjs&config=%7B%22esbuild%22:%7B%22external%22:%5B%22react@%5E19.2.0/jsx-runtime?target=es2022%22,%22react@%5E19.2.0?target=es2022%22%5D%7D%7D) | + | Main | [![](https://deno.bundlejs.com/badge?q=https://esm.sh/@tanstack/react-query/es2022/react-query.mjs&config={%22esbuild%22:{%22external%22:[%22react@^19.2.0/jsx-runtime?target=es2022%22,%22react@^19.2.0?target=es2022%22]}}&badge=detailed)](https://bundlejs.com/?q=https://esm.sh/@tanstack/react-query/es2022/react-query.mjs&config=%7B%22esbuild%22:%7B%22external%22:%5B%22react@%5E19.2.0/jsx-runtime?target=es2022%22,%22react@%5E19.2.0?target=es2022%22%5D%7D%7D) | + | This PR | [![](https://deno.bundlejs.com/badge?q=https://esm.sh/pr/@tanstack/react-query@${{ env.COMMIT_SHA }}/es2022/react-query.mjs&config={%22esbuild%22:{%22external%22:[%22react@^19.2.0/jsx-runtime?target=es2022%22,%22react@^19.2.0?target=es2022%22]}}&badge=detailed)](https://bundlejs.com/?q=https://esm.sh/pr/@tanstack/react-query@${{ env.COMMIT_SHA }}/es2022/react-query.mjs&config=%7B%22esbuild%22:%7B%22external%22:%5B%22react@%5E19.2.0/jsx-runtime?target=es2022%22,%22react@%5E19.2.0?target=es2022%22%5D%7D%7D) | continue-on-error: true provenance: name: Provenance diff --git a/README.md b/README.md index a2d75020a1..c052f7f15a 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ - + diff --git a/docs/framework/angular/guides/background-fetching-indicators.md b/docs/framework/angular/guides/background-fetching-indicators.md index 3eeafa2858..2aa27c62c8 100644 --- a/docs/framework/angular/guides/background-fetching-indicators.md +++ b/docs/framework/angular/guides/background-fetching-indicators.md @@ -2,6 +2,12 @@ id: background-fetching-indicators title: Background Fetching Indicators ref: docs/framework/react/guides/background-fetching-indicators.md +replace: + { + 'useIsFetching': 'injectIsFetching', + 'hook': 'function', + '@tanstack/react-query': '@tanstack/angular-query-experimental', + } --- [//]: # 'Example' diff --git a/docs/framework/react/guides/disabling-queries.md b/docs/framework/react/guides/disabling-queries.md index 93ff4ee36c..8b5df15748 100644 --- a/docs/framework/react/guides/disabling-queries.md +++ b/docs/framework/react/guides/disabling-queries.md @@ -97,7 +97,7 @@ so it will only be true if the query is currently fetching for the first time. If you are using TypeScript, you can use the `skipToken` to disable a query. This is useful when you want to disable a query based on a condition, but you still want to keep the query to be type safe. -> IMPORTANT: `refetch` from `useQuery` will not work with `skipToken`. Other than that, `skipToken` works the same as `enabled: false`. +> **IMPORTANT**: `refetch` from `useQuery` will not work with `skipToken`. Calling `refetch()` on a query that uses `skipToken` will result in a `Missing queryFn` error because there is no valid query function to execute. If you need to manually trigger queries, consider using `enabled: false` instead, which allows `refetch()` to work properly. Other than this limitation, `skipToken` works the same as `enabled: false`. [//]: # 'Example3' diff --git a/docs/framework/react/guides/paginated-queries.md b/docs/framework/react/guides/paginated-queries.md index e46131ab1e..258d744c78 100644 --- a/docs/framework/react/guides/paginated-queries.md +++ b/docs/framework/react/guides/paginated-queries.md @@ -10,7 +10,7 @@ Rendering paginated data is a very common UI pattern and in TanStack Query, it " ```tsx const result = useQuery({ queryKey: ['projects', page], - queryFn: fetchProjects, + queryFn: () => fetchProjects(page), }) ``` diff --git a/docs/framework/react/guides/query-retries.md b/docs/framework/react/guides/query-retries.md index 1929ff7e4a..fa1364dfba 100644 --- a/docs/framework/react/guides/query-retries.md +++ b/docs/framework/react/guides/query-retries.md @@ -78,3 +78,28 @@ const result = useQuery({ ``` [//]: # 'Example3' + +## Background Retry Behavior + +When using `refetchInterval` with `refetchIntervalInBackground: true`, retries will pause when the browser tab is inactive. This happens because retries respect the same focus behavior as regular refetches. + +If you need continuous retries in the background, consider disabling retries and implementing a custom refetch strategy: + +[//]: # 'Example4' + +```tsx +const result = useQuery({ + queryKey: ['todos'], + queryFn: fetchTodos, + refetchInterval: (query) => { + // Refetch more frequently when in error state + return query.state.status === 'error' ? 5000 : 30000 + }, + refetchIntervalInBackground: true, + retry: false, // Disable built-in retries +}) +``` + +[//]: # 'Example4' + +This approach lets you control retry timing manually while keeping refetches active in the background. diff --git a/docs/framework/solid/guides/request-waterfalls.md b/docs/framework/solid/guides/request-waterfalls.md index b0f0821d58..6a4894e609 100644 --- a/docs/framework/solid/guides/request-waterfalls.md +++ b/docs/framework/solid/guides/request-waterfalls.md @@ -11,5 +11,7 @@ replace: 'useQuery[(]': 'useQuery(() => ', 'useQueries[(]': 'useQueries(() => ', 'useInfiniteQuery[(]': 'useInfiniteQuery(() => ', + 'useSuspenseQuery': 'useQuery', + 'useSuspenseQueries': 'useQueries', } --- diff --git a/docs/framework/solid/guides/suspense.md b/docs/framework/solid/guides/suspense.md index 31924d1924..20d7a77bcc 100644 --- a/docs/framework/solid/guides/suspense.md +++ b/docs/framework/solid/guides/suspense.md @@ -16,25 +16,24 @@ import { Suspense } from 'solid-js' You can use async `suspense` function that is provided by `solid-query`. -```vue - + +function SuspendableComponent() { + const query = useQuery(() => ({ + queryKey: ['todos'], + queryFn: todoFetcher, + })) + + // Accessing query.data directly inside a boundary + // automatically triggers suspension until data is ready + return
Data: {JSON.stringify(query.data)}
+} ``` ## Fetch-on-render vs Render-as-you-fetch diff --git a/examples/angular/auto-refetching/package.json b/examples/angular/auto-refetching/package.json index 550cd54e95..6fbf37ef91 100644 --- a/examples/angular/auto-refetching/package.json +++ b/examples/angular/auto-refetching/package.json @@ -13,7 +13,7 @@ "@angular/compiler": "^20.0.0", "@angular/core": "^20.0.0", "@angular/platform-browser": "^20.0.0", - "@tanstack/angular-query-experimental": "^5.90.8", + "@tanstack/angular-query-experimental": "^5.90.9", "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 18f7ea6a92..6cfa232576 100644 --- a/examples/angular/basic-persister/package.json +++ b/examples/angular/basic-persister/package.json @@ -13,9 +13,9 @@ "@angular/compiler": "^20.0.0", "@angular/core": "^20.0.0", "@angular/platform-browser": "^20.0.0", - "@tanstack/angular-query-experimental": "^5.90.8", - "@tanstack/angular-query-persist-client": "^5.62.13", - "@tanstack/query-async-storage-persister": "^5.90.8", + "@tanstack/angular-query-experimental": "^5.90.9", + "@tanstack/angular-query-persist-client": "^5.62.14", + "@tanstack/query-async-storage-persister": "^5.90.9", "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 0e90997d57..5604d77050 100644 --- a/examples/angular/basic/package.json +++ b/examples/angular/basic/package.json @@ -13,7 +13,7 @@ "@angular/compiler": "^20.0.0", "@angular/core": "^20.0.0", "@angular/platform-browser": "^20.0.0", - "@tanstack/angular-query-experimental": "^5.90.8", + "@tanstack/angular-query-experimental": "^5.90.9", "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 d40506679b..96e32b4f22 100644 --- a/examples/angular/devtools-panel/package.json +++ b/examples/angular/devtools-panel/package.json @@ -14,7 +14,7 @@ "@angular/core": "^20.0.0", "@angular/platform-browser": "^20.0.0", "@angular/router": "^20.0.0", - "@tanstack/angular-query-experimental": "^5.90.8", + "@tanstack/angular-query-experimental": "^5.90.9", "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 51c4800b0a..c3cc933b07 100644 --- a/examples/angular/infinite-query-with-max-pages/package.json +++ b/examples/angular/infinite-query-with-max-pages/package.json @@ -13,7 +13,7 @@ "@angular/compiler": "^20.0.0", "@angular/core": "^20.0.0", "@angular/platform-browser": "^20.0.0", - "@tanstack/angular-query-experimental": "^5.90.8", + "@tanstack/angular-query-experimental": "^5.90.9", "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 441bb5c446..12ca880f67 100644 --- a/examples/angular/optimistic-updates/package.json +++ b/examples/angular/optimistic-updates/package.json @@ -14,7 +14,7 @@ "@angular/core": "^20.0.0", "@angular/forms": "^20.0.0", "@angular/platform-browser": "^20.0.0", - "@tanstack/angular-query-experimental": "^5.90.8", + "@tanstack/angular-query-experimental": "^5.90.9", "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 084bc2bf71..20368fa9ff 100644 --- a/examples/angular/pagination/package.json +++ b/examples/angular/pagination/package.json @@ -13,7 +13,7 @@ "@angular/compiler": "^20.0.0", "@angular/core": "^20.0.0", "@angular/platform-browser": "^20.0.0", - "@tanstack/angular-query-experimental": "^5.90.8", + "@tanstack/angular-query-experimental": "^5.90.9", "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 a783761f67..90faaf5694 100644 --- a/examples/angular/query-options-from-a-service/package.json +++ b/examples/angular/query-options-from-a-service/package.json @@ -14,7 +14,7 @@ "@angular/core": "^20.0.0", "@angular/platform-browser": "^20.0.0", "@angular/router": "^20.0.0", - "@tanstack/angular-query-experimental": "^5.90.8", + "@tanstack/angular-query-experimental": "^5.90.9", "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 5a92edbe97..b50afce7a4 100644 --- a/examples/angular/router/package.json +++ b/examples/angular/router/package.json @@ -14,7 +14,7 @@ "@angular/core": "^20.0.0", "@angular/platform-browser": "^20.0.0", "@angular/router": "^20.0.0", - "@tanstack/angular-query-experimental": "^5.90.8", + "@tanstack/angular-query-experimental": "^5.90.9", "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 4154be10e7..264921c427 100644 --- a/examples/angular/rxjs/package.json +++ b/examples/angular/rxjs/package.json @@ -14,7 +14,7 @@ "@angular/core": "^20.0.0", "@angular/forms": "^20.0.0", "@angular/platform-browser": "^20.0.0", - "@tanstack/angular-query-experimental": "^5.90.8", + "@tanstack/angular-query-experimental": "^5.90.9", "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 ca655c8c99..791a0bf15d 100644 --- a/examples/angular/simple/package.json +++ b/examples/angular/simple/package.json @@ -13,7 +13,7 @@ "@angular/compiler": "^20.0.0", "@angular/core": "^20.0.0", "@angular/platform-browser": "^20.0.0", - "@tanstack/angular-query-experimental": "^5.90.8", + "@tanstack/angular-query-experimental": "^5.90.9", "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 b0edfced98..b7b3e11d04 100644 --- a/examples/react/algolia/package.json +++ b/examples/react/algolia/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@algolia/client-search": "5.2.1", - "@tanstack/react-query": "^5.90.6", + "@tanstack/react-query": "^5.90.7", "@tanstack/react-query-devtools": "^5.90.2", "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 e9b8cca368..04d777fa6c 100644 --- a/examples/react/auto-refetching/package.json +++ b/examples/react/auto-refetching/package.json @@ -8,7 +8,7 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.90.6", + "@tanstack/react-query": "^5.90.7", "@tanstack/react-query-devtools": "^5.90.2", "next": "^15.3.1", "react": "^18.2.0", diff --git a/examples/react/basic-graphql-request/package.json b/examples/react/basic-graphql-request/package.json index 42619a85d0..6f8fbc8392 100644 --- a/examples/react/basic-graphql-request/package.json +++ b/examples/react/basic-graphql-request/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.90.6", + "@tanstack/react-query": "^5.90.7", "@tanstack/react-query-devtools": "^5.90.2", "graphql": "^16.9.0", "graphql-request": "^7.1.2", diff --git a/examples/react/basic/package.json b/examples/react/basic/package.json index e1ce86b64e..777ce74cd3 100644 --- a/examples/react/basic/package.json +++ b/examples/react/basic/package.json @@ -9,10 +9,10 @@ "test:eslint": "eslint ./src" }, "dependencies": { - "@tanstack/query-async-storage-persister": "^5.90.8", - "@tanstack/react-query": "^5.90.6", + "@tanstack/query-async-storage-persister": "^5.90.9", + "@tanstack/react-query": "^5.90.7", "@tanstack/react-query-devtools": "^5.90.2", - "@tanstack/react-query-persist-client": "^5.90.8", + "@tanstack/react-query-persist-client": "^5.90.9", "react": "^19.0.0", "react-dom": "^19.0.0" }, diff --git a/examples/react/chat/package.json b/examples/react/chat/package.json index 65520cb710..90354ebaf8 100644 --- a/examples/react/chat/package.json +++ b/examples/react/chat/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.90.6", + "@tanstack/react-query": "^5.90.7", "@tanstack/react-query-devtools": "^5.90.2", "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 877fd6e083..0bba649530 100644 --- a/examples/react/default-query-function/package.json +++ b/examples/react/default-query-function/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.90.6", + "@tanstack/react-query": "^5.90.7", "@tanstack/react-query-devtools": "^5.90.2", "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 9d2d4c4373..c5fd8a5ac8 100644 --- a/examples/react/devtools-panel/package.json +++ b/examples/react/devtools-panel/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.90.6", + "@tanstack/react-query": "^5.90.7", "@tanstack/react-query-devtools": "^5.90.2", "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 114db704a7..025ae2d746 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-async-storage-persister": "^5.90.8", - "@tanstack/react-query": "^5.90.6", + "@tanstack/query-async-storage-persister": "^5.90.9", + "@tanstack/react-query": "^5.90.7", "@tanstack/react-query-devtools": "^5.90.2", - "@tanstack/react-query-persist-client": "^5.90.8", + "@tanstack/react-query-persist-client": "^5.90.9", "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 ec3e212d49..d6f4151ed4 100644 --- a/examples/react/infinite-query-with-max-pages/package.json +++ b/examples/react/infinite-query-with-max-pages/package.json @@ -8,7 +8,7 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.90.6", + "@tanstack/react-query": "^5.90.7", "@tanstack/react-query-devtools": "^5.90.2", "next": "^15.3.1", "react": "^18.2.0", diff --git a/examples/react/load-more-infinite-scroll/package.json b/examples/react/load-more-infinite-scroll/package.json index 4937b1cf06..3c6c2220fe 100644 --- a/examples/react/load-more-infinite-scroll/package.json +++ b/examples/react/load-more-infinite-scroll/package.json @@ -8,7 +8,7 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.90.6", + "@tanstack/react-query": "^5.90.7", "@tanstack/react-query-devtools": "^5.90.2", "next": "^15.3.1", "react": "^18.2.0", diff --git a/examples/react/nextjs-app-prefetching/package.json b/examples/react/nextjs-app-prefetching/package.json index d6d204f766..7528921463 100644 --- a/examples/react/nextjs-app-prefetching/package.json +++ b/examples/react/nextjs-app-prefetching/package.json @@ -8,7 +8,7 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.90.6", + "@tanstack/react-query": "^5.90.7", "@tanstack/react-query-devtools": "^5.90.2", "next": "^15.3.1", "react": "^19.0.0", diff --git a/examples/react/nextjs-suspense-streaming/package.json b/examples/react/nextjs-suspense-streaming/package.json index 924e32d0c5..c508323080 100644 --- a/examples/react/nextjs-suspense-streaming/package.json +++ b/examples/react/nextjs-suspense-streaming/package.json @@ -8,7 +8,7 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.90.6", + "@tanstack/react-query": "^5.90.7", "@tanstack/react-query-devtools": "^5.90.2", "@tanstack/react-query-next-experimental": "^5.90.2", "next": "^15.3.1", diff --git a/examples/react/nextjs/package.json b/examples/react/nextjs/package.json index 54a5a1803c..c13c6a9c9f 100644 --- a/examples/react/nextjs/package.json +++ b/examples/react/nextjs/package.json @@ -8,7 +8,7 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.90.6", + "@tanstack/react-query": "^5.90.7", "@tanstack/react-query-devtools": "^5.90.2", "next": "^15.3.1", "react": "^18.2.0", diff --git a/examples/react/offline/package.json b/examples/react/offline/package.json index e93c075180..33f3d17f48 100644 --- a/examples/react/offline/package.json +++ b/examples/react/offline/package.json @@ -8,11 +8,11 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/query-async-storage-persister": "^5.90.8", + "@tanstack/query-async-storage-persister": "^5.90.9", "@tanstack/react-location": "^3.7.4", - "@tanstack/react-query": "^5.90.6", + "@tanstack/react-query": "^5.90.7", "@tanstack/react-query-devtools": "^5.90.2", - "@tanstack/react-query-persist-client": "^5.90.8", + "@tanstack/react-query-persist-client": "^5.90.9", "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 2c83e7e1f8..f4cc46606d 100755 --- a/examples/react/optimistic-updates-cache/package.json +++ b/examples/react/optimistic-updates-cache/package.json @@ -8,7 +8,7 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.90.6", + "@tanstack/react-query": "^5.90.7", "@tanstack/react-query-devtools": "^5.90.2", "next": "^15.3.1", "react": "^18.2.0", diff --git a/examples/react/optimistic-updates-ui/package.json b/examples/react/optimistic-updates-ui/package.json index de6644d775..caaa9affb3 100755 --- a/examples/react/optimistic-updates-ui/package.json +++ b/examples/react/optimistic-updates-ui/package.json @@ -8,7 +8,7 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.90.6", + "@tanstack/react-query": "^5.90.7", "@tanstack/react-query-devtools": "^5.90.2", "next": "^15.3.1", "react": "^18.2.0", diff --git a/examples/react/pagination/package.json b/examples/react/pagination/package.json index 5caf04f2d3..fcb258680b 100644 --- a/examples/react/pagination/package.json +++ b/examples/react/pagination/package.json @@ -8,7 +8,7 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.90.6", + "@tanstack/react-query": "^5.90.7", "@tanstack/react-query-devtools": "^5.90.2", "next": "^15.3.1", "react": "^18.2.0", diff --git a/examples/react/playground/package.json b/examples/react/playground/package.json index ea5af6cc68..f6b40b2d11 100644 --- a/examples/react/playground/package.json +++ b/examples/react/playground/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.90.6", + "@tanstack/react-query": "^5.90.7", "@tanstack/react-query-devtools": "^5.90.2", "react": "^19.0.0", "react-dom": "^19.0.0" diff --git a/examples/react/prefetching/package.json b/examples/react/prefetching/package.json index 26712bcb42..61ef1c55d3 100644 --- a/examples/react/prefetching/package.json +++ b/examples/react/prefetching/package.json @@ -8,7 +8,7 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.90.6", + "@tanstack/react-query": "^5.90.7", "@tanstack/react-query-devtools": "^5.90.2", "next": "^15.3.1", "react": "^18.2.0", diff --git a/examples/react/react-native/package.json b/examples/react/react-native/package.json index 3f8b8da21c..bedc9d0853 100644 --- a/examples/react/react-native/package.json +++ b/examples/react/react-native/package.json @@ -14,7 +14,7 @@ "@react-native-community/netinfo": "^11.4.1", "@react-navigation/native": "^6.1.18", "@react-navigation/stack": "^6.4.1", - "@tanstack/react-query": "^5.90.6", + "@tanstack/react-query": "^5.90.7", "@tanstack/react-query-devtools": "^5.90.2", "expo": "^52.0.11", "expo-constants": "^17.0.3", diff --git a/examples/react/react-router/package.json b/examples/react/react-router/package.json index 268a6268fc..f525f3299c 100644 --- a/examples/react/react-router/package.json +++ b/examples/react/react-router/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.90.6", + "@tanstack/react-query": "^5.90.7", "@tanstack/react-query-devtools": "^5.90.2", "localforage": "^1.10.0", "match-sorter": "^6.3.4", diff --git a/examples/react/rick-morty/package.json b/examples/react/rick-morty/package.json index 93ed169996..1657df35d3 100644 --- a/examples/react/rick-morty/package.json +++ b/examples/react/rick-morty/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.90.6", + "@tanstack/react-query": "^5.90.7", "@tanstack/react-query-devtools": "^5.90.2", "react": "^19.0.0", "react-dom": "^19.0.0", diff --git a/examples/react/shadow-dom/package.json b/examples/react/shadow-dom/package.json index 864da3fbf2..1af70d1375 100644 --- a/examples/react/shadow-dom/package.json +++ b/examples/react/shadow-dom/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.90.6", + "@tanstack/react-query": "^5.90.7", "@tanstack/react-query-devtools": "^5.90.2", "react": "^19.0.0", "react-dom": "^19.0.0" diff --git a/examples/react/simple/package.json b/examples/react/simple/package.json index 752897ee70..3b3d18716d 100644 --- a/examples/react/simple/package.json +++ b/examples/react/simple/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.90.6", + "@tanstack/react-query": "^5.90.7", "@tanstack/react-query-devtools": "^5.90.2", "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 c3c71491d6..0b7d102b68 100644 --- a/examples/react/star-wars/package.json +++ b/examples/react/star-wars/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.90.6", + "@tanstack/react-query": "^5.90.7", "@tanstack/react-query-devtools": "^5.90.2", "react": "^19.0.0", "react-dom": "^19.0.0", diff --git a/examples/react/suspense/package.json b/examples/react/suspense/package.json index a0d404fd8a..4948d1a339 100644 --- a/examples/react/suspense/package.json +++ b/examples/react/suspense/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.90.6", + "@tanstack/react-query": "^5.90.7", "@tanstack/react-query-devtools": "^5.90.2", "font-awesome": "^4.7.0", "react": "^19.0.0", diff --git a/examples/solid/astro/package.json b/examples/solid/astro/package.json index c46e55a495..2f9fbea5a8 100644 --- a/examples/solid/astro/package.json +++ b/examples/solid/astro/package.json @@ -15,7 +15,7 @@ "@astrojs/solid-js": "^5.0.7", "@astrojs/tailwind": "^6.0.2", "@astrojs/vercel": "^8.1.3", - "@tanstack/solid-query": "^5.90.8", + "@tanstack/solid-query": "^5.90.10", "@tanstack/solid-query-devtools": "^5.90.4", "astro": "^5.5.6", "solid-js": "^1.9.7", diff --git a/examples/solid/basic-graphql-request/package.json b/examples/solid/basic-graphql-request/package.json index 52ab955b79..85fc428ed8 100644 --- a/examples/solid/basic-graphql-request/package.json +++ b/examples/solid/basic-graphql-request/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/solid-query": "^5.90.8", + "@tanstack/solid-query": "^5.90.10", "@tanstack/solid-query-devtools": "^5.90.4", "graphql": "^16.9.0", "graphql-request": "^7.1.2", diff --git a/examples/solid/basic/package.json b/examples/solid/basic/package.json index 25f1cfe125..873b7a12cb 100644 --- a/examples/solid/basic/package.json +++ b/examples/solid/basic/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/solid-query": "^5.90.8", + "@tanstack/solid-query": "^5.90.10", "@tanstack/solid-query-devtools": "^5.90.4", "solid-js": "^1.9.7" }, diff --git a/examples/solid/default-query-function/package.json b/examples/solid/default-query-function/package.json index 9205cad5f9..68e5088a1b 100644 --- a/examples/solid/default-query-function/package.json +++ b/examples/solid/default-query-function/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/solid-query": "^5.90.8", + "@tanstack/solid-query": "^5.90.10", "@tanstack/solid-query-devtools": "^5.90.4", "solid-js": "^1.9.7" }, diff --git a/examples/solid/simple/package.json b/examples/solid/simple/package.json index 2d7b6b89ec..8fcfe1f97a 100644 --- a/examples/solid/simple/package.json +++ b/examples/solid/simple/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/solid-query": "^5.90.8", + "@tanstack/solid-query": "^5.90.10", "@tanstack/solid-query-devtools": "^5.90.4", "solid-js": "^1.9.7" }, diff --git a/examples/solid/solid-start-streaming/package.json b/examples/solid/solid-start-streaming/package.json index f59fa1bf3f..15cddba5f3 100644 --- a/examples/solid/solid-start-streaming/package.json +++ b/examples/solid/solid-start-streaming/package.json @@ -12,7 +12,7 @@ "@solidjs/meta": "^0.29.4", "@solidjs/router": "^0.15.3", "@solidjs/start": "^1.1.3", - "@tanstack/solid-query": "^5.90.8", + "@tanstack/solid-query": "^5.90.10", "@tanstack/solid-query-devtools": "^5.90.4", "solid-js": "^1.9.7", "vinxi": "^0.5.3" diff --git a/examples/svelte/auto-refetching/package.json b/examples/svelte/auto-refetching/package.json index 4abafee98b..8f128abe38 100644 --- a/examples/svelte/auto-refetching/package.json +++ b/examples/svelte/auto-refetching/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/svelte-query": "^6.0.4", + "@tanstack/svelte-query": "^6.0.5", "@tanstack/svelte-query-devtools": "^6.0.0" }, "devDependencies": { diff --git a/examples/svelte/basic/package.json b/examples/svelte/basic/package.json index 6fe4f93c64..ca4ce96f85 100644 --- a/examples/svelte/basic/package.json +++ b/examples/svelte/basic/package.json @@ -8,10 +8,10 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/query-async-storage-persister": "^5.90.8", - "@tanstack/svelte-query": "^6.0.4", + "@tanstack/query-async-storage-persister": "^5.90.9", + "@tanstack/svelte-query": "^6.0.5", "@tanstack/svelte-query-devtools": "^6.0.0", - "@tanstack/svelte-query-persist-client": "^6.0.6" + "@tanstack/svelte-query-persist-client": "^6.0.7" }, "devDependencies": { "@sveltejs/adapter-auto": "^6.1.0", diff --git a/examples/svelte/load-more-infinite-scroll/package.json b/examples/svelte/load-more-infinite-scroll/package.json index 5462ba2fb6..891b70e312 100644 --- a/examples/svelte/load-more-infinite-scroll/package.json +++ b/examples/svelte/load-more-infinite-scroll/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/svelte-query": "^6.0.4", + "@tanstack/svelte-query": "^6.0.5", "@tanstack/svelte-query-devtools": "^6.0.0" }, "devDependencies": { diff --git a/examples/svelte/optimistic-updates/package.json b/examples/svelte/optimistic-updates/package.json index 7a0660d02c..d8fcc17d4c 100644 --- a/examples/svelte/optimistic-updates/package.json +++ b/examples/svelte/optimistic-updates/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/svelte-query": "^6.0.4", + "@tanstack/svelte-query": "^6.0.5", "@tanstack/svelte-query-devtools": "^6.0.0" }, "devDependencies": { diff --git a/examples/svelte/playground/package.json b/examples/svelte/playground/package.json index 3ca2be349c..b86a1e7cf4 100644 --- a/examples/svelte/playground/package.json +++ b/examples/svelte/playground/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/svelte-query": "^6.0.4", + "@tanstack/svelte-query": "^6.0.5", "@tanstack/svelte-query-devtools": "^6.0.0" }, "devDependencies": { diff --git a/examples/svelte/simple/package.json b/examples/svelte/simple/package.json index 4cc6cb2fc2..a87b0430ad 100644 --- a/examples/svelte/simple/package.json +++ b/examples/svelte/simple/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/svelte-query": "^6.0.4", + "@tanstack/svelte-query": "^6.0.5", "@tanstack/svelte-query-devtools": "^6.0.0" }, "devDependencies": { diff --git a/examples/svelte/ssr/package.json b/examples/svelte/ssr/package.json index 03e313161e..32ec453d59 100644 --- a/examples/svelte/ssr/package.json +++ b/examples/svelte/ssr/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/svelte-query": "^6.0.4", + "@tanstack/svelte-query": "^6.0.5", "@tanstack/svelte-query-devtools": "^6.0.0" }, "devDependencies": { diff --git a/examples/svelte/star-wars/package.json b/examples/svelte/star-wars/package.json index ba9aa6f76a..64ea4b75fc 100644 --- a/examples/svelte/star-wars/package.json +++ b/examples/svelte/star-wars/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/svelte-query": "^6.0.4", + "@tanstack/svelte-query": "^6.0.5", "@tanstack/svelte-query-devtools": "^6.0.0" }, "devDependencies": { diff --git a/examples/vue/basic/package.json b/examples/vue/basic/package.json index 2d434681f0..2dd8c84c9f 100644 --- a/examples/vue/basic/package.json +++ b/examples/vue/basic/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.90.6", + "@tanstack/vue-query": "^5.90.7", "@tanstack/vue-query-devtools": "^5.91.0", "vue": "^3.4.27" }, diff --git a/examples/vue/dependent-queries/package.json b/examples/vue/dependent-queries/package.json index fc2e3e74b3..67b514a777 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.90.6", + "@tanstack/vue-query": "^5.90.7", "vue": "^3.4.27" }, "devDependencies": { diff --git a/examples/vue/persister/package.json b/examples/vue/persister/package.json index 8cf5dbabb0..5df0ac28a6 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.90.6", - "@tanstack/query-persist-client-core": "^5.91.5", - "@tanstack/query-sync-storage-persister": "^5.90.8", - "@tanstack/vue-query": "^5.90.6", + "@tanstack/query-core": "^5.90.7", + "@tanstack/query-persist-client-core": "^5.91.6", + "@tanstack/query-sync-storage-persister": "^5.90.9", + "@tanstack/vue-query": "^5.90.7", "idb-keyval": "^6.2.1", "vue": "^3.4.27" }, diff --git a/examples/vue/simple/package.json b/examples/vue/simple/package.json index 4c1f124a5e..31a101818d 100644 --- a/examples/vue/simple/package.json +++ b/examples/vue/simple/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.90.6", + "@tanstack/vue-query": "^5.90.7", "@tanstack/vue-query-devtools": "^5.91.0", "vue": "^3.4.27" }, diff --git a/integrations/angular-cli-20/package.json b/integrations/angular-cli-20/package.json index cceebace1b..329b883e5d 100644 --- a/integrations/angular-cli-20/package.json +++ b/integrations/angular-cli-20/package.json @@ -14,7 +14,7 @@ "@angular/forms": "^20.0.0", "@angular/platform-browser": "^20.0.0", "@angular/router": "^20.0.0", - "@tanstack/angular-query-experimental": "^5.90.8", + "@tanstack/angular-query-experimental": "^5.90.9", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.15.0" diff --git a/packages/angular-query-experimental/CHANGELOG.md b/packages/angular-query-experimental/CHANGELOG.md index 72539e06bd..b8b1af284b 100644 --- a/packages/angular-query-experimental/CHANGELOG.md +++ b/packages/angular-query-experimental/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/angular-query-experimental +## 5.90.9 + +### Patch Changes + +- Updated dependencies [[`b4cd121`](https://github.com/TanStack/query/commit/b4cd121a39d07cefaa3a3411136d342cc54ce8fb)]: + - @tanstack/query-core@5.90.7 + ## 5.90.8 ### Patch Changes diff --git a/packages/angular-query-experimental/package.json b/packages/angular-query-experimental/package.json index 252fab20b7..fa501df348 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.90.8", + "version": "5.90.9", "description": "Signals for managing, caching and syncing asynchronous and remote data in Angular", "author": "Arnoud de Vries", "license": "MIT", diff --git a/packages/angular-query-persist-client/CHANGELOG.md b/packages/angular-query-persist-client/CHANGELOG.md index 58ca51050a..77acfc957a 100644 --- a/packages/angular-query-persist-client/CHANGELOG.md +++ b/packages/angular-query-persist-client/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/angular-query-persist-client +## 5.62.14 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/angular-query-experimental@5.90.9 + - @tanstack/query-persist-client-core@5.91.6 + ## 5.62.13 ### Patch Changes diff --git a/packages/angular-query-persist-client/package.json b/packages/angular-query-persist-client/package.json index 0086cd7167..890be917bd 100644 --- a/packages/angular-query-persist-client/package.json +++ b/packages/angular-query-persist-client/package.json @@ -1,7 +1,7 @@ { "name": "@tanstack/angular-query-persist-client", "private": true, - "version": "5.62.13", + "version": "5.62.14", "description": "Angular bindings to work with persisters in TanStack/angular-query", "author": "Omer Gronich", "license": "MIT", diff --git a/packages/query-async-storage-persister/CHANGELOG.md b/packages/query-async-storage-persister/CHANGELOG.md index b41d121b15..dc7532e15e 100644 --- a/packages/query-async-storage-persister/CHANGELOG.md +++ b/packages/query-async-storage-persister/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/query-async-storage-persister +## 5.90.9 + +### Patch Changes + +- Updated dependencies [[`b4cd121`](https://github.com/TanStack/query/commit/b4cd121a39d07cefaa3a3411136d342cc54ce8fb)]: + - @tanstack/query-core@5.90.7 + - @tanstack/query-persist-client-core@5.91.6 + ## 5.90.8 ### Patch Changes diff --git a/packages/query-async-storage-persister/package.json b/packages/query-async-storage-persister/package.json index e4ed25a597..8a3067b79f 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.90.8", + "version": "5.90.9", "description": "A persister for asynchronous storages, to be used with TanStack/Query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/query-broadcast-client-experimental/CHANGELOG.md b/packages/query-broadcast-client-experimental/CHANGELOG.md index fccdbc3b20..f371cc7562 100644 --- a/packages/query-broadcast-client-experimental/CHANGELOG.md +++ b/packages/query-broadcast-client-experimental/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/query-broadcast-client-experimental +## 5.90.7 + +### Patch Changes + +- Updated dependencies [[`b4cd121`](https://github.com/TanStack/query/commit/b4cd121a39d07cefaa3a3411136d342cc54ce8fb)]: + - @tanstack/query-core@5.90.7 + ## 5.90.6 ### Patch Changes diff --git a/packages/query-broadcast-client-experimental/package.json b/packages/query-broadcast-client-experimental/package.json index 1b01345422..22c1c085bf 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.90.6", + "version": "5.90.7", "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/CHANGELOG.md b/packages/query-core/CHANGELOG.md index 9a321d215e..39bf563a96 100644 --- a/packages/query-core/CHANGELOG.md +++ b/packages/query-core/CHANGELOG.md @@ -1,5 +1,11 @@ # @tanstack/query-core +## 5.90.7 + +### Patch Changes + +- fix(core): only attach .then and .catch onto a promise if it gets dehydrated ([#9847](https://github.com/TanStack/query/pull/9847)) + ## 5.90.6 ### Patch Changes diff --git a/packages/query-core/package.json b/packages/query-core/package.json index 618e53a2dd..072481d583 100644 --- a/packages/query-core/package.json +++ b/packages/query-core/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/query-core", - "version": "5.90.6", + "version": "5.90.7", "description": "The framework agnostic core that powers TanStack Query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/query-core/src/hydration.ts b/packages/query-core/src/hydration.ts index 4b8c614677..c75d8ee332 100644 --- a/packages/query-core/src/hydration.ts +++ b/packages/query-core/src/hydration.ts @@ -79,25 +79,29 @@ function dehydrateQuery( serializeData: TransformerFn, shouldRedactErrors: (error: unknown) => boolean, ): DehydratedQuery { - const promise = query.promise?.then(serializeData).catch((error) => { - if (!shouldRedactErrors(error)) { - // Reject original error if it should not be redacted - return Promise.reject(error) - } - // If not in production, log original error before rejecting redacted error - if (process.env.NODE_ENV !== 'production') { - console.error( - `A query that was dehydrated as pending ended up rejecting. [${query.queryHash}]: ${error}; The error will be redacted in production builds`, - ) - } - return Promise.reject(new Error('redacted')) - }) + const dehydratePromise = () => { + const promise = query.promise?.then(serializeData).catch((error) => { + if (!shouldRedactErrors(error)) { + // Reject original error if it should not be redacted + return Promise.reject(error) + } + // If not in production, log original error before rejecting redacted error + if (process.env.NODE_ENV !== 'production') { + console.error( + `A query that was dehydrated as pending ended up rejecting. [${query.queryHash}]: ${error}; The error will be redacted in production builds`, + ) + } + return Promise.reject(new Error('redacted')) + }) + + // Avoid unhandled promise rejections + // We need the promise we dehydrate to reject to get the correct result into + // the query cache, but we also want to avoid unhandled promise rejections + // in whatever environment the prefetches are happening in. + promise?.catch(noop) - // Avoid unhandled promise rejections - // We need the promise we dehydrate to reject to get the correct result into - // the query cache, but we also want to avoid unhandled promise rejections - // in whatever environment the prefetches are happening in. - promise?.catch(noop) + return promise + } return { dehydratedAt: Date.now(), @@ -110,7 +114,7 @@ function dehydrateQuery( queryKey: query.queryKey, queryHash: query.queryHash, ...(query.state.status === 'pending' && { - promise, + promise: dehydratePromise(), }), ...(query.meta && { meta: query.meta }), } diff --git a/packages/query-persist-client-core/CHANGELOG.md b/packages/query-persist-client-core/CHANGELOG.md index 5c586da268..1a7640eebc 100644 --- a/packages/query-persist-client-core/CHANGELOG.md +++ b/packages/query-persist-client-core/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/query-persist-client-core +## 5.91.6 + +### Patch Changes + +- Updated dependencies [[`b4cd121`](https://github.com/TanStack/query/commit/b4cd121a39d07cefaa3a3411136d342cc54ce8fb)]: + - @tanstack/query-core@5.90.7 + ## 5.91.5 ### Patch Changes diff --git a/packages/query-persist-client-core/package.json b/packages/query-persist-client-core/package.json index 86cd5365c7..09f65dcfb1 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.91.5", + "version": "5.91.6", "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/CHANGELOG.md b/packages/query-sync-storage-persister/CHANGELOG.md index 70f82145a9..96659f9b45 100644 --- a/packages/query-sync-storage-persister/CHANGELOG.md +++ b/packages/query-sync-storage-persister/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/query-sync-storage-persister +## 5.90.9 + +### Patch Changes + +- Updated dependencies [[`b4cd121`](https://github.com/TanStack/query/commit/b4cd121a39d07cefaa3a3411136d342cc54ce8fb)]: + - @tanstack/query-core@5.90.7 + - @tanstack/query-persist-client-core@5.91.6 + ## 5.90.8 ### Patch Changes diff --git a/packages/query-sync-storage-persister/package.json b/packages/query-sync-storage-persister/package.json index 964e27f487..af33cd187c 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.90.8", + "version": "5.90.9", "description": "A persister for synchronous storages, to be used with TanStack/Query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/react-query-persist-client/CHANGELOG.md b/packages/react-query-persist-client/CHANGELOG.md index 913213c756..348565f7fe 100644 --- a/packages/react-query-persist-client/CHANGELOG.md +++ b/packages/react-query-persist-client/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/react-query-persist-client +## 5.90.9 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/query-persist-client-core@5.91.6 + - @tanstack/react-query@5.90.7 + ## 5.90.8 ### Patch Changes diff --git a/packages/react-query-persist-client/package.json b/packages/react-query-persist-client/package.json index 94a9df64a7..d981fc6ea1 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.90.8", + "version": "5.90.9", "description": "React bindings to work with persisters in TanStack/react-query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/react-query/CHANGELOG.md b/packages/react-query/CHANGELOG.md index 6fc01c488e..199c48422e 100644 --- a/packages/react-query/CHANGELOG.md +++ b/packages/react-query/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/react-query +## 5.90.7 + +### Patch Changes + +- Updated dependencies [[`b4cd121`](https://github.com/TanStack/query/commit/b4cd121a39d07cefaa3a3411136d342cc54ce8fb)]: + - @tanstack/query-core@5.90.7 + ## 5.90.6 ### Patch Changes diff --git a/packages/react-query/package.json b/packages/react-query/package.json index c211309a56..44262abed1 100644 --- a/packages/react-query/package.json +++ b/packages/react-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/react-query", - "version": "5.90.6", + "version": "5.90.7", "description": "Hooks for managing, caching and syncing asynchronous and remote data in React", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/solid-query-persist-client/CHANGELOG.md b/packages/solid-query-persist-client/CHANGELOG.md index ca9cb3ccb6..8095105282 100644 --- a/packages/solid-query-persist-client/CHANGELOG.md +++ b/packages/solid-query-persist-client/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/solid-query-persist-client +## 5.90.10 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/query-persist-client-core@5.91.6 + - @tanstack/solid-query@5.90.10 + ## 5.90.9 ### Patch Changes diff --git a/packages/solid-query-persist-client/package.json b/packages/solid-query-persist-client/package.json index ac192b5c4d..16843c61ee 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.90.9", + "version": "5.90.10", "description": "Solid.js bindings to work with persisters in TanStack/solid-query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/solid-query/CHANGELOG.md b/packages/solid-query/CHANGELOG.md index ae13b9991f..55ff2bda9b 100644 --- a/packages/solid-query/CHANGELOG.md +++ b/packages/solid-query/CHANGELOG.md @@ -1,5 +1,18 @@ # @tanstack/solid-query +## 5.90.10 + +### Patch Changes + +- Updated dependencies [[`b4cd121`](https://github.com/TanStack/query/commit/b4cd121a39d07cefaa3a3411136d342cc54ce8fb)]: + - @tanstack/query-core@5.90.7 + +## 5.90.9 + +### Patch Changes + +- Skip errors if returned data is undefined ([#9841](https://github.com/TanStack/query/pull/9841)) + ## 5.90.8 ### Patch Changes diff --git a/packages/solid-query/package.json b/packages/solid-query/package.json index 2f5439eae4..50be78014a 100644 --- a/packages/solid-query/package.json +++ b/packages/solid-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/solid-query", - "version": "5.90.8", + "version": "5.90.10", "description": "Primitives for managing, caching and syncing asynchronous and remote data in Solid", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/solid-query/src/useBaseQuery.ts b/packages/solid-query/src/useBaseQuery.ts index f2dbf3a74f..773d0719e0 100644 --- a/packages/solid-query/src/useBaseQuery.ts +++ b/packages/solid-query/src/useBaseQuery.ts @@ -159,7 +159,7 @@ export function useBaseQuery< const query = observer().getCurrentQuery() const unwrappedResult = hydratableObserverResult(query, result) - if (unwrappedResult.isError) { + if (result.data !== undefined && unwrappedResult.isError) { reject(unwrappedResult.error) unsubscribeIfQueued() } else { diff --git a/packages/svelte-query-persist-client/CHANGELOG.md b/packages/svelte-query-persist-client/CHANGELOG.md index 1b554cf6b6..ed2c1be862 100644 --- a/packages/svelte-query-persist-client/CHANGELOG.md +++ b/packages/svelte-query-persist-client/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/svelte-query-persist-client +## 6.0.7 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/query-persist-client-core@5.91.6 + - @tanstack/svelte-query@6.0.5 + ## 6.0.6 ### Patch Changes diff --git a/packages/svelte-query-persist-client/package.json b/packages/svelte-query-persist-client/package.json index 0fad61ee3a..9eb8b129f6 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": "6.0.6", + "version": "6.0.7", "description": "Svelte bindings to work with persisters in TanStack/svelte-query", "author": "Lachlan Collins", "license": "MIT", diff --git a/packages/svelte-query/CHANGELOG.md b/packages/svelte-query/CHANGELOG.md index 31d3ec291f..87912e3519 100644 --- a/packages/svelte-query/CHANGELOG.md +++ b/packages/svelte-query/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/svelte-query +## 6.0.5 + +### Patch Changes + +- Updated dependencies [[`b4cd121`](https://github.com/TanStack/query/commit/b4cd121a39d07cefaa3a3411136d342cc54ce8fb)]: + - @tanstack/query-core@5.90.7 + ## 6.0.4 ### Patch Changes diff --git a/packages/svelte-query/package.json b/packages/svelte-query/package.json index b36be29687..3689e99c8d 100644 --- a/packages/svelte-query/package.json +++ b/packages/svelte-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/svelte-query", - "version": "6.0.4", + "version": "6.0.5", "description": "Primitives for managing, caching and syncing asynchronous and remote data in Svelte", "author": "Lachlan Collins", "license": "MIT", diff --git a/packages/vue-query/CHANGELOG.md b/packages/vue-query/CHANGELOG.md index db5fd4585e..5d9f8348d9 100644 --- a/packages/vue-query/CHANGELOG.md +++ b/packages/vue-query/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/vue-query +## 5.90.7 + +### Patch Changes + +- Updated dependencies [[`b4cd121`](https://github.com/TanStack/query/commit/b4cd121a39d07cefaa3a3411136d342cc54ce8fb)]: + - @tanstack/query-core@5.90.7 + ## 5.90.6 ### Patch Changes diff --git a/packages/vue-query/package.json b/packages/vue-query/package.json index 07ebe8821a..34b2645096 100644 --- a/packages/vue-query/package.json +++ b/packages/vue-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/vue-query", - "version": "5.90.6", + "version": "5.90.7", "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 80fa52d8a6..a538336218 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -250,7 +250,7 @@ importers: specifier: workspace:* version: link:../../../packages/angular-query-experimental '@tanstack/angular-query-persist-client': - specifier: ^5.62.13 + specifier: ^5.62.14 version: link:../../../packages/angular-query-persist-client '@tanstack/query-async-storage-persister': specifier: workspace:*