Skip to content

refactor(@angular/build): extract shared concurrency, watcher, and styling utilities - #34110

Open
alan-agius4 wants to merge 1 commit into
angular:mainfrom
alan-agius4:refactor/build-shared-utils
Open

alan-agius4 wants to merge 1 commit into
angular:mainfrom
alan-agius4:refactor/build-shared-utils

Conversation

@alan-agius4

Copy link
Copy Markdown
Collaborator

Extract shared utilities from the application builder so they can be reused across builders:

  • Extract runConcurrent and mapConcurrent into utils/concurrency.ts
  • Extract setupWatcher into tools/esbuild/watcher.ts
  • Extract getTailwindConfig into utils/postcss-configuration.ts
  • Update stylesheet bundling options and CSS resource plugin to support data URLs
  • Expose resolvePath on BuilderHarness

@alan-agius4 alan-agius4 added the target: minor This PR is targeted for the next minor release label Sep 17, 2026
@alan-agius4
alan-agius4 requested a review from clydin September 17, 2026 16:49

@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 introduces several refactorings and new features, including the extraction of file watcher setup logic into a reusable setupWatcher helper, the addition of a dataurl option to inline stylesheet resources as base64 data URIs, and the introduction of new concurrency utilities (runConcurrent and mapConcurrent) to handle limited-concurrency asynchronous operations. Additionally, the getTailwindConfig helper was moved to postcss-configuration.ts. Feedback on these changes highlights a potential memory leak in setupWatcher where the 'abort' event listener registered on the AbortSignal is not removed when the watcher is closed.

Comment thread packages/angular/build/src/tools/esbuild/watcher.ts
@alan-agius4 alan-agius4 added the action: review The PR is still awaiting reviews from at least one requested reviewer label Sep 17, 2026
@alan-agius4
alan-agius4 force-pushed the refactor/build-shared-utils branch 2 times, most recently from 181d5af to 838d09e Compare September 17, 2026 17:49
@alan-agius4
alan-agius4 force-pushed the refactor/build-shared-utils branch from 838d09e to 6a226cd Compare September 17, 2026 18:09
@alan-agius4 alan-agius4 added target: rc This PR is targeted for the next release-candidate and removed target: minor This PR is targeted for the next minor release labels Sep 17, 2026
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: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant