@angular/core 19.0.5 → 19.0.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 (34) hide show
  1. package/LICENSE +1 -1
  2. package/fesm2022/core.mjs +32 -26
  3. package/fesm2022/core.mjs.map +1 -1
  4. package/fesm2022/primitives/event-dispatch.mjs +1 -24
  5. package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
  6. package/fesm2022/primitives/signals.mjs +1 -1
  7. package/fesm2022/rxjs-interop.mjs +1 -1
  8. package/fesm2022/testing.mjs +4 -4
  9. package/index.d.ts +5 -3
  10. package/package.json +1 -1
  11. package/primitives/event-dispatch/index.d.ts +1 -1
  12. package/primitives/signals/index.d.ts +1 -1
  13. package/rxjs-interop/index.d.ts +1 -1
  14. package/schematics/bundles/{checker-eced36c5.js → checker-99fcd356.js} +25 -9
  15. package/schematics/bundles/{combine_units-438d7a79.js → combine_units-755cada7.js} +3 -3
  16. package/schematics/bundles/{compiler_host-82c877de.js → compiler_host-6ebdb0ca.js} +2 -2
  17. package/schematics/bundles/control-flow-migration.js +3 -3
  18. package/schematics/bundles/explicit-standalone-flag.js +3 -3
  19. package/schematics/bundles/imports-abe29092.js +1 -1
  20. package/schematics/bundles/inject-migration.js +3 -3
  21. package/schematics/bundles/leading_space-d190b83b.js +1 -1
  22. package/schematics/bundles/{migrate_ts_type_references-7e102890.js → migrate_ts_type_references-c61efd47.js} +4 -4
  23. package/schematics/bundles/nodes-a9f0b985.js +1 -1
  24. package/schematics/bundles/output-migration.js +4 -4
  25. package/schematics/bundles/pending-tasks.js +3 -3
  26. package/schematics/bundles/{program-c49e652e.js → program-2d2a3ded.js} +70 -29
  27. package/schematics/bundles/project_tsconfig_paths-e9ccccbf.js +1 -1
  28. package/schematics/bundles/provide-initializer.js +3 -3
  29. package/schematics/bundles/route-lazy-loading.js +3 -3
  30. package/schematics/bundles/signal-input-migration.js +5 -5
  31. package/schematics/bundles/signal-queries-migration.js +5 -5
  32. package/schematics/bundles/signals.js +5 -5
  33. package/schematics/bundles/standalone-migration.js +5 -5
  34. package/testing/index.d.ts +1 -1
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2010-2024 Google LLC. https://angular.dev/license
3
+ Copyright (c) 2010-2025 Google LLC. https://angular.dev/license
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/fesm2022/core.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v19.0.5
2
+ * @license Angular v19.0.6
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1707,8 +1707,7 @@ function getPipeDef$1(type) {
1707
1707
  */
1708
1708
  function isStandalone(type) {
1709
1709
  const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef$1(type);
1710
- // TODO: standalone as default value (invert the condition)
1711
- return def !== null ? def.standalone : false;
1710
+ return def !== null && def.standalone;
1712
1711
  }
1713
1712
 
1714
1713
  /**
@@ -6173,7 +6172,8 @@ class PendingTasks {
6173
6172
  }
6174
6173
 
6175
6174
  class EventEmitter_ extends Subject {
6176
- __isAsync; // tslint:disable-line
6175
+ // tslint:disable-next-line:require-internal-with-underscore
6176
+ __isAsync;
6177
6177
  destroyRef = undefined;
6178
6178
  pendingTasks = undefined;
6179
6179
  constructor(isAsync = false) {
@@ -18088,7 +18088,7 @@ function createRootComponent(componentView, rootComponentDef, rootDirectives, ho
18088
18088
  function setRootNodeAttributes(hostRenderer, componentDef, hostRNode, rootSelectorOrNode) {
18089
18089
  if (rootSelectorOrNode) {
18090
18090
  // The placeholder will be replaced with the actual version at build time.
18091
- setUpAttributes(hostRenderer, hostRNode, ['ng-version', '19.0.5']);
18091
+ setUpAttributes(hostRenderer, hostRNode, ['ng-version', '19.0.6']);
18092
18092
  }
18093
18093
  else {
18094
18094
  // If host element is created as a part of this function call (i.e. `rootSelectorOrNode`
@@ -19687,7 +19687,6 @@ class NgModuleRef extends NgModuleRef$1 {
19687
19687
  _parent;
19688
19688
  // tslint:disable-next-line:require-internal-with-underscore
19689
19689
  _bootstrapComponents = [];
19690
- // tslint:disable-next-line:require-internal-with-underscore
19691
19690
  _r3Injector;
19692
19691
  instance;
19693
19692
  destroyCbs = [];
@@ -21175,7 +21174,8 @@ class CachedInjectorService {
21175
21174
  *
21176
21175
  * This token is only injected in devMode
21177
21176
  */
21178
- const DEFER_BLOCK_DEPENDENCY_INTERCEPTOR = new InjectionToken('DEFER_BLOCK_DEPENDENCY_INTERCEPTOR');
21177
+ const DEFER_BLOCK_DEPENDENCY_INTERCEPTOR =
21178
+ /* @__PURE__ */ new InjectionToken('DEFER_BLOCK_DEPENDENCY_INTERCEPTOR');
21179
21179
  /**
21180
21180
  * **INTERNAL**, token used for configuring defer block behavior.
21181
21181
  */
@@ -21567,7 +21567,6 @@ class Console {
21567
21567
  }
21568
21568
  // Note: for reporting errors use `DOM.logError()` as it is platform specific
21569
21569
  warn(message) {
21570
- // tslint:disable-next-line:no-console
21571
21570
  console.warn(message);
21572
21571
  }
21573
21572
  static ɵfac = function Console_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || Console)(); };
@@ -23004,6 +23003,15 @@ class ZoneAwareEffectScheduler {
23004
23003
  schedule(handle) {
23005
23004
  this.enqueue(handle);
23006
23005
  }
23006
+ remove(handle) {
23007
+ const zone = handle.zone;
23008
+ const queue = this.queues.get(zone);
23009
+ if (!queue.has(handle)) {
23010
+ return;
23011
+ }
23012
+ queue.delete(handle);
23013
+ this.queuedEffectCount--;
23014
+ }
23007
23015
  enqueue(handle) {
23008
23016
  const zone = handle.zone;
23009
23017
  if (!this.queues.has(zone)) {
@@ -23332,7 +23340,7 @@ class ApplicationRef {
23332
23340
  * {@example core/ts/platform/platform.ts region='domNode'}
23333
23341
  */
23334
23342
  bootstrap(componentOrFactory, rootSelectorOrNode) {
23335
- (typeof ngDevMode === 'undefined' || ngDevMode) && this.warnIfDestroyed();
23343
+ (typeof ngDevMode === 'undefined' || ngDevMode) && warnIfDestroyed(this._destroyed);
23336
23344
  const isComponentFactory = componentOrFactory instanceof ComponentFactory$1;
23337
23345
  const initStatus = this._injector.get(ApplicationInitStatus);
23338
23346
  if (!initStatus.done) {
@@ -23402,7 +23410,7 @@ class ApplicationRef {
23402
23410
  snapshot.dispose();
23403
23411
  return;
23404
23412
  }
23405
- (typeof ngDevMode === 'undefined' || ngDevMode) && this.warnIfDestroyed();
23413
+ (typeof ngDevMode === 'undefined' || ngDevMode) && warnIfDestroyed(this._destroyed);
23406
23414
  if (this._runningTick) {
23407
23415
  throw new RuntimeError(101 /* RuntimeErrorCode.RECURSIVE_APPLICATION_REF_TICK */, ngDevMode && 'ApplicationRef.tick is called recursively');
23408
23416
  }
@@ -23533,7 +23541,7 @@ class ApplicationRef {
23533
23541
  * This will throw if the view is already attached to a ViewContainer.
23534
23542
  */
23535
23543
  attachView(viewRef) {
23536
- (typeof ngDevMode === 'undefined' || ngDevMode) && this.warnIfDestroyed();
23544
+ (typeof ngDevMode === 'undefined' || ngDevMode) && warnIfDestroyed(this._destroyed);
23537
23545
  const view = viewRef;
23538
23546
  this._views.push(view);
23539
23547
  view.attachToAppRef(this);
@@ -23542,7 +23550,7 @@ class ApplicationRef {
23542
23550
  * Detaches a view from dirty checking again.
23543
23551
  */
23544
23552
  detachView(viewRef) {
23545
- (typeof ngDevMode === 'undefined' || ngDevMode) && this.warnIfDestroyed();
23553
+ (typeof ngDevMode === 'undefined' || ngDevMode) && warnIfDestroyed(this._destroyed);
23546
23554
  const view = viewRef;
23547
23555
  remove(this._views, view);
23548
23556
  view.detachFromAppRef();
@@ -23586,7 +23594,7 @@ class ApplicationRef {
23586
23594
  * @returns A function which unregisters a listener.
23587
23595
  */
23588
23596
  onDestroy(callback) {
23589
- (typeof ngDevMode === 'undefined' || ngDevMode) && this.warnIfDestroyed();
23597
+ (typeof ngDevMode === 'undefined' || ngDevMode) && warnIfDestroyed(this._destroyed);
23590
23598
  this._destroyListeners.push(callback);
23591
23599
  return () => remove(this._destroyListeners, callback);
23592
23600
  }
@@ -23613,11 +23621,6 @@ class ApplicationRef {
23613
23621
  get viewCount() {
23614
23622
  return this._views.length;
23615
23623
  }
23616
- warnIfDestroyed() {
23617
- if ((typeof ngDevMode === 'undefined' || ngDevMode) && this._destroyed) {
23618
- console.warn(formatRuntimeError(406 /* RuntimeErrorCode.APPLICATION_REF_ALREADY_DESTROYED */, 'This instance of the `ApplicationRef` has already been destroyed.'));
23619
- }
23620
- }
23621
23624
  static ɵfac = function ApplicationRef_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ApplicationRef)(); };
23622
23625
  static ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationRef, factory: ApplicationRef.ɵfac, providedIn: 'root' });
23623
23626
  }
@@ -23625,6 +23628,11 @@ class ApplicationRef {
23625
23628
  type: Injectable,
23626
23629
  args: [{ providedIn: 'root' }]
23627
23630
  }], () => [], null); })();
23631
+ function warnIfDestroyed(destroyed) {
23632
+ if (destroyed) {
23633
+ console.warn(formatRuntimeError(406 /* RuntimeErrorCode.APPLICATION_REF_ALREADY_DESTROYED */, 'This instance of the `ApplicationRef` has already been destroyed.'));
23634
+ }
23635
+ }
23628
23636
  function remove(list, el) {
23629
23637
  const index = list.indexOf(el);
23630
23638
  if (index > -1) {
@@ -23785,7 +23793,7 @@ function triggerResourceLoading(tDetails, lView, tNode) {
23785
23793
  tDetails.loadingState = DeferDependenciesLoadingState.FAILED;
23786
23794
  if (tDetails.errorTmplIndex === null) {
23787
23795
  const templateLocation = ngDevMode ? getTemplateLocationDetails(lView) : '';
23788
- const error = new RuntimeError(750 /* RuntimeErrorCode.DEFER_LOADING_FAILED */, ngDevMode &&
23796
+ const error = new RuntimeError(-750 /* RuntimeErrorCode.DEFER_LOADING_FAILED */, ngDevMode &&
23789
23797
  'Loading dependencies for `@defer` block failed, ' +
23790
23798
  `but no \`@error\` block was configured${templateLocation}. ` +
23791
23799
  'Consider using the `@error` block to render an error state.');
@@ -27304,7 +27312,6 @@ function reconcile(liveCollection, newCollection, trackByFn) {
27304
27312
  'Duplicated keys were: \n' +
27305
27313
  duplicatedKeysMsg.join(', \n') +
27306
27314
  '.');
27307
- // tslint:disable-next-line:no-console
27308
27315
  console.warn(message);
27309
27316
  }
27310
27317
  }
@@ -28132,10 +28139,8 @@ if (typeof ngI18nClosureMode === 'undefined') {
28132
28139
  // Make sure to refer to ngI18nClosureMode as ['ngI18nClosureMode'] for closure.
28133
28140
  // NOTE: we need to have it in IIFE so that the tree-shaker is happy.
28134
28141
  (function () {
28135
- // tslint:disable-next-line:no-toplevel-property-access
28136
28142
  _global['ngI18nClosureMode'] =
28137
28143
  // TODO(FW-1250): validate that this actually, you know, works.
28138
- // tslint:disable-next-line:no-toplevel-property-access
28139
28144
  typeof goog !== 'undefined' && typeof goog.getMsg === 'function';
28140
28145
  })();
28141
28146
  }
@@ -33101,8 +33106,9 @@ function recreateMatchingLViews(def, rootLView) {
33101
33106
  */
33102
33107
  function clearRendererCache(factory, def) {
33103
33108
  // Cast to read a private field.
33104
- // NOTE: This must be kept synchronized with the renderer factory implementation in platform-browser.
33105
- factory.rendererByCompId?.delete(def.id);
33109
+ // NOTE: This must be kept synchronized with the renderer factory implementation in
33110
+ // platform-browser and platform-browser/animations.
33111
+ factory.componentReplaced?.(def.id);
33106
33112
  }
33107
33113
  /**
33108
33114
  * Recreates an LView in-place from a new component definition.
@@ -34567,7 +34573,7 @@ class Version {
34567
34573
  /**
34568
34574
  * @publicApi
34569
34575
  */
34570
- const VERSION = new Version('19.0.5');
34576
+ const VERSION = new Version('19.0.6');
34571
34577
 
34572
34578
  /**
34573
34579
  * Combination of NgModuleFactory and ComponentFactories.
@@ -39651,7 +39657,6 @@ function withDomHydration() {
39651
39657
  'thus hydration was not enabled. ' +
39652
39658
  'Make sure the `provideClientHydration()` is included into the list ' +
39653
39659
  'of providers in the server part of the application configuration.');
39654
- // tslint:disable-next-line:no-console
39655
39660
  console.warn(message);
39656
39661
  }
39657
39662
  },
@@ -40503,6 +40508,7 @@ const ROOT_EFFECT_NODE =
40503
40508
  consumerDestroy$1(this);
40504
40509
  this.onDestroyFn();
40505
40510
  this.maybeCleanup();
40511
+ this.scheduler.remove(this);
40506
40512
  },
40507
40513
  }))();
40508
40514
  const VIEW_EFFECT_NODE =