@angular/core 20.0.0-next.3 → 20.0.0-next.5

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 (72) hide show
  1. package/api.d-mxcXqDpA.d.ts +297 -0
  2. package/discovery.d-CyYpOJ7j.d.ts +7393 -0
  3. package/event_dispatcher.d-PWnbqZDx.d.ts +346 -0
  4. package/fesm2022/attribute-B17mgaqe.mjs +24 -0
  5. package/fesm2022/attribute-B17mgaqe.mjs.map +1 -0
  6. package/fesm2022/core.mjs +579 -36730
  7. package/fesm2022/core.mjs.map +1 -1
  8. package/fesm2022/debug_node-xKpCIZm-.mjs +32070 -0
  9. package/fesm2022/debug_node-xKpCIZm-.mjs.map +1 -0
  10. package/fesm2022/primitives/di.mjs +2 -2
  11. package/fesm2022/primitives/di.mjs.map +1 -1
  12. package/fesm2022/primitives/event-dispatch.mjs +2 -16
  13. package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
  14. package/fesm2022/primitives/signals.mjs +5 -609
  15. package/fesm2022/primitives/signals.mjs.map +1 -1
  16. package/fesm2022/resource-BPpYEDic.mjs +621 -0
  17. package/fesm2022/resource-BPpYEDic.mjs.map +1 -0
  18. package/fesm2022/root_effect_scheduler-D0_b1cf_.mjs +3816 -0
  19. package/fesm2022/root_effect_scheduler-D0_b1cf_.mjs.map +1 -0
  20. package/fesm2022/rxjs-interop.mjs +91 -7
  21. package/fesm2022/rxjs-interop.mjs.map +1 -1
  22. package/fesm2022/signal-DhRAAi7R.mjs +522 -0
  23. package/fesm2022/signal-DhRAAi7R.mjs.map +1 -0
  24. package/fesm2022/testing.mjs +105 -103
  25. package/fesm2022/testing.mjs.map +1 -1
  26. package/fesm2022/untracked-DaaW3JJm.mjs +117 -0
  27. package/fesm2022/untracked-DaaW3JJm.mjs.map +1 -0
  28. package/fesm2022/weak_ref-DrMdAIDh.mjs +1 -1
  29. package/graph.d-StYigYp1.d.ts +195 -0
  30. package/index.d.ts +2616 -10854
  31. package/ng_i18n_closure_mode.d-DLxSUiDr.d.ts +832 -0
  32. package/package.json +3 -3
  33. package/primitives/di/index.d.ts +3 -2
  34. package/primitives/event-dispatch/index.d.ts +5 -340
  35. package/primitives/signals/index.d.ts +7 -209
  36. package/rxjs-interop/index.d.ts +16 -4
  37. package/schematics/bundles/{apply_import_manager-BXQEjo09.js → apply_import_manager-C-ysxahq.js} +3 -3
  38. package/schematics/bundles/{compiler_host-Bk3repE2.js → change_tracker-0Ktek5Xl.js} +3 -121
  39. package/schematics/bundles/checker-DqUKCGda.js +17702 -0
  40. package/schematics/bundles/cleanup-unused-imports.js +6 -5
  41. package/schematics/bundles/{checker-BHb19MHt.js → compiler-CuoiHqkc.js} +578 -18086
  42. package/schematics/bundles/compiler_host-CAfDJO3W.js +129 -0
  43. package/schematics/bundles/control-flow-migration.js +59 -50
  44. package/schematics/bundles/document-core.js +96 -0
  45. package/schematics/bundles/imports-CIX-JgAN.js +1 -1
  46. package/schematics/bundles/{index-BL9kAIe5.js → index-CwFQSYXZ.js} +30 -29
  47. package/schematics/bundles/{index-I8VbxQcO.js → index-WFXCe5Q0.js} +527 -524
  48. package/schematics/bundles/inject-flags.js +6 -5
  49. package/schematics/bundles/inject-migration.js +29 -10
  50. package/schematics/bundles/leading_space-D9nQ8UQC.js +1 -1
  51. package/schematics/bundles/{migrate_ts_type_references-KlOTWeDl.js → migrate_ts_type_references-BNuHufqZ.js} +6 -5
  52. package/schematics/bundles/ng_decorators-DznZ5jMl.js +1 -1
  53. package/schematics/bundles/nodes-B16H9JUd.js +1 -1
  54. package/schematics/bundles/output-migration.js +15 -10
  55. package/schematics/bundles/project_tsconfig_paths-CDVxT6Ov.js +1 -1
  56. package/schematics/bundles/property_name-BBwFuqMe.js +1 -1
  57. package/schematics/bundles/route-lazy-loading.js +7 -5
  58. package/schematics/bundles/{run_in_devkit-C0JPtK2u.js → run_in_devkit-CmHxABFr.js} +4 -3
  59. package/schematics/bundles/self-closing-tags-migration.js +10 -9
  60. package/schematics/bundles/signal-input-migration.js +8 -7
  61. package/schematics/bundles/signal-queries-migration.js +27 -14
  62. package/schematics/bundles/signals.js +8 -7
  63. package/schematics/bundles/standalone-migration.js +11 -9
  64. package/schematics/bundles/symbol-VPWguRxr.js +1 -1
  65. package/schematics/bundles/test-bed-get.js +5 -4
  66. package/schematics/collection.json +0 -6
  67. package/schematics/migrations.json +11 -0
  68. package/signal.d-BeaTIeOE.d.ts +31 -0
  69. package/testing/index.d.ts +13 -9
  70. package/weak_ref.d-ttyj86RV.d.ts +1 -1
  71. package/navigation_types.d-u4EOrrdZ.d.ts +0 -121
  72. package/schematics/ng-generate/control-flow-migration/schema.json +0 -20
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.0-next.3
3
+ * @license Angular v20.0.0-next.5
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -8,8 +8,8 @@
8
8
 
9
9
  var ts = require('typescript');
10
10
  require('os');
11
- var checker = require('./checker-BHb19MHt.js');
12
- var run_in_devkit = require('./run_in_devkit-C0JPtK2u.js');
11
+ var checker = require('./checker-DqUKCGda.js');
12
+ var run_in_devkit = require('./run_in_devkit-CmHxABFr.js');
13
13
 
14
14
  /**
15
15
  * Applies import manager changes, and writes them as replacements the
@@ -1,34 +1,15 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v20.0.0-next.3
3
+ * @license Angular v20.0.0-next.5
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
7
7
  'use strict';
8
8
 
9
9
  var ts = require('typescript');
10
- var checker = require('./checker-BHb19MHt.js');
10
+ require('./compiler-CuoiHqkc.js');
11
+ var checker = require('./checker-DqUKCGda.js');
11
12
  require('os');
12
- var p = require('path');
13
-
14
- function _interopNamespaceDefault(e) {
15
- var n = Object.create(null);
16
- if (e) {
17
- Object.keys(e).forEach(function (k) {
18
- if (k !== 'default') {
19
- var d = Object.getOwnPropertyDescriptor(e, k);
20
- Object.defineProperty(n, k, d.get ? d : {
21
- enumerable: true,
22
- get: function () { return e[k]; }
23
- });
24
- }
25
- });
26
- }
27
- n.default = e;
28
- return Object.freeze(n);
29
- }
30
-
31
- var p__namespace = /*#__PURE__*/_interopNamespaceDefault(p);
32
13
 
33
14
  /** Tracks changes that have to be made for specific files. */
34
15
  class ChangeTracker {
@@ -216,104 +197,5 @@ function normalizePath(path) {
216
197
  return path.replace(/\\/g, '/');
217
198
  }
218
199
 
219
- function parseTsconfigFile(tsconfigPath, basePath) {
220
- const { config } = ts.readConfigFile(tsconfigPath, ts.sys.readFile);
221
- const parseConfigHost = {
222
- useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames,
223
- fileExists: ts.sys.fileExists,
224
- readDirectory: ts.sys.readDirectory,
225
- readFile: ts.sys.readFile,
226
- };
227
- // Throw if incorrect arguments are passed to this function. Passing relative base paths
228
- // results in root directories not being resolved and in later type checking runtime errors.
229
- // More details can be found here: https://github.com/microsoft/TypeScript/issues/37731.
230
- if (!p__namespace.isAbsolute(basePath)) {
231
- throw Error('Unexpected relative base path has been specified.');
232
- }
233
- return ts.parseJsonConfigFileContent(config, parseConfigHost, basePath, {});
234
- }
235
-
236
- /**
237
- * Creates a TypeScript program instance for a TypeScript project within
238
- * the virtual file system tree.
239
- * @param tree Virtual file system tree that contains the source files.
240
- * @param tsconfigPath Virtual file system path that resolves to the TypeScript project.
241
- * @param basePath Base path for the virtual file system tree.
242
- * @param fakeFileRead Optional file reader function. Can be used to overwrite files in
243
- * the TypeScript program, or to add in-memory files (e.g. to add global types).
244
- * @param additionalFiles Additional file paths that should be added to the program.
245
- */
246
- function createMigrationProgram(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles) {
247
- const { rootNames, options, host } = createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead);
248
- return ts.createProgram(rootNames, options, host);
249
- }
250
- /**
251
- * Creates the options necessary to instantiate a TypeScript program.
252
- * @param tree Virtual file system tree that contains the source files.
253
- * @param tsconfigPath Virtual file system path that resolves to the TypeScript project.
254
- * @param basePath Base path for the virtual file system tree.
255
- * @param fakeFileRead Optional file reader function. Can be used to overwrite files in
256
- * the TypeScript program, or to add in-memory files (e.g. to add global types).
257
- * @param additionalFiles Additional file paths that should be added to the program.
258
- * @param optionOverrides Overrides of the parsed compiler options.
259
- */
260
- function createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles, optionOverrides) {
261
- // Resolve the tsconfig path to an absolute path. This is needed as TypeScript otherwise
262
- // is not able to resolve root directories in the given tsconfig. More details can be found
263
- // in the following issue: https://github.com/microsoft/TypeScript/issues/37731.
264
- tsconfigPath = p.resolve(basePath, tsconfigPath);
265
- const parsed = parseTsconfigFile(tsconfigPath, p.dirname(tsconfigPath));
266
- const options = optionOverrides ? { ...parsed.options, ...optionOverrides } : parsed.options;
267
- const host = createMigrationCompilerHost(tree, options, basePath, fakeFileRead);
268
- return { rootNames: parsed.fileNames.concat([]), options, host };
269
- }
270
- function createMigrationCompilerHost(tree, options, basePath, fakeRead) {
271
- const host = ts.createCompilerHost(options, true);
272
- const defaultReadFile = host.readFile;
273
- // We need to overwrite the host "readFile" method, as we want the TypeScript
274
- // program to be based on the file contents in the virtual file tree. Otherwise
275
- // if we run multiple migrations we might have intersecting changes and
276
- // source files.
277
- host.readFile = (fileName) => {
278
- const treeRelativePath = p.relative(basePath, fileName);
279
- let result = fakeRead?.(treeRelativePath);
280
- if (typeof result !== 'string') {
281
- // If the relative path resolved to somewhere outside of the tree, fall back to
282
- // TypeScript's default file reading function since the `tree` will throw an error.
283
- result = treeRelativePath.startsWith('..')
284
- ? defaultReadFile.call(host, fileName)
285
- : tree.read(treeRelativePath)?.toString();
286
- }
287
- // Strip BOM as otherwise TSC methods (Ex: getWidth) will return an offset,
288
- // which breaks the CLI UpdateRecorder.
289
- // See: https://github.com/angular/angular/pull/30719
290
- return typeof result === 'string' ? result.replace(/^\uFEFF/, '') : undefined;
291
- };
292
- return host;
293
- }
294
- /**
295
- * Checks whether a file can be migrate by our automated migrations.
296
- * @param basePath Absolute path to the project.
297
- * @param sourceFile File being checked.
298
- * @param program Program that includes the source file.
299
- */
300
- function canMigrateFile(basePath, sourceFile, program) {
301
- // We shouldn't migrate .d.ts files, files from an external library or type checking files.
302
- if (sourceFile.fileName.endsWith('.ngtypecheck.ts') ||
303
- sourceFile.isDeclarationFile ||
304
- program.isSourceFileFromExternalLibrary(sourceFile)) {
305
- return false;
306
- }
307
- // Our migrations are set up to create a `Program` from the project's tsconfig and to migrate all
308
- // the files within the program. This can include files that are outside of the Angular CLI
309
- // project. We can't migrate files outside of the project, because our file system interactions
310
- // go through the CLI's `Tree` which assumes that all files are within the project. See:
311
- // https://github.com/angular/angular-cli/blob/0b0961c9c233a825b6e4bb59ab7f0790f9b14676/packages/angular_devkit/schematics/src/tree/host-tree.ts#L131
312
- return !p.relative(basePath, sourceFile.fileName).startsWith('..');
313
- }
314
-
315
200
  exports.ChangeTracker = ChangeTracker;
316
- exports.canMigrateFile = canMigrateFile;
317
- exports.createMigrationProgram = createMigrationProgram;
318
- exports.createProgramOptions = createProgramOptions;
319
201
  exports.normalizePath = normalizePath;