* 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>
* feat(devtools): add floating/draggable trigger with throw physics
Add a `triggerMode: 'fixed' | 'floating'` setting. In floating mode the trigger
can be dragged anywhere with the left mouse button; releasing with velocity
throws it (inertia + wall bounce). Position is clamped to a padded on-screen
area (matching the fixed trigger's edge offset) and persisted to local storage,
re-clamping on window resize so it can never load off-screen.
* ci: apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* test(devtools): raise vitest timeouts to stop flaky component test:lib in CI
The component tests added in #472 render the full Solid + goober tree and take
1-4s locally. Shared CI runners are ~4x slower (the suite runs in ~8s locally
but ~31s in CI), which pushes individual tests past vitest's default 5s
testTimeout and causes intermittent `@tanstack/devtools:test:lib` failures
across unrelated PRs (e.g. #471, #477).
Raise testTimeout and hookTimeout to 30s for the devtools package so slow CI
runs have headroom. Fast unit tests are unaffected; a real hang still fails
(just after 30s instead of 5s).
* ci: cap nx parallelism to 3 to fix flaky Test job
nx.json sets `parallel: 5`, which is fine for local dev machines but
oversubscribes GitHub-hosted runners: each affected `test:lib` (vitest) and
`test:types` (tsc) task spawns its own worker pool, so 5 heavy tasks at once
exhaust CPU/RAM and intermittently stall or OOM-kill deterministic tasks. That
produced flaky failures across unrelated PRs (#471, #477, #478) that pass on a
plain re-run.
The team already pins `test:e2e` to `--parallel=1` for the same reason; cap the
Test job's nx parallelism via NX_PARALLEL=3 (CI-only, leaves local dev at 5).
Combined with the raised vitest timeouts, this keeps tasks within the runner's
budget.
* fix(devtools): rename Solid use* primitives to create* for React Compiler compat
The devtools packages are Solid but used React-style naming (useStyles,
useTheme, useDevtoolsState, ...) for their custom primitives. When an app
enables React Compiler, it matches the use* convention and transforms this
Solid code as if it were React, breaking the panel.
Rename every custom Solid primitive in @tanstack/devtools, devtools-ui, and
devtools-a11y from use* to create*, and import Solid's useContext and
@solid-primitives' useKeyDownList under non-use aliases (getContext,
getKeyDownList).
BREAKING(@tanstack/devtools-ui): exported useTheme is renamed to createTheme.
* fix(devtools): apply create* rename to tests and docs merged from main
#472 added component tests (tabs.test.tsx, settings-tab.test.tsx) using the
old useDevtoolsState/useDevtoolsSettings names, and the devtools-plugin-panel
skill docs referenced the renamed devtools-ui export useTheme. Update them to
the create* names.
fix(examples): align @tanstack/devtools-a11y to ^0.1.5 across examples
The Version Packages release bumped the react a11y example to ^0.1.5
but left the angular example at ^0.1.4, tripping sherif's
multiple-dependency-versions check and failing CI on main.
* docs: add Svelte devtools adapter design doc
* docs: add Svelte devtools implementation plan
* feat(svelte-devtools): add Svelte 5 adapter package
* feat(devtools-utils): add Svelte factory functions and build config
* fix: resolve knip issues and update svelte vite plugin to v6
* docs: add Svelte documentation
* chore: add changeset for Svelte adapter
* ci: apply automated fixes
* fix(svelte-devtools): mount once and tear down stale plugin components on update
- Mount the core exactly once: untrack props in the mount $effect so a prop
change no longer destroys and rebuilds the entire devtools core (the update
$effect already handles config/plugin changes reactively).
- update() now calls destroyAllComponents() before setConfig(), matching the
Angular adapter — the core re-invokes render/name for the new plugin set, so
without this the previous Svelte instances were orphaned and leaked.
- renderComponent() keys mounted components by container.id directly (the core
always assigns one) instead of an empty-string fallback that could never be
matched on destroy.
- vite.config: cast svelte() plugin as any, matching the vue/solid configs, to
satisfy the vite 8 plugin types.
* chore(devtools-utils): add svelte devDependency for the svelte subpath build
The `./svelte` build type-checks svelte-importing source, so svelte must be
resolvable at build time (mirroring vite-plugin-solid for the solid build)
rather than relying on workspace hoisting of the optional peer.
* test(devtools-utils): cover svelte plugin and panel factories
Mirrors the existing solid class factory tests: createSveltePlugin shape +
NoOp behavior, and createSveltePanel mounting/tearing down a class-based core.
* ci: apply automated fixes
* refactor(devtools-utils): make createSveltePlugin generic over component props
Threads a TComponentProps generic through the svelte plugin factory (mirroring
createVuePlugin) so plugin props are type-checked against the component instead
of falling back to `any`. Addresses PR review feedback.
* 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>
The plugin marketplace rendered empty ("No additional plugins available")
because the `mounted` -> `package-json-read` round-trip could be lost:
- ClientEventBus.emitToServer silently dropped events emitted while the
WebSocket was still connecting. They are now buffered and flushed once the
socket opens.
- The marketplace re-requests package.json on every open and retries until it
arrives, so re-opening always re-fetches the plugin list.
- The basic React example reconnects to the server bus (connectToServerBus).
- Added TanStack AI Devtools to the plugin marketplace registry.
* 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>
* chore(deps): upgrade pnpm to 11.1.1
Bumps the corepack-managed pnpm version across the root and the four
Angular example workspaces. pnpm 11 refuses to run install scripts by
default; declare a minimal allowBuilds allowlist in pnpm-workspace.yaml
so only the two packages whose postinstalls the build actually needs
(esbuild, nx) are permitted. The other eight transitively-pulled
postinstalls (sharp, lmdb, workerd, etc.) all fall back to JS paths
or are unused during build, and are explicitly denied.
Also pin the preinstall guard to only-allow@1.2.2 so it no longer
resolves a floating tag from npm on every install.
* ci(security): pin actions to SHAs and harden CI/CD supply chain
Replaces every mutable workflow reference (@main, @v1, @v3, @v4,
@v6.0.2) with a 40-char commit SHA + version comment so Renovate can
keep them current. Composite actions in TanStack/config — previously
pinned to @main — are the highest-impact change: a force-push or
compromised commit there would have given an attacker the npm OIDC
publishing identity plus contents/issues/PR write tokens on the next
push to main.
Other changes in this commit:
- release.yml: set cancel-in-progress: false so a re-push cannot abort
changesets/action mid-publish and leave partial versions on npm.
Add environment: release so required reviewers can be configured in
repo settings for an explicit human gate before publish.
- triage-agent.yml: add a "SECURITY: Untrusted input" preamble to the
Warp agent prompt. The agent reads attacker-controlled issue text,
so it must treat that text strictly as data and refuse instructions
embedded inside it. Also corrected the bug-report template path
(bug-report.yml -> bug_report.yml) that the agent was failing to
load.
- check-skills.yml / validate-skills.yml: pin @tanstack/intent to a
specific version; npm install -g without a version was floating.
- pr.yml preview job: pin pkg-pr-new to a specific version; pnpx
without a version was floating.
- .github/renovate.json: drop :automergeMinor. Combined with floating
versions this could have landed a malicious patch without review.
- .github/CODEOWNERS (new): require owner review on workflows, package
manifests, lockfile, .npmrc, and renovate config. Adjust the owner
handle to a team once one exists.
- .github/workflows/dependency-review.yml (new): runs
actions/dependency-review-action on every PR with
fail-on-severity: high to block PRs that introduce known-vulnerable
transitive dependencies.
* ci(security): bump TanStack/config pin to latest main SHA
* fix(ci): correct preinstall skip logic for CI
The original `||`-chained preinstall printed "Skipping preinstall..." in
CI but then ran only-allow anyway because `process.exit(1)` triggers
the `||` operator. CI happened to pass when only-allow was unpinned
(npx resolved it differently), but pinning to @1.2.2 forced a fresh
registry resolve in which only-allow strictly checks
npm_config_user_agent — which, when invoked via npx-inside-pnpm, is
npm's, not pnpm's — and rejects.
The fix matches the script's stated intent: when CI=true, exit 0 so
the `||` does not trigger and only-allow is genuinely skipped. Local
installs continue to fall through and enforce pnpm via only-allow as
before.