Skip to content

refactor(@angular/build): consolidate library asset collection and watch check - #34230

Merged
alan-agius4 merged 2 commits into
angular:mainfrom
alan-agius4:refactor/library-simplify-assets
Oct 3, 2026
Merged

alan-agius4 merged 2 commits into
angular:mainfrom
alan-agius4:refactor/library-simplify-assets

Conversation

@alan-agius4

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

Copy link
Copy Markdown
Collaborator

Remove checkAssetChanges and reuse the assets collected by collectAssetsToEmit in watch mode so asset matching only runs once per watch iteration.

gemini-code-assist[bot]

This comment was marked as outdated.

…tch check

Remove `checkAssetChanges` and reuse the assets collected by `collectAssetsToEmit` in watch mode so asset matching only runs once per watch iteration.
@alan-agius4 alan-agius4 changed the title refactor(@angular/build): simplify library asset resolution and watch handling refactor(@angular/build): consolidate library asset collection and watch check Oct 1, 2026
@alan-agius4
alan-agius4 force-pushed the refactor/library-simplify-assets branch from 83cf2bf to 5f90459 Compare October 1, 2026 09:23
@alan-agius4

Copy link
Copy Markdown
Collaborator Author

/gemini review

@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 1, 2026
@alan-agius4
alan-agius4 requested a review from clydin October 1, 2026 09:42

@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 asset collection and change detection logic in the Angular library builder. It replaces the checkAssetChanges utility with a more direct approach that collects assets to emit (collectAssetsToEmit) during the watch loop, passing them directly to the build action. This eliminates redundant asset matching and simplifies the watch loop logic. Additionally, the responsibility of adding asset paths to the watched files set is moved from the asset collection utility to the build action. There are no review comments, and I have no feedback to provide.

Comment thread packages/angular/build/src/builders/library/pipeline/build-action.ts Outdated
@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 3, 2026
@alan-agius4
alan-agius4 merged commit aee35d4 into angular:main Oct 3, 2026
67 of 68 checks passed
@alan-agius4

Copy link
Copy Markdown
Collaborator Author

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

@alan-agius4
alan-agius4 deleted the refactor/library-simplify-assets branch October 3, 2026 08:02
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