Repository navigation
refactor(@angular/build): relocate non-esbuild utilities out of tools/esbuild - #34132
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`.
8812237 to
9fd8753
Compare
|
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. |
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.