Repository navigation
refactor(@angular/build): simplify watch-mode asset precedence and ignore normalization - #34475
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the asset tracking and resolution logic in the Angular library builder. It introduces a map to track emitted asset sources, simplifies the priority-based asset resolution and fallback restoration logic in collectAssetsToEmit, and improves glob pattern normalization to support wildcard patterns. Unit tests have been updated to verify these changes. There are no review comments, so I have no feedback to provide.
6ffc63c to
32806e0
Compare
…nore normalization Simplify incremental asset precedence checks in `collectAssetsToEmit` by relying on in-memory `emittedAssets` state rather than redundant filesystem `statSync` calls, and index emitted asset sources by output path in `BuilderState` for O(1) eviction. Also expand wildcard-suffixed ignore patterns so both direct files and nested directory contents are ignored in watch mode.
32806e0 to
52521c7
Compare
|
This PR was merged into the repository. The changes were merged into the following branches:
|
|
This pull request has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Follow-up to #34470:
emittedAssetsstate when checking whether a modified asset is shadowed by a higher-priority matcher in watch mode, avoiding redundantstatSync/lstatSynccalls on every incremental build.emittedAssetsoutput paths directly when restoring lower-priority fallback assets after a higher-priority asset is deleted.BuilderState(#emittedAssetSources) for O(1) eviction when an asset is overridden.normalizeGlobPatternso both direct files and files under matching directories are ignored in watch mode.