refactor(plugin-dts): simplify dtsPromises to single dtsPromise#1439
Merged
Timeless0911 merged 3 commits intomainfrom Jan 8, 2026
Merged
refactor(plugin-dts): simplify dtsPromises to single dtsPromise#1439Timeless0911 merged 3 commits intomainfrom
Timeless0911 merged 3 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the DTS promise handling from an array (dtsPromises) to a single variable (dtsPromise) with the assumption that only one promise is used. However, this assumption is incorrect - Rslib supports multiple library formats (e.g., esm and cjs) in a single configuration, where each format is treated as a separate environment that generates its own DTS files.
Key Changes
- Changed
dtsPromisesarray to singledtsPromisevariable - Modified promise collection from array push to direct assignment
- Updated promise resolution to await single promise instead of Promise.all
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fi3ework
approved these changes
Jan 8, 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.
Summary
Refactor
dtsPromisesarray to a singledtsPromisevariable inpackages/plugin-dts/src/index.ts.Since there is always only one promise in this environment plugin, using an array was unnecessary and potentially ambiguous.
Related Links
N/A
Checklist