chore!: migrate build pipeline from tsc to tsdown#51
Merged
Conversation
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.
Which Linear task is linked to this PR?
N/A — Build tooling improvement.
Why was it implemented this way?
Migrates the build pipeline from
tscto tsdown (powered by Rolldown/OXC in Rust) for significantly faster builds. This approach was proven in the SDK repo where build times went from ~13s to ~650ms.What changed:
tsdownadded as root devDependency — single build tool replacing multipletscinvocations per package.tsdown.config.tscreated for each package — dual ESM/CJS output with source maps and declaration files (.d.tswith source maps via OXC's isolated declarations).isolatedDeclarations: trueadded to roottsconfig.json— required by OXC's declaration emitter. All exported functions, variables, and class members now have explicit type annotations (~30 files updated).Package scripts simplified:
buildinlined to single command (rm -rf dist && version.js && build.js && printf package.json markers)build:cjs,build:esm,build:types,build:cleanscriptscleansimplified torm -rf distwatchreplaced withtsdown --watchcheck:types(tsc --noEmit) kept as-isscripts/build.jscreated — per-package build timing wrapper aroundtsdown.All packages now produce both ESM and CJS — previously only
@bigmi/corehad CJS output.Why tsdown over alternatives:
isolatedDeclarationssupport via OXC — generates.d.tswithout a full TypeScript programdist/esm/,dist/cjs/)Visual showcase (Screenshots or Videos)
Build output after migration:
Checklist before requesting a review