feat: migrate build tooling from tsup to tsdown and update TypeScript#446
feat: migrate build tooling from tsup to tsdown and update TypeScript#446
Conversation
- Replace tsup 8.x with tsdown 0.21.x for the ESM/dts build - Bump typescript 5.9 -> 6.0 - Switch moduleResolution from the (now-removed) "node" to "bundler" - Update exports/main/types to .mjs and .d.mts to match tsdown's default output filenames for ESM https://claude.ai/code/session_017Khrq5EYfF7EzJcv2iT7Cp
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #446 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 5 5
Lines 518 518
Branches 145 143 -2
=========================================
Hits 518 518 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request migrates the build system from tsup to tsdown, updates output file extensions to .mjs and .d.mts, and bumps the TypeScript version. Feedback highlights critical issues in the build script, specifically the removal of the directory cleaning step which could result in stale assets, and a mismatch between the default build output extensions and the entry points defined in package.json. Furthermore, the TypeScript version update to ^6.0.3 is flagged as potentially invalid.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce?
Build tooling and configuration update
Description
This PR migrates the project's build tooling from
tsuptotsdownand updates TypeScript to v6. The changes include:tsupwithtsdownin the build script, removing therimraf ./distpre-step and--cleanflag astsdownhandles this automatically.mjsand.d.mtsextensions (ES module conventions) instead of.jsand.d.tstsconfig.jsonmoduleResolutionfrom"node"to"bundler"to align with modern bundler expectationsThese changes modernize the build pipeline while maintaining the same ESM output format.
Test Plan
Existing tests pass with the new build configuration. The build output remains functionally equivalent with the updated file extensions properly reflected in package.json exports.
https://claude.ai/code/session_017Khrq5EYfF7EzJcv2iT7Cp