Skip to content

fix(@angular/build): only copy root README asset by default - #34417

Merged
alan-agius4 merged 4 commits into
angular:mainfrom
alan-agius4:fix/library-options-normalization
Oct 20, 2026
Merged

alan-agius4 merged 4 commits into
angular:mainfrom
alan-agius4:fix/library-options-normalization

Conversation

@alan-agius4

@alan-agius4 alan-agius4 commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Only include the root README.md ({ glob: 'README.md', input: projectRoot, output: '.' }) in default library assets and remove automatic secondary entry-point README.md asset rules.

…secondary README assets

- Prevent secondary entry-point default `README.md` assets from copying the root or primary `README.md` when sharing `projectRoot` or the primary entry-point directory.
- Validate in `normalizeLibraryOptions` that `outputPath` is not equal to `workspaceRoot`, `projectRoot`, or a parent directory of `projectRoot` before `deleteOutputDir` executes.
- Canonicalize `workspaceRoot` via `canonicalizePath` to ensure consistent Windows drive-letter casing across compilation and file watching.
@alan-agius4 alan-agius4 changed the title fix(@angular/build): validate library outputPath and avoid duplicate secondary README assets fix(@angular/build): avoid duplicate secondary README assets and canonicalize workspaceRoot Oct 20, 2026
@alan-agius4 alan-agius4 changed the title fix(@angular/build): avoid duplicate secondary README assets and canonicalize workspaceRoot fix(@angular/build): only copy root README asset by default and canonicalize workspaceRoot Oct 20, 2026
@alan-agius4
alan-agius4 requested a review from clydin October 20, 2026 09:23
@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 20, 2026
@alan-agius4
alan-agius4 marked this pull request as ready for review October 20, 2026 09:23

@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 library builder options to canonicalize the workspace root path and removes the automatic copying of README.md files for secondary entry points. It also adds comprehensive unit tests to verify that only the root README.md is copied by default and not the ones for secondary entry points. No review comments were provided, so there is no feedback to address.

@alan-agius4 alan-agius4 changed the title fix(@angular/build): only copy root README asset by default and canonicalize workspaceRoot fix(@angular/build): only copy root README asset by default Oct 20, 2026
@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 20, 2026
@alan-agius4
alan-agius4 merged commit 9e998c1 into angular:main Oct 20, 2026
39 of 40 checks passed
@alan-agius4
alan-agius4 deleted the fix/library-options-normalization branch October 20, 2026 15:50
@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