Skip to content

Conversation

@Timeless0911
Copy link
Contributor

@Timeless0911 Timeless0911 commented Jan 8, 2026

Summary

Refactor dtsPromises array to a single dtsPromise variable in packages/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

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings January 8, 2026 10:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 dtsPromises array to single dtsPromise variable
  • 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.

@Timeless0911 Timeless0911 marked this pull request as draft January 8, 2026 10:23
@Timeless0911 Timeless0911 marked this pull request as ready for review January 8, 2026 11:07
@Timeless0911 Timeless0911 merged commit ed198d7 into main Jan 8, 2026
15 checks passed
@Timeless0911 Timeless0911 deleted the refactor/dts-promise-simplification branch January 8, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants