@angular/localize 20.0.0-next.1 → 20.0.0-next.2

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.
package/index.d.ts CHANGED
@@ -1,12 +1,466 @@
1
1
  /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
2
+ * @license Angular v20.0.0-next.2
3
+ * (c) 2010-2025 Google LLC. https://angular.io/
4
+ * License: MIT
5
+ */
6
+
7
+ declare function computeMsgId(msg: string, meaning?: string): string;
8
+
9
+ /**
10
+ * A string containing a translation source message.
11
+ *
12
+ * I.E. the message that indicates what will be translated from.
13
+ *
14
+ * Uses `{$placeholder-name}` to indicate a placeholder.
15
+ */
16
+ type SourceMessage = string;
17
+ /**
18
+ * A string containing a translation target message.
19
+ *
20
+ * I.E. the message that indicates what will be translated to.
21
+ *
22
+ * Uses `{$placeholder-name}` to indicate a placeholder.
23
+ *
24
+ * @publicApi
25
+ */
26
+ type TargetMessage = string;
27
+ /**
28
+ * A string that uniquely identifies a message, to be used for matching translations.
29
+ *
30
+ * @publicApi
31
+ */
32
+ type MessageId = string;
33
+ /**
34
+ * Declares a copy of the `AbsoluteFsPath` branded type in `@angular/compiler-cli` to avoid an
35
+ * import into `@angular/compiler-cli`. The compiler-cli's declaration files are not necessarily
36
+ * compatible with web environments that use `@angular/localize`, and would inadvertently include
37
+ * `typescript` declaration files in any compilation unit that uses `@angular/localize` (which
38
+ * increases parsing time and memory usage during builds) using a default import that only
39
+ * type-checks when `allowSyntheticDefaultImports` is enabled.
40
+ *
41
+ * @see https://github.com/angular/angular/issues/45179
42
+ */
43
+ type AbsoluteFsPathLocalizeCopy = string & {
44
+ _brand: 'AbsoluteFsPath';
45
+ };
46
+ /**
47
+ * The location of the message in the source file.
48
+ *
49
+ * The `line` and `column` values for the `start` and `end` properties are zero-based.
50
+ */
51
+ interface SourceLocation {
52
+ start: {
53
+ line: number;
54
+ column: number;
55
+ };
56
+ end: {
57
+ line: number;
58
+ column: number;
59
+ };
60
+ file: AbsoluteFsPathLocalizeCopy;
61
+ text?: string;
62
+ }
63
+ /**
64
+ * Additional information that can be associated with a message.
65
+ */
66
+ interface MessageMetadata {
67
+ /**
68
+ * A human readable rendering of the message
69
+ */
70
+ text: string;
71
+ /**
72
+ * Legacy message ids, if provided.
73
+ *
74
+ * In legacy message formats the message id can only be computed directly from the original
75
+ * template source.
76
+ *
77
+ * Since this information is not available in `$localize` calls, the legacy message ids may be
78
+ * attached by the compiler to the `$localize` metablock so it can be used if needed at the point
79
+ * of translation if the translations are encoded using the legacy message id.
80
+ */
81
+ legacyIds?: string[];
82
+ /**
83
+ * The id of the `message` if a custom one was specified explicitly.
84
+ *
85
+ * This id overrides any computed or legacy ids.
86
+ */
87
+ customId?: string;
88
+ /**
89
+ * The meaning of the `message`, used to distinguish identical `messageString`s.
90
+ */
91
+ meaning?: string;
92
+ /**
93
+ * The description of the `message`, used to aid translation.
94
+ */
95
+ description?: string;
96
+ /**
97
+ * The location of the message in the source.
98
+ */
99
+ location?: SourceLocation;
100
+ }
101
+ /**
102
+ * Information parsed from a `$localize` tagged string that is used to translate it.
103
+ *
104
+ * For example:
105
+ *
106
+ * ```ts
107
+ * const name = 'Jo Bloggs';
108
+ * $localize`Hello ${name}:title@@ID:!`;
109
+ * ```
110
+ *
111
+ * May be parsed into:
112
+ *
113
+ * ```ts
114
+ * {
115
+ * id: '6998194507597730591',
116
+ * substitutions: { title: 'Jo Bloggs' },
117
+ * messageString: 'Hello {$title}!',
118
+ * placeholderNames: ['title'],
119
+ * associatedMessageIds: { title: 'ID' },
120
+ * }
121
+ * ```
122
+ */
123
+ interface ParsedMessage extends MessageMetadata {
124
+ /**
125
+ * The key used to look up the appropriate translation target.
126
+ */
127
+ id: MessageId;
128
+ /**
129
+ * A mapping of placeholder names to substitution values.
130
+ */
131
+ substitutions: Record<string, any>;
132
+ /**
133
+ * An optional mapping of placeholder names to associated MessageIds.
134
+ * This can be used to match ICU placeholders to the message that contains the ICU.
135
+ */
136
+ associatedMessageIds?: Record<string, MessageId>;
137
+ /**
138
+ * An optional mapping of placeholder names to source locations
139
+ */
140
+ substitutionLocations?: Record<string, SourceLocation | undefined>;
141
+ /**
142
+ * The static parts of the message.
143
+ */
144
+ messageParts: string[];
145
+ /**
146
+ * An optional mapping of message parts to source locations
147
+ */
148
+ messagePartLocations?: (SourceLocation | undefined)[];
149
+ /**
150
+ * The names of the placeholders that will be replaced with substitutions.
151
+ */
152
+ placeholderNames: string[];
153
+ }
154
+ /**
155
+ * Parse a `$localize` tagged string into a structure that can be used for translation or
156
+ * extraction.
157
+ *
158
+ * See `ParsedMessage` for an example.
159
+ */
160
+ declare function parseMessage(messageParts: TemplateStringsArray, expressions?: readonly any[], location?: SourceLocation, messagePartLocations?: (SourceLocation | undefined)[], expressionLocations?: (SourceLocation | undefined)[]): ParsedMessage;
161
+ /**
162
+ * Parse the given message part (`cooked` + `raw`) to extract the message metadata from the text.
163
+ *
164
+ * If the message part has a metadata block this function will extract the `meaning`,
165
+ * `description`, `customId` and `legacyId` (if provided) from the block. These metadata properties
166
+ * are serialized in the string delimited by `|`, `@@` and `␟` respectively.
167
+ *
168
+ * (Note that `␟` is the `LEGACY_ID_INDICATOR` - see `constants.ts`.)
169
+ *
170
+ * For example:
171
+ *
172
+ * ```ts
173
+ * `:meaning|description@@custom-id:`
174
+ * `:meaning|@@custom-id:`
175
+ * `:meaning|description:`
176
+ * `:description@@custom-id:`
177
+ * `:meaning|:`
178
+ * `:description:`
179
+ * `:@@custom-id:`
180
+ * `:meaning|description@@custom-id␟legacy-id-1␟legacy-id-2:`
181
+ * ```
182
+ *
183
+ * @param cooked The cooked version of the message part to parse.
184
+ * @param raw The raw version of the message part to parse.
185
+ * @returns A object containing any metadata that was parsed from the message part.
186
+ */
187
+ declare function parseMetadata(cooked: string, raw: string): MessageMetadata;
188
+ /**
189
+ * Split a message part (`cooked` + `raw`) into an optional delimited "block" off the front and the
190
+ * rest of the text of the message part.
191
+ *
192
+ * Blocks appear at the start of message parts. They are delimited by a colon `:` character at the
193
+ * start and end of the block.
194
+ *
195
+ * If the block is in the first message part then it will be metadata about the whole message:
196
+ * meaning, description, id. Otherwise it will be metadata about the immediately preceding
197
+ * substitution: placeholder name.
198
+ *
199
+ * Since blocks are optional, it is possible that the content of a message block actually starts
200
+ * with a block marker. In this case the marker must be escaped `\:`.
201
+ *
202
+ * @param cooked The cooked version of the message part to parse.
203
+ * @param raw The raw version of the message part to parse.
204
+ * @returns An object containing the `text` of the message part and the text of the `block`, if it
205
+ * exists.
206
+ * @throws an error if the `block` is unterminated
207
+ */
208
+ declare function splitBlock(cooked: string, raw: string): {
209
+ text: string;
210
+ block?: string;
211
+ };
212
+ /**
213
+ * Find the end of a "marked block" indicated by the first non-escaped colon.
214
+ *
215
+ * @param cooked The cooked string (where escaped chars have been processed)
216
+ * @param raw The raw string (where escape sequences are still in place)
217
+ *
218
+ * @returns the index of the end of block marker
219
+ * @throws an error if the block is unterminated
220
+ */
221
+ declare function findEndOfBlock(cooked: string, raw: string): number;
222
+
223
+ /**
224
+ * A translation message that has been processed to extract the message parts and placeholders.
225
+ */
226
+ interface ParsedTranslation extends MessageMetadata {
227
+ messageParts: TemplateStringsArray;
228
+ placeholderNames: string[];
229
+ }
230
+ /**
231
+ * The internal structure used by the runtime localization to translate messages.
232
+ */
233
+ type ParsedTranslations = Record<MessageId, ParsedTranslation>;
234
+ declare class MissingTranslationError extends Error {
235
+ readonly parsedMessage: ParsedMessage;
236
+ private readonly type;
237
+ constructor(parsedMessage: ParsedMessage);
238
+ }
239
+ declare function isMissingTranslationError(e: any): e is MissingTranslationError;
240
+ /**
241
+ * Translate the text of the `$localize` tagged-string (i.e. `messageParts` and
242
+ * `substitutions`) using the given `translations`.
243
+ *
244
+ * The tagged-string is parsed to extract its `messageId` which is used to find an appropriate
245
+ * `ParsedTranslation`. If this doesn't match and there are legacy ids then try matching a
246
+ * translation using those.
247
+ *
248
+ * If one is found then it is used to translate the message into a new set of `messageParts` and
249
+ * `substitutions`.
250
+ * The translation may reorder (or remove) substitutions as appropriate.
251
+ *
252
+ * If there is no translation with a matching message id then an error is thrown.
253
+ * If a translation contains a placeholder that is not found in the message being translated then an
254
+ * error is thrown.
255
+ */
256
+ declare function translate(translations: Record<string, ParsedTranslation>, messageParts: TemplateStringsArray, substitutions: readonly any[]): [TemplateStringsArray, readonly any[]];
257
+ /**
258
+ * Parse the `messageParts` and `placeholderNames` out of a target `message`.
259
+ *
260
+ * Used by `loadTranslations()` to convert target message strings into a structure that is more
261
+ * appropriate for doing translation.
262
+ *
263
+ * @param message the message to be parsed.
264
+ */
265
+ declare function parseTranslation(messageString: TargetMessage): ParsedTranslation;
266
+ /**
267
+ * Create a `ParsedTranslation` from a set of `messageParts` and `placeholderNames`.
268
+ *
269
+ * @param messageParts The message parts to appear in the ParsedTranslation.
270
+ * @param placeholderNames The names of the placeholders to intersperse between the `messageParts`.
271
+ */
272
+ declare function makeParsedTranslation(messageParts: string[], placeholderNames?: string[]): ParsedTranslation;
273
+ /**
274
+ * Create the specialized array that is passed to tagged-string tag functions.
275
+ *
276
+ * @param cooked The message parts with their escape codes processed.
277
+ * @param raw The message parts with their escaped codes as-is.
278
+ */
279
+ declare function makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray;
280
+
281
+ /**
282
+ * Load translations for use by `$localize`, if doing runtime translation.
283
+ *
284
+ * If the `$localize` tagged strings are not going to be replaced at compiled time, it is possible
285
+ * to load a set of translations that will be applied to the `$localize` tagged strings at runtime,
286
+ * in the browser.
287
+ *
288
+ * Loading a new translation will overwrite a previous translation if it has the same `MessageId`.
289
+ *
290
+ * Note that `$localize` messages are only processed once, when the tagged string is first
291
+ * encountered, and does not provide dynamic language changing without refreshing the browser.
292
+ * Loading new translations later in the application life-cycle will not change the translated text
293
+ * of messages that have already been translated.
294
+ *
295
+ * The message IDs and translations are in the same format as that rendered to "simple JSON"
296
+ * translation files when extracting messages. In particular, placeholders in messages are rendered
297
+ * using the `{$PLACEHOLDER_NAME}` syntax. For example the message from the following template:
298
+ *
299
+ * ```html
300
+ * <div i18n>pre<span>inner-pre<b>bold</b>inner-post</span>post</div>
301
+ * ```
302
+ *
303
+ * would have the following form in the `translations` map:
304
+ *
305
+ * ```ts
306
+ * {
307
+ * "2932901491976224757":
308
+ * "pre{$START_TAG_SPAN}inner-pre{$START_BOLD_TEXT}bold{$CLOSE_BOLD_TEXT}inner-post{$CLOSE_TAG_SPAN}post"
309
+ * }
310
+ * ```
311
+ *
312
+ * @param translations A map from message ID to translated message.
313
+ *
314
+ * These messages are processed and added to a lookup based on their `MessageId`.
315
+ *
316
+ * @see {@link clearTranslations} for removing translations loaded using this function.
317
+ * @see {@link /api/localize/init/$localize $localize} for tagging messages as needing to be translated.
318
+ * @publicApi
319
+ */
320
+ declare function loadTranslations(translations: Record<MessageId, TargetMessage>): void;
321
+ /**
322
+ * Remove all translations for `$localize`, if doing runtime translation.
323
+ *
324
+ * All translations that had been loading into memory using `loadTranslations()` will be removed.
325
+ *
326
+ * @see {@link loadTranslations} for loading translations at runtime.
327
+ * @see {@link /api/localize/init/$localize $localize} for tagging messages as needing to be translated.
328
+ *
329
+ * @publicApi
330
+ */
331
+ declare function clearTranslations(): void;
332
+
333
+ /** @nodoc */
334
+ interface LocalizeFn {
335
+ (messageParts: TemplateStringsArray, ...expressions: readonly any[]): string;
336
+ /**
337
+ * A function that converts an input "message with expressions" into a translated "message with
338
+ * expressions".
339
+ *
340
+ * The conversion may be done in place, modifying the array passed to the function, so
341
+ * don't assume that this has no side-effects.
342
+ *
343
+ * The expressions must be passed in since it might be they need to be reordered for
344
+ * different translations.
345
+ */
346
+ translate?: TranslateFn;
347
+ /**
348
+ * The current locale of the translated messages.
349
+ *
350
+ * The compile-time translation inliner is able to replace the following code:
351
+ *
352
+ * ```ts
353
+ * typeof $localize !== "undefined" && $localize.locale
354
+ * ```
355
+ *
356
+ * with a string literal of the current locale. E.g.
357
+ *
358
+ * ```
359
+ * "fr"
360
+ * ```
361
+ */
362
+ locale?: string;
363
+ }
364
+ /** @nodoc */
365
+ interface TranslateFn {
366
+ (messageParts: TemplateStringsArray, expressions: readonly any[]): [TemplateStringsArray, readonly any[]];
367
+ }
368
+ /**
369
+ * Tag a template literal string for localization.
370
+ *
371
+ * For example:
372
+ *
373
+ * ```ts
374
+ * $localize `some string to localize`
375
+ * ```
376
+ *
377
+ * **Providing meaning, description and id**
378
+ *
379
+ * You can optionally specify one or more of `meaning`, `description` and `id` for a localized
380
+ * string by pre-pending it with a colon delimited block of the form:
381
+ *
382
+ * ```ts
383
+ * $localize`:meaning|description@@id:source message text`;
384
+ *
385
+ * $localize`:meaning|:source message text`;
386
+ * $localize`:description:source message text`;
387
+ * $localize`:@@id:source message text`;
388
+ * ```
389
+ *
390
+ * This format is the same as that used for `i18n` markers in Angular templates. See the
391
+ * [Angular i18n guide](guide/i18n/prepare#mark-text-in-component-template).
392
+ *
393
+ * **Naming placeholders**
394
+ *
395
+ * If the template literal string contains expressions, then the expressions will be automatically
396
+ * associated with placeholder names for you.
397
+ *
398
+ * For example:
399
+ *
400
+ * ```ts
401
+ * $localize `Hi ${name}! There are ${items.length} items.`;
402
+ * ```
403
+ *
404
+ * will generate a message-source of `Hi {$PH}! There are {$PH_1} items`.
405
+ *
406
+ * The recommended practice is to name the placeholder associated with each expression though.
407
+ *
408
+ * Do this by providing the placeholder name wrapped in `:` characters directly after the
409
+ * expression. These placeholder names are stripped out of the rendered localized string.
410
+ *
411
+ * For example, to name the `items.length` expression placeholder `itemCount` you write:
412
+ *
413
+ * ```ts
414
+ * $localize `There are ${items.length}:itemCount: items`;
415
+ * ```
416
+ *
417
+ * **Escaping colon markers**
418
+ *
419
+ * If you need to use a `:` character directly at the start of a tagged string that has no
420
+ * metadata block, or directly after a substitution expression that has no name you must escape
421
+ * the `:` by preceding it with a backslash:
422
+ *
423
+ * For example:
424
+ *
425
+ * ```ts
426
+ * // message has a metadata block so no need to escape colon
427
+ * $localize `:some description::this message starts with a colon (:)`;
428
+ * // no metadata block so the colon must be escaped
429
+ * $localize `\:this message starts with a colon (:)`;
430
+ * ```
431
+ *
432
+ * ```ts
433
+ * // named substitution so no need to escape colon
434
+ * $localize `${label}:label:: ${}`
435
+ * // anonymous substitution so colon must be escaped
436
+ * $localize `${label}\: ${}`
437
+ * ```
438
+ *
439
+ * **Processing localized strings:**
440
+ *
441
+ * There are three scenarios:
442
+ *
443
+ * * **compile-time inlining**: the `$localize` tag is transformed at compile time by a
444
+ * transpiler, removing the tag and replacing the template literal string with a translated
445
+ * literal string from a collection of translations provided to the transpilation tool.
446
+ *
447
+ * * **run-time evaluation**: the `$localize` tag is a run-time function that replaces and
448
+ * reorders the parts (static strings and expressions) of the template literal string with strings
449
+ * from a collection of translations loaded at run-time.
450
+ *
451
+ * * **pass-through evaluation**: the `$localize` tag is a run-time function that simply evaluates
452
+ * the original template literal string without applying any translations to the parts. This
453
+ * version is used during development or where there is no need to translate the localized
454
+ * template literals.
455
+ *
456
+ * @param messageParts a collection of the static parts of the template string.
457
+ * @param expressions a collection of the values of each placeholder in the template string.
458
+ * @returns the translated string, with the `messageParts` and `expressions` interleaved together.
4
459
  *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.dev/license
460
+ * @publicApi
7
461
  */
8
- export * from './localize';
9
- import { ɵLocalizeFn } from './localize';
462
+ declare const $localize: LocalizeFn;
463
+
10
464
  declare global {
11
465
  /**
12
466
  * Tag a template literal string for localization.
@@ -100,5 +554,7 @@ declare global {
100
554
  * @param expressions a collection of the values of each placeholder in the template string.
101
555
  * @returns the translated string, with the `messageParts` and `expressions` interleaved together.
102
556
  */
103
- const $localize: ɵLocalizeFn;
557
+ const $localize: LocalizeFn;
104
558
  }
559
+
560
+ export { type MessageId, type TargetMessage, clearTranslations, loadTranslations, $localize as ɵ$localize, type LocalizeFn as ɵLocalizeFn, MissingTranslationError as ɵMissingTranslationError, type ParsedMessage as ɵParsedMessage, type ParsedTranslation as ɵParsedTranslation, type ParsedTranslations as ɵParsedTranslations, type SourceLocation as ɵSourceLocation, type SourceMessage as ɵSourceMessage, type TranslateFn as ɵTranslateFn, computeMsgId as ɵcomputeMsgId, findEndOfBlock as ɵfindEndOfBlock, isMissingTranslationError as ɵisMissingTranslationError, makeParsedTranslation as ɵmakeParsedTranslation, makeTemplateObject as ɵmakeTemplateObject, parseMessage as ɵparseMessage, parseMetadata as ɵparseMetadata, parseTranslation as ɵparseTranslation, splitBlock as ɵsplitBlock, translate as ɵtranslate };
package/init/index.d.ts CHANGED
@@ -1,18 +1,7 @@
1
1
  /**
2
- * @license Angular v20.0.0-next.1
2
+ * @license Angular v20.0.0-next.2
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
-
8
- import { ɵ$localize as $localize } from '@angular/localize';
9
- import { ɵLocalizeFn as LocalizeFn } from '@angular/localize';
10
- import { ɵTranslateFn as TranslateFn } from '@angular/localize';
11
-
12
- export { $localize }
13
-
14
- export { LocalizeFn }
15
-
16
- export { TranslateFn }
17
-
18
- export { }
7
+ export { ɵ$localize as $localize, ɵLocalizeFn as LocalizeFn, ɵTranslateFn as TranslateFn } from '@angular/localize';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/localize",
3
- "version": "20.0.0-next.1",
3
+ "version": "20.0.0-next.2",
4
4
  "description": "Angular - library for localizing messages",
5
5
  "bin": {
6
6
  "localize-translate": "./tools/bundles/src/translate/cli.js",
@@ -63,12 +63,12 @@
63
63
  "dependencies": {
64
64
  "@babel/core": "7.26.9",
65
65
  "@types/babel__core": "7.20.5",
66
- "fast-glob": "3.3.3",
66
+ "tinyglobby": "^0.2.12",
67
67
  "yargs": "^17.2.1"
68
68
  },
69
69
  "peerDependencies": {
70
- "@angular/compiler": "20.0.0-next.1",
71
- "@angular/compiler-cli": "20.0.0-next.1"
70
+ "@angular/compiler": "20.0.0-next.2",
71
+ "@angular/compiler-cli": "20.0.0-next.2"
72
72
  },
73
73
  "module": "./fesm2022/localize.mjs",
74
74
  "typings": "./index.d.ts",
@@ -147,7 +147,7 @@ function moveToDependencies(host) {
147
147
  return;
148
148
  }
149
149
  (0, import_dependencies.removePackageJsonDependency)(host, "@angular/localize");
150
- return (0, import_utility.addDependency)("@angular/localize", `~20.0.0-next.1`);
150
+ return (0, import_utility.addDependency)("@angular/localize", `~20.0.0-next.2`);
151
151
  }
152
152
  function ng_add_default(options) {
153
153
  const projectName = options.project;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../packages/localize/schematics/ng-add/index.ts"],
4
- "sourcesContent": ["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n *\n * @fileoverview Schematics for `ng add @angular/localize` schematic.\n */\n\nimport {chain, noop, Rule, SchematicsException, Tree} from '@angular-devkit/schematics';\nimport {\n AngularBuilder,\n addDependency,\n readWorkspace,\n updateWorkspace,\n} from '@schematics/angular/utility';\nimport {removePackageJsonDependency} from '@schematics/angular/utility/dependencies';\nimport {JSONFile, JSONPath} from '@schematics/angular/utility/json-file';\n\nimport {Schema} from './schema';\n\nconst localizeType = `@angular/localize`;\nconst localizePolyfill = '@angular/localize/init';\nconst localizeTripleSlashType = `/// <reference types=\"@angular/localize\" />`;\n\nfunction addPolyfillToConfig(projectName: string): Rule {\n return updateWorkspace((workspace) => {\n const project = workspace.projects.get(projectName);\n if (!project) {\n throw new SchematicsException(`Invalid project name '${projectName}'.`);\n }\n\n const isLocalizePolyfill = (path: string) => path.startsWith('@angular/localize');\n\n for (const target of project.targets.values()) {\n switch (target.builder) {\n case AngularBuilder.Karma:\n case AngularBuilder.Server:\n case AngularBuilder.Browser:\n case AngularBuilder.BrowserEsbuild:\n case AngularBuilder.Application:\n case AngularBuilder.BuildApplication:\n target.options ??= {};\n const value = target.options['polyfills'];\n if (typeof value === 'string') {\n if (!isLocalizePolyfill(value)) {\n target.options['polyfills'] = [value, localizePolyfill];\n }\n } else if (Array.isArray(value)) {\n if (!(value as string[]).some(isLocalizePolyfill)) {\n value.push(localizePolyfill);\n }\n } else {\n target.options['polyfills'] = [localizePolyfill];\n }\n\n break;\n }\n }\n });\n}\n\nfunction addTypeScriptConfigTypes(projectName: string): Rule {\n return async (host: Tree) => {\n const workspace = await readWorkspace(host);\n const project = workspace.projects.get(projectName);\n if (!project) {\n throw new SchematicsException(`Invalid project name '${projectName}'.`);\n }\n\n // We add the root workspace tsconfig for better IDE support.\n const tsConfigFiles = new Set<string>();\n for (const target of project.targets.values()) {\n switch (target.builder) {\n case AngularBuilder.Karma:\n case AngularBuilder.Server:\n case AngularBuilder.BrowserEsbuild:\n case AngularBuilder.Browser:\n case AngularBuilder.Application:\n case AngularBuilder.BuildApplication:\n const value = target.options?.['tsConfig'];\n if (typeof value === 'string') {\n tsConfigFiles.add(value);\n }\n\n break;\n }\n\n if (\n target.builder === AngularBuilder.Browser ||\n target.builder === AngularBuilder.BrowserEsbuild\n ) {\n const value = target.options?.['main'];\n if (typeof value === 'string') {\n addTripleSlashType(host, value);\n }\n } else if (target.builder === AngularBuilder.Application) {\n const value = target.options?.['browser'];\n if (typeof value === 'string') {\n addTripleSlashType(host, value);\n }\n }\n }\n\n const typesJsonPath: JSONPath = ['compilerOptions', 'types'];\n for (const path of tsConfigFiles) {\n if (!host.exists(path)) {\n continue;\n }\n\n const json = new JSONFile(host, path);\n const types = json.get(typesJsonPath) ?? [];\n if (!Array.isArray(types)) {\n throw new SchematicsException(\n `TypeScript configuration file '${path}' has an invalid 'types' property. It must be an array.`,\n );\n }\n\n const hasLocalizeType = types.some(\n (t) => t === localizeType || t === '@angular/localize/init',\n );\n if (hasLocalizeType) {\n // Skip has already localize type.\n continue;\n }\n\n json.modify(typesJsonPath, [...types, localizeType]);\n }\n };\n}\n\nfunction addTripleSlashType(host: Tree, path: string): void {\n const content = host.readText(path);\n if (!content.includes(localizeTripleSlashType)) {\n host.overwrite(path, localizeTripleSlashType + '\\n\\n' + content);\n }\n}\n\nfunction moveToDependencies(host: Tree): Rule | void {\n if (!host.exists('package.json')) {\n return;\n }\n\n // Remove the previous dependency and add in a new one under the desired type.\n removePackageJsonDependency(host, '@angular/localize');\n\n return addDependency('@angular/localize', `~20.0.0-next.1`);\n}\n\nexport default function (options: Schema): Rule {\n const projectName = options.project;\n\n if (!projectName) {\n throw new SchematicsException('Option \"project\" is required.');\n }\n\n return chain([\n addTypeScriptConfigTypes(projectName),\n addPolyfillToConfig(projectName),\n // If `$localize` will be used at runtime then must install `@angular/localize`\n // into `dependencies`, rather than the default of `devDependencies`.\n options.useAtRuntime ? moveToDependencies : noop(),\n ]);\n}\n"],
4
+ "sourcesContent": ["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n *\n * @fileoverview Schematics for `ng add @angular/localize` schematic.\n */\n\nimport {chain, noop, Rule, SchematicsException, Tree} from '@angular-devkit/schematics';\nimport {\n AngularBuilder,\n addDependency,\n readWorkspace,\n updateWorkspace,\n} from '@schematics/angular/utility';\nimport {removePackageJsonDependency} from '@schematics/angular/utility/dependencies';\nimport {JSONFile, JSONPath} from '@schematics/angular/utility/json-file';\n\nimport {Schema} from './schema';\n\nconst localizeType = `@angular/localize`;\nconst localizePolyfill = '@angular/localize/init';\nconst localizeTripleSlashType = `/// <reference types=\"@angular/localize\" />`;\n\nfunction addPolyfillToConfig(projectName: string): Rule {\n return updateWorkspace((workspace) => {\n const project = workspace.projects.get(projectName);\n if (!project) {\n throw new SchematicsException(`Invalid project name '${projectName}'.`);\n }\n\n const isLocalizePolyfill = (path: string) => path.startsWith('@angular/localize');\n\n for (const target of project.targets.values()) {\n switch (target.builder) {\n case AngularBuilder.Karma:\n case AngularBuilder.Server:\n case AngularBuilder.Browser:\n case AngularBuilder.BrowserEsbuild:\n case AngularBuilder.Application:\n case AngularBuilder.BuildApplication:\n target.options ??= {};\n const value = target.options['polyfills'];\n if (typeof value === 'string') {\n if (!isLocalizePolyfill(value)) {\n target.options['polyfills'] = [value, localizePolyfill];\n }\n } else if (Array.isArray(value)) {\n if (!(value as string[]).some(isLocalizePolyfill)) {\n value.push(localizePolyfill);\n }\n } else {\n target.options['polyfills'] = [localizePolyfill];\n }\n\n break;\n }\n }\n });\n}\n\nfunction addTypeScriptConfigTypes(projectName: string): Rule {\n return async (host: Tree) => {\n const workspace = await readWorkspace(host);\n const project = workspace.projects.get(projectName);\n if (!project) {\n throw new SchematicsException(`Invalid project name '${projectName}'.`);\n }\n\n // We add the root workspace tsconfig for better IDE support.\n const tsConfigFiles = new Set<string>();\n for (const target of project.targets.values()) {\n switch (target.builder) {\n case AngularBuilder.Karma:\n case AngularBuilder.Server:\n case AngularBuilder.BrowserEsbuild:\n case AngularBuilder.Browser:\n case AngularBuilder.Application:\n case AngularBuilder.BuildApplication:\n const value = target.options?.['tsConfig'];\n if (typeof value === 'string') {\n tsConfigFiles.add(value);\n }\n\n break;\n }\n\n if (\n target.builder === AngularBuilder.Browser ||\n target.builder === AngularBuilder.BrowserEsbuild\n ) {\n const value = target.options?.['main'];\n if (typeof value === 'string') {\n addTripleSlashType(host, value);\n }\n } else if (target.builder === AngularBuilder.Application) {\n const value = target.options?.['browser'];\n if (typeof value === 'string') {\n addTripleSlashType(host, value);\n }\n }\n }\n\n const typesJsonPath: JSONPath = ['compilerOptions', 'types'];\n for (const path of tsConfigFiles) {\n if (!host.exists(path)) {\n continue;\n }\n\n const json = new JSONFile(host, path);\n const types = json.get(typesJsonPath) ?? [];\n if (!Array.isArray(types)) {\n throw new SchematicsException(\n `TypeScript configuration file '${path}' has an invalid 'types' property. It must be an array.`,\n );\n }\n\n const hasLocalizeType = types.some(\n (t) => t === localizeType || t === '@angular/localize/init',\n );\n if (hasLocalizeType) {\n // Skip has already localize type.\n continue;\n }\n\n json.modify(typesJsonPath, [...types, localizeType]);\n }\n };\n}\n\nfunction addTripleSlashType(host: Tree, path: string): void {\n const content = host.readText(path);\n if (!content.includes(localizeTripleSlashType)) {\n host.overwrite(path, localizeTripleSlashType + '\\n\\n' + content);\n }\n}\n\nfunction moveToDependencies(host: Tree): Rule | void {\n if (!host.exists('package.json')) {\n return;\n }\n\n // Remove the previous dependency and add in a new one under the desired type.\n removePackageJsonDependency(host, '@angular/localize');\n\n return addDependency('@angular/localize', `~20.0.0-next.2`);\n}\n\nexport default function (options: Schema): Rule {\n const projectName = options.project;\n\n if (!projectName) {\n throw new SchematicsException('Option \"project\" is required.');\n }\n\n return chain([\n addTypeScriptConfigTypes(projectName),\n addPolyfillToConfig(projectName),\n // If `$localize` will be used at runtime then must install `@angular/localize`\n // into `dependencies`, rather than the default of `devDependencies`.\n options.useAtRuntime ? moveToDependencies : noop(),\n ]);\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;AAUA,wBAA2D;AAC3D,qBAKO;AACP,0BAA0C;AAC1C,uBAAiC;AAIjC,IAAM,eAAe;AACrB,IAAM,mBAAmB;AACzB,IAAM,0BAA0B;AAEhC,SAAS,oBAAoB,aAAmB;AAC9C,aAAO,gCAAgB,CAAC,cAAa;AA3BvC;AA4BI,UAAM,UAAU,UAAU,SAAS,IAAI,WAAW;AAClD,QAAI,CAAC,SAAS;AACZ,YAAM,IAAI,sCAAoB,yBAAyB,eAAe;IACxE;AAEA,UAAM,qBAAqB,CAAC,SAAiB,KAAK,WAAW,mBAAmB;AAEhF,eAAW,UAAU,QAAQ,QAAQ,OAAM,GAAI;AAC7C,cAAQ,OAAO,SAAS;QACtB,KAAK,8BAAe;QACpB,KAAK,8BAAe;QACpB,KAAK,8BAAe;QACpB,KAAK,8BAAe;QACpB,KAAK,8BAAe;QACpB,KAAK,8BAAe;AAClB,uBAAO,YAAP,mBAAO,UAAY,CAAA;AACnB,gBAAM,QAAQ,OAAO,QAAQ;AAC7B,cAAI,OAAO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eAAW,QAAQ,eAAe;AAChC,UAAI,CAAC,KAAK,OAAO,IAAI,GAAG;AACtB;MACF;AAEA,YAAM,OAAO,IAAI,0BAAS,MAAM,IAAI;AACpC,YAAM,SAAQ,UAAK,IAAI,aAAa,MAAtB,YAA2B,CAAA;AACzC,UAAI,CAAC,MAAM,QAAQ,KAAK,GAAG;AACzB,cAAM,IAAI,sCACR,kCAAkC,6DAA6D;MAEnG;AAEA,YAAM,kBAAkB,MAAM,KAC5B,CAAC,MAAM,MAAM,gBAAgB,MAAM,wBAAwB;AAE7D,UAAI,iBAAiB;AAEnB;MACF;AAEA,WAAK,OAAO,eAAe,CAAC,GAAG,OAAO,YAAY,CAAC;IACrD;EACF;AACF;AAEA,SAAS,mBAAmB,MAAY,MAAY;AAClD,QAAM,UAAU,KAAK,SAAS,IAAI;AAClC,MAAI,CAAC,QAAQ,SAAS,uBAAuB,GAAG;AAC9C,SAAK,UAAU,MAAM,0BAA0B,SAAS,OAAO;EACjE;AACF;AAEA,SAAS,mBAAmB,MAAU;AACpC,MAAI,CAAC,KAAK,OAAO,cAAc,GAAG;AAChC;EACF;AAGA,uDAA4B,MAAM,mBAAmB;AAErD,aAAO,8BAAc,qBAAqB,oBAAoB;AAChE;AAEc,SAAP,eAAkB,SAAe;AACtC,QAAM,cAAc,QAAQ;AAE5B,MAAI,CAAC,aAAa;AAChB,UAAM,IAAI,sCAAoB,+BAA+B;EAC/D;AAEA,aAAO,yBAAM;IACX,yBAAyB,WAAW;IACpC,oBAAoB,WAAW;IAG/B,QAAQ,eAAe,yBAAqB,wBAAI;GACjD;AACH;",
6
6
  "names": []
7
7
  }
@@ -18,7 +18,7 @@ import "../../chunk-P63CR46L.js";
18
18
 
19
19
  // bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/cli.mjs
20
20
  import { ConsoleLogger, LogLevel, NodeJSFileSystem, setFileSystem } from "@angular/compiler-cli/private/localize";
21
- import glob from "fast-glob";
21
+ import { globSync } from "tinyglobby";
22
22
  import yargs from "yargs";
23
23
 
24
24
  // bazel-out/k8-fastbuild/bin/packages/localize/tools/src/extract/index.mjs
@@ -129,7 +129,7 @@ var options = yargs(args).option("l", {
129
129
  var fileSystem = new NodeJSFileSystem();
130
130
  setFileSystem(fileSystem);
131
131
  var rootPath = options.r;
132
- var sourceFilePaths = glob.sync(options.s, { cwd: rootPath });
132
+ var sourceFilePaths = globSync(options.s, { cwd: rootPath });
133
133
  var logLevel = options.loglevel;
134
134
  var logger = new ConsoleLogger(logLevel ? LogLevel[logLevel] : LogLevel.warn);
135
135
  var duplicateMessageHandling = options.d;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../../../packages/localize/tools/src/extract/cli.ts", "../../../../../../../../../packages/localize/tools/src/extract/index.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;AASA,SACE,eACA,UACA,kBACA,qBACK;AACP,OAAO,UAAU;AACjB,OAAO,WAAW;;;AC8DZ,SAAU,oBAAoB,EAClC,UAAAA,WACA,iBAAAC,kBACA,cACA,QAAAC,SACA,YAAY,QACZ,QAAAC,SACA,eACA,cACA,0BAAAC,2BACA,eAAAC,iBAAgB,CAAA,GAChB,YAAY,GAAE,GACa;AAC3B,QAAM,WAAW,GAAG,QAAQL,SAAQ;AACpC,QAAM,YAAY,IAAI,iBAAiB,IAAIG,SAAQ,EAAC,UAAU,cAAa,CAAC;AAE5E,QAAM,WAA6B,CAAA;AACnC,aAAW,QAAQF,kBAAiB;AAClC,aAAS,KAAK,GAAG,UAAU,gBAAgB,IAAI,CAAC;EAClD;AAEA,QAAM,cAAc,uBAAuB,IAAI,UAAUG,2BAA0B,QAAQ;AAC3F,MAAI,YAAY,WAAW;AACzB,UAAM,IAAI,MAAM,YAAY,kBAAkB,4BAA4B,CAAC;EAC7E;AAEA,QAAM,aAAa,GAAG,QAAQJ,WAAU,MAAM;AAC9C,QAAM,aAAa,cACjBE,SACA,cACA,GAAG,QAAQ,UAAU,GACrB,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;CACD;",
5
5
  "names": ["rootPath", "sourceFilePaths", "format", "logger", "duplicateMessageHandling", "formatOptions"]
6
6
  }
@@ -6,7 +6,7 @@
6
6
 
7
7
  // bazel-out/k8-fastbuild/bin/packages/localize/tools/src/migrate/cli.mjs
8
8
  import { ConsoleLogger, LogLevel, NodeJSFileSystem, setFileSystem } from "@angular/compiler-cli/private/localize";
9
- import glob from "fast-glob";
9
+ import { globSync } from "tinyglobby";
10
10
  import yargs from "yargs";
11
11
 
12
12
  // bazel-out/k8-fastbuild/bin/packages/localize/tools/src/migrate/index.mjs
@@ -63,7 +63,7 @@ var options = yargs(args).option("r", {
63
63
  var fs = new NodeJSFileSystem();
64
64
  setFileSystem(fs);
65
65
  var rootPath = options.r;
66
- var translationFilePaths = glob.sync(options.f, { cwd: rootPath, onlyFiles: true });
66
+ var translationFilePaths = globSync(options.f, { cwd: rootPath, onlyFiles: true });
67
67
  var logger = new ConsoleLogger(LogLevel.warn);
68
68
  migrateFiles({ rootPath, translationFilePaths, mappingFilePath: options.m, logger });
69
69
  process.exit(0);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../../../packages/localize/tools/src/migrate/cli.ts", "../../../../../../../../../packages/localize/tools/src/migrate/index.ts", "../../../../../../../../../packages/localize/tools/src/migrate/migrate.ts"],
4
- "mappings": ";;;;;;;AASA,SACE,eACA,UACA,kBACA,qBACK;AACP,OAAO,UAAU;AACjB,OAAO,WAAW;;;ACRlB,SAAQ,qBAA4B;;;ACM9B,SAAU,YAAY,YAAoB,SAAyB;AACvE,QAAM,YAAY,OAAO,KAAK,OAAO;AAErC,aAAW,YAAY,WAAW;AAChC,UAAM,cAAc,QAAQ;AAC5B,UAAM,UAAU,IAAI,OAAO,aAAa,QAAQ,GAAG,GAAG;AACtD,iBAAa,WAAW,QAAQ,SAAS,WAAW;EACtD;AAEA,SAAO;AACT;AAGA,SAAS,aAAa,KAAW;AAC/B,SAAO,IAAI,QAAQ,8BA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AM,uBAAuB,SAAS,QAAQ,GAAG,EAAC,KAAK,UAAU,WAAW,KAAI,CAAC;AACjF,IAAM,SAAS,IAAI,cAAc,SAAS,IAAI;AAE9C,aAAa,EAAC,UAAU,sBAAsB,iBAAiB,QAAQ,GAAG,OAAM,CAAC;AACjF,QAAQ,KAAK,CAAC;",
5
5
  "names": ["rootPath", "translationFilePaths", "logger", "fs"]
6
6
  }
@@ -19,7 +19,7 @@ import {
19
19
 
20
20
  // bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/cli.mjs
21
21
  import { NodeJSFileSystem, setFileSystem } from "@angular/compiler-cli/private/localize";
22
- import glob from "fast-glob";
22
+ import { globSync } from "tinyglobby";
23
23
  import yargs from "yargs";
24
24
 
25
25
  // bazel-out/k8-fastbuild/bin/packages/localize/tools/src/translate/output_path.mjs
@@ -298,7 +298,7 @@ var options = yargs(args).option("r", {
298
298
  var fs = new NodeJSFileSystem();
299
299
  setFileSystem(fs);
300
300
  var sourceRootPath = options.r;
301
- var sourceFilePaths = glob.sync(options.s, { cwd: sourceRootPath, onlyFiles: true });
301
+ var sourceFilePaths = globSync(options.s, { cwd: sourceRootPath, onlyFiles: true });
302
302
  var translationFilePaths = convertArraysFromArgs(options.t);
303
303
  var outputPathFn = getOutputPathFn(fs, fs.resolve(options.o));
304
304
  var diagnostics = new Diagnostics();