@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.
- package/api.d-B0vztftH.d.ts +1 -1
- package/chrome_dev_tools_performance.d-DvzAxqBc.d.ts +1 -1
- package/{discovery.d-DZNIp-Fw.d.ts → discovery.d-CB2iJta5.d.ts} +8 -9
- package/event_dispatcher.d-BReQpZfC.d.ts +1 -1
- package/fesm2022/attribute-BWp59EjE.mjs +1 -1
- package/fesm2022/core.mjs +12 -12
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/{debug_node-Dn-GvQJo.mjs → debug_node-B9JawCEy.mjs} +33 -23
- package/fesm2022/debug_node-B9JawCEy.mjs.map +1 -0
- package/fesm2022/primitives/di.mjs +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +1 -1
- package/fesm2022/primitives/signals.mjs +4 -4
- package/fesm2022/{resource-BPCh38bN.mjs → resource-W6LObBPP.mjs} +8 -6
- package/fesm2022/{resource-BPCh38bN.mjs.map → resource-W6LObBPP.mjs.map} +1 -1
- package/fesm2022/{root_effect_scheduler-0BxwqIgm.mjs → root_effect_scheduler-C4AUixQF.mjs} +19 -13
- package/fesm2022/root_effect_scheduler-C4AUixQF.mjs.map +1 -0
- package/fesm2022/rxjs-interop.mjs +12 -7
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/{signal-ePSl6jXn.mjs → signal-BZ1SD--i.mjs} +8 -9
- package/fesm2022/{signal-ePSl6jXn.mjs.map → signal-BZ1SD--i.mjs.map} +1 -1
- package/fesm2022/testing.mjs +4 -4
- package/fesm2022/{untracked-2ouAFbCz.mjs → untracked-RA6XPQ1Z.mjs} +3 -3
- package/fesm2022/{untracked-2ouAFbCz.mjs.map → untracked-RA6XPQ1Z.mjs.map} +1 -1
- package/fesm2022/weak_ref-BaIq-pgY.mjs +1 -1
- package/graph.d-BcIOep_B.d.ts +1 -1
- package/index.d.ts +19 -14
- package/package.json +2 -2
- package/primitives/di/index.d.ts +1 -1
- package/primitives/event-dispatch/index.d.ts +1 -1
- package/primitives/signals/index.d.ts +3 -3
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/bundles/{apply_import_manager-Bqnvtho4.cjs → apply_import_manager-DT15wSJs.cjs} +3 -3
- package/schematics/bundles/{compiler-Dl11rH6-.cjs → checker-Bu1Wu4f7.cjs} +18350 -336
- package/schematics/bundles/cleanup-unused-imports.cjs +12 -9
- package/schematics/bundles/{change_tracker-DaCWdziV.cjs → compiler_host-C_4Iw5UD.cjs} +121 -3
- package/schematics/bundles/control-flow-migration.cjs +46 -25
- package/schematics/bundles/document-core.cjs +5 -6
- package/schematics/bundles/imports-CIX-JgAN.cjs +1 -1
- package/schematics/bundles/{index-CYxAVSJC.cjs → index-CAM7Xiu7.cjs} +29 -30
- package/schematics/bundles/{index-DPvX-lSh.cjs → index-CCX_cTPD.cjs} +516 -517
- package/schematics/bundles/inject-flags.cjs +5 -6
- package/schematics/bundles/inject-migration.cjs +5 -7
- package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
- package/schematics/bundles/{migrate_ts_type_references-DWUePVh6.cjs → migrate_ts_type_references-DSqmdRpG.cjs} +5 -6
- package/schematics/bundles/ng_decorators-B5HCqr20.cjs +1 -1
- package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
- package/schematics/bundles/output-migration.cjs +7 -8
- package/schematics/bundles/{project_paths-BPBAn_A2.cjs → project_paths-BjQra9mv.cjs} +3 -4
- package/schematics/bundles/project_tsconfig_paths-CDVxT6Ov.cjs +1 -1
- package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
- package/schematics/bundles/route-lazy-loading.cjs +5 -7
- package/schematics/bundles/self-closing-tags-migration.cjs +9 -10
- package/schematics/bundles/signal-input-migration.cjs +7 -8
- package/schematics/bundles/signal-queries-migration.cjs +13 -14
- package/schematics/bundles/signals.cjs +7 -8
- package/schematics/bundles/standalone-migration.cjs +9 -11
- package/schematics/bundles/symbol-VPWguRxr.cjs +1 -1
- package/schematics/bundles/test-bed-get.cjs +4 -5
- package/schematics/collection.json +6 -0
- package/schematics/migrations/control-flow-migration/schema.json +20 -0
- package/{signal.d-D6VJ67xi.d.ts → signal.d-fOdF0h0o.d.ts} +4 -3
- package/testing/index.d.ts +3 -3
- package/weak_ref.d-eGOEP9S1.d.ts +1 -1
- package/fesm2022/debug_node-Dn-GvQJo.mjs.map +0 -1
- package/fesm2022/root_effect_scheduler-0BxwqIgm.mjs.map +0 -1
- package/schematics/bundles/checker-BHgMyU8j.cjs +0 -17996
- package/schematics/bundles/compiler_host-CAfDJO3W.cjs +0 -129
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.
|
|
3
|
+
* @license Angular v20.0.1
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,12 +8,11 @@
|
|
|
8
8
|
|
|
9
9
|
var ts = require('typescript');
|
|
10
10
|
require('os');
|
|
11
|
-
var checker = require('./checker-
|
|
12
|
-
require('./
|
|
13
|
-
require('./index-DPvX-lSh.cjs');
|
|
11
|
+
var checker = require('./checker-Bu1Wu4f7.cjs');
|
|
12
|
+
require('./index-CCX_cTPD.cjs');
|
|
14
13
|
require('path');
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
16
|
-
var apply_import_manager = require('./apply_import_manager-
|
|
14
|
+
var project_paths = require('./project_paths-BjQra9mv.cjs');
|
|
15
|
+
var apply_import_manager = require('./apply_import_manager-DT15wSJs.cjs');
|
|
17
16
|
var imports = require('./imports-CIX-JgAN.cjs');
|
|
18
17
|
require('@angular-devkit/core');
|
|
19
18
|
require('node:path/posix');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.
|
|
3
|
+
* @license Angular v20.0.1
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,15 +8,13 @@
|
|
|
8
8
|
|
|
9
9
|
var schematics = require('@angular-devkit/schematics');
|
|
10
10
|
var p = require('path');
|
|
11
|
-
var
|
|
12
|
-
var compiler_host = require('./compiler_host-CAfDJO3W.cjs');
|
|
11
|
+
var compiler_host = require('./compiler_host-C_4Iw5UD.cjs');
|
|
13
12
|
var ts = require('typescript');
|
|
14
13
|
var ng_decorators = require('./ng_decorators-B5HCqr20.cjs');
|
|
15
14
|
var imports = require('./imports-CIX-JgAN.cjs');
|
|
16
15
|
var nodes = require('./nodes-B16H9JUd.cjs');
|
|
17
16
|
var leading_space = require('./leading_space-D9nQ8UQC.cjs');
|
|
18
|
-
require('./
|
|
19
|
-
require('./checker-BHgMyU8j.cjs');
|
|
17
|
+
require('./checker-Bu1Wu4f7.cjs');
|
|
20
18
|
require('os');
|
|
21
19
|
require('fs');
|
|
22
20
|
require('module');
|
|
@@ -681,7 +679,7 @@ function migrateFile(sourceFile, options) {
|
|
|
681
679
|
return [];
|
|
682
680
|
}
|
|
683
681
|
const printer = ts.createPrinter();
|
|
684
|
-
const tracker = new
|
|
682
|
+
const tracker = new compiler_host.ChangeTracker(printer);
|
|
685
683
|
analysis.classes.forEach(({ node, constructor, superCall }) => {
|
|
686
684
|
const memberIndentation = leading_space.getLeadingLineWhitespaceOfNode(node.members[0]);
|
|
687
685
|
const prependToClass = [];
|
|
@@ -1241,7 +1239,7 @@ function replaceParameterReferencesInInitializer(initializer, constructor, local
|
|
|
1241
1239
|
function migrate(options) {
|
|
1242
1240
|
return async (tree) => {
|
|
1243
1241
|
const basePath = process.cwd();
|
|
1244
|
-
const pathToMigrate =
|
|
1242
|
+
const pathToMigrate = compiler_host.normalizePath(p.join(basePath, options.path));
|
|
1245
1243
|
let allPaths = [];
|
|
1246
1244
|
if (pathToMigrate.trim() !== '') {
|
|
1247
1245
|
allPaths.push(pathToMigrate);
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.
|
|
3
|
+
* @license Angular v20.0.1
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
-
require('./
|
|
9
|
+
var checker = require('./checker-Bu1Wu4f7.cjs');
|
|
10
10
|
var ts = require('typescript');
|
|
11
|
-
var checker = require('./checker-BHgMyU8j.cjs');
|
|
12
11
|
require('os');
|
|
13
12
|
var assert = require('assert');
|
|
14
|
-
var index = require('./index-
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
13
|
+
var index = require('./index-CAM7Xiu7.cjs');
|
|
14
|
+
var project_paths = require('./project_paths-BjQra9mv.cjs');
|
|
16
15
|
var leading_space = require('./leading_space-D9nQ8UQC.cjs');
|
|
17
|
-
require('./index-
|
|
16
|
+
require('./index-CCX_cTPD.cjs');
|
|
18
17
|
require('path');
|
|
19
18
|
|
|
20
19
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.
|
|
3
|
+
* @license Angular v20.0.1
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,13 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
var ts = require('typescript');
|
|
10
10
|
require('os');
|
|
11
|
-
var checker = require('./checker-
|
|
12
|
-
var
|
|
13
|
-
var index$1 = require('./index-DPvX-lSh.cjs');
|
|
11
|
+
var checker = require('./checker-Bu1Wu4f7.cjs');
|
|
12
|
+
var index$1 = require('./index-CCX_cTPD.cjs');
|
|
14
13
|
require('path');
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
16
|
-
var apply_import_manager = require('./apply_import_manager-
|
|
17
|
-
var index = require('./index-
|
|
14
|
+
var project_paths = require('./project_paths-BjQra9mv.cjs');
|
|
15
|
+
var apply_import_manager = require('./apply_import_manager-DT15wSJs.cjs');
|
|
16
|
+
var index = require('./index-CAM7Xiu7.cjs');
|
|
18
17
|
require('@angular-devkit/core');
|
|
19
18
|
require('node:path/posix');
|
|
20
19
|
require('fs');
|
|
@@ -115,7 +114,7 @@ function checkNonTsReferenceAccessesField(ref, fieldName) {
|
|
|
115
114
|
if (ref.from.read !== readFromPath) {
|
|
116
115
|
return null;
|
|
117
116
|
}
|
|
118
|
-
if (!(parentRead instanceof
|
|
117
|
+
if (!(parentRead instanceof checker.PropertyRead) || parentRead.name !== fieldName) {
|
|
119
118
|
return null;
|
|
120
119
|
}
|
|
121
120
|
return parentRead;
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.
|
|
3
|
+
* @license Angular v20.0.1
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
-
var index = require('./index-
|
|
9
|
+
var index = require('./index-CCX_cTPD.cjs');
|
|
10
10
|
var schematics = require('@angular-devkit/schematics');
|
|
11
11
|
var core = require('@angular-devkit/core');
|
|
12
12
|
var posixPath = require('node:path/posix');
|
|
13
13
|
var os = require('os');
|
|
14
14
|
var ts = require('typescript');
|
|
15
|
-
var checker = require('./checker-
|
|
16
|
-
require('./compiler-Dl11rH6-.cjs');
|
|
15
|
+
var checker = require('./checker-Bu1Wu4f7.cjs');
|
|
17
16
|
require('path');
|
|
18
17
|
var project_tsconfig_paths = require('./project_tsconfig_paths-CDVxT6Ov.cjs');
|
|
19
18
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.
|
|
3
|
+
* @license Angular v20.0.1
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -9,13 +9,11 @@
|
|
|
9
9
|
var schematics = require('@angular-devkit/schematics');
|
|
10
10
|
var fs = require('fs');
|
|
11
11
|
var p = require('path');
|
|
12
|
-
var
|
|
12
|
+
var compiler_host = require('./compiler_host-C_4Iw5UD.cjs');
|
|
13
13
|
var project_tsconfig_paths = require('./project_tsconfig_paths-CDVxT6Ov.cjs');
|
|
14
|
-
var compiler_host = require('./compiler_host-CAfDJO3W.cjs');
|
|
15
14
|
var ts = require('typescript');
|
|
16
|
-
var checker = require('./checker-
|
|
15
|
+
var checker = require('./checker-Bu1Wu4f7.cjs');
|
|
17
16
|
var property_name = require('./property_name-BBwFuqMe.cjs');
|
|
18
|
-
require('./compiler-Dl11rH6-.cjs');
|
|
19
17
|
require('os');
|
|
20
18
|
require('@angular-devkit/core');
|
|
21
19
|
require('module');
|
|
@@ -158,7 +156,7 @@ function migrateFileToLazyRoutes(sourceFile, program) {
|
|
|
158
156
|
const typeChecker = program.getTypeChecker();
|
|
159
157
|
const reflector = new checker.TypeScriptReflectionHost(typeChecker);
|
|
160
158
|
const printer = ts.createPrinter();
|
|
161
|
-
const tracker = new
|
|
159
|
+
const tracker = new compiler_host.ChangeTracker(printer);
|
|
162
160
|
const routeArraysToMigrate = findRoutesArrayToMigrate(sourceFile, typeChecker);
|
|
163
161
|
if (routeArraysToMigrate.length === 0) {
|
|
164
162
|
return { pendingChanges: [], skippedRoutes: [], migratedRoutes: [] };
|
|
@@ -349,7 +347,7 @@ function migrate(options) {
|
|
|
349
347
|
const basePath = process.cwd();
|
|
350
348
|
// TS and Schematic use paths in POSIX format even on Windows. This is needed as otherwise
|
|
351
349
|
// string matching such as `sourceFile.fileName.startsWith(pathToMigrate)` might not work.
|
|
352
|
-
const pathToMigrate =
|
|
350
|
+
const pathToMigrate = compiler_host.normalizePath(p.join(basePath, options.path));
|
|
353
351
|
if (!buildPaths.length) {
|
|
354
352
|
throw new schematics.SchematicsException('Could not find any tsconfig file. Cannot run the route lazy loading migration.');
|
|
355
353
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.
|
|
3
|
+
* @license Angular v20.0.1
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,11 +8,10 @@
|
|
|
8
8
|
|
|
9
9
|
var ts = require('typescript');
|
|
10
10
|
require('os');
|
|
11
|
-
var checker = require('./checker-
|
|
12
|
-
|
|
13
|
-
require('./index-DPvX-lSh.cjs');
|
|
11
|
+
var checker = require('./checker-Bu1Wu4f7.cjs');
|
|
12
|
+
require('./index-CCX_cTPD.cjs');
|
|
14
13
|
require('path');
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
14
|
+
var project_paths = require('./project_paths-BjQra9mv.cjs');
|
|
16
15
|
var ng_decorators = require('./ng_decorators-B5HCqr20.cjs');
|
|
17
16
|
var property_name = require('./property_name-BBwFuqMe.cjs');
|
|
18
17
|
require('@angular-devkit/core');
|
|
@@ -203,7 +202,7 @@ function parseTemplate(template) {
|
|
|
203
202
|
// interpolated text as text nodes containing a mixture of interpolation tokens and text tokens,
|
|
204
203
|
// rather than turning them into `BoundText` nodes like the Ivy AST does. This allows us to
|
|
205
204
|
// easily get the text-only ranges without having to reconstruct the original text.
|
|
206
|
-
parsed = new
|
|
205
|
+
parsed = new checker.HtmlParser().parse(template, '', {
|
|
207
206
|
// Allows for ICUs to be parsed.
|
|
208
207
|
tokenizeExpansionForms: true,
|
|
209
208
|
// Explicitly disable blocks so that their characters are treated as plain text.
|
|
@@ -228,7 +227,7 @@ function migrateTemplateToSelfClosingTags(template) {
|
|
|
228
227
|
return { migrated: template, changed: false, replacementCount: 0 };
|
|
229
228
|
}
|
|
230
229
|
const visitor = new AngularElementCollector();
|
|
231
|
-
|
|
230
|
+
checker.visitAll$1(visitor, parsed.tree.rootNodes);
|
|
232
231
|
let newTemplate = template;
|
|
233
232
|
let changedOffset = 0;
|
|
234
233
|
let replacementCount = 0;
|
|
@@ -256,8 +255,8 @@ function replaceWithSelfClosingTag(html, tagName) {
|
|
|
256
255
|
function replaceTemplate(template, replaceValue, start, end, offset) {
|
|
257
256
|
return template.slice(0, start + offset) + replaceValue + template.slice(end + offset);
|
|
258
257
|
}
|
|
259
|
-
const ALL_HTML_TAGS = new
|
|
260
|
-
class AngularElementCollector extends
|
|
258
|
+
const ALL_HTML_TAGS = new checker.DomElementSchemaRegistry().allKnownElementNames();
|
|
259
|
+
class AngularElementCollector extends checker.RecursiveVisitor$1 {
|
|
261
260
|
elements = [];
|
|
262
261
|
constructor() {
|
|
263
262
|
super();
|
|
@@ -284,7 +283,7 @@ class AngularElementCollector extends compiler.RecursiveVisitor$1 {
|
|
|
284
283
|
}
|
|
285
284
|
if (element.children.length === 1) {
|
|
286
285
|
const child = element.children[0];
|
|
287
|
-
return child instanceof
|
|
286
|
+
return child instanceof checker.Text && /^\s*$/.test(child.value);
|
|
288
287
|
}
|
|
289
288
|
return false;
|
|
290
289
|
}
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.
|
|
3
|
+
* @license Angular v20.0.1
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
-
var migrate_ts_type_references = require('./migrate_ts_type_references-
|
|
9
|
+
var migrate_ts_type_references = require('./migrate_ts_type_references-DSqmdRpG.cjs');
|
|
10
10
|
var ts = require('typescript');
|
|
11
11
|
require('os');
|
|
12
|
-
var checker = require('./checker-
|
|
13
|
-
require('./
|
|
14
|
-
var index$1 = require('./index-DPvX-lSh.cjs');
|
|
12
|
+
var checker = require('./checker-Bu1Wu4f7.cjs');
|
|
13
|
+
var index$1 = require('./index-CCX_cTPD.cjs');
|
|
15
14
|
require('path');
|
|
16
|
-
var project_paths = require('./project_paths-
|
|
17
|
-
var index = require('./index-
|
|
15
|
+
var project_paths = require('./project_paths-BjQra9mv.cjs');
|
|
16
|
+
var index = require('./index-CAM7Xiu7.cjs');
|
|
18
17
|
var assert = require('assert');
|
|
19
|
-
var apply_import_manager = require('./apply_import_manager-
|
|
18
|
+
var apply_import_manager = require('./apply_import_manager-DT15wSJs.cjs');
|
|
20
19
|
require('@angular-devkit/core');
|
|
21
20
|
require('node:path/posix');
|
|
22
21
|
require('./leading_space-D9nQ8UQC.cjs');
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.
|
|
3
|
+
* @license Angular v20.0.1
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var checker = require('./checker-Bu1Wu4f7.cjs');
|
|
10
10
|
var ts = require('typescript');
|
|
11
|
-
var checker = require('./checker-BHgMyU8j.cjs');
|
|
12
11
|
require('os');
|
|
13
|
-
var index$1 = require('./index-
|
|
12
|
+
var index$1 = require('./index-CCX_cTPD.cjs');
|
|
14
13
|
require('path');
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
16
|
-
var apply_import_manager = require('./apply_import_manager-
|
|
17
|
-
var migrate_ts_type_references = require('./migrate_ts_type_references-
|
|
14
|
+
var project_paths = require('./project_paths-BjQra9mv.cjs');
|
|
15
|
+
var apply_import_manager = require('./apply_import_manager-DT15wSJs.cjs');
|
|
16
|
+
var migrate_ts_type_references = require('./migrate_ts_type_references-DSqmdRpG.cjs');
|
|
18
17
|
var assert = require('assert');
|
|
19
|
-
var index = require('./index-
|
|
18
|
+
var index = require('./index-CAM7Xiu7.cjs');
|
|
20
19
|
require('@angular-devkit/core');
|
|
21
20
|
require('node:path/posix');
|
|
22
21
|
require('fs');
|
|
@@ -135,7 +134,7 @@ function extractQueryListType(node) {
|
|
|
135
134
|
* --> read stays
|
|
136
135
|
* --> emitDistinctChangesOnly is gone!
|
|
137
136
|
*/
|
|
138
|
-
function computeReplacementsToMigrateQuery(node, metadata, importManager, info, printer, options, checker) {
|
|
137
|
+
function computeReplacementsToMigrateQuery(node, metadata, importManager, info, printer, options, checker$1) {
|
|
139
138
|
const sf = node.getSourceFile();
|
|
140
139
|
let newQueryFn = importManager.addImport({
|
|
141
140
|
requestedFile: sf,
|
|
@@ -160,7 +159,7 @@ function computeReplacementsToMigrateQuery(node, metadata, importManager, info,
|
|
|
160
159
|
}
|
|
161
160
|
}
|
|
162
161
|
if (metadata.queryInfo.read !== null) {
|
|
163
|
-
assert(metadata.queryInfo.read instanceof
|
|
162
|
+
assert(metadata.queryInfo.read instanceof checker.WrappedNodeExpr);
|
|
164
163
|
optionProperties.push(ts.factory.createPropertyAssignment('read', metadata.queryInfo.read.node));
|
|
165
164
|
}
|
|
166
165
|
if (metadata.queryInfo.descendants !== defaultDescendants) {
|
|
@@ -184,7 +183,7 @@ function computeReplacementsToMigrateQuery(node, metadata, importManager, info,
|
|
|
184
183
|
node.initializer === undefined &&
|
|
185
184
|
node.questionToken === undefined &&
|
|
186
185
|
type !== undefined &&
|
|
187
|
-
!checker.isTypeAssignableTo(checker.getUndefinedType(), checker.getTypeFromTypeNode(type))) {
|
|
186
|
+
!checker$1.isTypeAssignableTo(checker$1.getUndefinedType(), checker$1.getTypeFromTypeNode(type))) {
|
|
188
187
|
isRequired = true;
|
|
189
188
|
}
|
|
190
189
|
if (isRequired && metadata.queryInfo.first) {
|
|
@@ -204,7 +203,7 @@ function computeReplacementsToMigrateQuery(node, metadata, importManager, info,
|
|
|
204
203
|
// If the original property type and the read type are matching, we can rely
|
|
205
204
|
// on the TS inference, instead of repeating types, like in `viewChild<Button>(Button)`.
|
|
206
205
|
if (type !== undefined &&
|
|
207
|
-
resolvedReadType instanceof
|
|
206
|
+
resolvedReadType instanceof checker.WrappedNodeExpr &&
|
|
208
207
|
ts.isIdentifier(resolvedReadType.node) &&
|
|
209
208
|
ts.isTypeReferenceNode(type) &&
|
|
210
209
|
ts.isIdentifier(type.typeName) &&
|
|
@@ -533,7 +532,7 @@ function checkNonTsReferenceAccessesField(ref, fieldName) {
|
|
|
533
532
|
if (ref.from.read !== readFromPath) {
|
|
534
533
|
return null;
|
|
535
534
|
}
|
|
536
|
-
if (!(parentRead instanceof
|
|
535
|
+
if (!(parentRead instanceof checker.PropertyRead) || parentRead.name !== fieldName) {
|
|
537
536
|
return null;
|
|
538
537
|
}
|
|
539
538
|
return parentRead;
|
|
@@ -571,7 +570,7 @@ function checkNonTsReferenceCallsField(ref, fieldName) {
|
|
|
571
570
|
return null;
|
|
572
571
|
}
|
|
573
572
|
const potentialCall = ref.from.readAstPath[accessIdx - 1];
|
|
574
|
-
if (potentialCall === undefined || !(potentialCall instanceof
|
|
573
|
+
if (potentialCall === undefined || !(potentialCall instanceof checker.Call)) {
|
|
575
574
|
return null;
|
|
576
575
|
}
|
|
577
576
|
return potentialCall;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.
|
|
3
|
+
* @license Angular v20.0.1
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -10,23 +10,22 @@ var schematics = require('@angular-devkit/schematics');
|
|
|
10
10
|
var signalQueriesMigration = require('./signal-queries-migration.cjs');
|
|
11
11
|
var signalInputMigration = require('./signal-input-migration.cjs');
|
|
12
12
|
var outputMigration = require('./output-migration.cjs');
|
|
13
|
-
require('./
|
|
13
|
+
require('./checker-Bu1Wu4f7.cjs');
|
|
14
14
|
require('typescript');
|
|
15
|
-
require('./checker-BHgMyU8j.cjs');
|
|
16
15
|
require('os');
|
|
17
16
|
require('fs');
|
|
18
17
|
require('module');
|
|
19
18
|
require('path');
|
|
20
19
|
require('url');
|
|
21
|
-
require('./index-
|
|
22
|
-
require('./project_paths-
|
|
20
|
+
require('./index-CCX_cTPD.cjs');
|
|
21
|
+
require('./project_paths-BjQra9mv.cjs');
|
|
23
22
|
require('@angular-devkit/core');
|
|
24
23
|
require('node:path/posix');
|
|
25
24
|
require('./project_tsconfig_paths-CDVxT6Ov.cjs');
|
|
26
|
-
require('./apply_import_manager-
|
|
27
|
-
require('./migrate_ts_type_references-
|
|
25
|
+
require('./apply_import_manager-DT15wSJs.cjs');
|
|
26
|
+
require('./migrate_ts_type_references-DSqmdRpG.cjs');
|
|
28
27
|
require('assert');
|
|
29
|
-
require('./index-
|
|
28
|
+
require('./index-CAM7Xiu7.cjs');
|
|
30
29
|
require('./leading_space-D9nQ8UQC.cjs');
|
|
31
30
|
|
|
32
31
|
function migrate(options) {
|
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.
|
|
3
|
+
* @license Angular v20.0.1
|
|
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 schematics = require('@angular-devkit/schematics');
|
|
10
|
-
var index = require('./index-
|
|
10
|
+
var index = require('./index-CCX_cTPD.cjs');
|
|
11
11
|
var fs = require('fs');
|
|
12
12
|
var p = require('path');
|
|
13
13
|
var ts = require('typescript');
|
|
14
|
-
var
|
|
14
|
+
var compiler_host = require('./compiler_host-C_4Iw5UD.cjs');
|
|
15
15
|
var project_tsconfig_paths = require('./project_tsconfig_paths-CDVxT6Ov.cjs');
|
|
16
|
-
var compiler_host = require('./compiler_host-CAfDJO3W.cjs');
|
|
17
16
|
var ng_decorators = require('./ng_decorators-B5HCqr20.cjs');
|
|
18
17
|
var nodes = require('./nodes-B16H9JUd.cjs');
|
|
19
18
|
var symbol = require('./symbol-VPWguRxr.cjs');
|
|
20
19
|
var imports = require('./imports-CIX-JgAN.cjs');
|
|
21
|
-
require('./
|
|
22
|
-
var checker = require('./checker-BHgMyU8j.cjs');
|
|
20
|
+
var checker = require('./checker-Bu1Wu4f7.cjs');
|
|
23
21
|
require('os');
|
|
24
22
|
require('@angular-devkit/core');
|
|
25
23
|
require('module');
|
|
@@ -236,7 +234,7 @@ function getRelativeImportPath(fromFile, toFile) {
|
|
|
236
234
|
path = './' + path;
|
|
237
235
|
}
|
|
238
236
|
// Using the Node utilities can yield paths with forward slashes on Windows.
|
|
239
|
-
return
|
|
237
|
+
return compiler_host.normalizePath(path);
|
|
240
238
|
}
|
|
241
239
|
/** Function used to remap the generated `imports` for a component to known shorter aliases. */
|
|
242
240
|
function knownInternalAliasRemapper(imports) {
|
|
@@ -333,7 +331,7 @@ function toStandalone(sourceFiles, program, printer, fileImportRemapper, declara
|
|
|
333
331
|
const modulesToMigrate = new Set();
|
|
334
332
|
const testObjectsToMigrate = new Set();
|
|
335
333
|
const declarations = new Set();
|
|
336
|
-
const tracker = new
|
|
334
|
+
const tracker = new compiler_host.ChangeTracker(printer, fileImportRemapper);
|
|
337
335
|
for (const sourceFile of sourceFiles) {
|
|
338
336
|
const modules = findNgModuleClassesToMigrate(sourceFile, typeChecker);
|
|
339
337
|
const testObjects = findTestObjectsToMigrate(sourceFile, typeChecker);
|
|
@@ -912,7 +910,7 @@ function isStandaloneDeclaration(node, declarationsInMigration, templateTypeChec
|
|
|
912
910
|
*/
|
|
913
911
|
function pruneNgModules(program, host, basePath, rootFileNames, sourceFiles, printer, importRemapper, referenceLookupExcludedFiles, declarationImportRemapper) {
|
|
914
912
|
const filesToRemove = new Set();
|
|
915
|
-
const tracker = new
|
|
913
|
+
const tracker = new compiler_host.ChangeTracker(printer, importRemapper);
|
|
916
914
|
const tsProgram = program.getTsProgram();
|
|
917
915
|
const typeChecker = tsProgram.getTypeChecker();
|
|
918
916
|
const templateTypeChecker = program.compiler.getTemplateTypeChecker();
|
|
@@ -1396,7 +1394,7 @@ function isInImportsArray(closestAssignment, closestArray) {
|
|
|
1396
1394
|
* found in the LICENSE file at https://angular.dev/license
|
|
1397
1395
|
*/
|
|
1398
1396
|
function toStandaloneBootstrap(program, host, basePath, rootFileNames, sourceFiles, printer, importRemapper, referenceLookupExcludedFiles, declarationImportRemapper) {
|
|
1399
|
-
const tracker = new
|
|
1397
|
+
const tracker = new compiler_host.ChangeTracker(printer, importRemapper);
|
|
1400
1398
|
const typeChecker = program.getTsProgram().getTypeChecker();
|
|
1401
1399
|
const templateTypeChecker = program.compiler.getTemplateTypeChecker();
|
|
1402
1400
|
const referenceResolver = new ReferenceResolver(program, host, rootFileNames, basePath, referenceLookupExcludedFiles);
|
|
@@ -1989,7 +1987,7 @@ function migrate(options) {
|
|
|
1989
1987
|
const allPaths = [...buildPaths, ...testPaths];
|
|
1990
1988
|
// TS and Schematic use paths in POSIX format even on Windows. This is needed as otherwise
|
|
1991
1989
|
// string matching such as `sourceFile.fileName.startsWith(pathToMigrate)` might not work.
|
|
1992
|
-
const pathToMigrate =
|
|
1990
|
+
const pathToMigrate = compiler_host.normalizePath(p.join(basePath, options.path));
|
|
1993
1991
|
let migratedFiles = 0;
|
|
1994
1992
|
if (!allPaths.length) {
|
|
1995
1993
|
throw new schematics.SchematicsException('Could not find any tsconfig file. Cannot run the standalone migration.');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.
|
|
3
|
+
* @license Angular v20.0.1
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,11 +8,10 @@
|
|
|
8
8
|
|
|
9
9
|
var ts = require('typescript');
|
|
10
10
|
require('os');
|
|
11
|
-
require('./checker-
|
|
12
|
-
require('./
|
|
13
|
-
require('./index-DPvX-lSh.cjs');
|
|
11
|
+
require('./checker-Bu1Wu4f7.cjs');
|
|
12
|
+
require('./index-CCX_cTPD.cjs');
|
|
14
13
|
require('path');
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
14
|
+
var project_paths = require('./project_paths-BjQra9mv.cjs');
|
|
16
15
|
var imports = require('./imports-CIX-JgAN.cjs');
|
|
17
16
|
var symbol = require('./symbol-VPWguRxr.cjs');
|
|
18
17
|
require('@angular-devkit/core');
|
|
@@ -51,6 +51,12 @@
|
|
|
51
51
|
"factory": "./bundles/self-closing-tags-migration.cjs#migrate",
|
|
52
52
|
"schema": "./ng-generate/self-closing-tags-migration/schema.json",
|
|
53
53
|
"aliases": ["self-closing-tag"]
|
|
54
|
+
},
|
|
55
|
+
"control-flow-migration": {
|
|
56
|
+
"description": "Converts the entire application to block control flow syntax",
|
|
57
|
+
"factory": "./bundles/control-flow-migration.cjs#migrate",
|
|
58
|
+
"schema": "./migrations/control-flow-migration/schema.json",
|
|
59
|
+
"aliases": ["control-flow"]
|
|
54
60
|
}
|
|
55
61
|
}
|
|
56
62
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
+
"$id": "AngularControlFlowMigration",
|
|
4
|
+
"title": "Angular Control Flow Migration Schema",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"path": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "Path relative to the project root which should be migrated",
|
|
10
|
+
"x-prompt": "Which path in your project should be migrated?",
|
|
11
|
+
"default": "./"
|
|
12
|
+
},
|
|
13
|
+
"format": {
|
|
14
|
+
"type": "boolean",
|
|
15
|
+
"description": "Enables reformatting of your templates",
|
|
16
|
+
"x-prompt": "Should the migration reformat your templates?",
|
|
17
|
+
"default": "true"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v20.0.
|
|
2
|
+
* @license Angular v20.0.1
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -19,11 +19,12 @@ interface SignalGetter<T> extends SignalBaseGetter<T> {
|
|
|
19
19
|
readonly [SIGNAL]: SignalNode<T>;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Creates a `Signal` getter, setter, and updater function.
|
|
23
23
|
*/
|
|
24
|
-
declare function createSignal<T>(initialValue: T, equal?: ValueEqualityFn<T>): SignalGetter<T
|
|
24
|
+
declare function createSignal<T>(initialValue: T, equal?: ValueEqualityFn<T>): [SignalGetter<T>, SignalSetter<T>, SignalUpdater<T>];
|
|
25
25
|
/**
|
|
26
26
|
* Creates a `Signal` getter, setter, and updater function.
|
|
27
|
+
* @deprecated use createSignal
|
|
27
28
|
*/
|
|
28
29
|
declare function createSignalTuple<T>(initialValue: T, equal?: ValueEqualityFn<T>): [SignalGetter<T>, SignalSetter<T>, SignalUpdater<T>];
|
|
29
30
|
declare function setPostSignalSetFn(fn: ReactiveHookFn | null): ReactiveHookFn | null;
|
package/testing/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v20.0.
|
|
2
|
+
* @license Angular v20.0.1
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import '../event_dispatcher.d-BReQpZfC.js';
|
|
8
8
|
import { InjectionToken, Type, ProviderToken, InjectOptions } from '../chrome_dev_tools_performance.d-DvzAxqBc.js';
|
|
9
|
-
import { DeferBlockDetails, DeferBlockState, ComponentRef, DebugElement, ElementRef, ChangeDetectorRef, NgZone, SchemaMetadata, DeferBlockBehavior, PlatformRef, NgModule, Component, Directive, Pipe, Navigation, NavigationHistoryEntry, NavigationNavigateOptions, NavigationResult, NavigationOptions, NavigateEvent, NavigationCurrentEntryChangeEvent, NavigationTransition, NavigationUpdateCurrentEntryOptions, NavigationReloadOptions } from '../discovery.d-
|
|
9
|
+
import { DeferBlockDetails, DeferBlockState, ComponentRef, DebugElement, ElementRef, ChangeDetectorRef, NgZone, SchemaMetadata, DeferBlockBehavior, PlatformRef, NgModule, Component, Directive, Pipe, Navigation, NavigationHistoryEntry, NavigationNavigateOptions, NavigationResult, NavigationOptions, NavigateEvent, NavigationCurrentEntryChangeEvent, NavigationTransition, NavigationUpdateCurrentEntryOptions, NavigationReloadOptions } from '../discovery.d-CB2iJta5.js';
|
|
10
10
|
import * as i0 from '@angular/core';
|
|
11
11
|
import '../graph.d-BcIOep_B.js';
|
|
12
12
|
import 'rxjs';
|
|
13
|
-
import '../signal.d-
|
|
13
|
+
import '../signal.d-fOdF0h0o.js';
|
|
14
14
|
import '@angular/core/primitives/di';
|
|
15
15
|
|
|
16
16
|
/**
|