chore: replace rollup-plugin-dts with tsc for declaration emission#385
Merged
kinyoklion merged 1 commit intomainfrom Apr 16, 2026
Merged
chore: replace rollup-plugin-dts with tsc for declaration emission#385kinyoklion merged 1 commit intomainfrom
kinyoklion merged 1 commit intomainfrom
Conversation
Remove rollup-plugin-dts and emit type declarations directly with tsc via a new tsconfig.build.json. The build now produces lib/types/*.d.ts alongside the existing lib/cjs and lib/esm bundles; the `types` / `exports.types` entries in package.json point at lib/types/index.d.ts.
joker23
approved these changes
Apr 16, 2026
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.
Remove rollup-plugin-dts and emit type declarations directly with tsc via a new tsconfig.build.json. The build now produces lib/types/*.d.ts alongside the existing lib/cjs and lib/esm bundles; the
types/exports.typesentries in package.json point at lib/types/index.d.ts.The rollup-plugin-dts was just combining all the types into a single .d.ts file for this project. It wasn't rolling up the .d.ts from its dependencies.
Note
Medium Risk
Primarily build/publish metadata changes, but it affects the emitted/packaged TypeScript declaration layout and could break consumers if the new
lib/typesoutput differs or is incomplete.Overview
Build output now generates
.d.tsfiles viatsc -p tsconfig.build.jsonintolib/types/(declarations-only), rather than using Rollup to bundle a singlelib/index.d.ts.package.jsonandexports.typesare updated to point consumers at./lib/types/index.d.ts, androllup-plugin-dtsis removed from the Rollup config and dev dependencies.Reviewed by Cursor Bugbot for commit 9227a7d. Bugbot is set up for automated code reviews on this repo. Configure here.