* ci: stop Release test:lib flakes from runner overload
Release runs nx run-many across every package at nx.json parallel: 5.
That oversubscribes GitHub-hosted runners and flakes two test:lib jobs:
- @tanstack/devtools-ui: default 5s timeout on Solid + goober mounts
- @tanstack/devtools: vitest worker RPC stall (onTaskUpdate)
PR already caps NX_PARALLEL at 3 (#478). Apply the same cap to Release,
and raise the 30s test/hook timeouts on the remaining heavy UI packages.
* chore: upgrade Vitest to v4
Bump vitest from 3.2.4 to 4.1.10. Vitest 4 replaces the 60s
onTaskUpdate RPC timeout that failed Release after every
@tanstack/devtools test had already passed.
Migrate defineWorkspace to test.projects. Turn off Solid HMR in
tests so the module runner does not load /@solid-refresh. Update
mocks and timers that Vitest 4 types or isolates differently.
* feat(bundler-core): scaffold @tanstack/devtools-bundler-core package
* feat(bundler-core): move framework-agnostic logic out of devtools-vite
* feat(bundler-core): add dev-state singleton for loader/plugin sharing
* refactor(devtools-vite): consume @tanstack/devtools-bundler-core
* test(bundler-core): relocate handleDevToolsRequest routing tests from devtools-vite
* feat(devtools-rspack): scaffold package with skeleton exports
* feat(devtools-rspack): transform pipeline loader
* feat(devtools-rspack): plugin (loader injection, event bus, dev middleware, package manager) + dev-server port routing
* chore(devtools): fix core import ordering + guard rspack package-manager wiring in CI
* test(devtools-rspack): entry factory test
* test(devtools-rspack): react rspack example + e2e smoke
* chore: changesets for devtools-bundler-core + devtools-rspack
Also removes the redundant @rspack/core devDependency from
devtools-rspack (already declared as peerDependency, unused
otherwise per knip).
* fix(devtools-rspack): process @tanstack node_modules for connection placeholder + runtime-bridge injection
The single loader rule excluded all of node_modules, so the __TANSTACK_DEVTOOLS_*
connection placeholders (which live in @tanstack/devtools-event-bus's client, under
node_modules for real consumers) were never replaced -- breaking a custom
eventBusConfig.port/host/protocol. Add a second loader rule scoped to
@tanstack/devtools*|event-bus* under node_modules (flat + pnpm nested layouts), and
normalize the step-4 id gate to posix so it matches on Windows. Matches vite's
connection-injection, which does not exclude node_modules.
* fix(devtools-rspack): eager event-bus connection, gate dep-refresh on package.json, port-routing tests, doc accuracy
* fix(devtools-rspack): emit package-json-read on package.json change (vite parity)
* chore(devtools): formatting + lint fixes
* fix(devtools-rspack): make marketplace + go-to-source work under Rspack
- Seed the shared global event target before wiring the package manager so the
plugin receives the client's `mounted` event and replies with
`package-json-read` (the marketplace stayed empty without it), and gate the
wiring on the compiler mode instead of `process.env.NODE_ENV`, which isn't set
at `apply()` time under `rspack serve`.
- Normalize the module path before stripping cwd in enhance-logs and
inject-source so Rspack's backslash ids on Windows don't leak an absolute path
that breaks editor open.
- Enable `connectToServerBus` in the react-rspack example so the client connects
to the event bus.
* ci: apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Adds the `bugs` field pointing to the GitHub issue tracker to every publishable package under packages/. This was the only standard metadata field missing; repository, license, homepage, funding, author and keywords were already present and consistent across all packages.
* docs: add design spec for network transport fallback in isolated server runtimes
Addresses the issue where devtools events are lost when server code runs in
isolated environments (Nitro v3 worker threads, Cloudflare Workers, etc.)
that don't share globalThis with the Vite main thread.
* docs: address spec review findings for network transport fallback
Fix problem description precision, URL matching and handleNewConnection
signature issues, POST handler routing, placeholder convention, triplicate
interface sync, queue preservation, and multi-worker echo safety.
* docs: clarify dual handler paths in network transport spec
Disambiguate that both standalone and external server POST/upgrade
handlers need updates, and that only WebSocket URL matching needs
prefix change (not SSE/POST URLs).
* docs: add implementation plan for network transport fallback
7-task plan covering: interface updates, ServerEventBus bridge support,
POST handler routing, RingBuffer utility, EventClient network transport
detection, WebSocket connection/emit/receive, and integration tests.
* feat: add eventId and source fields to TanStackDevtoolsEvent interface
* feat: add server bridge WebSocket connection support to ServerEventBus
- Accept WebSocket connections with ?bridge=server query parameter
- Track bridge clients separately for proper routing
- Bridge messages route through emit() (broadcast to WS clients + EventTarget)
- Regular browser messages route through emitToServer() (EventTarget only)
- Clean up bridge client tracking on disconnect and stop()
* feat: add source-based routing to POST handlers for server bridge support
* feat: add RingBuffer utility for event ID deduplication
* feat: add network transport detection and compile-time placeholders to EventClient
* feat: add WebSocket network transport fallback to EventClient
When EventClient detects it is in an isolated server environment
(no shared globalThis.__TANSTACK_EVENT_TARGET__, no window), it
automatically connects to ServerEventBus via WebSocket. Bidirectional:
events emitted in the worker reach the devtools panel, and events
from the devtools panel reach listeners in the worker.
Includes echo prevention via 200-entry ring buffer, exponential
backoff reconnection, HTTP POST fallback, and event queuing.
* fix: improve WebSocket error handling and destroy cleanup in EventClient
- Add scheduleReconnect() call in error handler for non-browser runtimes
where 'close' may not follow 'error'
- Reset wsGaveUp, wsReconnectAttempts, wsReconnectDelay in
___destroyNetworkTransport for safe reuse
* test: add end-to-end integration tests for network transport fallback
* docs: mark network transport fallback spec as implemented
* ci: apply automated fixes
* feat: add Nitro v3 and Cloudflare Workers test examples
Two minimal examples for manually testing the network transport fallback:
- examples/react/start-nitro — TanStack Start + Nitro v3 (worker threads)
- examples/react/start-cloudflare — TanStack Start + Cloudflare Workers
Both emit devtools events from server functions and display them in a
custom "Server Events" devtools panel. If events appear in the panel,
the network transport fallback is working correctly.
* Refactor code structure for improved readability and maintainability
* docs: design spec for native Vite HotChannel runtime bridge
* docs: implementation plan for native Vite HotChannel runtime bridge
* feat(devtools-vite): generate worker-side runtime bridge code
* feat(devtools-vite): inject runtime bridge into event-client for server envs
* feat(devtools-vite): wire dev-server hot channels to ServerEventBus
* feat(devtools-vite): hook runtime bridge into plugin and dev server
* chore: add devtools-vite changeset, remove planning docs from PR
* fix(devtools-vite): tear down runtime-bridge hot handlers to prevent duplicate events
* ci: apply automated fixes
* chore: align start-nitro/start-cloudflare examples to vite 8 (fix sherif)
* test(devtools-vite): use explicit function types in runtime-bridge mocks (eslint)
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* refactor(devtools-vite): migrate from Babel to oxc-parser + MagicString
* changeset+knip fix
* docs update
* ci: apply automated fixes
* refactor(devtools-vite): address CodeRabbit feedback on oxc migration
- Extract shared TANSTACK_DEVTOOLS_PACKAGES constant; remove-devtools now
recognizes preact/vue/svelte/angular packages (previously only
react/solid/devtools were stripped).
- Escape displayName/packageName via JSON.stringify when generating
plugin injection code so quotes/backslashes do not break the output.
- Skip appending a duplicate import when the plugin symbol is already
imported from the same package.
- collectJsx no longer crosses function boundaries; inner components
keep their own propsName context and aren't annotated with an outer
function's data-tsd-source.
- Drop the redundant VariableDeclaration branch in visitFunctions;
arrow/function expressions are reached via forEachChild, so the
prior code walked them twice.
- Add regression tests covering non-ASCII source positions (emoji,
CJK) — oxc-parser napi bindings already return UTF-16 code-unit
indices, so no offset conversion is needed.
- Sync the devtools-production SKILL.md package list with the
implementation.
* chore(deps): bump oxc-parser to ^0.120.0
Verified empirically that the napi bindings continue to return UTF-16
code-unit indices (matching the assumption in inject-source.ts and the
non-ASCII regression tests). All 167 devtools-vite tests pass on the new
version; lint, typecheck, build, and knip clean.
* ci: apply automated fixes
* fix(devtools-vite): emit correct source positions for enhanced logs
console-pipe-transform prepends a multi-line IIFE to root entry files
before better-console-logs runs. Because both plugins are enforce:'pre'
and execute in array order, enhanceConsoleLog was parsing the
post-prepend source and reporting line numbers shifted past the end of
the user's file -- 'Go to Source' links pointed nowhere.
Swap the two plugin entries so enhanceConsoleLog sees the original
source. Add a regression test asserting better-console-logs is
registered before console-pipe-transform.
* fix(devtools): snapshot data-tsd-source before mutating click state
The click handler in SourceInspector called `setDisabledAfterClick(true)`
before reading `highlightState.dataSource`. That signal write flipped
`isActive` to false, triggering the highlight effect's `resetHighlight()`
synchronously enough (via the chained `createStore` reactions) to clear
`dataSource` before the subsequent reads. Result: the open-source fetch
was issued with `?source=` empty and clipboard writes wrote an empty
string.
Capture `highlightState.dataSource` into a local before any state
mutations, then use the captured value for both the clipboard path and
the URL construction.
* ci: apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com>
* fix: include skills/ and bin/intent.js in npm publish for all packages
The skills/ directories and intent bin shim were missing from the
individual package.json files. The intent scanner requires both
"bin": { "intent": ... } and a skills/ directory to detect packages.
Without these, npx @tanstack/intent install reports "No intent-enabled
packages found."
* ci: apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* Added CSS Formatting to Enhanced Logs
* Fixed Failing Enhanced Logs Tests
* Added CSS Formatting Test to Enhanced Console Logs
* Added @tanstack/devtools-vite Changeset
* Check for server enviroment in enhanceConsoleLog
- This change is made so log coloring can work in both Server and Browser
- It will use ANSI for Server and CSS for Browser
* fix: make the console logs always conditionally render
---------
Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com>