Repository navigation
fix(types): migrate declarations to Rolldown and TypeScript 7 - #225
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #225 +/- ##
=======================================
Coverage 100.0% 100.0%
=======================================
Files 27 27
Lines 1877 1877
Branches 409 409
=======================================
Hits 1877 1877 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
🎉 This pull request is included in version 5.3.1 📦 |
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.
Summary
Replace
dts-bundle-generatorwith Rolldown and upgrade the workspace to TypeScript 7.0.2. The new build still emits one declaration file per package and fixes the type incompatibility betweenexcel-builder-vanillaand@excel-builder-vanilla/types.Why
The previous declaration generator did not handle private class members reliably: it included them in the DTS files, making equivalent classes from the library and companion package incompatible. It also prevented upgrading the project to TypeScript 7.
The replacement uses Rolldown’s native
tsgodeclaration generator. Private and underscore-prefixed class members are omitted from published declarations, so both packages expose compatible types.Changes
dts-bundle-generatorand add Rolldown 1.2.12 withrolldown-plugin-dts0.28.6.dist/index.d.ts, preserves the previous generator’s 11 implicit type exports, and omits private implementation members.@private.In the earlier like-for-like generator comparison, the filtered DTS sizes were 54,116 bytes for
dts-bundle-generator, 54,311 for Rolldown, and 59,001 for Rollup. The final native TypeScript 7 build, with underscore-prefixed members private, is smaller still:The final package sizes include source maps, manifests, and README changes. Runtime JavaScript is byte-identical; source maps grow by 604 bytes because they include the modified source.
Validation
git diff --checkpassed.Comments
Consumers who accessed underscore-prefixed class members in TypeScript must use public configuration and export methods, such as
setHeader(),setFooter(), andsetRowInstructions(). Runtime member names and implementations are retained. Underscore keys inWorksheet.exportData()remain part of the transfer format.The plugin labels its native
tsgointegration experimental; the build and compatibility tests exercise this path. Two unused legacy runtime helpers are retained with narrowly scoped unused-member diagnostic suppressions.AI / LLM assistance
Checklist