@angular/core 20.0.3 → 20.0.4

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 (59) hide show
  1. package/api.d-B0vztftH.d.ts +1 -1
  2. package/chrome_dev_tools_performance.d-DvzAxqBc.d.ts +1 -1
  3. package/discovery.d-C5dkZ8lJ.d.ts +1 -1
  4. package/event_dispatcher.d-BReQpZfC.d.ts +1 -1
  5. package/fesm2022/attribute-BWp59EjE.mjs +1 -1
  6. package/fesm2022/core.mjs +14 -16
  7. package/fesm2022/core.mjs.map +1 -1
  8. package/fesm2022/{debug_node-JnOYh9kg.mjs → debug_node-DTOmNMDH.mjs} +9 -12
  9. package/fesm2022/debug_node-DTOmNMDH.mjs.map +1 -0
  10. package/fesm2022/primitives/di.mjs +1 -1
  11. package/fesm2022/primitives/event-dispatch.mjs +1 -1
  12. package/fesm2022/primitives/signals.mjs +1 -1
  13. package/fesm2022/{resource-BarKSp_3.mjs → resource-DalzMB4W.mjs} +3 -3
  14. package/fesm2022/{resource-BarKSp_3.mjs.map → resource-DalzMB4W.mjs.map} +1 -1
  15. package/fesm2022/{root_effect_scheduler-DCy1y1b8.mjs → root_effect_scheduler-CWV89N3_.mjs} +10 -3
  16. package/fesm2022/{root_effect_scheduler-DCy1y1b8.mjs.map → root_effect_scheduler-CWV89N3_.mjs.map} +1 -1
  17. package/fesm2022/rxjs-interop.mjs +3 -3
  18. package/fesm2022/signal-nCiHhWf6.mjs +1 -1
  19. package/fesm2022/testing.mjs +3 -3
  20. package/fesm2022/untracked-DmD_2MlC.mjs +1 -1
  21. package/fesm2022/weak_ref-BaIq-pgY.mjs +1 -1
  22. package/graph.d-BcIOep_B.d.ts +1 -1
  23. package/index.d.ts +1 -4
  24. package/package.json +2 -2
  25. package/primitives/di/index.d.ts +1 -1
  26. package/primitives/event-dispatch/index.d.ts +1 -1
  27. package/primitives/signals/index.d.ts +1 -1
  28. package/rxjs-interop/index.d.ts +1 -1
  29. package/schematics/bundles/apply_import_manager-DT15wSJs.cjs +1 -1
  30. package/schematics/bundles/checker-Bu1Wu4f7.cjs +2 -2
  31. package/schematics/bundles/cleanup-unused-imports.cjs +31 -17
  32. package/schematics/bundles/compiler_host-C_4Iw5UD.cjs +1 -1
  33. package/schematics/bundles/control-flow-migration.cjs +1 -1
  34. package/schematics/bundles/document-core.cjs +1 -1
  35. package/schematics/bundles/imports-CIX-JgAN.cjs +1 -1
  36. package/schematics/bundles/index-CAM7Xiu7.cjs +1 -1
  37. package/schematics/bundles/index-CCX_cTPD.cjs +11 -11
  38. package/schematics/bundles/inject-flags.cjs +1 -1
  39. package/schematics/bundles/inject-migration.cjs +7 -2
  40. package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
  41. package/schematics/bundles/migrate_ts_type_references-DSqmdRpG.cjs +1 -1
  42. package/schematics/bundles/ng_decorators-B5HCqr20.cjs +1 -1
  43. package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
  44. package/schematics/bundles/output-migration.cjs +1 -1
  45. package/schematics/bundles/project_paths-BjQra9mv.cjs +1 -1
  46. package/schematics/bundles/project_tsconfig_paths-CDVxT6Ov.cjs +1 -1
  47. package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
  48. package/schematics/bundles/route-lazy-loading.cjs +1 -1
  49. package/schematics/bundles/self-closing-tags-migration.cjs +1 -1
  50. package/schematics/bundles/signal-input-migration.cjs +1 -1
  51. package/schematics/bundles/signal-queries-migration.cjs +1 -1
  52. package/schematics/bundles/signals.cjs +1 -1
  53. package/schematics/bundles/standalone-migration.cjs +1 -1
  54. package/schematics/bundles/symbol-VPWguRxr.cjs +1 -1
  55. package/schematics/bundles/test-bed-get.cjs +1 -1
  56. package/signal.d-BcmOdASA.d.ts +1 -1
  57. package/testing/index.d.ts +1 -1
  58. package/weak_ref.d-eGOEP9S1.d.ts +1 -1
  59. package/fesm2022/debug_node-JnOYh9kg.mjs.map +0 -1
@@ -1,13 +1,13 @@
1
1
  /**
2
- * @license Angular v20.0.3
2
+ * @license Angular v20.0.4
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
7
  import { Observable, ReplaySubject } from 'rxjs';
8
8
  import { takeUntil } from 'rxjs/operators';
9
- import { assertInInjectionContext, inject, DestroyRef, RuntimeError, Injector, assertNotInReactiveContext, signal, PendingTasks } from './root_effect_scheduler-DCy1y1b8.mjs';
10
- import { getOutputDestroyRef, effect, untracked, computed, resource, encapsulateResourceError } from './resource-BarKSp_3.mjs';
9
+ import { assertInInjectionContext, inject, DestroyRef, RuntimeError, Injector, assertNotInReactiveContext, signal, PendingTasks } from './root_effect_scheduler-CWV89N3_.mjs';
10
+ import { getOutputDestroyRef, effect, untracked, computed, resource, encapsulateResourceError } from './resource-DalzMB4W.mjs';
11
11
  import './primitives/di.mjs';
12
12
  import './signal-nCiHhWf6.mjs';
13
13
  import '@angular/core/primitives/di';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.0.3
2
+ * @license Angular v20.0.4
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,13 +1,13 @@
1
1
  /**
2
- * @license Angular v20.0.3
2
+ * @license Angular v20.0.4
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
7
  import * as i0 from '@angular/core';
8
- import { NgZone, Injectable, DeferBlockState, triggerResourceLoading, renderDeferBlockState, getDeferBlocks, DeferBlockBehavior, NoopNgZone, ApplicationRef, getDebugNode, RendererFactory2, Directive, Component, Pipe, NgModule, ReflectionCapabilities, depsTracker, isComponentDefPendingResolution, resolveComponentResources, NgModuleRef, ApplicationInitStatus, LOCALE_ID, DEFAULT_LOCALE_ID, setLocaleId, ComponentFactory, getAsyncClassMetadataFn, compileComponent, compileDirective, compilePipe, patchComponentDefWithScope, compileNgModuleDefs, clearResolutionOfComponentResourcesQueue, restoreComponentResolutionQueue, internalProvideZoneChangeDetection, ChangeDetectionSchedulerImpl, COMPILER_OPTIONS, generateStandaloneInDeclarationsError, transitiveScopesFor, Compiler, DEFER_BLOCK_CONFIG, NgModuleFactory, ModuleWithComponentFactories, resetCompiledComponents, ɵsetUnknownElementStrictMode as _setUnknownElementStrictMode, ɵsetUnknownPropertyStrictMode as _setUnknownPropertyStrictMode, ɵgetUnknownElementStrictMode as _getUnknownElementStrictMode, ɵgetUnknownPropertyStrictMode as _getUnknownPropertyStrictMode, flushModuleScopingQueueAsMuchAsPossible, setAllowDuplicateNgModuleIdsForTest } from './debug_node-JnOYh9kg.mjs';
8
+ import { NgZone, Injectable, DeferBlockState, triggerResourceLoading, renderDeferBlockState, getDeferBlocks, DeferBlockBehavior, NoopNgZone, ApplicationRef, getDebugNode, RendererFactory2, Directive, Component, Pipe, NgModule, ReflectionCapabilities, depsTracker, isComponentDefPendingResolution, resolveComponentResources, NgModuleRef, ApplicationInitStatus, LOCALE_ID, DEFAULT_LOCALE_ID, setLocaleId, ComponentFactory, getAsyncClassMetadataFn, compileComponent, compileDirective, compilePipe, patchComponentDefWithScope, compileNgModuleDefs, clearResolutionOfComponentResourcesQueue, restoreComponentResolutionQueue, internalProvideZoneChangeDetection, ChangeDetectionSchedulerImpl, COMPILER_OPTIONS, generateStandaloneInDeclarationsError, transitiveScopesFor, Compiler, DEFER_BLOCK_CONFIG, NgModuleFactory, ModuleWithComponentFactories, resetCompiledComponents, ɵsetUnknownElementStrictMode as _setUnknownElementStrictMode, ɵsetUnknownPropertyStrictMode as _setUnknownPropertyStrictMode, ɵgetUnknownElementStrictMode as _getUnknownElementStrictMode, ɵgetUnknownPropertyStrictMode as _getUnknownPropertyStrictMode, flushModuleScopingQueueAsMuchAsPossible, setAllowDuplicateNgModuleIdsForTest } from './debug_node-DTOmNMDH.mjs';
9
9
  import { Subscription } from 'rxjs';
10
- import { inject as inject$1, EnvironmentInjector, ErrorHandler, CONTAINER_HEADER_OFFSET, InjectionToken, PendingTasksInternal, ZONELESS_ENABLED, ChangeDetectionScheduler, EffectScheduler, stringify, getInjectableDef, resolveForwardRef, NG_COMP_DEF, NG_DIR_DEF, NG_PIPE_DEF, NG_INJ_DEF, NG_MOD_DEF, ENVIRONMENT_INITIALIZER, Injector, isEnvironmentProviders, INTERNAL_APPLICATION_ERROR_HANDLER, runInInjectionContext } from './root_effect_scheduler-DCy1y1b8.mjs';
10
+ import { inject as inject$1, EnvironmentInjector, ErrorHandler, CONTAINER_HEADER_OFFSET, InjectionToken, PendingTasksInternal, ZONELESS_ENABLED, ChangeDetectionScheduler, EffectScheduler, stringify, getInjectableDef, resolveForwardRef, NG_COMP_DEF, NG_DIR_DEF, NG_PIPE_DEF, NG_INJ_DEF, NG_MOD_DEF, ENVIRONMENT_INITIALIZER, Injector, isEnvironmentProviders, INTERNAL_APPLICATION_ERROR_HANDLER, runInInjectionContext } from './root_effect_scheduler-CWV89N3_.mjs';
11
11
  import { ResourceLoader } from '@angular/compiler';
12
12
  import './signal-nCiHhWf6.mjs';
13
13
  import '@angular/core/primitives/signals';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.0.3
2
+ * @license Angular v20.0.4
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.0.3
2
+ * @license Angular v20.0.4
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.0.3
2
+ * @license Angular v20.0.4
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.0.3
2
+ * @license Angular v20.0.4
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -4559,7 +4559,6 @@ declare const LOCALE_ID: InjectionToken<string>;
4559
4559
  * In standalone apps:
4560
4560
  * ```ts
4561
4561
  * import { LOCALE_ID, ApplicationConfig } from '@angular/core';
4562
- * import { AppModule } from './app/app.module';
4563
4562
  *
4564
4563
  * const appConfig: ApplicationConfig = {
4565
4564
  * providers: [{provide: DEFAULT_CURRENCY_CODE, useValue: 'EUR' }]
@@ -4590,7 +4589,6 @@ declare const DEFAULT_CURRENCY_CODE: InjectionToken<string>;
4590
4589
  * In standalone apps:
4591
4590
  * ```ts
4592
4591
  * import { LOCALE_ID, ApplicationConfig } from '@angular/core';
4593
- * import { AppModule } from './app/app.module';
4594
4592
  *
4595
4593
  * const appConfig: ApplicationConfig = {
4596
4594
  * providers: [{provide: TRANSLATIONS, useValue: translations }]
@@ -4625,7 +4623,6 @@ declare const TRANSLATIONS: InjectionToken<string>;
4625
4623
  * In standalone apps:
4626
4624
  * ```ts
4627
4625
  * import { LOCALE_ID, ApplicationConfig } from '@angular/core';
4628
- * import { AppModule } from './app/app.module';
4629
4626
  *
4630
4627
  * const appConfig: ApplicationConfig = {
4631
4628
  * providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "20.0.3",
3
+ "version": "20.0.4",
4
4
  "description": "Angular - the core framework",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -46,7 +46,7 @@
46
46
  "tslib": "^2.3.0"
47
47
  },
48
48
  "peerDependencies": {
49
- "@angular/compiler": "20.0.3",
49
+ "@angular/compiler": "20.0.4",
50
50
  "rxjs": "^6.5.3 || ^7.4.0",
51
51
  "zone.js": "~0.15.0"
52
52
  },
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.0.3
2
+ * @license Angular v20.0.4
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.0.3
2
+ * @license Angular v20.0.4
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.0.3
2
+ * @license Angular v20.0.4
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.0.3
2
+ * @license Angular v20.0.4
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -32166,7 +32166,7 @@ function isAttrNode(ast) {
32166
32166
  * @description
32167
32167
  * Entry point for all public APIs of the compiler package.
32168
32168
  */
32169
- new Version('20.0.3');
32169
+ new Version('20.0.4');
32170
32170
 
32171
32171
  //////////////////////////////////////
32172
32172
  // THIS FILE HAS GLOBAL SIDE EFFECT //
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -15,7 +15,6 @@ var checker = require('./checker-Bu1Wu4f7.cjs');
15
15
  var index = require('./index-CCX_cTPD.cjs');
16
16
  require('path');
17
17
  var apply_import_manager = require('./apply_import_manager-DT15wSJs.cjs');
18
- var leading_space = require('./leading_space-D9nQ8UQC.cjs');
19
18
  require('@angular-devkit/schematics');
20
19
  require('./project_tsconfig_paths-CDVxT6Ov.cjs');
21
20
  require('fs');
@@ -207,7 +206,10 @@ class UnusedImportsMigration extends project_paths.TsurgeFunnelMigration {
207
206
  // Filter out the unused identifiers from an array.
208
207
  partialRemovals.forEach((toRemove, parent) => {
209
208
  toRemove.forEach((node) => {
210
- replacements.push(new project_paths.Replacement(project_paths.projectFile(sourceFile, info), getArrayElementRemovalUpdate(node, parent, sourceText)));
209
+ replacements.push(new project_paths.Replacement(project_paths.projectFile(sourceFile, info), getArrayElementRemovalUpdate(node, sourceText)));
210
+ });
211
+ stripTrailingSameLineCommas(parent, toRemove, sourceText)?.forEach((update) => {
212
+ replacements.push(new project_paths.Replacement(project_paths.projectFile(sourceFile, info), update));
211
213
  });
212
214
  });
213
215
  // Attempt to clean up unused import declarations. Note that this isn't foolproof, because we
@@ -229,7 +231,7 @@ class UnusedImportsMigration extends project_paths.TsurgeFunnelMigration {
229
231
  }
230
232
  }
231
233
  /** Generates a `TextUpdate` for the removal of an array element. */
232
- function getArrayElementRemovalUpdate(node, parent, sourceText) {
234
+ function getArrayElementRemovalUpdate(node, sourceText) {
233
235
  let position = node.getStart();
234
236
  let end = node.getEnd();
235
237
  let toInsert = '';
@@ -249,27 +251,39 @@ function getArrayElementRemovalUpdate(node, parent, sourceText) {
249
251
  break;
250
252
  }
251
253
  }
252
- // If we're removing the last element in the array, adjust the starting offset so that
253
- // it includes the previous comma on the same line. This avoids turning something like
254
- // `[One, Two, Three]` into `[One,]`. We only do this within the same like, because
255
- // trailing comma at the end of the line is fine.
256
- if (parent.elements[parent.elements.length - 1] === node) {
257
- for (let i = position - 1; i >= 0; i--) {
258
- const char = sourceText[i];
254
+ return new project_paths.TextUpdate({ position, end, toInsert });
255
+ }
256
+ /** Returns `TextUpdate`s that will remove any leftover trailing commas on the same line. */
257
+ function stripTrailingSameLineCommas(node, toRemove, sourceText) {
258
+ let updates = null;
259
+ for (let i = 0; i < node.elements.length; i++) {
260
+ // Skip over elements that are being removed already.
261
+ if (toRemove.has(node.elements[i])) {
262
+ continue;
263
+ }
264
+ // An element might have a trailing comma if all elements after it have been removed.
265
+ const mightHaveTrailingComma = node.elements.slice(i + 1).every((e) => toRemove.has(e));
266
+ if (!mightHaveTrailingComma) {
267
+ continue;
268
+ }
269
+ const position = node.elements[i].getEnd();
270
+ let end = position;
271
+ // If the item might have a trailing comma, start looking after it until we hit a line break.
272
+ for (let charIndex = position; charIndex < node.getEnd(); charIndex++) {
273
+ const char = sourceText[charIndex];
259
274
  if (char === ',' || char === ' ') {
260
- position--;
275
+ end++;
261
276
  }
262
277
  else {
263
- if (whitespaceOrLineFeed.test(char)) {
264
- // Replace the node with its leading whitespace to preserve the formatting.
265
- // This only needs to happen if we're breaking on a newline.
266
- toInsert = leading_space.getLeadingLineWhitespaceOfNode(node);
278
+ if (char !== '\n' && position !== end) {
279
+ updates ??= [];
280
+ updates.push(new project_paths.TextUpdate({ position, end, toInsert: '' }));
267
281
  }
268
282
  break;
269
283
  }
270
284
  }
271
285
  }
272
- return new project_paths.TextUpdate({ position, end, toInsert });
286
+ return updates;
273
287
  }
274
288
 
275
289
  function migrate() {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -891,7 +891,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
891
891
  function compileDeclareClassMetadata(metadata) {
892
892
  const definitionMap = new checker.DefinitionMap();
893
893
  definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
894
- definitionMap.set('version', checker.literal('20.0.3'));
894
+ definitionMap.set('version', checker.literal('20.0.4'));
895
895
  definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
896
896
  definitionMap.set('type', metadata.type);
897
897
  definitionMap.set('decorators', metadata.decorators);
@@ -909,7 +909,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
909
909
  callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? checker.literal(null));
910
910
  callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? checker.literal(null));
911
911
  definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
912
- definitionMap.set('version', checker.literal('20.0.3'));
912
+ definitionMap.set('version', checker.literal('20.0.4'));
913
913
  definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
914
914
  definitionMap.set('type', metadata.type);
915
915
  definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
@@ -1004,7 +1004,7 @@ function createDirectiveDefinitionMap(meta) {
1004
1004
  const definitionMap = new checker.DefinitionMap();
1005
1005
  const minVersion = getMinimumVersionForPartialOutput(meta);
1006
1006
  definitionMap.set('minVersion', checker.literal(minVersion));
1007
- definitionMap.set('version', checker.literal('20.0.3'));
1007
+ definitionMap.set('version', checker.literal('20.0.4'));
1008
1008
  // e.g. `type: MyDirective`
1009
1009
  definitionMap.set('type', meta.type.value);
1010
1010
  if (meta.isStandalone !== undefined) {
@@ -1420,7 +1420,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
1420
1420
  function compileDeclareFactoryFunction(meta) {
1421
1421
  const definitionMap = new checker.DefinitionMap();
1422
1422
  definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
1423
- definitionMap.set('version', checker.literal('20.0.3'));
1423
+ definitionMap.set('version', checker.literal('20.0.4'));
1424
1424
  definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
1425
1425
  definitionMap.set('type', meta.type.value);
1426
1426
  definitionMap.set('deps', compileDependencies(meta.deps));
@@ -1455,7 +1455,7 @@ function compileDeclareInjectableFromMetadata(meta) {
1455
1455
  function createInjectableDefinitionMap(meta) {
1456
1456
  const definitionMap = new checker.DefinitionMap();
1457
1457
  definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
1458
- definitionMap.set('version', checker.literal('20.0.3'));
1458
+ definitionMap.set('version', checker.literal('20.0.4'));
1459
1459
  definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
1460
1460
  definitionMap.set('type', meta.type.value);
1461
1461
  // Only generate providedIn property if it has a non-null value
@@ -1506,7 +1506,7 @@ function compileDeclareInjectorFromMetadata(meta) {
1506
1506
  function createInjectorDefinitionMap(meta) {
1507
1507
  const definitionMap = new checker.DefinitionMap();
1508
1508
  definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
1509
- definitionMap.set('version', checker.literal('20.0.3'));
1509
+ definitionMap.set('version', checker.literal('20.0.4'));
1510
1510
  definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
1511
1511
  definitionMap.set('type', meta.type.value);
1512
1512
  definitionMap.set('providers', meta.providers);
@@ -1539,7 +1539,7 @@ function createNgModuleDefinitionMap(meta) {
1539
1539
  throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
1540
1540
  }
1541
1541
  definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
1542
- definitionMap.set('version', checker.literal('20.0.3'));
1542
+ definitionMap.set('version', checker.literal('20.0.4'));
1543
1543
  definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
1544
1544
  definitionMap.set('type', meta.type.value);
1545
1545
  // We only generate the keys in the metadata if the arrays contain values.
@@ -1590,7 +1590,7 @@ function compileDeclarePipeFromMetadata(meta) {
1590
1590
  function createPipeDefinitionMap(meta) {
1591
1591
  const definitionMap = new checker.DefinitionMap();
1592
1592
  definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION));
1593
- definitionMap.set('version', checker.literal('20.0.3'));
1593
+ definitionMap.set('version', checker.literal('20.0.4'));
1594
1594
  definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
1595
1595
  // e.g. `type: MyPipe`
1596
1596
  definitionMap.set('type', meta.type.value);
@@ -10935,7 +10935,7 @@ class PipeDecoratorHandler {
10935
10935
  * @description
10936
10936
  * Entry point for all public APIs of the compiler-cli package.
10937
10937
  */
10938
- new checker.Version('20.0.3');
10938
+ new checker.Version('20.0.4');
10939
10939
 
10940
10940
  /**
10941
10941
  * Whether a given decorator should be treated as an Angular decorator.
@@ -18974,7 +18974,7 @@ var semver = /*@__PURE__*/getDefaultExportFromCjs(semverExports);
18974
18974
  * @param minVersion Minimum required version for the feature.
18975
18975
  */
18976
18976
  function coreVersionSupportsFeature(coreVersion, minVersion) {
18977
- // A version of `20.0.3` usually means that core is at head so it supports
18977
+ // A version of `20.0.4` usually means that core is at head so it supports
18978
18978
  // all features. Use string interpolation prevent the placeholder from being replaced
18979
18979
  // with the current version during build time.
18980
18980
  if (coreVersion === `0.0.0-${'PLACEHOLDER'}`) {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -985,7 +985,7 @@ function migrateInjectDecorator(firstArg, type, localTypeChecker) {
985
985
  let typeArguments = null;
986
986
  // `inject` no longer officially supports string injection so we need
987
987
  // to cast to any. We maintain the type by passing it as a generic.
988
- if (ts.isStringLiteralLike(firstArg)) {
988
+ if (ts.isStringLiteralLike(firstArg) || isStringType(firstArg, localTypeChecker)) {
989
989
  typeArguments = [type || ts.factory.createKeywordTypeNode(ts.SyntaxKind.AnyKeyword)];
990
990
  injectedType += ' as any';
991
991
  }
@@ -1235,6 +1235,11 @@ function replaceParameterReferencesInInitializer(initializer, constructor, local
1235
1235
  }
1236
1236
  return result.join('this.');
1237
1237
  }
1238
+ function isStringType(node, checker) {
1239
+ const type = checker.getTypeAtLocation(node);
1240
+ // stringLiteral here is to cover const strings inferred as literal type.
1241
+ return !!(type.flags & ts.TypeFlags.String || type.flags & ts.TypeFlags.StringLiteral);
1242
+ }
1238
1243
 
1239
1244
  function migrate(options) {
1240
1245
  return async (tree) => {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.3
3
+ * @license Angular v20.0.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.0.3
2
+ * @license Angular v20.0.4
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.0.3
2
+ * @license Angular v20.0.4
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.0.3
2
+ * @license Angular v20.0.4
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */