@angular/core 22.0.0-next.7 → 22.0.0-next.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 (70) hide show
  1. package/fesm2022/_attribute-chunk.mjs +1 -1
  2. package/fesm2022/_debug_node-chunk.mjs +967 -872
  3. package/fesm2022/_debug_node-chunk.mjs.map +1 -1
  4. package/fesm2022/_effect-chunk.mjs +1 -1
  5. package/fesm2022/_not_found-chunk.mjs +1 -1
  6. package/fesm2022/_pending_tasks-chunk.mjs +10 -8
  7. package/fesm2022/_pending_tasks-chunk.mjs.map +1 -1
  8. package/fesm2022/_resource-chunk.mjs +25 -11
  9. package/fesm2022/_resource-chunk.mjs.map +1 -1
  10. package/fesm2022/_untracked-chunk.mjs +1 -1
  11. package/fesm2022/_weak_ref-chunk.mjs +1 -1
  12. package/fesm2022/core.mjs +350 -6
  13. package/fesm2022/core.mjs.map +1 -1
  14. package/fesm2022/primitives-di.mjs +1 -1
  15. package/fesm2022/primitives-event-dispatch.mjs +1 -1
  16. package/fesm2022/primitives-signals.mjs +1 -1
  17. package/fesm2022/rxjs-interop.mjs +4 -1
  18. package/fesm2022/rxjs-interop.mjs.map +1 -1
  19. package/fesm2022/testing.mjs +2 -12
  20. package/fesm2022/testing.mjs.map +1 -1
  21. package/package.json +2 -2
  22. package/schematics/bundles/apply_import_manager-CxA_YYgB.cjs +1 -1
  23. package/schematics/bundles/can-match-snapshot-required.cjs +1 -1
  24. package/schematics/bundles/change-detection-eager.cjs +1 -1
  25. package/schematics/bundles/cleanup-unused-imports.cjs +1 -1
  26. package/schematics/bundles/common-to-standalone-migration.cjs +1 -1
  27. package/schematics/bundles/compiler_host-CY14HvaP.cjs +1 -1
  28. package/schematics/bundles/control-flow-migration.cjs +1 -1
  29. package/schematics/bundles/http-xhr-backend.cjs +1 -1
  30. package/schematics/bundles/imports-CKV-ITqD.cjs +1 -1
  31. package/schematics/bundles/incremental-hydration.cjs +91 -0
  32. package/schematics/bundles/index-DADA7AvC.cjs +1 -1
  33. package/schematics/bundles/inject-migration.cjs +1 -1
  34. package/schematics/bundles/json-file-Drblb4E1.cjs +1916 -0
  35. package/schematics/bundles/leading_space-BTPRV0wu.cjs +1 -1
  36. package/schematics/bundles/migrate_ts_type_references-B9LlDDUg.cjs +1 -1
  37. package/schematics/bundles/ng_component_template-DPAF1aEA.cjs +1 -1
  38. package/schematics/bundles/ng_decorators-IVztR9rk.cjs +1 -1
  39. package/schematics/bundles/ngclass-to-class-migration.cjs +14 -6
  40. package/schematics/bundles/ngstyle-to-style-migration.cjs +1 -1
  41. package/schematics/bundles/nodes-ZSQ7WZRB.cjs +1 -1
  42. package/schematics/bundles/output-migration.cjs +1 -1
  43. package/schematics/bundles/parse_html-C8eKA9px.cjs +1 -1
  44. package/schematics/bundles/project_paths-D2V-Uh2L.cjs +1 -1
  45. package/schematics/bundles/project_tsconfig_paths-DkkMibv-.cjs +1 -1
  46. package/schematics/bundles/property_name-BCpALNpZ.cjs +1 -1
  47. package/schematics/bundles/route-lazy-loading.cjs +1 -1
  48. package/schematics/bundles/router-testing-module-migration.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/strict-safe-navigation-narrow.cjs +32 -0
  55. package/schematics/bundles/strict-templates-default.cjs +63 -0
  56. package/schematics/migrations.json +13 -3
  57. package/types/_api-chunk.d.ts +9 -3
  58. package/types/_chrome_dev_tools_performance-chunk.d.ts +2 -2
  59. package/types/_debug_node-chunk.d.ts +132 -212
  60. package/types/_effect-chunk.d.ts +1 -1
  61. package/types/_event_dispatcher-chunk.d.ts +1 -1
  62. package/types/_formatter-chunk.d.ts +1 -1
  63. package/types/_weak_ref-chunk.d.ts +1 -1
  64. package/types/core.d.ts +876 -749
  65. package/types/primitives-di.d.ts +1 -1
  66. package/types/primitives-event-dispatch.d.ts +1 -1
  67. package/types/primitives-signals.d.ts +1 -1
  68. package/types/rxjs-interop.d.ts +1 -1
  69. package/types/testing.d.ts +2 -2
  70. package/schematics/bundles/strict-templates.cjs +0 -55
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v22.0.0-next.7
3
+ * @license Angular v22.0.0-next.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v22.0.0-next.7
3
+ * @license Angular v22.0.0-next.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v22.0.0-next.7
3
+ * @license Angular v22.0.0-next.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v22.0.0-next.7
3
+ * @license Angular v22.0.0-next.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v22.0.0-next.7
3
+ * @license Angular v22.0.0-next.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -121,12 +121,20 @@ function getPropertyRemovalRange(property) {
121
121
  }
122
122
  const properties = parent.properties;
123
123
  const propertyIndex = properties.indexOf(property);
124
- const end = property.getEnd();
125
- if (propertyIndex < properties.length - 1) {
126
- const nextProperty = properties[propertyIndex + 1];
127
- return { start: property.getStart(), end: nextProperty.getStart() };
124
+ if (properties.length === 1) {
125
+ const sourceFile = property.getSourceFile();
126
+ let end = property.getEnd();
127
+ const textAfter = sourceFile.text.substring(end, parent.getEnd());
128
+ const commaIndex = textAfter.indexOf(',');
129
+ if (commaIndex !== -1) {
130
+ end += commaIndex + 1;
131
+ }
132
+ return { start: property.getFullStart(), end };
133
+ }
134
+ if (propertyIndex === 0) {
135
+ return { start: property.getFullStart(), end: properties[1].getFullStart() };
128
136
  }
129
- return { start: property.getStart(), end };
137
+ return { start: properties[propertyIndex - 1].getEnd(), end: property.getEnd() };
130
138
  }
131
139
  function calculateImportReplacements(info, sourceFiles, filesToRemoveCommonModule) {
132
140
  const importReplacements = {};
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v22.0.0-next.7
3
+ * @license Angular v22.0.0-next.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v22.0.0-next.7
3
+ * @license Angular v22.0.0-next.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v22.0.0-next.7
3
+ * @license Angular v22.0.0-next.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v22.0.0-next.7
3
+ * @license Angular v22.0.0-next.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v22.0.0-next.7
3
+ * @license Angular v22.0.0-next.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v22.0.0-next.7
3
+ * @license Angular v22.0.0-next.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v22.0.0-next.7
3
+ * @license Angular v22.0.0-next.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v22.0.0-next.7
3
+ * @license Angular v22.0.0-next.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v22.0.0-next.7
3
+ * @license Angular v22.0.0-next.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v22.0.0-next.7
3
+ * @license Angular v22.0.0-next.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v22.0.0-next.7
3
+ * @license Angular v22.0.0-next.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v22.0.0-next.7
3
+ * @license Angular v22.0.0-next.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v22.0.0-next.7
3
+ * @license Angular v22.0.0-next.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v22.0.0-next.7
3
+ * @license Angular v22.0.0-next.9
4
4
  * (c) 2010-2026 Google LLC. https://angular.dev/
5
5
  * License: MIT
6
6
  */
@@ -0,0 +1,32 @@
1
+ 'use strict';
2
+ /**
3
+ * @license Angular v22.0.0-next.9
4
+ * (c) 2010-2026 Google LLC. https://angular.dev/
5
+ * License: MIT
6
+ */
7
+ 'use strict';
8
+
9
+ var project_tsconfig_paths = require('./project_tsconfig_paths-DkkMibv-.cjs');
10
+ var jsonFile = require('./json-file-Drblb4E1.cjs');
11
+ require('@angular-devkit/core');
12
+ require('node:os');
13
+
14
+ function migrate() {
15
+ return async (tree) => {
16
+ const { buildPaths, testPaths } = await project_tsconfig_paths.getProjectTsConfigPaths(tree);
17
+ const allPaths = [...new Set([...buildPaths, ...testPaths])];
18
+ for (const tsconfigPath of allPaths) {
19
+ const json = new jsonFile.jsonFileExports.JSONFile(tree, tsconfigPath);
20
+ const compilerOptions = json.get(['compilerOptions']);
21
+ if (!compilerOptions ||
22
+ typeof compilerOptions !== 'object' ||
23
+ Object.keys(compilerOptions).length === 0) {
24
+ continue;
25
+ }
26
+ json.modify(['angularCompilerOptions', 'extendedDiagnostics', 'checks', 'nullishCoalescingNotNullable'], 'suppress');
27
+ json.modify(['angularCompilerOptions', 'extendedDiagnostics', 'checks', 'optionalChainNotNullable'], 'suppress');
28
+ }
29
+ };
30
+ }
31
+
32
+ exports.migrate = migrate;
@@ -0,0 +1,63 @@
1
+ 'use strict';
2
+ /**
3
+ * @license Angular v22.0.0-next.9
4
+ * (c) 2010-2026 Google LLC. https://angular.dev/
5
+ * License: MIT
6
+ */
7
+ 'use strict';
8
+
9
+ var project_tsconfig_paths = require('./project_tsconfig_paths-DkkMibv-.cjs');
10
+ var jsonFile = require('./json-file-Drblb4E1.cjs');
11
+ var ts = require('typescript');
12
+ var path = require('node:path');
13
+ require('@angular-devkit/core');
14
+ require('node:os');
15
+
16
+ function getResolvedAngularCompilerOptions(tree, tsconfigPath) {
17
+ if (!tree.exists(tsconfigPath))
18
+ return {};
19
+ const sourceFile = ts.readJsonConfigFile(tsconfigPath, (path) => tree.readText(path));
20
+ const config = ts.convertToObject(sourceFile, []);
21
+ let angularOptions = config.angularCompilerOptions || {};
22
+ // Manually resolve inheritance for Angular-specific options.
23
+ // Since the TypeScript API doesn't perform a deep merge of custom/non-standard keys
24
+ // during config parsing, we must traverse the inheritance chain manually
25
+ if (config.extends) {
26
+ // Management extends property...
27
+ const parentPath = path.join(path.dirname(tsconfigPath), config.extends);
28
+ const parentOptions = getResolvedAngularCompilerOptions(tree, parentPath);
29
+ // Merge: the options of the current file overwrite those of the parent
30
+ angularOptions = {
31
+ ...parentOptions,
32
+ ...angularOptions,
33
+ };
34
+ }
35
+ return angularOptions;
36
+ }
37
+ /**
38
+ * Migration that adds `strictTemplates: false` to `tsconfig.json` files.
39
+ */
40
+ function migrate() {
41
+ return async (tree) => {
42
+ const { buildPaths, testPaths } = await project_tsconfig_paths.getProjectTsConfigPaths(tree);
43
+ const allPaths = [...new Set([...buildPaths, ...testPaths])];
44
+ for (const tsconfigPath of allPaths) {
45
+ const json = new jsonFile.jsonFileExports.JSONFile(tree, tsconfigPath);
46
+ const compilerOptions = json.get(['compilerOptions']);
47
+ if (!compilerOptions ||
48
+ typeof compilerOptions !== 'object' ||
49
+ Object.keys(compilerOptions).length === 0) {
50
+ continue;
51
+ }
52
+ const angularOptions = getResolvedAngularCompilerOptions(tree, tsconfigPath);
53
+ if (angularOptions['strictTemplates'] !== undefined) {
54
+ continue;
55
+ }
56
+ if (json.get(['angularCompilerOptions', 'strictTemplates']) === undefined) {
57
+ json.modify(['angularCompilerOptions', 'strictTemplates'], false);
58
+ }
59
+ }
60
+ };
61
+ }
62
+
63
+ exports.migrate = migrate;
@@ -10,15 +10,25 @@
10
10
  "description": "Adds 'withXhr' to 'provideHttpClient' function calls when the 'HttpXhrBackend' is used. For more information see: https://angular.dev/api/common/http/withXhr",
11
11
  "factory": "./bundles/http-xhr-backend.cjs#migrate"
12
12
  },
13
- "strict-template": {
13
+ "strict-templates-default": {
14
14
  "version": "22.0.0",
15
- "description": "Adds 'strictTemplates: true' in tsconfig.json.",
16
- "factory": "./bundles/strict-templates.cjs#migrate"
15
+ "description": "Adds 'strictTemplates: false' in tsconfig.json when not set.",
16
+ "factory": "./bundles/strict-templates-default.cjs#migrate"
17
17
  },
18
18
  "can-match-snapshot-required": {
19
19
  "version": "22.0.0",
20
20
  "description": "Adds the required third argument to canMatch callsites.",
21
21
  "factory": "./bundles/can-match-snapshot-required.cjs#migrate"
22
+ },
23
+ "incremental-hydration": {
24
+ "version": "22.0.0",
25
+ "description": "Adds withNoIncrementalHydration() opt out to provideClientHydration() when incremental hydration is not enabled to retain pre-v22 behavior-.",
26
+ "factory": "./bundles/incremental-hydration.cjs#migrate"
27
+ },
28
+ "strict-safe-navigation-narrow": {
29
+ "version": "22.0.0",
30
+ "description": "Disables the 'nullishCoalescingNotNullable & optionalChainNotNullable extended diagnostics.",
31
+ "factory": "./bundles/strict-safe-navigation-narrow.cjs#migrate"
22
32
  }
23
33
  }
24
34
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v22.0.0-next.7
2
+ * @license Angular v22.0.0-next.9
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -247,7 +247,7 @@ type ResourceLoader<T, R> = (param: ResourceLoaderParams<R>) => PromiseLike<T>;
247
247
  *
248
248
  * @experimental
249
249
  */
250
- type ResourceStreamingLoader<T, R> = (param: ResourceLoaderParams<R>) => PromiseLike<Signal<ResourceStreamItem<T>>>;
250
+ type ResourceStreamingLoader<T, R> = (param: ResourceLoaderParams<R>) => Signal<ResourceStreamItem<T>> | PromiseLike<Signal<ResourceStreamItem<T>>> | undefined;
251
251
  /**
252
252
  * Options to the `resource` function, for creating a resource.
253
253
  *
@@ -342,7 +342,11 @@ type ResourceSnapshot<T> = {
342
342
  readonly status: 'error';
343
343
  readonly error: Error;
344
344
  };
345
- /** Options for `debounced`. */
345
+ /**
346
+ * Options for `debounced`.
347
+ *
348
+ * @see [Debouncing signals with `debounced`](guide/signals/debounced)
349
+ */
346
350
  interface DebouncedOptions<T> {
347
351
  /** The `Injector` to use for the debounced resource. */
348
352
  injector?: Injector;
@@ -352,6 +356,8 @@ interface DebouncedOptions<T> {
352
356
  /**
353
357
  * Represents the wait condition for item debouncing.
354
358
  * Can be a number of milliseconds or a function that returns a Promise.
359
+ *
360
+ * @see [Debouncing signals with `debounced`](guide/signals/debounced)
355
361
  */
356
362
  type DebounceTimer<T> = number | ((value: T, lastValue: ResourceSnapshot<T>) => Promise<void> | void);
357
363
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v22.0.0-next.7
2
+ * @license Angular v22.0.0-next.9
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -844,7 +844,7 @@ type TimeStampName = string;
844
844
  type DevToolsColor = 'primary' | 'primary-light' | 'primary-dark' | 'secondary' | 'secondary-light' | 'secondary-dark' | 'tertiary' | 'tertiary-light' | 'tertiary-dark' | 'error';
845
845
  declare global {
846
846
  interface Console {
847
- timeStamp(label: string, start: TimeStampName, end?: TimeStampName, trackName?: string, trackGroup?: string, color?: DevToolsColor): void;
847
+ timeStamp(label: string, start: TimeStampName, end?: TimeStampName, trackName?: string, trackGroup?: string, color?: DevToolsColor, detail?: object): void;
848
848
  }
849
849
  }
850
850
  /**