refactor(@angular/build): relocate non-esbuild utilities out of tools/esbuild - #34132
Merged
alan-agius4 merged 1 commit intoSep 21, 2026
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request reorganizes and refactors several internal build utilities and tools, moving modules like the watcher, profiling, cache, i18n inliner, and JavaScript transformer to more appropriate or generic directories (such as utils/ or dedicated tool directories) and updating their import paths across the codebase. Feedback on these changes highlights a potential issue in packages/angular/build/src/tools/i18n/locale-data.ts, where a rejected promise in loadLocaleData could be permanently cached in localeDataCache. It is recommended to add a .catch() handler to evict the rejected promise from the cache to allow recovery or retries.
…/esbuild Relocate several utilities from `src/tools/esbuild` to more appropriate locations, as they are not specific to esbuild: - `watcher.ts`: moved to `src/utils/watcher.ts`. - `profiling.ts`: moved to `src/utils/profiling.ts`. - `cache.ts`, `sqlite-cache-store.ts`, `lmdb-cache-store.ts`: moved to `src/utils/cache/`. - `javascript-transformer.ts`, `javascript-transformer-worker.ts`: moved to `src/tools/javascript-transformer/`. - `i18n-inliner.ts`, `i18n-inliner-worker.ts`, `i18n-translation-*`: moved to `src/tools/i18n/`, with locale data helpers in `src/tools/i18n/locale-data.ts`. - `index-html-generator.ts`: moved to `src/builders/application/index-html-generator.ts`.
alan-agius4
force-pushed
the
refactor/relocate-non-esbuild-utils
branch
from
September 21, 2026 10:47
8812237 to
9fd8753
Compare
clydin
approved these changes
Sep 21, 2026
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relocate several utilities from
packages/angular/build/src/tools/esbuildto more appropriate locations, as they are not specific to esbuild:watcher.tsandwatcher_spec.tstosrc/utils/watcher.ts.profiling.tstosrc/utils/profiling.ts.cache.ts,sqlite-cache-store.ts, andlmdb-cache-store.ts(along with tests) tosrc/utils/cache/.javascript-transformer.ts,javascript-transformer-worker.ts, and spec tosrc/tools/javascript-transformer/.i18n-inliner.ts,i18n-inliner-worker.ts,i18n-translation-reader.ts, andi18n-translation-encoder.tstosrc/tools/i18n/. Extracted locale data resolution/loading intosrc/tools/i18n/locale-data.ts.index-html-generator.tstosrc/builders/application/index-html-generator.ts.