Skip to content

Commit 6dd0d98

Browse files
committed
feat: fix event bus port issues
1 parent 487123d commit 6dd0d98

54 files changed

Lines changed: 3248 additions & 2193 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/reference/interfaces/clienteventbusconfig.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ optional port: number;
4545
Defined in: event-bus/dist/esm/client/client.d.ts:15
4646

4747
Optional port to connect to the devtools server event bus.
48-
Defaults to 42069.
48+
Defaults to 4206.

examples/preact/basic/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default defineConfig({
1212
}),
1313

1414
Inspect(),
15-
sonda(),
15+
sonda() as any,
1616
preact(),
1717
],
1818
build: {

examples/react/basic/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@
1515
"@tanstack/react-form": "^1.23.7",
1616
"@tanstack/react-query": "^5.90.1",
1717
"@tanstack/react-query-devtools": "^5.90.1",
18-
"@tanstack/react-router": "^1.131.50",
19-
"@tanstack/react-router-devtools": "^1.131.50",
20-
"react": "19.1.1",
21-
"react-dom": "19.1.1",
18+
"@tanstack/react-router": "^1.132.0",
19+
"@tanstack/react-router-devtools": "^1.132.0",
20+
"react": "^19.2.0",
21+
"react-dom": "^19.2.0",
2222
"zod": "^4.1.11"
2323
},
2424
"devDependencies": {
2525
"@tanstack/devtools-ui": "0.4.4",
2626
"@tanstack/devtools-vite": "0.3.12",
2727
"@tanstack/react-form-devtools": "^0.1.7",
28-
"@types/react": "^19.1.13",
29-
"@types/react-dom": "^19.1.9",
30-
"@vitejs/plugin-react": "^4.7.0",
28+
"@types/react": "^19.2.0",
29+
"@types/react-dom": "^19.2.0",
30+
"@vitejs/plugin-react": "^5.0.4",
3131
"sonda": "0.9.0",
3232
"vite": "^7.1.7",
3333
"vite-plugin-inspect": "11.3.3"

examples/react/basic/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default defineConfig({
1212
}),
1313

1414
Inspect(),
15-
sonda(),
15+
sonda() as any,
1616
react({
1717
// babel: {
1818
// plugins: [['babel-plugin-react-compiler', { target: '19' }]],

examples/react/custom-devtools/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
"dependencies": {
1212
"@tanstack/devtools-event-client": "0.4.0",
1313
"@tanstack/react-devtools": "^0.8.6",
14-
"react": "19.1.1",
15-
"react-dom": "19.1.1"
14+
"react": "^19.2.0",
15+
"react-dom": "^19.2.0"
1616
},
1717
"devDependencies": {
18-
"@types/react": "^19.1.13",
19-
"@types/react-dom": "^19.1.9",
20-
"@vitejs/plugin-react": "^4.7.0",
18+
"@types/react": "^19.2.0",
19+
"@types/react-dom": "^19.2.0",
20+
"@vitejs/plugin-react": "^5.0.4",
2121
"vite": "^7.1.7"
2222
},
2323
"browserslist": {

examples/react/drizzle/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@
99
},
1010
"dependencies": {
1111
"@tanstack/react-devtools": "^0.8.6",
12-
"@tanstack/react-router": "^1.131.50",
13-
"@tanstack/react-router-devtools": "^1.131.50",
14-
"@tanstack/react-start": "1.132.0-alpha.25",
15-
"react": "19.1.1",
16-
"react-dom": "19.1.1"
12+
"@tanstack/react-router": "^1.132.0",
13+
"@tanstack/react-router-devtools": "^1.132.0",
14+
"@tanstack/react-start": "^1.132.0",
15+
"react": "^19.2.0",
16+
"react-dom": "^19.2.0"
1717
},
1818
"devDependencies": {
1919
"@tanstack/devtools-vite": "0.3.12",
2020
"@types/node": "^22.15.2",
21-
"@types/react": "^19.1.13",
22-
"@types/react-dom": "^19.1.9",
21+
"@types/react": "^19.2.0",
22+
"@types/react-dom": "^19.2.0",
2323
"drizzle-kit": "^0.31.4",
2424
"drizzle-orm": "^0.44.5",
2525
"pg": "^8.16.3",

examples/react/https/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@
1313
"@tanstack/react-devtools": "^0.8.6",
1414
"@tanstack/react-query": "^5.90.1",
1515
"@tanstack/react-query-devtools": "^5.90.1",
16-
"@tanstack/react-router": "^1.131.50",
17-
"@tanstack/react-router-devtools": "^1.131.50",
18-
"react": "19.1.1",
19-
"react-dom": "19.1.1",
16+
"@tanstack/react-router": "^1.132.0",
17+
"@tanstack/react-router-devtools": "^1.132.0",
18+
"react": "^19.2.0",
19+
"react-dom": "^19.2.0",
2020
"zod": "^4.1.11"
2121
},
2222
"devDependencies": {
2323
"@tanstack/devtools-ui": "0.4.4",
2424
"@tanstack/devtools-vite": "0.3.12",
25-
"@types/react": "^19.1.13",
26-
"@types/react-dom": "^19.1.9",
27-
"@vitejs/plugin-react": "^4.7.0",
25+
"@types/react": "^19.2.0",
26+
"@types/react-dom": "^19.2.0",
27+
"@vitejs/plugin-react": "^5.0.4",
2828
"vite": "^7.1.7",
2929
"vite-plugin-inspect": "11.3.3",
3030
"vite-plugin-mkcert": "^1.17.8"

examples/react/start/.cta.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44
"typescript": true,
55
"tailwind": true,
66
"packageManager": "pnpm",
7-
"git": false,
7+
"git": true,
8+
"addOnOptions": {},
89
"version": 1,
910
"framework": "react-cra",
10-
"chosenAddOns": ["start"]
11-
}
11+
"chosenAddOns": [
12+
"start",
13+
"nitro"
14+
]
15+
}

examples/react/start/.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ count.txt
77
.env
88
.nitro
99
.tanstack
10+
.wrangler
1011
.output
1112
.vinxi
1213
todos.json
13-
14-
/generated/prisma

examples/react/start/README.md

Lines changed: 46 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Welcome to your new TanStack app!
1+
Welcome to your new TanStack app!
22

33
# Getting Started
44

@@ -29,8 +29,10 @@ pnpm test
2929

3030
This project uses [Tailwind CSS](https://tailwindcss.com/) for styling.
3131

32-
## Routing
3332

33+
34+
35+
## Routing
3436
This project uses [TanStack Router](https://tanstack.com/router). The initial setup is a file based router. Which means that the routes are managed as files in `src/routes`.
3537

3638
### Adding A Route
@@ -46,7 +48,7 @@ Now that you have two routes you can use a `Link` component to navigate between
4648
To use SPA (Single Page Application) navigation you will need to import the `Link` component from `@tanstack/react-router`.
4749

4850
```tsx
49-
import { Link } from '@tanstack/react-router'
51+
import { Link } from "@tanstack/react-router";
5052
```
5153

5254
Then anywhere in your JSX you can use it like so:
@@ -69,7 +71,7 @@ Here is an example layout that includes a header:
6971
import { Outlet, createRootRoute } from '@tanstack/react-router'
7072
import { TanStackRouterDevtools } from '@tanstack/react-router-devtools'
7173

72-
import { Link } from '@tanstack/react-router'
74+
import { Link } from "@tanstack/react-router";
7375

7476
export const Route = createRootRoute({
7577
component: () => (
@@ -91,6 +93,7 @@ The `<TanStackRouterDevtools />` component is not required so you can remove it
9193

9294
More information on layouts can be found in the [Layouts documentation](https://tanstack.com/router/latest/docs/framework/react/guide/routing-concepts#layouts).
9395

96+
9497
## Data Fetching
9598

9699
There are multiple ways to fetch data in your application. You can use TanStack Query to fetch data from a server. But you can also use the `loader` functionality built into TanStack Router to load the data for a route before it's rendered.
@@ -100,26 +103,26 @@ For example:
100103
```tsx
101104
const peopleRoute = createRoute({
102105
getParentRoute: () => rootRoute,
103-
path: '/people',
106+
path: "/people",
104107
loader: async () => {
105-
const response = await fetch('https://swapi.dev/api/people')
108+
const response = await fetch("https://swapi.dev/api/people");
106109
return response.json() as Promise<{
107110
results: {
108-
name: string
109-
}[]
110-
}>
111+
name: string;
112+
}[];
113+
}>;
111114
},
112115
component: () => {
113-
const data = peopleRoute.useLoaderData()
116+
const data = peopleRoute.useLoaderData();
114117
return (
115118
<ul>
116119
{data.results.map((person) => (
117120
<li key={person.name}>{person.name}</li>
118121
))}
119122
</ul>
120-
)
123+
);
121124
},
122-
})
125+
});
123126
```
124127

125128
Loaders simplify your data fetching logic dramatically. Check out more information in the [Loader documentation](https://tanstack.com/router/latest/docs/framework/react/guide/data-loading#loader-parameters).
@@ -137,29 +140,29 @@ pnpm add @tanstack/react-query @tanstack/react-query-devtools
137140
Next we'll need to create a query client and provider. We recommend putting those in `main.tsx`.
138141

139142
```tsx
140-
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
143+
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
141144

142145
// ...
143146

144-
const queryClient = new QueryClient()
147+
const queryClient = new QueryClient();
145148

146149
// ...
147150

148151
if (!rootElement.innerHTML) {
149-
const root = ReactDOM.createRoot(rootElement)
152+
const root = ReactDOM.createRoot(rootElement);
150153

151154
root.render(
152155
<QueryClientProvider client={queryClient}>
153156
<RouterProvider router={router} />
154-
</QueryClientProvider>,
155-
)
157+
</QueryClientProvider>
158+
);
156159
}
157160
```
158161

159162
You can also add TanStack Query Devtools to the root route (optional).
160163

161164
```tsx
162-
import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
165+
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
163166

164167
const rootRoute = createRootRoute({
165168
component: () => (
@@ -169,25 +172,25 @@ const rootRoute = createRootRoute({
169172
<TanStackRouterDevtools />
170173
</>
171174
),
172-
})
175+
});
173176
```
174177

175178
Now you can use `useQuery` to fetch your data.
176179

177180
```tsx
178-
import { useQuery } from '@tanstack/react-query'
181+
import { useQuery } from "@tanstack/react-query";
179182

180-
import './App.css'
183+
import "./App.css";
181184

182185
function App() {
183186
const { data } = useQuery({
184-
queryKey: ['people'],
187+
queryKey: ["people"],
185188
queryFn: () =>
186-
fetch('https://swapi.dev/api/people')
189+
fetch("https://swapi.dev/api/people")
187190
.then((res) => res.json())
188191
.then((data) => data.results as { name: string }[]),
189192
initialData: [],
190-
})
193+
});
191194

192195
return (
193196
<div>
@@ -197,10 +200,10 @@ function App() {
197200
))}
198201
</ul>
199202
</div>
200-
)
203+
);
201204
}
202205

203-
export default App
206+
export default App;
204207
```
205208

206209
You can find out everything you need to know on how to use React-Query in the [React-Query documentation](https://tanstack.com/query/latest/docs/framework/react/overview).
@@ -218,46 +221,46 @@ pnpm add @tanstack/store
218221
Now let's create a simple counter in the `src/App.tsx` file as a demonstration.
219222

220223
```tsx
221-
import { useStore } from '@tanstack/react-store'
222-
import { Store } from '@tanstack/store'
223-
import './App.css'
224+
import { useStore } from "@tanstack/react-store";
225+
import { Store } from "@tanstack/store";
226+
import "./App.css";
224227

225-
const countStore = new Store(0)
228+
const countStore = new Store(0);
226229

227230
function App() {
228-
const count = useStore(countStore)
231+
const count = useStore(countStore);
229232
return (
230233
<div>
231234
<button onClick={() => countStore.setState((n) => n + 1)}>
232235
Increment - {count}
233236
</button>
234237
</div>
235-
)
238+
);
236239
}
237240

238-
export default App
241+
export default App;
239242
```
240243

241244
One of the many nice features of TanStack Store is the ability to derive state from other state. That derived state will update when the base state updates.
242245

243246
Let's check this out by doubling the count using derived state.
244247

245248
```tsx
246-
import { useStore } from '@tanstack/react-store'
247-
import { Store, Derived } from '@tanstack/store'
248-
import './App.css'
249+
import { useStore } from "@tanstack/react-store";
250+
import { Store, Derived } from "@tanstack/store";
251+
import "./App.css";
249252

250-
const countStore = new Store(0)
253+
const countStore = new Store(0);
251254

252255
const doubledStore = new Derived({
253256
fn: () => countStore.state * 2,
254257
deps: [countStore],
255-
})
256-
doubledStore.mount()
258+
});
259+
doubledStore.mount();
257260

258261
function App() {
259-
const count = useStore(countStore)
260-
const doubledCount = useStore(doubledStore)
262+
const count = useStore(countStore);
263+
const doubledCount = useStore(doubledStore);
261264

262265
return (
263266
<div>
@@ -266,10 +269,10 @@ function App() {
266269
</button>
267270
<div>Doubled - {doubledCount}</div>
268271
</div>
269-
)
272+
);
270273
}
271274

272-
export default App
275+
export default App;
273276
```
274277

275278
We use the `Derived` class to create a new store that is derived from another store. The `Derived` class has a `mount` method that will start the derived store updating.

0 commit comments

Comments
 (0)