Repository navigation
chore(build): migrate the web runner, mcpdo and TUI bundles from tsup to tsdown - #2807
Merged
Merged
Conversation
… to tsdown (#2797) Follows the CLI prototype from #1492, so no client builds with tsup any more. - Each config keeps a `const EXTERNALS = [...]` expanded with subpath patterns for `deps.neverBundle`, plus `fixedExtension: false` and `outputOptions.comments: { jsdoc: false }`, as in clients/cli. - TUI: JSX via `inputOptions.transform.jsx`, and ink-form / ink-scroll-view in `deps.alwaysBundle`. tsupConfig.test.ts becomes tsdownConfig.test.ts, reading the deps lists through tsdown's UserConfig with its React-externals assertions unchanged. - mcpdo: the shared chunk is written flat into build/, so ensure.ts still finds mcpdod.js as a sibling. With tsup gone, esbuild is out of this install, so its esbuild/sucrase overrides and allowScripts go too. Web and TUI keep theirs, since Vite, Storybook and tsx still install esbuild. - tsdown is held at 0.23.1 and Rolldown overridden to 1.2.13 in every install, matching the CLI and the root's Vite for verify:dep-lockstep. - BUNDLED_CLIENTS, the external-list paths in AGENTS.md and sdk-watch, the tsconfig includes and the docs/skills follow the renames. Each bundle emits the same set of bare package imports as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
There was a problem hiding this comment.
🟢 Approval recommended
The migration preserves entry-point and externalization contracts, retains React bundling safeguards, and has no identified blocking defects.
No open issues 🎉
3 files not reviewed
clients/mcpdo/package-lock.json: Generated fileclients/tui/package-lock.json: Generated fileclients/web/package-lock.json: Generated file
What changed in this PR
Completes #2797 by migrating the web runner, mcpdo, and TUI to tsdown, following the CLI prototype from #1492 and standardizing all four bundled clients.
Changes:
- Replaces tsup configurations and build commands while preserving entry filenames, shared-core bundling, and external package subpaths.
- Adapts the TUI’s React bundling safeguards and aligns Rolldown versions.
- Updates verification references, documentation, and development procedures to reflect the completed migration.
| File | Description |
|---|---|
specification/v2_cli_tui_launcher.md |
Updates build architecture references to tsdown. |
specification/v2_catalog_launch_config.md |
Updates the linked specification’s description. |
scripts/verify-dep-lockstep.mjs |
Updates a toolchain comment. |
scripts/verify-bundle-externals.mjs |
Points verification at the new configurations. |
scripts/sdk-watch.mjs |
Updates generated upgrade-checklist paths. |
scripts/pack-and-verify.mjs |
Updates bundler guidance in an error message. |
README.md |
Refreshes build and migration documentation references. |
docs/tsdown-migration.md |
Records completion, measurements, and migration details. |
docs/quality-gate.md |
Documents tsdown bundle verification. |
docs/publishing.md |
Updates configuration and React-policy test paths. |
docs/architecture.md |
Documents the unified tsdown alias setup. |
core/auth/node/file-lock.ts |
Updates the bundler compatibility comment only. |
clients/web/vite.config.ts |
Updates the separate-runner comment only. |
clients/web/tsup.runner.config.ts |
Removes the old runner configuration. |
clients/web/tsdown.runner.config.ts |
Adds the tsdown runner configuration. |
clients/web/tsconfig.node.json |
Includes the renamed runner configuration. |
clients/web/src/test/integration/server/vite-base-config.test.ts |
Updates bundler terminology in comments only. |
clients/web/server/vite-base-config.ts |
Updates the production-externalization comment only. |
clients/web/README.md |
Documents the new runner build command. |
clients/web/package.json |
Switches the runner to tsdown and overrides Rolldown. |
clients/web/eslint.config.js |
Updates the generated-output comment only. |
clients/tui/tsup.config.ts |
Removes the old TUI configuration. |
clients/tui/tsdown.config.ts |
Adds tsdown with JSX and React bundling policies. |
clients/tui/tsconfig.json |
Includes the renamed build configuration. |
clients/tui/README.md |
Updates bundling-policy documentation. |
clients/tui/package.json |
Switches builds to tsdown and overrides Rolldown. |
clients/tui/package-lock.json |
Replaces the tsup dependency tree with tsdown’s. |
clients/tui/__tests__/tsdownConfig.test.ts |
Adapts React-policy checks to tsdown configuration types. |
clients/mcpdo/tsup.config.ts |
Removes the old mcpdo configuration. |
clients/mcpdo/tsdown.config.ts |
Adds the two-entry tsdown build configuration. |
clients/mcpdo/tsconfig.json |
Includes the renamed build configuration. |
clients/mcpdo/src/daemon/ensure.ts |
Clarifies chunk-relative daemon lookup in comments only. |
clients/mcpdo/README.md |
Updates the development-build description. |
clients/mcpdo/package.json |
Switches builds and removes obsolete dependency overrides and script policies. |
AGENTS.md |
Updates bundler paths and dependency-policy terminology. |
.claude/skills/release/SKILL.md |
Marks the tsup advisory example as historical. |
.claude/skills/project-structure/SKILL.md |
Updates the TUI build description. |
.claude/skills/local-dev/SKILL.md |
Refreshes build, alias, and dependency guidance. |
Review effort: Balanced
Member
Author
|
Copilot review loop closed after round 1. It came back clean: approval recommended, no inline comments, nothing suppressed. Per pr-flow 7c, one clean round ends the loop, so I haven't requested another. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2797
Follows the CLI prototype from #1492. No client builds with tsup any more.
What changed
clients/web/tsdown.runner.config.ts), mcpdo (clients/mcpdo/tsdown.config.ts) and TUI (clients/tui/tsdown.config.ts) now build with tsdown. Each has aconst EXTERNALS = [...]expanded with subpath patterns intodeps.neverBundle, plusfixedExtension: falseandoutputOptions.comments: { jsdoc: false }, the same asclients/cli/tsdown.config.ts.inputOptions.transform.jsx: "react-jsx", andink-form/ink-scroll-vieware indeps.alwaysBundle, which overrides tsdown's auto-externalization of the client's owndependencies.__tests__/tsupConfig.test.tsis nowtsdownConfig.test.tsand reads the deps lists through tsdown'sUserConfig/DepsConfigtypes. Its React-externals assertions are unchanged. I checked that it still catches a regression by droppingink-formfrom the bundled list: the test failed.build/, sosrc/daemon/ensure.tsstill findsmcpdod.jsnext to it. The mcpdo suite spawns the built daemon, so it covers that path. With tsup gone,npm ls esbuildis empty in this install, so itsesbuildandsucraseoverrides and itsallowScriptsentries are removed.esbuildoverrides andallowScripts. Vite and Storybook (web) andtsx(TUI) still install esbuild, and Vite and Storybook accept^0.27.0, which includes the advisory range the override avoids.verify:dep-locksteprejects the skew.BUNDLED_CLIENTS, the external-list paths in AGENTS.md andscripts/sdk-watch.mjs, each client's tsconfiginclude,docs/tsdown-migration.md(now marked complete, with measurements), and the docs and skills that named the old configs.Acceptance
tsupdependency remains in any client manifest.node:prefix.verify:bundle-externalspasses (4 bundles), as doesverify:dep-lockstep.npm run local:gatepasses, including every client'stest:coverage.No UI change, so no screenshots.
🤖 Generated with Claude Code