Skip to content

refactor(cli): replace esbuild with tsdown#1022

Merged
overbalance merged 4 commits intomainfrom
overbalance/replace-esbuild
Dec 16, 2025
Merged

refactor(cli): replace esbuild with tsdown#1022
overbalance merged 4 commits intomainfrom
overbalance/replace-esbuild

Conversation

@overbalance
Copy link
Copy Markdown
Member

@overbalance overbalance commented Dec 16, 2025

What problem is this solving?

Aligns CLI build tooling with the main SDK by using tsdown (rolldown-based), reducing build tool fragmentation.

Short description of changes

  • Replace esbuild with tsdown for CLI compilation (tsc runs first for type checking)
  • Convert validation script from bash to TypeScript for cross-platform support (to match SDK)
  • Remove custom validation checks now handled by tsdown (publint, shebang)
  • Delete unused scripts/measureSize.ts
  • Output changed from dist/index.js to dist/index.mjs (default extension from tsdown)

Testing

  • npm run cli:compile produces valid output
  • npm run cli:validate passes (es-check + integration test)
  • npm run cli:test passes

Comment thread cli/package.json
Comment on lines -19 to -21
"dist",
"LICENSE",
"README.md"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license and readme are always included by npm

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 16, 2025

Platform Tests (vite-7 gzip: 47.99KB)

vite-7 Platform Tests

Total Uncompressed Size Total Gzip Size
vite-7 - esnext +164.67 KB +47.99 KB
vite-7 - es2015 +171.51 KB +49.67 KB

vite-otel-latest Platform Tests

Total Uncompressed Size Total Gzip Size
vite-otel-latest - esnext +163.74 KB +49.69 KB
vite-otel-latest - es2015 +170.50 KB +51.32 KB

webpack-5 Platform Tests

Total Uncompressed Size Total Gzip Size
webpack-5 - esnext +121.11 KB +43.18 KB
webpack-5 - es2015 +122.22 KB +44.65 KB
Chrome DevTools Protocol Tracing (Script: 102.83ms, Heap: 12.87MB)
Number of Requests Size of Requests Script Duration Task Duration Heap Used Size
Requests +3 requests +29.72 KB
Page Loaded +13.19 ms +6.89 ms +0.91 MB
Generate 100 fetch requests +15.92 ms +64.56 ms +1.71 MB
Generate 100 XHR requests +40.24 ms +115.13 ms +2.31 MB
Click 100 buttons and generate 100 logs +24.43 ms +28.52 ms +2.85 MB
Throw a 100 exceptions +1.67 ms +14.16 ms +2.12 MB
End Session +7.38 ms +15.22 ms +2.98 MB
Total +3 requests +29.72 KB +102.83 ms +244.49 ms +12.87 MB
Lighthouse (Script Eval: 44.79ms)
Difference Description
Total Blocking Time 0 ms Difference in Total Blocking Time: Sum of all time periods between FCP and Time to Interactive, when task length exceeded 50ms, expressed in milliseconds. Learn more about the Total Blocking Time metric.
Main Thread Time +59.24 ms Difference in Main Thread Time: Consider reducing the time spent parsing, compiling and executing JS. You may find delivering smaller JS payloads helps with this. Learn how to minimize main-thread work
Script Evaluation Time +44.79 ms Difference in Script Evaluation Time: Consider reducing the time spent parsing, compiling, and executing JS. You may find delivering smaller JS payloads helps with this. Learn how to reduce Javascript execution time.

@overbalance overbalance merged commit 8beeff1 into main Dec 16, 2025
17 checks passed
@overbalance overbalance deleted the overbalance/replace-esbuild branch December 16, 2025 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants