@angular/build 22.2.0-next.4 → 22.2.0-next.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/package.json +13 -12
  2. package/src/builders/application/build-action.js +47 -39
  3. package/src/builders/application/build-action.js.map +1 -1
  4. package/src/builders/application/execute-build.js +1 -1
  5. package/src/builders/application/execute-build.js.map +1 -1
  6. package/src/builders/application/execute-post-bundle.js +2 -5
  7. package/src/builders/application/execute-post-bundle.js.map +1 -1
  8. package/src/builders/application/i18n.js +20 -10
  9. package/src/builders/application/i18n.js.map +1 -1
  10. package/src/builders/application/index.js +2 -2
  11. package/src/builders/application/index.js.map +1 -1
  12. package/src/builders/application/results.d.ts +3 -2
  13. package/src/builders/application/setup-bundling.js +3 -1
  14. package/src/builders/application/setup-bundling.js.map +1 -1
  15. package/src/builders/dev-server/vite/index.js +4 -7
  16. package/src/builders/dev-server/vite/index.js.map +1 -1
  17. package/src/builders/dev-server/vite/server.js +1 -1
  18. package/src/builders/dev-server/vite/server.js.map +1 -1
  19. package/src/builders/dev-server/vite/utils.d.ts +1 -1
  20. package/src/builders/dev-server/vite/utils.js +9 -4
  21. package/src/builders/dev-server/vite/utils.js.map +1 -1
  22. package/src/builders/extract-i18n/application-extraction.js +6 -5
  23. package/src/builders/extract-i18n/application-extraction.js.map +1 -1
  24. package/src/builders/karma/application_builder.js +1 -1
  25. package/src/builders/karma/application_builder.js.map +1 -1
  26. package/src/builders/karma/assets-middleware.d.ts +2 -2
  27. package/src/builders/karma/assets-middleware.js +5 -2
  28. package/src/builders/karma/assets-middleware.js.map +1 -1
  29. package/src/builders/karma/progress-reporter.js +7 -5
  30. package/src/builders/karma/progress-reporter.js.map +1 -1
  31. package/src/builders/karma/utils.d.ts +2 -1
  32. package/src/builders/karma/utils.js +2 -2
  33. package/src/builders/karma/utils.js.map +1 -1
  34. package/src/builders/unit-test/builder.js +1 -1
  35. package/src/builders/unit-test/options.d.ts +1 -0
  36. package/src/builders/unit-test/options.js +2 -1
  37. package/src/builders/unit-test/options.js.map +1 -1
  38. package/src/builders/unit-test/runners/vitest/build-options.js +5 -6
  39. package/src/builders/unit-test/runners/vitest/build-options.js.map +1 -1
  40. package/src/builders/unit-test/runners/vitest/executor.js +4 -4
  41. package/src/builders/unit-test/runners/vitest/executor.js.map +1 -1
  42. package/src/builders/unit-test/schema.d.ts +7 -0
  43. package/src/builders/unit-test/schema.js.map +1 -1
  44. package/src/builders/unit-test/schema.json +5 -0
  45. package/src/private.d.ts +1 -1
  46. package/src/private.js +4 -3
  47. package/src/private.js.map +1 -1
  48. package/src/tools/angular/compilation/angular-compilation.d.ts +3 -8
  49. package/src/tools/angular/compilation/angular-compilation.js +2 -88
  50. package/src/tools/angular/compilation/angular-compilation.js.map +1 -1
  51. package/src/tools/angular/compilation/aot-compilation.d.ts +5 -5
  52. package/src/tools/angular/compilation/aot-compilation.js +9 -13
  53. package/src/tools/angular/compilation/aot-compilation.js.map +1 -1
  54. package/src/tools/angular/compilation/compiler-options.d.ts +24 -0
  55. package/src/tools/angular/compilation/compiler-options.js +135 -0
  56. package/src/tools/angular/compilation/compiler-options.js.map +1 -0
  57. package/src/tools/angular/compilation/index.d.ts +1 -1
  58. package/src/tools/angular/compilation/index.js +1 -3
  59. package/src/tools/angular/compilation/index.js.map +1 -1
  60. package/src/tools/angular/compilation/jit-compilation.d.ts +5 -5
  61. package/src/tools/angular/compilation/jit-compilation.js +8 -15
  62. package/src/tools/angular/compilation/jit-compilation.js.map +1 -1
  63. package/src/tools/angular/compilation/parallel-compilation.d.ts +2 -7
  64. package/src/tools/angular/compilation/parallel-compilation.js +39 -41
  65. package/src/tools/angular/compilation/parallel-compilation.js.map +1 -1
  66. package/src/tools/angular/compilation/parallel-worker.d.ts +2 -2
  67. package/src/tools/angular/compilation/parallel-worker.js +79 -63
  68. package/src/tools/angular/compilation/parallel-worker.js.map +1 -1
  69. package/src/tools/angular/compilation/typescript-compilation.d.ts +24 -0
  70. package/src/tools/angular/compilation/typescript-compilation.js +107 -0
  71. package/src/tools/angular/compilation/typescript-compilation.js.map +1 -0
  72. package/src/tools/angular/linker/oxc-linker.d.ts +13 -17
  73. package/src/tools/angular/linker/oxc-linker.js +27 -89
  74. package/src/tools/angular/linker/oxc-linker.js.map +1 -1
  75. package/src/tools/esbuild/angular/compilation-state.d.ts +23 -3
  76. package/src/tools/esbuild/angular/compilation-state.js +51 -13
  77. package/src/tools/esbuild/angular/compilation-state.js.map +1 -1
  78. package/src/tools/esbuild/angular/compiler-plugin.js +36 -101
  79. package/src/tools/esbuild/angular/compiler-plugin.js.map +1 -1
  80. package/src/tools/esbuild/angular/component-stylesheets.d.ts +3 -3
  81. package/src/tools/esbuild/angular/component-stylesheets.js +42 -15
  82. package/src/tools/esbuild/angular/component-stylesheets.js.map +1 -1
  83. package/src/tools/esbuild/application-code-bundle.js +5 -9
  84. package/src/tools/esbuild/application-code-bundle.js.map +1 -1
  85. package/src/tools/esbuild/bundler-context.d.ts +4 -4
  86. package/src/tools/esbuild/bundler-context.js +93 -27
  87. package/src/tools/esbuild/bundler-context.js.map +1 -1
  88. package/src/tools/esbuild/bundler-execution-result.d.ts +1 -0
  89. package/src/tools/esbuild/bundler-execution-result.js +2 -2
  90. package/src/tools/esbuild/bundler-execution-result.js.map +1 -1
  91. package/src/tools/esbuild/cache.d.ts +10 -0
  92. package/src/tools/esbuild/cache.js +18 -0
  93. package/src/tools/esbuild/cache.js.map +1 -1
  94. package/src/tools/esbuild/i18n-inliner-worker.d.ts +82 -37
  95. package/src/tools/esbuild/i18n-inliner-worker.js +134 -97
  96. package/src/tools/esbuild/i18n-inliner-worker.js.map +1 -1
  97. package/src/tools/esbuild/i18n-inliner.d.ts +42 -11
  98. package/src/tools/esbuild/i18n-inliner.js +335 -121
  99. package/src/tools/esbuild/i18n-inliner.js.map +1 -1
  100. package/src/tools/esbuild/i18n-locale-plugin.d.ts +32 -0
  101. package/src/tools/esbuild/i18n-locale-plugin.js +112 -103
  102. package/src/tools/esbuild/i18n-locale-plugin.js.map +1 -1
  103. package/src/tools/esbuild/i18n-translation-encoder.d.ts +21 -0
  104. package/src/tools/esbuild/i18n-translation-encoder.js +92 -0
  105. package/src/tools/esbuild/i18n-translation-encoder.js.map +1 -0
  106. package/src/tools/esbuild/i18n-translation-reader.d.ts +41 -0
  107. package/src/tools/esbuild/i18n-translation-reader.js +164 -0
  108. package/src/tools/esbuild/i18n-translation-reader.js.map +1 -0
  109. package/src/tools/esbuild/javascript-transformer-worker.js +41 -47
  110. package/src/tools/esbuild/javascript-transformer-worker.js.map +1 -1
  111. package/src/tools/esbuild/javascript-transformer.js +53 -1
  112. package/src/tools/esbuild/javascript-transformer.js.map +1 -1
  113. package/src/tools/esbuild/load-result-cache.d.ts +1 -0
  114. package/src/tools/esbuild/load-result-cache.js +24 -11
  115. package/src/tools/esbuild/load-result-cache.js.map +1 -1
  116. package/src/tools/esbuild/sqlite-cache-store.d.ts +8 -0
  117. package/src/tools/esbuild/sqlite-cache-store.js +19 -7
  118. package/src/tools/esbuild/sqlite-cache-store.js.map +1 -1
  119. package/src/tools/esbuild/stylesheets/sass-language.js +19 -14
  120. package/src/tools/esbuild/stylesheets/sass-language.js.map +1 -1
  121. package/src/tools/esbuild/stylesheets/stylesheet-plugin-factory.d.ts +1 -1
  122. package/src/tools/esbuild/utils.d.ts +1 -1
  123. package/src/tools/esbuild/utils.js.map +1 -1
  124. package/src/tools/oxc/oxc-transform.d.ts +3 -0
  125. package/src/tools/oxc/oxc-transform.js +103 -124
  126. package/src/tools/oxc/oxc-transform.js.map +1 -1
  127. package/src/tools/oxc/traversal.d.ts +32 -0
  128. package/src/tools/oxc/traversal.js +299 -0
  129. package/src/tools/oxc/traversal.js.map +1 -0
  130. package/src/tools/sass/rebasing-importer.d.ts +8 -14
  131. package/src/tools/sass/rebasing-importer.js +18 -24
  132. package/src/tools/sass/rebasing-importer.js.map +1 -1
  133. package/src/tools/sass/sass-service.d.ts +11 -38
  134. package/src/tools/sass/sass-service.js +124 -187
  135. package/src/tools/sass/sass-service.js.map +1 -1
  136. package/src/utils/environment-options.d.ts +12 -0
  137. package/src/utils/environment-options.js +20 -12
  138. package/src/utils/environment-options.js.map +1 -1
  139. package/src/utils/i18n-options.d.ts +2 -1
  140. package/src/utils/i18n-options.js.map +1 -1
  141. package/src/utils/normalize-cache.d.ts +11 -1
  142. package/src/utils/normalize-cache.js +6 -3
  143. package/src/utils/normalize-cache.js.map +1 -1
  144. package/src/utils/purge-cache.js +24 -13
  145. package/src/utils/purge-cache.js.map +1 -1
  146. package/src/utils/server-rendering/esm-in-memory-loader/loader-hooks.d.ts +1 -1
  147. package/src/utils/server-rendering/esm-in-memory-loader/loader-hooks.js +12 -9
  148. package/src/utils/server-rendering/esm-in-memory-loader/loader-hooks.js.map +1 -1
  149. package/src/utils/server-rendering/esm-in-memory-loader/utils.d.ts +8 -0
  150. package/src/utils/server-rendering/esm-in-memory-loader/utils.js +30 -0
  151. package/src/utils/server-rendering/esm-in-memory-loader/utils.js.map +1 -1
  152. package/src/utils/server-rendering/prerender.d.ts +2 -1
  153. package/src/utils/server-rendering/prerender.js +83 -30
  154. package/src/utils/server-rendering/prerender.js.map +1 -1
  155. package/src/utils/server-rendering/render-worker.d.ts +10 -5
  156. package/src/utils/server-rendering/render-worker.js +31 -7
  157. package/src/utils/server-rendering/render-worker.js.map +1 -1
  158. package/src/utils/test-files.d.ts +2 -2
  159. package/src/utils/test-files.js +3 -3
  160. package/src/utils/test-files.js.map +1 -1
  161. package/src/tools/angular/compilation/noop-compilation.d.ts +0 -15
  162. package/src/tools/angular/compilation/noop-compilation.js +0 -27
  163. package/src/tools/angular/compilation/noop-compilation.js.map +0 -1
  164. package/src/tools/sass/worker.d.ts +0 -63
  165. package/src/tools/sass/worker.js +0 -202
  166. package/src/tools/sass/worker.js.map +0 -1
  167. /package/src/tools/{esbuild/angular → angular/compilation}/diagnostics.d.ts +0 -0
  168. /package/src/tools/{esbuild/angular → angular/compilation}/diagnostics.js +0 -0
  169. /package/src/tools/{esbuild/angular → angular/compilation}/diagnostics.js.map +0 -0
@@ -12,29 +12,77 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.I18nInliner = void 0;
14
14
  const node_assert_1 = __importDefault(require("node:assert"));
15
+ const node_module_1 = require("node:module");
15
16
  const node_path_1 = require("node:path");
16
17
  const node_v8_1 = require("node:v8");
17
18
  const hash_1 = require("../../utils/hash");
18
19
  const worker_pool_1 = require("../../utils/worker-pool");
19
20
  const bundler_files_1 = require("./bundler-files");
20
21
  const cache_1 = require("./cache");
22
+ const i18n_translation_encoder_1 = require("./i18n-translation-encoder");
23
+ // TODO: Convert to import.meta usage during ESM transition
24
+ const localRequire = (0, node_module_1.createRequire)(__filename);
25
+ const INLINER_WORKER_PATH = localRequire.resolve('./i18n-inliner-worker');
21
26
  /**
22
27
  * A keyword used to indicate if a JavaScript file may require inlining of translations.
23
28
  * This keyword is used to avoid processing files that would not otherwise need i18n processing.
24
29
  */
25
30
  const LOCALIZE_KEYWORD = '$localize';
31
+ /**
32
+ * The baseline number of locales to process concurrently in a single sliding window.
33
+ * This caps peak worker memory on low-core machines while maintaining multi-locale batching throughput.
34
+ */
35
+ const DEFAULT_LOCALE_WINDOW_SIZE = 8;
36
+ /**
37
+ * Minimum byte size threshold for a file to be eligible for multi-batch sharding.
38
+ * Files below this threshold (< 100 KB) are processed in a single batch to minimize IPC overhead.
39
+ */
40
+ const SMALL_FILE_FLOOR_BYTES = 100 * 1024;
41
+ /**
42
+ * Ratio of the maximum file size in a window to consider a file "dominant".
43
+ * Files within 70% of the largest file are sharded across all workers for maximum concurrency.
44
+ */
45
+ const DOMINANT_FILE_RATIO = 0.7;
26
46
  /**
27
47
  * Serializes the translation messages for a locale for transfer to an inliner Worker.
28
48
  *
29
- * A Blob is used because cloning one shares its data by reference, whereas sending the messages
30
- * themselves copies them into a Worker for every request that carries them. A locale can contain
31
- * tens of thousands of messages, which makes that copy the dominant cost of inlining a locale.
49
+ * A SharedArrayBuffer is preferred because it enables zero-copy shared memory access
50
+ * and on-demand string decoding across all worker threads. Falls back to a Blob when
51
+ * SharedArrayBuffer is unavailable.
32
52
  *
33
53
  * @param translation The translation messages for a locale, if the locale has any.
34
- * @returns A Blob containing the serialized messages, or undefined if the locale has none.
54
+ * @param translationIntegrity Optional content hash of the translation file for cache lookup.
55
+ * @param translationCache Optional Cache instance for binary translation buffers.
56
+ * @returns A SharedArrayBuffer or Blob containing the serialized messages, or undefined if none.
35
57
  */
36
- function serializeTranslation(translation) {
37
- return translation && new Blob([(0, node_v8_1.serialize)(translation)]);
58
+ async function serializeTranslation(translation, translationIntegrity, translationCache) {
59
+ if (!translation) {
60
+ return undefined;
61
+ }
62
+ if (typeof SharedArrayBuffer !== 'undefined') {
63
+ if (translationIntegrity && translationCache) {
64
+ // Look up or generate binary translation data in the persistent cache.
65
+ // A Uint8Array view is stored in the cache store to allow binary persistence.
66
+ const binaryData = await translationCache.getOrCreate(translationIntegrity, () => {
67
+ return new Uint8Array((0, i18n_translation_encoder_1.encodeTranslationToBuffer)(translation));
68
+ });
69
+ // On a cache miss, getOrCreate returns the newly created Uint8Array backed by the
70
+ // original SharedArrayBuffer. Return it directly to avoid an unnecessary allocation and copy.
71
+ if (binaryData.buffer instanceof SharedArrayBuffer &&
72
+ binaryData.byteOffset === 0 &&
73
+ binaryData.byteLength === binaryData.buffer.byteLength) {
74
+ return binaryData.buffer;
75
+ }
76
+ // On a warm cache hit, the restored data is backed by a standard ArrayBuffer from disk.
77
+ // Copy it into a SharedArrayBuffer so worker threads can access it via zero-copy shared memory.
78
+ const buffer = new SharedArrayBuffer(binaryData.byteLength);
79
+ new Uint8Array(buffer).set(binaryData);
80
+ return buffer;
81
+ }
82
+ // When persistent caching is not configured, encode directly into a SharedArrayBuffer.
83
+ return (0, i18n_translation_encoder_1.encodeTranslationToBuffer)(translation);
84
+ }
85
+ return new Blob([(0, node_v8_1.serialize)(translation)]);
38
86
  }
39
87
  /**
40
88
  * A class that performs i18n translation inlining of JavaScript code.
@@ -46,16 +94,23 @@ class I18nInliner {
46
94
  options;
47
95
  #cacheInitFailed = false;
48
96
  #workerPool;
49
- #cache;
50
- #localizeFiles;
51
- #unmodifiedFiles;
97
+ #cacheStore;
98
+ #transformedFileCache;
99
+ #translationCache;
100
+ #generation = 0;
52
101
  constructor(options, maxThreads) {
53
102
  this.options = options;
54
- this.#unmodifiedFiles = [];
55
- const { outputFiles, shouldOptimize, missingTranslation } = options;
56
- const files = new Map();
103
+ this.#workerPool = new worker_pool_1.WorkerPool({
104
+ maxThreads,
105
+ });
106
+ }
107
+ #partitionFiles(files) {
108
+ const filenames = [];
109
+ const localizeFiles = new Map();
110
+ const localizeMaps = new Map();
111
+ const unmodifiedFiles = [];
57
112
  const pendingMaps = [];
58
- for (const file of outputFiles) {
113
+ for (const file of files) {
59
114
  if (file.type === bundler_files_1.BuildOutputFileType.Root || file.type === bundler_files_1.BuildOutputFileType.ServerRoot) {
60
115
  // Skip also the server entry-point.
61
116
  // Skip stats and similar files.
@@ -69,7 +124,8 @@ class I18nInliner {
69
124
  : Buffer.from(file.contents.buffer, file.contents.byteOffset, file.contents.byteLength);
70
125
  const hasLocalize = contentBuffer.includes(LOCALIZE_KEYWORD);
71
126
  if (hasLocalize) {
72
- files.set(file.path, file);
127
+ localizeFiles.set(file.path, file);
128
+ filenames.push(file.path);
73
129
  continue;
74
130
  }
75
131
  }
@@ -79,128 +135,279 @@ class I18nInliner {
79
135
  pendingMaps.push(file);
80
136
  continue;
81
137
  }
82
- this.#unmodifiedFiles.push(file);
138
+ unmodifiedFiles.push(file);
83
139
  }
84
140
  // Check if any pending map files should be processed by checking if the parent JS file is present
85
141
  for (const file of pendingMaps) {
86
- if (files.has(file.path.slice(0, -4))) {
87
- files.set(file.path, file);
142
+ const jsPath = file.path.slice(0, -4);
143
+ if (localizeFiles.has(jsPath)) {
144
+ localizeMaps.set(jsPath, file);
88
145
  }
89
146
  else {
90
- this.#unmodifiedFiles.push(file);
147
+ unmodifiedFiles.push(file);
91
148
  }
92
149
  }
93
- this.#localizeFiles = files;
94
- this.#workerPool = new worker_pool_1.WorkerPool({
95
- filename: require.resolve('./i18n-inliner-worker'),
96
- maxThreads,
97
- // Extract options to ensure only the named options are serialized and sent to the worker
98
- workerData: {
99
- missingTranslation,
100
- shouldOptimize,
101
- // A Blob is an immutable data structure that allows sharing the data between workers
102
- // without copying until the data is actually used within a Worker. This is useful here
103
- // since each file may not actually be processed in each Worker and the Blob avoids
104
- // unneeded repeat copying of potentially large JavaScript files.
105
- files: new Map(Array.from(files, ([name, file]) => [name, new Blob([file.contents])])),
106
- },
107
- });
150
+ return { filenames, localizeFiles, localizeMaps, unmodifiedFiles };
108
151
  }
109
152
  /**
110
- * Performs inlining of translations for the provided locale and translations. The files that
111
- * are processed originate from the files passed to the class constructor and filter by presence
112
- * of the localize function keyword.
113
- * @param locale The string representing the locale to inline.
114
- * @param translation The translation messages to use when inlining.
115
- * @param translationIntegrity An optional integrity value for the translation messages to use for caching.
116
- * @returns A promise that resolves to an array of OutputFiles representing a translated result.
153
+ * Performs inlining of translations across multiple locales in parallel.
154
+ *
155
+ * An adaptive 2D task-partitioning algorithm distributes (files x locales) work units
156
+ * across all worker threads while caching AST metadata and sourcemaps in worker memory.
157
+ *
158
+ * @param files The build output files to transform.
159
+ * @param locales The locales and translations to inline.
160
+ * @returns A map of locale names to their inlined output files and diagnostics.
117
161
  */
118
- async inlineForLocale(locale, translation, translationIntegrity) {
162
+ async inlineAll(files, locales) {
119
163
  await this.initCache();
120
- const { shouldOptimize, missingTranslation } = this.options;
121
- // Serialized once here and then shared by the request for every file of this locale
122
- const translationBlob = serializeTranslation(translation);
123
- // Request inlining for each file that contains localize calls
124
- const requests = [];
125
- let fileCacheKeyBase;
126
- for (const [filename, file] of this.#localizeFiles) {
127
- let cacheKey;
128
- if (filename.endsWith('.map')) {
129
- continue;
130
- }
131
- let cacheResultPromise = Promise.resolve(null);
132
- if (this.#cache) {
133
- // The options are digested here so that each file's key is derived from a fixed number
134
- // of bytes. Hashing the options directly would re-hash the full set of messages, which
135
- // can be several megabytes, once for every file.
136
- fileCacheKeyBase ??= (0, hash_1.calculateHash)(JSON.stringify({
137
- locale,
138
- translation: translationIntegrity ?? translation,
139
- missingTranslation,
140
- shouldOptimize,
141
- localizeVersion: this.options.localizeVersion,
142
- }));
143
- // NOTE: If additional options are added, this may need to be updated.
144
- const hasher = (0, hash_1.createContentHash)();
145
- hasher.update(file.hash);
146
- hasher.update(filename);
147
- hasher.update(fileCacheKeyBase);
148
- cacheKey = hasher.digest();
149
- // Failure to get the value should not fail the transform
150
- cacheResultPromise = this.#cache.get(cacheKey).catch(() => null);
164
+ const generation = ++this.#generation;
165
+ const { missingTranslation, localizeVersion } = this.options;
166
+ const localeList = Array.from(locales);
167
+ if (localeList.length === 0) {
168
+ return new Map();
169
+ }
170
+ const { filenames, localizeFiles, localizeMaps, unmodifiedFiles } = this.#partitionFiles(files);
171
+ const fileResultsByLocale = new Map();
172
+ for (const { locale } of localeList) {
173
+ (0, node_assert_1.default)(!fileResultsByLocale.has(locale), 'Duplicate locale provided to inliner: ' + locale);
174
+ fileResultsByLocale.set(locale, new Map());
175
+ }
176
+ // Process locales in sliding windows to cap peak worker memory.
177
+ // Ensure the window has at least enough locales to saturate all available workers on high-core machines.
178
+ const windowSize = Math.max(DEFAULT_LOCALE_WINDOW_SIZE, this.#workerPool.maxThreads || 1);
179
+ for (let i = 0; i < localeList.length; i += windowSize) {
180
+ const windowLocales = localeList.slice(i, i + windowSize);
181
+ const activeLocales = windowLocales.map((item) => item.locale);
182
+ const isLastWindow = i + windowSize >= localeList.length;
183
+ // Pre-calculate cache key bases and serialized Blobs for each locale in this window
184
+ const localeCacheBases = new Map();
185
+ const localeBlobs = new Map();
186
+ await Promise.all(windowLocales.map(async ({ locale, translation, translationIntegrity }) => {
187
+ const serialized = await serializeTranslation(translation, translationIntegrity, this.#translationCache);
188
+ localeBlobs.set(locale, serialized);
189
+ if (this.#cacheStore) {
190
+ localeCacheBases.set(locale, (0, hash_1.calculateHash)(JSON.stringify({
191
+ locale,
192
+ translation: translationIntegrity || translation,
193
+ missingTranslation,
194
+ localizeVersion,
195
+ })));
196
+ }
197
+ }));
198
+ const uncachedByFile = new Map();
199
+ if (this.#transformedFileCache) {
200
+ const cache = this.#transformedFileCache;
201
+ const cacheChecks = [];
202
+ for (const filename of filenames) {
203
+ const file = localizeFiles.get(filename);
204
+ (0, node_assert_1.default)(file !== undefined, 'Localize file must exist: ' + filename);
205
+ const fileEntriesPromises = windowLocales.map(async ({ locale }) => {
206
+ const fileCacheKeyBase = localeCacheBases.get(locale);
207
+ (0, node_assert_1.default)(fileCacheKeyBase !== undefined, 'Cache base must exist for locale: ' + locale);
208
+ const hasher = (0, hash_1.createContentHash)();
209
+ hasher.update(file.hash);
210
+ hasher.update(filename);
211
+ hasher.update(fileCacheKeyBase);
212
+ const cacheKey = hasher.digest();
213
+ try {
214
+ const result = await cache.get(cacheKey);
215
+ if (result) {
216
+ fileResultsByLocale.get(locale)?.set(filename, result);
217
+ return;
218
+ }
219
+ }
220
+ catch { }
221
+ return {
222
+ locale,
223
+ cacheKey,
224
+ translation: localeBlobs.get(locale),
225
+ };
226
+ });
227
+ cacheChecks.push(Promise.all(fileEntriesPromises).then((entries) => {
228
+ const filtered = entries.filter((e) => e !== undefined);
229
+ if (filtered.length > 0) {
230
+ uncachedByFile.set(filename, filtered);
231
+ }
232
+ }));
233
+ }
234
+ await Promise.all(cacheChecks);
151
235
  }
152
- const fileResult = cacheResultPromise.then(async (cachedResult) => {
153
- if (cachedResult) {
154
- return cachedResult;
236
+ else {
237
+ for (const filename of filenames) {
238
+ uncachedByFile.set(filename, windowLocales.map(({ locale }) => ({
239
+ locale,
240
+ translation: localeBlobs.get(locale),
241
+ })));
155
242
  }
156
- const result = await this.#workerPool.run({
157
- filename,
158
- locale,
159
- translation: translationBlob,
160
- });
161
- if (this.#cache && cacheKey) {
162
- try {
163
- // Failure to set the value should not fail the transform
164
- await this.#cache.set(cacheKey, result);
243
+ }
244
+ // Adaptive 2D Sharding for uncached tasks in this window
245
+ if (uncachedByFile.size > 0) {
246
+ await this.#processUncachedBatches(localizeFiles, localizeMaps, uncachedByFile, fileResultsByLocale, activeLocales, isLastWindow, generation);
247
+ }
248
+ }
249
+ // Assemble final results in deterministic order per locale
250
+ const resultsByLocale = new Map();
251
+ for (const { locale } of localeList) {
252
+ const fileResults = fileResultsByLocale.get(locale);
253
+ const outputFiles = [];
254
+ const errors = [];
255
+ const warnings = [];
256
+ if (fileResults) {
257
+ for (const filename of filenames) {
258
+ const originalFile = localizeFiles.get(filename);
259
+ (0, node_assert_1.default)(originalFile !== undefined, 'Localize file must exist: ' + filename);
260
+ const fileResult = fileResults.get(filename);
261
+ if (!fileResult) {
262
+ continue;
263
+ }
264
+ const type = originalFile.type;
265
+ if (fileResult.code != undefined) {
266
+ outputFiles.push((0, bundler_files_1.createOutputFile)(filename, fileResult.code, type));
267
+ }
268
+ else {
269
+ outputFiles.push(originalFile.clone());
270
+ }
271
+ const originalMap = localizeMaps.get(filename);
272
+ if (fileResult.map !== undefined) {
273
+ outputFiles.push((0, bundler_files_1.createOutputFile)(filename + '.map', fileResult.map, type));
274
+ }
275
+ else if (originalMap !== undefined) {
276
+ outputFiles.push(originalMap.clone());
277
+ }
278
+ for (const message of fileResult.messages) {
279
+ if (message.type === 'error') {
280
+ errors.push(message.message);
281
+ }
282
+ else {
283
+ warnings.push(message.message);
284
+ }
165
285
  }
166
- catch { }
167
286
  }
168
- return result;
287
+ }
288
+ // Include cloned unmodified files for every locale
289
+ outputFiles.push(...unmodifiedFiles.map((file) => file.clone()));
290
+ resultsByLocale.set(locale, {
291
+ outputFiles,
292
+ errors,
293
+ warnings,
169
294
  });
170
- requests.push(fileResult);
171
295
  }
172
- // Wait for all file requests to complete
173
- const rawResults = await Promise.all(requests);
174
- // Convert raw results to output file objects and include all unmodified files
175
- const errors = [];
176
- const warnings = [];
177
- const outputFiles = [
178
- ...rawResults.flatMap(({ file, code, map, messages }) => {
179
- const type = this.#localizeFiles.get(file)?.type;
180
- (0, node_assert_1.default)(type !== undefined, 'localized file should always have a type' + file);
181
- const resultFiles = [(0, bundler_files_1.createOutputFile)(file, code, type)];
182
- if (map) {
183
- resultFiles.push((0, bundler_files_1.createOutputFile)(file + '.map', map, type));
184
- }
185
- for (const message of messages) {
186
- if (message.type === 'error') {
187
- errors.push(message.message);
296
+ return resultsByLocale;
297
+ }
298
+ async #processUncachedBatches(localizeFiles, localizeMaps, uncachedByFile, fileResultsByLocale, activeLocales, isLastWindow = true, generation) {
299
+ const workerCount = this.#workerPool.maxThreads || 1;
300
+ // Extract file data and identify the heaviest file size in a single pass
301
+ let maxFileSize = 0;
302
+ const sortedFiles = Array.from(uncachedByFile, ([filename, entries]) => {
303
+ const codeFile = localizeFiles.get(filename);
304
+ (0, node_assert_1.default)(codeFile !== undefined, 'Localize file must exist: ' + filename);
305
+ const fileSize = codeFile.contents.byteLength;
306
+ if (fileSize > maxFileSize) {
307
+ maxFileSize = fileSize;
308
+ }
309
+ return { filename, entries, codeFile, fileSize };
310
+ });
311
+ // Sort files descending by byte size (Longest Processing Time First / LPT).
312
+ // Heavy files (e.g. main.js) are queued first to saturate all worker threads immediately,
313
+ // while small files act as gap fillers near the window barrier to prevent tail stragglers.
314
+ sortedFiles.sort((a, b) => b.fileSize - a.fileSize);
315
+ const workerTasks = [];
316
+ for (const { filename, entries, codeFile, fileSize } of sortedFiles) {
317
+ const mapFile = localizeMaps.get(filename);
318
+ const codeBlob = new Blob([codeFile.contents]);
319
+ const mapBlob = mapFile ? new Blob([mapFile.contents]) : undefined;
320
+ let localesPerBatch;
321
+ if (uncachedByFile.size === 1) {
322
+ // Single file in window: shard across all workers to avoid idle threads
323
+ localesPerBatch = Math.max(1, Math.ceil(entries.length / workerCount));
324
+ }
325
+ else if (fileSize < SMALL_FILE_FLOOR_BYTES) {
326
+ // Small chunks (< 100 KB): process all locales in 1 batch to eliminate IPC overhead
327
+ localesPerBatch = entries.length;
328
+ }
329
+ else if (fileSize >= maxFileSize * DOMINANT_FILE_RATIO) {
330
+ // Dominant file(s): shard across all workers for maximum multi-core parallelism
331
+ localesPerBatch = Math.max(1, Math.ceil(entries.length / workerCount));
332
+ }
333
+ else {
334
+ // Intermediate files: moderate sharding
335
+ localesPerBatch = Math.max(1, Math.ceil(entries.length / 2));
336
+ }
337
+ const ephemeral = isLastWindow && entries.length <= localesPerBatch;
338
+ for (let i = 0; i < entries.length; i += localesPerBatch) {
339
+ const batchEntries = entries.slice(i, i + localesPerBatch);
340
+ const task = (async () => {
341
+ const batchResult = await this.#runWorkerTask('inlineFileBatch', {
342
+ filename,
343
+ code: codeBlob,
344
+ map: mapBlob,
345
+ locales: new Map(batchEntries.map((e) => [e.locale, e.translation])),
346
+ missingTranslation: this.options.missingTranslation,
347
+ ephemeral,
348
+ activeLocales,
349
+ generation,
350
+ });
351
+ if (batchResult.unmodified) {
352
+ const unmodifiedResult = {
353
+ file: filename,
354
+ messages: batchResult.messages,
355
+ };
356
+ const cachePromises = [];
357
+ for (const { locale, cacheKey } of batchEntries) {
358
+ fileResultsByLocale.get(locale)?.set(filename, unmodifiedResult);
359
+ if (this.#transformedFileCache && cacheKey) {
360
+ cachePromises.push(this.#transformedFileCache.put(cacheKey, unmodifiedResult));
361
+ }
362
+ }
363
+ await Promise.allSettled(cachePromises);
188
364
  }
189
365
  else {
190
- warnings.push(message.message);
366
+ const cachePromises = [];
367
+ for (const res of batchResult.results) {
368
+ const matchingEntry = batchEntries.find((e) => e.locale === res.locale);
369
+ const cacheKey = matchingEntry?.cacheKey;
370
+ const fileResult = {
371
+ file: filename,
372
+ code: res.code,
373
+ map: res.map,
374
+ messages: res.messages,
375
+ };
376
+ if (this.#transformedFileCache && cacheKey) {
377
+ cachePromises.push(this.#transformedFileCache.put(cacheKey, fileResult));
378
+ }
379
+ fileResultsByLocale.get(res.locale)?.set(filename, fileResult);
380
+ }
381
+ await Promise.allSettled(cachePromises);
191
382
  }
192
- }
193
- return resultFiles;
194
- }),
195
- ...this.#unmodifiedFiles.map((file) => file.clone()),
196
- ];
197
- return {
198
- outputFiles,
199
- errors,
200
- warnings,
201
- };
383
+ })();
384
+ workerTasks.push(task);
385
+ }
386
+ }
387
+ await Promise.all(workerTasks);
388
+ }
389
+ #runWorkerTask(name, request) {
390
+ return this.#workerPool.run(request, {
391
+ filename: INLINER_WORKER_PATH,
392
+ name,
393
+ });
202
394
  }
203
- async inlineTemplateUpdate(locale, translation, templateCode, templateId) {
395
+ /**
396
+ * Performs inlining of translations for the provided locale and translations.
397
+ *
398
+ * @param files The build output files to transform.
399
+ * @param locale The string representing the locale to inline.
400
+ * @param translation The translation messages to use when inlining.
401
+ * @param translationIntegrity An optional integrity value for the translation messages to use for caching.
402
+ * @returns A promise that resolves to an array of OutputFiles representing a translated result.
403
+ */
404
+ async inlineForLocale(files, locale, translation, translationIntegrity) {
405
+ const results = await this.inlineAll(files, [{ locale, translation, translationIntegrity }]);
406
+ const result = results.get(locale);
407
+ (0, node_assert_1.default)(result !== undefined, `Result for locale '${locale}' should be present.`);
408
+ return result;
409
+ }
410
+ async inlineTemplateUpdate(locale, translation, templateCode, templateId, translationIntegrity) {
204
411
  const hasLocalize = templateCode.includes(LOCALIZE_KEYWORD);
205
412
  if (!hasLocalize) {
206
413
  return {
@@ -209,12 +416,13 @@ class I18nInliner {
209
416
  warnings: [],
210
417
  };
211
418
  }
212
- const { output, messages } = await this.#workerPool.run({
419
+ const { output, messages } = await this.#runWorkerTask('inlineCode', {
213
420
  code: templateCode,
214
421
  filename: templateId,
215
422
  locale,
216
- translation: serializeTranslation(translation),
217
- }, { name: 'inlineCode' });
423
+ missingTranslation: this.options.missingTranslation,
424
+ translation: await serializeTranslation(translation, translationIntegrity, this.#translationCache),
425
+ });
218
426
  const errors = [];
219
427
  const warnings = [];
220
428
  for (const message of messages) {
@@ -236,7 +444,7 @@ class I18nInliner {
236
444
  * @returns A void promise that resolves when closing is complete.
237
445
  */
238
446
  async close() {
239
- await Promise.allSettled([this.#cache?.close(), this.#workerPool.destroy()]);
447
+ await Promise.allSettled([this.#cacheStore?.close(), this.#workerPool.destroy()]);
240
448
  }
241
449
  /**
242
450
  * Initializes the cache for storing translated bundles.
@@ -245,7 +453,7 @@ class I18nInliner {
245
453
  * @returns A promise that resolves once the cache initialization process is complete.
246
454
  */
247
455
  async initCache() {
248
- if (this.#cache || this.#cacheInitFailed) {
456
+ if (this.#cacheStore || this.#cacheInitFailed) {
249
457
  return;
250
458
  }
251
459
  const { persistentCachePath } = this.options;
@@ -255,7 +463,13 @@ class I18nInliner {
255
463
  }
256
464
  // Initialize a persistent cache for i18n transformations.
257
465
  try {
258
- this.#cache = await (0, cache_1.createPersistentCacheStore)((0, node_path_1.join)(persistentCachePath, 'angular-i18n'));
466
+ const [, cacheStore] = await Promise.all([
467
+ (0, hash_1.initializeHash)(),
468
+ (0, cache_1.createPersistentCacheStore)((0, node_path_1.join)(persistentCachePath, 'angular-i18n')),
469
+ ]);
470
+ this.#cacheStore = cacheStore;
471
+ this.#transformedFileCache = cacheStore.createCache('transforms');
472
+ this.#translationCache = cacheStore.createCache('translations');
259
473
  }
260
474
  catch {
261
475
  this.#cacheInitFailed = true;
@@ -1 +1 @@
1
- {"version":3,"file":"i18n-inliner.js","sourceRoot":"","sources":["i18n-inliner.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;AAEH,8DAAiC;AACjC,yCAA0C;AAC1C,qCAAoC;AACpC,2CAAoE;AACpE,yDAAqD;AACrD,mDAA8F;AAC9F,mCAAgF;AAEhF;;;GAGG;AACH,MAAM,gBAAgB,GAAG,WAAW,CAAC;AAErC;;;;;;;;;GASG;AACH,SAAS,oBAAoB,CAAC,WAAgD;IAC5E,OAAO,WAAW,IAAI,IAAI,IAAI,CAAC,CAAC,IAAA,mBAAS,EAAC,WAAW,CAAC,C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