Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/react/algolia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
},
"dependencies": {
"@algolia/client-search": "5.2.1",
"@tanstack/react-query": "^5.75.1",
"@tanstack/react-query-devtools": "^5.75.1",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-query-devtools": "^5.75.2",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/react/auto-refetching/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"start": "next start"
},
"dependencies": {
"@tanstack/react-query": "^5.75.1",
"@tanstack/react-query-devtools": "^5.75.1",
"next": "^15.1.2",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-query-devtools": "^5.75.2",
"next": "^15.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/react/basic-graphql-request/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/react-query": "^5.75.1",
"@tanstack/react-query-devtools": "^5.75.1",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-query-devtools": "^5.75.2",
"graphql": "^16.9.0",
"graphql-request": "^7.1.2",
"react": "^19.0.0",
Expand Down
6 changes: 3 additions & 3 deletions examples/react/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
},
"dependencies": {
"@tanstack/query-sync-storage-persister": "^5.75.0",
"@tanstack/react-query": "^5.75.1",
"@tanstack/react-query-devtools": "^5.75.1",
"@tanstack/react-query-persist-client": "^5.75.1",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-query-devtools": "^5.75.2",
"@tanstack/react-query-persist-client": "^5.75.2",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/react/chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/react-query": "^5.75.1",
"@tanstack/react-query-devtools": "^5.75.1",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-query-devtools": "^5.75.2",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/react/default-query-function/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/react-query": "^5.75.1",
"@tanstack/react-query-devtools": "^5.75.1",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-query-devtools": "^5.75.2",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/react/devtools-panel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/react-query": "^5.75.1",
"@tanstack/react-query-devtools": "^5.75.1",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-query-devtools": "^5.75.2",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/react/eslint-legacy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
},
"dependencies": {
"@tanstack/query-sync-storage-persister": "^5.75.0",
"@tanstack/react-query": "^5.75.1",
"@tanstack/react-query-devtools": "^5.75.1",
"@tanstack/react-query-persist-client": "^5.75.1",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-query-devtools": "^5.75.2",
"@tanstack/react-query-persist-client": "^5.75.2",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/react/infinite-query-with-max-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"start": "next start"
},
"dependencies": {
"@tanstack/react-query": "^5.75.1",
"@tanstack/react-query-devtools": "^5.75.1",
"next": "^15.1.2",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-query-devtools": "^5.75.2",
"next": "^15.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/react/load-more-infinite-scroll/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"start": "next start"
},
"dependencies": {
"@tanstack/react-query": "^5.75.1",
"@tanstack/react-query-devtools": "^5.75.1",
"next": "^15.1.2",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-query-devtools": "^5.75.2",
"next": "^15.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-intersection-observer": "^9.16.0"
Expand Down
6 changes: 3 additions & 3 deletions examples/react/nextjs-app-prefetching/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"start": "next start"
},
"dependencies": {
"@tanstack/react-query": "^5.75.1",
"@tanstack/react-query-devtools": "^5.75.1",
"next": "^15.1.2",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-query-devtools": "^5.75.2",
"next": "^15.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
Expand Down
8 changes: 4 additions & 4 deletions examples/react/nextjs-suspense-streaming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"start": "next start"
},
"dependencies": {
"@tanstack/react-query": "^5.75.1",
"@tanstack/react-query-devtools": "^5.75.1",
"@tanstack/react-query-next-experimental": "^5.75.1",
"next": "^15.1.2",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-query-devtools": "^5.75.2",
"@tanstack/react-query-next-experimental": "^5.75.2",
"next": "^15.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/react/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"start": "next start"
},
"dependencies": {
"@tanstack/react-query": "^5.75.1",
"@tanstack/react-query-devtools": "^5.75.1",
"next": "^15.1.2",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-query-devtools": "^5.75.2",
"next": "^15.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/react/offline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"dependencies": {
"@tanstack/query-sync-storage-persister": "^5.75.0",
"@tanstack/react-location": "^3.7.4",
"@tanstack/react-query": "^5.75.1",
"@tanstack/react-query-devtools": "^5.75.1",
"@tanstack/react-query-persist-client": "^5.75.1",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-query-devtools": "^5.75.2",
"@tanstack/react-query-persist-client": "^5.75.2",
"msw": "^2.6.6",
"react": "^19.0.0",
"react-dom": "^19.0.0",
Expand Down
6 changes: 3 additions & 3 deletions examples/react/optimistic-updates-cache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"start": "next start"
},
"dependencies": {
"@tanstack/react-query": "^5.75.1",
"@tanstack/react-query-devtools": "^5.75.1",
"next": "^15.1.2",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-query-devtools": "^5.75.2",
"next": "^15.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/react/optimistic-updates-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"start": "next start"
},
"dependencies": {
"@tanstack/react-query": "^5.75.1",
"@tanstack/react-query-devtools": "^5.75.1",
"next": "^15.1.2",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-query-devtools": "^5.75.2",
"next": "^15.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/react/pagination/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"start": "next start"
},
"dependencies": {
"@tanstack/react-query": "^5.75.1",
"@tanstack/react-query-devtools": "^5.75.1",
"next": "^15.1.2",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-query-devtools": "^5.75.2",
"next": "^15.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/react/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/react-query": "^5.75.1",
"@tanstack/react-query-devtools": "^5.75.1",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-query-devtools": "^5.75.2",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/react/prefetching/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"start": "next start"
},
"dependencies": {
"@tanstack/react-query": "^5.75.1",
"@tanstack/react-query-devtools": "^5.75.1",
"next": "^15.1.2",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-query-devtools": "^5.75.2",
"next": "^15.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/react/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.75.1",
"@tanstack/react-query-devtools": "^5.75.1",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-query-devtools": "^5.75.2",
"expo": "^52.0.11",
"expo-constants": "^17.0.3",
"expo-status-bar": "^2.0.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/react-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/react-query": "^5.75.1",
"@tanstack/react-query-devtools": "^5.75.1",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-query-devtools": "^5.75.2",
"localforage": "^1.10.0",
"match-sorter": "^6.3.4",
"react": "^19.0.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/rick-morty/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"@emotion/styled": "^11.13.5",
"@mui/material": "^6.1.8",
"@mui/styles": "^6.1.8",
"@tanstack/react-query": "^5.75.1",
"@tanstack/react-query-devtools": "^5.75.1",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-query-devtools": "^5.75.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-router": "^6.25.1",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/shadow-dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/react-query": "^5.75.1",
"@tanstack/react-query-devtools": "^5.75.1",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-query-devtools": "^5.75.2",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/react/simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/react-query": "^5.75.1",
"@tanstack/react-query-devtools": "^5.75.1",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-query-devtools": "^5.75.2",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/react/star-wars/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"@emotion/styled": "^11.13.5",
"@mui/material": "^6.1.8",
"@mui/styles": "^6.1.8",
"@tanstack/react-query": "^5.75.1",
"@tanstack/react-query-devtools": "^5.75.1",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-query-devtools": "^5.75.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-router": "^6.25.1",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/suspense/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/react-query": "^5.75.1",
"@tanstack/react-query-devtools": "^5.75.1",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-query-devtools": "^5.75.2",
"font-awesome": "^4.7.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
Expand Down
2 changes: 1 addition & 1 deletion integrations/react-next-14/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dependencies": {
"@tanstack/react-query": "workspace:*",
"@tanstack/react-query-devtools": "workspace:*",
"next": "^15.1.2",
"next": "^14.2.28",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion integrations/react-next-15/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"@js-temporal/polyfill": "^0.4.4",
"@tanstack/react-query": "workspace:*",
"@tanstack/react-query-devtools": "workspace:*",
"next": "^15.1.2",
"next": "^15.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tupleson": "0.23.1"
Expand Down
6 changes: 5 additions & 1 deletion packages/query-broadcast-client-experimental/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/query-broadcast-client-experimental",
"version": "5.75.0",
"version": "5.75.2",
"description": "An experimental plugin to for broadcasting the state of your queryClient between browser tabs/windows",
"author": "tannerlinsley",
"license": "MIT",
Expand Down Expand Up @@ -28,6 +28,8 @@
"test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js --build",
"test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js --build",
"test:types:tscurrent": "tsc --build",
"test:lib": "vitest",
"test:lib:dev": "pnpm run test:lib --watch",
"test:build": "publint --strict && attw --pack",
"build": "tsup --tsconfig tsconfig.prod.json"
},
Expand Down Expand Up @@ -60,6 +62,8 @@
"broadcast-channel": "^7.0.0"
},
"devDependencies": {
"@testing-library/react": "^16.1.0",
"@vitejs/plugin-react": "^4.3.4",
"npm-run-all2": "^5.0.0"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { QueryClient } from '@tanstack/query-core'
import { beforeEach, describe, expect, it } from 'vitest'
import { broadcastQueryClient } from '..'
import type { QueryCache } from '@tanstack/query-core'

describe('broadcastQueryClient', () => {
let queryClient: QueryClient
let queryCache: QueryCache

beforeEach(() => {
queryClient = new QueryClient()
queryCache = queryClient.getQueryCache()
})

it('should subscribe to the query cache', async () => {
broadcastQueryClient({
queryClient,
broadcastChannel: 'test_channel',
})
expect(queryCache.hasListeners()).toBe(true)
})

it('should not have any listeners after cleanup', async () => {
const unsubscribe = broadcastQueryClient({
queryClient,
broadcastChannel: 'test_channel',
})
unsubscribe()
expect(queryCache.hasListeners()).toBe(false)
})
})
Loading
Loading