Skip to content

fix(@angular/build): filter Rolldown warnings and disable .d.ts annotation comments in library builder - #34313

Merged
alan-agius4 merged 2 commits into
angular:mainfrom
alan-agius4:fix/library-rolldown-warnings-and-annotations
Oct 12, 2026
Merged

alan-agius4 merged 2 commits into
angular:mainfrom
alan-agius4:fix/library-rolldown-warnings-and-annotations

Conversation

@alan-agius4

Copy link
Copy Markdown
Collaborator

Suppress noisy Rolldown warnings (EMPTY_BUNDLE, UNUSED_EXTERNAL_IMPORT, and THIS_IS_UNDEFINED) and disable annotation comments in .d.ts output bundles to match ng-packagr behavior.

…ation comments in library builder

Suppress noisy Rolldown warnings (`EMPTY_BUNDLE`, `UNUSED_EXTERNAL_IMPORT`, and `THIS_IS_UNDEFINED`) and disable annotation comments in `.d.ts` output bundles to match `ng-packagr` behavior.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates the Rolldown bundler configuration to ignore specific warning codes ('EMPTY_BUNDLE', 'UNUSED_EXTERNAL_IMPORT', 'THIS_IS_UNDEFINED') and adjusts the comment preservation settings to ensure JSDoc comments are kept in .d.ts files while annotation comments are excluded. Corresponding tests were added to verify the suppression of 'EMPTY_BUNDLE' warnings and the correct handling of comments. I have included a suggestion to further strengthen the test case by explicitly asserting that annotation comments are absent from the .d.ts output.

@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer target: minor This PR is targeted for the next minor release labels Oct 12, 2026
@alan-agius4
alan-agius4 requested a review from clydin October 12, 2026 12:54
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Oct 12, 2026
@alan-agius4
alan-agius4 merged commit 432aea0 into angular:main Oct 12, 2026
40 checks passed
@alan-agius4
alan-agius4 deleted the fix/library-rolldown-warnings-and-annotations branch October 12, 2026 17:18
@alan-agius4

Copy link
Copy Markdown
Collaborator Author

This PR was merged into the repository. The changes were merged into the following branches:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/build target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants