@angular/core 19.2.7 → 19.2.9

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 (45) hide show
  1. package/event_dispatcher.d-DlbccpYq.d.ts +1 -1
  2. package/fesm2022/core.mjs +59 -34
  3. package/fesm2022/core.mjs.map +1 -1
  4. package/fesm2022/primitives/di.mjs +1 -1
  5. package/fesm2022/primitives/event-dispatch.mjs +1 -1
  6. package/fesm2022/primitives/signals.mjs +1 -1
  7. package/fesm2022/rxjs-interop.mjs +1 -1
  8. package/fesm2022/testing.mjs +30 -11
  9. package/fesm2022/testing.mjs.map +1 -1
  10. package/fesm2022/untracked-BKcld_ew.mjs +1 -1
  11. package/index.d.ts +17 -6
  12. package/navigation_types.d-fAxd92YV.d.ts +1 -1
  13. package/package.json +1 -1
  14. package/primitives/di/index.d.ts +1 -1
  15. package/primitives/event-dispatch/index.d.ts +1 -1
  16. package/primitives/signals/index.d.ts +1 -1
  17. package/rxjs-interop/index.d.ts +1 -1
  18. package/schematics/bundles/{apply_import_manager-2VufvTsB.js → apply_import_manager-COqnCltX.js} +2 -2
  19. package/schematics/bundles/checker-BNmiXJIJ.js +2 -2
  20. package/schematics/bundles/cleanup-unused-imports.js +4 -4
  21. package/schematics/bundles/compiler_host-BafHjBMK.js +1 -1
  22. package/schematics/bundles/control-flow-migration.js +1 -1
  23. package/schematics/bundles/explicit-standalone-flag.js +1 -1
  24. package/schematics/bundles/imports-CIX-JgAN.js +1 -1
  25. package/schematics/bundles/{index-DMhRS_CK.js → index-CAJ-Rm56.js} +43 -20
  26. package/schematics/bundles/{index-DJTfI03d.js → index-rvZ5aROS.js} +3 -3
  27. package/schematics/bundles/inject-migration.js +1 -1
  28. package/schematics/bundles/leading_space-D9nQ8UQC.js +1 -1
  29. package/schematics/bundles/{migrate_ts_type_references-CgtT9yyW.js → migrate_ts_type_references-BIV-FPWl.js} +4 -4
  30. package/schematics/bundles/ng_decorators-DznZ5jMl.js +1 -1
  31. package/schematics/bundles/nodes-B16H9JUd.js +1 -1
  32. package/schematics/bundles/output-migration.js +5 -5
  33. package/schematics/bundles/pending-tasks.js +1 -1
  34. package/schematics/bundles/{project_paths-C-UAB3jT.js → project_paths-A9I0g_ID.js} +2 -2
  35. package/schematics/bundles/project_tsconfig_paths-CDVxT6Ov.js +1 -1
  36. package/schematics/bundles/property_name-BBwFuqMe.js +1 -1
  37. package/schematics/bundles/provide-initializer.js +1 -1
  38. package/schematics/bundles/route-lazy-loading.js +1 -1
  39. package/schematics/bundles/self-closing-tags-migration.js +3 -3
  40. package/schematics/bundles/signal-input-migration.js +6 -6
  41. package/schematics/bundles/signal-queries-migration.js +6 -6
  42. package/schematics/bundles/signals.js +6 -6
  43. package/schematics/bundles/standalone-migration.js +2 -2
  44. package/testing/index.d.ts +5 -3
  45. package/weak_ref.d-DWHPG08n.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v19.2.7
2
+ * @license Angular v19.2.9
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 v19.2.7
2
+ * @license Angular v19.2.9
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 v19.2.7
2
+ * @license Angular v19.2.9
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 v19.2.7
2
+ * @license Angular v19.2.9
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 v19.2.7
2
+ * @license Angular v19.2.9
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -2310,7 +2310,6 @@ const __core_private_testing_placeholder__ = '';
2310
2310
  * things like traversal delay.
2311
2311
  */
2312
2312
  class FakeNavigation {
2313
- window;
2314
2313
  /**
2315
2314
  * The fake implementation of an entries array. Only same-document entries
2316
2315
  * allowed.
@@ -2368,9 +2367,30 @@ class FakeNavigation {
2368
2367
  get canGoForward() {
2369
2368
  return this.currentEntryIndex < this.entriesArr.length - 1;
2370
2369
  }
2371
- constructor(window, startURL) {
2372
- this.window = window;
2373
- this.eventTarget = this.window.document.createElement('div');
2370
+ createEventTarget;
2371
+ _window;
2372
+ get window() {
2373
+ return this._window;
2374
+ }
2375
+ constructor(doc, startURL) {
2376
+ this.createEventTarget = () => {
2377
+ try {
2378
+ // `document.createElement` because NodeJS `EventTarget` is
2379
+ // incompatible with Domino's `Event`. That is, attempting to
2380
+ // dispatch an event created by Domino's patched `Event` will
2381
+ // throw an error since it is not an instance of a real Node
2382
+ // `Event`.
2383
+ return doc.createElement('div');
2384
+ }
2385
+ catch {
2386
+ // Fallback to a basic EventTarget if `document.createElement`
2387
+ // fails. This can happen with tests that pass in a value for document
2388
+ // that is stubbed.
2389
+ return new EventTarget();
2390
+ }
2391
+ };
2392
+ this._window = document.defaultView ?? this.createEventTarget();
2393
+ this.eventTarget = this.createEventTarget();
2374
2394
  // First entry.
2375
2395
  this.setInitialEntryForTesting(startURL);
2376
2396
  }
@@ -2382,7 +2402,7 @@ class FakeNavigation {
2382
2402
  throw new Error('setInitialEntryForTesting can only be called before any ' + 'navigation has occurred');
2383
2403
  }
2384
2404
  const currentInitialEntry = this.entriesArr[0];
2385
- this.entriesArr[0] = new FakeNavigationHistoryEntry(this.window.document.createElement('div'), new URL(url).toString(), {
2405
+ this.entriesArr[0] = new FakeNavigationHistoryEntry(this.eventTarget, new URL(url).toString(), {
2386
2406
  index: 0,
2387
2407
  key: currentInitialEntry?.key ?? String(this.nextKey++),
2388
2408
  id: currentInitialEntry?.id ?? String(this.nextId++),
@@ -2649,8 +2669,7 @@ class FakeNavigation {
2649
2669
  /** Cleans up resources. */
2650
2670
  dispose() {
2651
2671
  // Recreate eventTarget to release current listeners.
2652
- // `document.createElement` because NodeJS `EventTarget` is incompatible with Domino's `Event`.
2653
- this.eventTarget = this.window.document.createElement('div');
2672
+ this.eventTarget = this.createEventTarget();
2654
2673
  this.disposed = true;
2655
2674
  }
2656
2675
  /** Returns whether this fake is disposed. */
@@ -2709,10 +2728,10 @@ class FakeNavigation {
2709
2728
  const popStateEvent = createPopStateEvent({
2710
2729
  state: navigateEvent.destination.getHistoryState(),
2711
2730
  });
2712
- this.window.dispatchEvent(popStateEvent);
2731
+ this._window.dispatchEvent(popStateEvent);
2713
2732
  if (navigateEvent.hashChange) {
2714
2733
  const hashchangeEvent = createHashChangeEvent(oldUrl, this.currentEntry.url);
2715
- this.window.dispatchEvent(hashchangeEvent);
2734
+ this._window.dispatchEvent(hashchangeEvent);
2716
2735
  }
2717
2736
  }
2718
2737
  /**
@@ -2739,7 +2758,7 @@ class FakeNavigation {
2739
2758
  if (navigationType === 'push' || navigationType === 'replace') {
2740
2759
  const index = this.currentEntryIndex;
2741
2760
  const key = navigationType === 'push' ? String(this.nextKey++) : this.currentEntry.key;
2742
- const newNHE = new FakeNavigationHistoryEntry(this.window.document.createElement('div'), destination.url, {
2761
+ const newNHE = new FakeNavigationHistoryEntry(this.eventTarget, destination.url, {
2743
2762
  id: String(this.nextId++),
2744
2763
  key,
2745
2764
  index,