Commit graph

89 commits

Author SHA1 Message Date
github-actions[bot]
71b2ad0bb6
ci: Version Packages (#506)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-19 18:56:50 +02:00
Alem Tuzlak
53805408af
chore: upgrade Vitest to v4 (#497)
* 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.
2026-08-12 16:20:22 +02:00
github-actions[bot]
06006350d6
ci: Version Packages (#487)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-22 14:51:32 +02:00
github-actions[bot]
f9553f5a88
ci: Version Packages (#486)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-22 14:23:45 +02:00
Alem Tuzlak
d6e9022a8b
feat: add @tanstack/devtools-rspack (1:1 Vite parity) + shared @tanstack/devtools-bundler-core (#484)
* 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>
2026-07-22 13:44:57 +02:00
github-actions[bot]
e0266670c8
ci: Version Packages (#475)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-24 13:21:43 +02:00
Alem Tuzlak
7114ecd285
test: e2e suite (8 apps + server↔client probe) + unit/component coverage (#472)
* test(e2e): scaffold Playwright harness, helper package, react-vite app, shell test-ids

* test(e2e): full react-vite shell behavior suite + event-probe

* ci(e2e): build packages before running the Playwright suite on every PR

* test(e2e): react-start runtime app + server probe

* test(e2e): extend event-probe with server-ping emitter + receiver

* test(e2e): promote react-start to real server->client via #384 runtime bridge; lock e2e deps

* test(e2e): react-nitro runtime app + server probe

* test(e2e): cloudflare/workerd runtime app

* test(e2e): solid adapter smoke

* test(e2e): vue adapter smoke

* test(e2e): preact adapter smoke

* test(e2e): angular adapter smoke

* ci(e2e): run all runtime + adapter e2e apps on every PR; lock e2e deps

* test(unit): fill pure-function coverage gaps in devtools + devtools-vite

* test(component): Solid shell render + reactivity tests

* test(component): React adapter portal wiring test

* chore(e2e): formatting and lint fixes

* fix(devtools-ui): Checkbox reflects controlled `checked` prop updates

* chore(knip): declare doc-script entrypoints and ignore generated intent bin stubs

* ci: apply automated fixes

* ci(e2e): pin actions to commit SHAs (org policy + zizmor)

* test(e2e): make server->client probe deterministic (re-emit until delivered)

* ci(e2e): run e2e projects serially — parallel dev servers collide on the shared devtools bus port

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-23 20:37:55 +02:00
Alem Tuzlak
f17d7e8a0a
chore: add bugs.url metadata to all published packages (#470)
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.
2026-06-22 16:35:07 +02:00
github-actions[bot]
d9f2b37ce5
ci: Version Packages (#468)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-19 19:53:37 +02:00
Alem Tuzlak
958c6836b8
feat: deliver devtools events from isolated server runtimes via Vite HotChannel (#384)
* 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>
2026-06-19 19:47:33 +02:00
github-actions[bot]
ca6e266ff4
ci: Version Packages (#465)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-19 14:24:51 +02:00
Vedant Pahune
2a2f9eb5b8
fix(devtools-vite): preserve valid syntax when removing parenthesized devtools JSX (#449)
* fix(devtools-vite): preserve valid syntax when removing parenthesized devtools JSX

* add changeset
2026-06-19 13:10:48 +02:00
github-actions[bot]
45d9b8e013
ci: Version Packages (#453)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-19 13:07:08 +02:00
Kent Hou Man
cf89dcd9e0
fix: fix go to source file whose path contains $ symbol (#450)
* fix: fix go to source when file name contains $ symbol

* chore: add changeset
2026-05-30 09:03:53 +02:00
github-actions[bot]
5d359f276e
ci: Version Packages (#442)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-13 16:45:28 +02:00
Keven Arroyo
7be3776b86
refactor(devtools-vite): migrate from Babel to oxc-parser + MagicString (#397)
* 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>
2026-05-13 16:13:22 +02:00
github-actions[bot]
0ec5292ac1
ci: Version Packages (#433)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-13 12:17:50 +02:00
renovate[bot]
bb2f499c1f
chore(deps): update dependency happy-dom to v20 [security] (#439)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-13 12:11:53 +02:00
Harry Whorlow
562ad00b61
fix(ci): fix eslint error (#432)
* fix(ci): fix eslint error

* chore: update with test

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-11 22:27:12 +02:00
Raudy Brito
16c0bf0d58
fix(devtools-vite): prevent console pipe loop and solid-js duplication (#412)
* fix(devtools-vite): prevent console pipe loop and solid-js duplication with Vite 8

* chore: add changeset

* fix(devtools-vite): add defensive fallback for invalid console level

* Remove Solid Dedupe

* format fix
2026-05-11 11:06:56 +02:00
Wz
113e9a7134
fix(devtools-vite): avoid piping raw DOM console arguments (#424)
fix console piping DOM serialization
2026-05-11 11:06:28 +02:00
github-actions[bot]
6c7b961fe4
ci: Version Packages (#389)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-15 09:52:44 +01:00
Harry Whorlow
63e505c7b6
feat: support vite v8 (#388)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-15 09:35:54 +01:00
github-actions[bot]
a120650543
ci: Version Packages (#380)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-11 14:39:21 +01:00
Alem Tuzlak
1451124c07
fix: include skills/ in npm publish for all packages (#379)
* 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>
2026-03-11 14:35:35 +01:00
github-actions[bot]
da5ff35a0d
ci: Version Packages (#378)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-11 12:27:44 +01:00
Alem Tuzlak
644bcb3ec5
feat: add @tanstack/intent agent skills (#377)
* feat: add @tanstack/intent agent skills for all packages

Scaffold agent-readable SKILL.md files via @tanstack/intent for AI coding
agents (Claude Code, Cursor, Copilot, etc.) to generate better code when
working with TanStack Devtools.

Skills added (9 total across 4 packages):
- devtools: app-setup, plugin-panel, production, marketplace
- event-bus-client: event-client, instrumentation, bidirectional
- devtools-vite: vite-plugin
- devtools-utils: framework-adapters (React, Vue, Solid, Preact)

Also includes:
- CI workflows for skill validation, staleness checks, and intent notifications
- Domain map, skill spec, and skill tree artifacts
- Intent CLI bin shim and package.json wiring
- README note for AI agent users

* ci: apply automated fixes

* ci: apply automated fixes (attempt 2/3)

* chore: add changeset for intent skills

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-11 12:25:57 +01:00
github-actions[bot]
fc8c3290bb
ci: Version Packages (#362)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-04 11:06:13 +01:00
github-actions[bot]
16d96c7d6e
ci: Version Packages (#356)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-27 12:24:01 +01:00
Alem Tuzlak
bded93b8aa
chore: fix issue with dist and build matching (#354)
* chore: fix issue with dist and build matching

* chore: fix path

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-02-26 10:12:58 +01:00
github-actions[bot]
25daa2780e
ci: Version Packages (#344)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-07 17:48:30 +01:00
Alem Tuzlak
da41a598a9
fix: issue with console piping and https server resolutions (#343)
* fix: issue with console piping and https server resolutions

* changeset

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-02-07 17:46:55 +01:00
github-actions[bot]
f8c62b5308
ci: Version Packages (#338)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-30 16:52:56 +01:00
Alem Tuzlak
9f45788b45
Feat/console pipe (#337)
* feat: console piping

* implement the two way pipping

* ci: apply automated fixes

* revert: remove console piping from devtools-vite

* revert client changes

* ci: apply automated fixes

* remove extra file

* fix for logs

* fix23

* improvements

* knip issues

* ci: apply automated fixes

* changeeset

* changeset

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-01-30 16:48:54 +01:00
github-actions[bot]
cda3fc7c81
ci: Version Packages (#303)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-06 13:26:01 +01:00
Alem Tuzlak
6457d8afd8
fix: improve build speed with vite (#304)
* fix: improve build speed with vite

* fix: bug issue
2026-01-06 12:13:57 +01:00
Sal Hasan
17c823b519
fix: add css format specifier support to enhancedConsoleLog (#300)
* 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>
2026-01-06 11:53:52 +01:00
github-actions[bot]
cbe2d05b13
ci: Version Packages (#298)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-26 13:25:33 +01:00
Alem Tuzlak
bf1d590c34
feat: fix event bus port issues (#297)
* feat: fix event bus port issues

* changeset

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-12-26 13:23:56 +01:00
Lachlan Collins
f58a87b9b6
ci: prepare for trusted publishing (#288) 2025-12-09 11:44:55 +11:00
github-actions[bot]
f4ae99705e
ci: Version Packages (#287)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-08 12:17:23 +01:00
Lachlan Collins
66722f5a70
docs: correct local relative links (#282)
* docs: correct local relative links

* Fix config imports
2025-12-05 22:38:56 +11:00
github-actions[bot]
cf1b57ac03
ci: Version Packages (#251)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-30 14:05:07 +01:00
github-actions[bot]
5a016f3ecd
ci: Version Packages (#232)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-24 17:36:33 +02:00
github-actions[bot]
772a3dc247
ci: Version Packages (#224)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-21 13:21:17 +02:00
Alem Tuzlak
4636cb9ca9
Feat/add ignore patterns (#223)
* fix

* feat: implement ignore patterns for injectSource
2025-10-21 13:12:25 +02:00
github-actions[bot]
91def487f9
ci: Version Packages (#221)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-20 21:26:07 +02:00
Alem Tuzlak
51fb89b26b
fix: remove completely devtools in hosting providers (#220)
* fix: remove completely devtools in hosting providers

* changeset

* add logs

* log

* fix for bundling

* fix for bundling

* fix
2025-10-20 21:19:21 +02:00
github-actions[bot]
a5448af606
ci: Version Packages (#217)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-17 15:52:17 +02:00
Alem Tuzlak
0b4a4a9e57
Plugins marketplace (#216)
* feat: add plugin marketplace and no plugins fallback

* Plugins marketplace

* fixx lock and changeset

* ci: apply automated fixes

* update plugin registry

* fix

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-10-17 15:35:48 +02:00