@angular/core 20.0.0 → 20.0.1

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 (67) 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-DZNIp-Fw.d.ts → discovery.d-CB2iJta5.d.ts} +8 -9
  4. package/event_dispatcher.d-BReQpZfC.d.ts +1 -1
  5. package/fesm2022/attribute-BWp59EjE.mjs +1 -1
  6. package/fesm2022/core.mjs +12 -12
  7. package/fesm2022/core.mjs.map +1 -1
  8. package/fesm2022/{debug_node-Dn-GvQJo.mjs → debug_node-B9JawCEy.mjs} +33 -23
  9. package/fesm2022/debug_node-B9JawCEy.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 +4 -4
  13. package/fesm2022/{resource-BPCh38bN.mjs → resource-W6LObBPP.mjs} +8 -6
  14. package/fesm2022/{resource-BPCh38bN.mjs.map → resource-W6LObBPP.mjs.map} +1 -1
  15. package/fesm2022/{root_effect_scheduler-0BxwqIgm.mjs → root_effect_scheduler-C4AUixQF.mjs} +19 -13
  16. package/fesm2022/root_effect_scheduler-C4AUixQF.mjs.map +1 -0
  17. package/fesm2022/rxjs-interop.mjs +12 -7
  18. package/fesm2022/rxjs-interop.mjs.map +1 -1
  19. package/fesm2022/{signal-ePSl6jXn.mjs → signal-BZ1SD--i.mjs} +8 -9
  20. package/fesm2022/{signal-ePSl6jXn.mjs.map → signal-BZ1SD--i.mjs.map} +1 -1
  21. package/fesm2022/testing.mjs +4 -4
  22. package/fesm2022/{untracked-2ouAFbCz.mjs → untracked-RA6XPQ1Z.mjs} +3 -3
  23. package/fesm2022/{untracked-2ouAFbCz.mjs.map → untracked-RA6XPQ1Z.mjs.map} +1 -1
  24. package/fesm2022/weak_ref-BaIq-pgY.mjs +1 -1
  25. package/graph.d-BcIOep_B.d.ts +1 -1
  26. package/index.d.ts +19 -14
  27. package/package.json +2 -2
  28. package/primitives/di/index.d.ts +1 -1
  29. package/primitives/event-dispatch/index.d.ts +1 -1
  30. package/primitives/signals/index.d.ts +3 -3
  31. package/rxjs-interop/index.d.ts +1 -1
  32. package/schematics/bundles/{apply_import_manager-Bqnvtho4.cjs → apply_import_manager-DT15wSJs.cjs} +3 -3
  33. package/schematics/bundles/{compiler-Dl11rH6-.cjs → checker-Bu1Wu4f7.cjs} +18350 -336
  34. package/schematics/bundles/cleanup-unused-imports.cjs +12 -9
  35. package/schematics/bundles/{change_tracker-DaCWdziV.cjs → compiler_host-C_4Iw5UD.cjs} +121 -3
  36. package/schematics/bundles/control-flow-migration.cjs +46 -25
  37. package/schematics/bundles/document-core.cjs +5 -6
  38. package/schematics/bundles/imports-CIX-JgAN.cjs +1 -1
  39. package/schematics/bundles/{index-CYxAVSJC.cjs → index-CAM7Xiu7.cjs} +29 -30
  40. package/schematics/bundles/{index-DPvX-lSh.cjs → index-CCX_cTPD.cjs} +516 -517
  41. package/schematics/bundles/inject-flags.cjs +5 -6
  42. package/schematics/bundles/inject-migration.cjs +5 -7
  43. package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
  44. package/schematics/bundles/{migrate_ts_type_references-DWUePVh6.cjs → migrate_ts_type_references-DSqmdRpG.cjs} +5 -6
  45. package/schematics/bundles/ng_decorators-B5HCqr20.cjs +1 -1
  46. package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
  47. package/schematics/bundles/output-migration.cjs +7 -8
  48. package/schematics/bundles/{project_paths-BPBAn_A2.cjs → project_paths-BjQra9mv.cjs} +3 -4
  49. package/schematics/bundles/project_tsconfig_paths-CDVxT6Ov.cjs +1 -1
  50. package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
  51. package/schematics/bundles/route-lazy-loading.cjs +5 -7
  52. package/schematics/bundles/self-closing-tags-migration.cjs +9 -10
  53. package/schematics/bundles/signal-input-migration.cjs +7 -8
  54. package/schematics/bundles/signal-queries-migration.cjs +13 -14
  55. package/schematics/bundles/signals.cjs +7 -8
  56. package/schematics/bundles/standalone-migration.cjs +9 -11
  57. package/schematics/bundles/symbol-VPWguRxr.cjs +1 -1
  58. package/schematics/bundles/test-bed-get.cjs +4 -5
  59. package/schematics/collection.json +6 -0
  60. package/schematics/migrations/control-flow-migration/schema.json +20 -0
  61. package/{signal.d-D6VJ67xi.d.ts → signal.d-fOdF0h0o.d.ts} +4 -3
  62. package/testing/index.d.ts +3 -3
  63. package/weak_ref.d-eGOEP9S1.d.ts +1 -1
  64. package/fesm2022/debug_node-Dn-GvQJo.mjs.map +0 -1
  65. package/fesm2022/root_effect_scheduler-0BxwqIgm.mjs.map +0 -1
  66. package/schematics/bundles/checker-BHgMyU8j.cjs +0 -17996
  67. package/schematics/bundles/compiler_host-CAfDJO3W.cjs +0 -129
@@ -1,129 +0,0 @@
1
- 'use strict';
2
- /**
3
- * @license Angular v20.0.0
4
- * (c) 2010-2025 Google LLC. https://angular.io/
5
- * License: MIT
6
- */
7
- 'use strict';
8
-
9
- var p = require('path');
10
- var ts = require('typescript');
11
-
12
- function _interopNamespaceDefault(e) {
13
- var n = Object.create(null);
14
- if (e) {
15
- Object.keys(e).forEach(function (k) {
16
- if (k !== 'default') {
17
- var d = Object.getOwnPropertyDescriptor(e, k);
18
- Object.defineProperty(n, k, d.get ? d : {
19
- enumerable: true,
20
- get: function () { return e[k]; }
21
- });
22
- }
23
- });
24
- }
25
- n.default = e;
26
- return Object.freeze(n);
27
- }
28
-
29
- var p__namespace = /*#__PURE__*/_interopNamespaceDefault(p);
30
-
31
- function parseTsconfigFile(tsconfigPath, basePath) {
32
- const { config } = ts.readConfigFile(tsconfigPath, ts.sys.readFile);
33
- const parseConfigHost = {
34
- useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames,
35
- fileExists: ts.sys.fileExists,
36
- readDirectory: ts.sys.readDirectory,
37
- readFile: ts.sys.readFile,
38
- };
39
- // Throw if incorrect arguments are passed to this function. Passing relative base paths
40
- // results in root directories not being resolved and in later type checking runtime errors.
41
- // More details can be found here: https://github.com/microsoft/TypeScript/issues/37731.
42
- if (!p__namespace.isAbsolute(basePath)) {
43
- throw Error('Unexpected relative base path has been specified.');
44
- }
45
- return ts.parseJsonConfigFileContent(config, parseConfigHost, basePath, {});
46
- }
47
-
48
- /**
49
- * Creates a TypeScript program instance for a TypeScript project within
50
- * the virtual file system tree.
51
- * @param tree Virtual file system tree that contains the source files.
52
- * @param tsconfigPath Virtual file system path that resolves to the TypeScript project.
53
- * @param basePath Base path for the virtual file system tree.
54
- * @param fakeFileRead Optional file reader function. Can be used to overwrite files in
55
- * the TypeScript program, or to add in-memory files (e.g. to add global types).
56
- * @param additionalFiles Additional file paths that should be added to the program.
57
- */
58
- function createMigrationProgram(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles) {
59
- const { rootNames, options, host } = createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead);
60
- return ts.createProgram(rootNames, options, host);
61
- }
62
- /**
63
- * Creates the options necessary to instantiate a TypeScript program.
64
- * @param tree Virtual file system tree that contains the source files.
65
- * @param tsconfigPath Virtual file system path that resolves to the TypeScript project.
66
- * @param basePath Base path for the virtual file system tree.
67
- * @param fakeFileRead Optional file reader function. Can be used to overwrite files in
68
- * the TypeScript program, or to add in-memory files (e.g. to add global types).
69
- * @param additionalFiles Additional file paths that should be added to the program.
70
- * @param optionOverrides Overrides of the parsed compiler options.
71
- */
72
- function createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles, optionOverrides) {
73
- // Resolve the tsconfig path to an absolute path. This is needed as TypeScript otherwise
74
- // is not able to resolve root directories in the given tsconfig. More details can be found
75
- // in the following issue: https://github.com/microsoft/TypeScript/issues/37731.
76
- tsconfigPath = p.resolve(basePath, tsconfigPath);
77
- const parsed = parseTsconfigFile(tsconfigPath, p.dirname(tsconfigPath));
78
- const options = optionOverrides ? { ...parsed.options, ...optionOverrides } : parsed.options;
79
- const host = createMigrationCompilerHost(tree, options, basePath, fakeFileRead);
80
- return { rootNames: parsed.fileNames.concat([]), options, host };
81
- }
82
- function createMigrationCompilerHost(tree, options, basePath, fakeRead) {
83
- const host = ts.createCompilerHost(options, true);
84
- const defaultReadFile = host.readFile;
85
- // We need to overwrite the host "readFile" method, as we want the TypeScript
86
- // program to be based on the file contents in the virtual file tree. Otherwise
87
- // if we run multiple migrations we might have intersecting changes and
88
- // source files.
89
- host.readFile = (fileName) => {
90
- const treeRelativePath = p.relative(basePath, fileName);
91
- let result = fakeRead?.(treeRelativePath);
92
- if (typeof result !== 'string') {
93
- // If the relative path resolved to somewhere outside of the tree, fall back to
94
- // TypeScript's default file reading function since the `tree` will throw an error.
95
- result = treeRelativePath.startsWith('..')
96
- ? defaultReadFile.call(host, fileName)
97
- : tree.read(treeRelativePath)?.toString();
98
- }
99
- // Strip BOM as otherwise TSC methods (Ex: getWidth) will return an offset,
100
- // which breaks the CLI UpdateRecorder.
101
- // See: https://github.com/angular/angular/pull/30719
102
- return typeof result === 'string' ? result.replace(/^\uFEFF/, '') : undefined;
103
- };
104
- return host;
105
- }
106
- /**
107
- * Checks whether a file can be migrate by our automated migrations.
108
- * @param basePath Absolute path to the project.
109
- * @param sourceFile File being checked.
110
- * @param program Program that includes the source file.
111
- */
112
- function canMigrateFile(basePath, sourceFile, program) {
113
- // We shouldn't migrate .d.ts files, files from an external library or type checking files.
114
- if (sourceFile.fileName.endsWith('.ngtypecheck.ts') ||
115
- sourceFile.isDeclarationFile ||
116
- program.isSourceFileFromExternalLibrary(sourceFile)) {
117
- return false;
118
- }
119
- // Our migrations are set up to create a `Program` from the project's tsconfig and to migrate all
120
- // the files within the program. This can include files that are outside of the Angular CLI
121
- // project. We can't migrate files outside of the project, because our file system interactions
122
- // go through the CLI's `Tree` which assumes that all files are within the project. See:
123
- // https://github.com/angular/angular-cli/blob/0b0961c9c233a825b6e4bb59ab7f0790f9b14676/packages/angular_devkit/schematics/src/tree/host-tree.ts#L131
124
- return !p.relative(basePath, sourceFile.fileName).startsWith('..');
125
- }
126
-
127
- exports.canMigrateFile = canMigrateFile;
128
- exports.createMigrationProgram = createMigrationProgram;
129
- exports.createProgramOptions = createProgramOptions;