Skip to content

refactor(@angular/build): normalize library builder paths to POSIX format - #34342

Open
alan-agius4 wants to merge 3 commits into
angular:mainfrom
alan-agius4:library-posix-paths
Open

alan-agius4 wants to merge 3 commits into
angular:mainfrom
alan-agius4:library-posix-paths

Conversation

@alan-agius4

Copy link
Copy Markdown
Collaborator

Normalize paths at option and compilation boundaries in the library builder to POSIX format and update TSDoc comments across the library builder pipeline.

Related to #34340.

…rmat

Normalize paths at option and compilation boundaries in the library builder to POSIX format and update TSDoc comments across the library builder pipeline.

@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 refactors the library builder to normalize all file and directory paths to POSIX format early in the options normalization phase, allowing downstream processes to assume POSIX paths and removing redundant path conversions. Feedback on these changes suggests optimizing the asset matching logic in assets.ts by precomputing POSIX input prefixes and using efficient string operations (startsWith and slice) instead of calling path.posix.relative inside nested loops, which could introduce performance bottlenecks during incremental builds.

Comment thread packages/angular/build/src/builders/library/pipeline/assets.ts
Comment thread packages/angular/build/src/builders/library/pipeline/assets.ts
@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 14, 2026
@alan-agius4
alan-agius4 requested a review from clydin October 14, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: review The PR is still awaiting reviews from at least one requested reviewer 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