@angular/core 20.0.0 → 20.1.0-next.0
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 → api.d-Dwpmmn5j.d.ts} +2 -2
- package/{chrome_dev_tools_performance.d-DvzAxqBc.d.ts → chrome_dev_tools_performance.d-Dk_7kdX9.d.ts} +5 -1
- package/{discovery.d-DZNIp-Fw.d.ts → discovery.d-BAZTj_rM.d.ts} +9 -10
- package/event_dispatcher.d-BReQpZfC.d.ts +1 -1
- package/fesm2022/attribute-BWp59EjE.mjs +1 -1
- package/fesm2022/attribute-BWp59EjE.mjs.map +1 -1
- package/fesm2022/core.mjs +15 -14
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/{debug_node-Dn-GvQJo.mjs → debug_node-CjNGi9N3.mjs} +1510 -1474
- package/fesm2022/debug_node-CjNGi9N3.mjs.map +1 -0
- package/fesm2022/primitives/di.mjs +1 -1
- package/fesm2022/primitives/di.mjs.map +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +93 -2
- package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +4 -4
- package/fesm2022/primitives/signals.mjs.map +1 -1
- package/fesm2022/{resource-BPCh38bN.mjs → resource-1o9xbJml.mjs} +8 -6
- package/fesm2022/resource-1o9xbJml.mjs.map +1 -0
- package/fesm2022/{root_effect_scheduler-0BxwqIgm.mjs → root_effect_scheduler-Ds-Wmkv_.mjs} +33 -20
- package/fesm2022/root_effect_scheduler-Ds-Wmkv_.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 +23 -33
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/{untracked-2ouAFbCz.mjs → untracked-C72kieeB.mjs} +3 -3
- package/fesm2022/{untracked-2ouAFbCz.mjs.map → untracked-C72kieeB.mjs.map} +1 -1
- package/fesm2022/weak_ref-BaIq-pgY.mjs +1 -1
- package/fesm2022/weak_ref-BaIq-pgY.mjs.map +1 -1
- package/graph.d-BcIOep_B.d.ts +1 -1
- package/index.d.ts +26 -18
- 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 +3 -3
- package/schematics/bundles/{apply_import_manager-Bqnvtho4.cjs → apply_import_manager-CSEu0fby.cjs} +3 -3
- package/schematics/bundles/{compiler-Dl11rH6-.cjs → checker-CuQvkMhs.cjs} +18876 -710
- package/schematics/bundles/cleanup-unused-imports.cjs +12 -9
- package/schematics/bundles/{change_tracker-DaCWdziV.cjs → compiler_host-Biezhzch.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-DPvX-lSh.cjs → index-C5wL4qaq.cjs} +1486 -1071
- package/schematics/bundles/{index-CYxAVSJC.cjs → index-vkqofxID.cjs} +37 -37
- 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-BYgEQg0O.cjs} +26 -78
- 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-KPCsvRfl.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 +12 -25
- package/schematics/bundles/signal-input-migration.cjs +28 -13
- 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 +4 -4
- package/weak_ref.d-eGOEP9S1.d.ts +1 -1
- package/fesm2022/debug_node-Dn-GvQJo.mjs.map +0 -1
- package/fesm2022/resource-BPCh38bN.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.0
|
|
3
|
+
* @license Angular v20.1.0-next.0
|
|
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
|
-
var
|
|
13
|
-
var index = require('./index-DPvX-lSh.cjs');
|
|
11
|
+
var checker = require('./checker-CuQvkMhs.cjs');
|
|
12
|
+
var index = require('./index-C5wL4qaq.cjs');
|
|
14
13
|
require('path');
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
14
|
+
var project_paths = require('./project_paths-KPCsvRfl.cjs');
|
|
16
15
|
|
|
17
16
|
function getMemberName(member) {
|
|
18
17
|
if (member.name === undefined) {
|
|
@@ -189,7 +188,7 @@ function lookupPropertyAccess(checker, type, path, options = {}) {
|
|
|
189
188
|
* This resolution is important to be able to migrate references to inputs
|
|
190
189
|
* that will be migrated to signal inputs.
|
|
191
190
|
*/
|
|
192
|
-
class TemplateReferenceVisitor extends
|
|
191
|
+
class TemplateReferenceVisitor extends checker.RecursiveVisitor {
|
|
193
192
|
result = [];
|
|
194
193
|
/**
|
|
195
194
|
* Whether we are currently descending into HTML AST nodes
|
|
@@ -236,21 +235,21 @@ class TemplateReferenceVisitor extends compiler.RecursiveVisitor {
|
|
|
236
235
|
// of signal calls in templates.
|
|
237
236
|
// TODO: Remove with: https://github.com/angular/angular/pull/55456.
|
|
238
237
|
this.templateAttributeReferencedFields = [];
|
|
239
|
-
|
|
240
|
-
|
|
238
|
+
checker.visitAll(this, template.attributes);
|
|
239
|
+
checker.visitAll(this, template.templateAttrs);
|
|
241
240
|
// If we are dealing with a microsyntax template, do not check
|
|
242
241
|
// inputs and outputs as those are already passed to the children.
|
|
243
242
|
// Template attributes may contain relevant expressions though.
|
|
244
243
|
if (template.tagName === 'ng-template') {
|
|
245
|
-
|
|
246
|
-
|
|
244
|
+
checker.visitAll(this, template.inputs);
|
|
245
|
+
checker.visitAll(this, template.outputs);
|
|
247
246
|
}
|
|
248
247
|
const referencedInputs = this.templateAttributeReferencedFields;
|
|
249
248
|
this.templateAttributeReferencedFields = null;
|
|
250
249
|
this.descendAndCheckForNarrowedSimilarReferences(referencedInputs, () => {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
250
|
+
checker.visitAll(this, template.children);
|
|
251
|
+
checker.visitAll(this, template.references);
|
|
252
|
+
checker.visitAll(this, template.variables);
|
|
254
253
|
});
|
|
255
254
|
}
|
|
256
255
|
visitIfBlockBranch(block) {
|
|
@@ -317,7 +316,7 @@ class TemplateReferenceVisitor extends compiler.RecursiveVisitor {
|
|
|
317
316
|
* This resolution is important to be able to migrate references to inputs
|
|
318
317
|
* that will be migrated to signal inputs.
|
|
319
318
|
*/
|
|
320
|
-
class TemplateExpressionReferenceVisitor extends
|
|
319
|
+
class TemplateExpressionReferenceVisitor extends checker.RecursiveAstVisitor {
|
|
321
320
|
typeChecker;
|
|
322
321
|
templateTypeChecker;
|
|
323
322
|
componentClass;
|
|
@@ -356,16 +355,20 @@ class TemplateExpressionReferenceVisitor extends compiler.RecursiveAstVisitor {
|
|
|
356
355
|
}
|
|
357
356
|
}
|
|
358
357
|
visitPropertyRead(ast, context) {
|
|
359
|
-
this._inspectPropertyAccess(ast, context);
|
|
358
|
+
this._inspectPropertyAccess(ast, false, context);
|
|
360
359
|
super.visitPropertyRead(ast, context);
|
|
361
360
|
}
|
|
362
361
|
visitSafePropertyRead(ast, context) {
|
|
363
|
-
this._inspectPropertyAccess(ast, context);
|
|
362
|
+
this._inspectPropertyAccess(ast, false, context);
|
|
364
363
|
super.visitPropertyRead(ast, context);
|
|
365
364
|
}
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
365
|
+
visitBinary(ast, context) {
|
|
366
|
+
if (ast.operation === '=' && ast.left instanceof checker.PropertyRead) {
|
|
367
|
+
this._inspectPropertyAccess(ast.left, true, [...context, ast, ast.left]);
|
|
368
|
+
}
|
|
369
|
+
else {
|
|
370
|
+
super.visitBinary(ast, context);
|
|
371
|
+
}
|
|
369
372
|
}
|
|
370
373
|
visitConditional(ast, context) {
|
|
371
374
|
this.visit(ast.condition, context);
|
|
@@ -378,12 +381,12 @@ class TemplateExpressionReferenceVisitor extends compiler.RecursiveAstVisitor {
|
|
|
378
381
|
* Inspects the property access and attempts to resolve whether they access
|
|
379
382
|
* a known field. If so, the result is captured.
|
|
380
383
|
*/
|
|
381
|
-
_inspectPropertyAccess(ast, astPath) {
|
|
384
|
+
_inspectPropertyAccess(ast, isAssignment, astPath) {
|
|
382
385
|
if (this.fieldNamesToConsiderForReferenceLookup !== null &&
|
|
383
386
|
!this.fieldNamesToConsiderForReferenceLookup.has(ast.name)) {
|
|
384
387
|
return;
|
|
385
388
|
}
|
|
386
|
-
const isWrite = !!(
|
|
389
|
+
const isWrite = !!(isAssignment ||
|
|
387
390
|
(this.activeTmplAstNode && isTwoWayBindingNode(this.activeTmplAstNode)));
|
|
388
391
|
this._checkAccessViaTemplateTypeCheckBlock(ast, isWrite, astPath) ||
|
|
389
392
|
this._checkAccessViaOwningComponentClassType(ast, isWrite, astPath);
|
|
@@ -460,28 +463,25 @@ class TemplateExpressionReferenceVisitor extends compiler.RecursiveAstVisitor {
|
|
|
460
463
|
_isPartOfNarrowingTernary(read) {
|
|
461
464
|
// Note: We do not safe check that the reads are fully matching 1:1. This is acceptable
|
|
462
465
|
// as worst case we just skip an input from being migrated. This is very unlikely too.
|
|
463
|
-
return this.insideConditionalExpressionsWithReads.some((r) => (r instanceof
|
|
464
|
-
r instanceof compiler.PropertyWrite ||
|
|
465
|
-
r instanceof compiler.SafePropertyRead) &&
|
|
466
|
-
r.name === read.name);
|
|
466
|
+
return this.insideConditionalExpressionsWithReads.some((r) => (r instanceof checker.PropertyRead || r instanceof checker.SafePropertyRead) && r.name === read.name);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
/**
|
|
470
470
|
* Emulates an access to a given field using the TypeScript `ts.Type`
|
|
471
471
|
* of the given class. The resolved symbol of the access is returned.
|
|
472
472
|
*/
|
|
473
|
-
function traverseReceiverAndLookupSymbol(readOrWrite, componentClass, checker) {
|
|
473
|
+
function traverseReceiverAndLookupSymbol(readOrWrite, componentClass, checker$1) {
|
|
474
474
|
const path = [readOrWrite.name];
|
|
475
475
|
let node = readOrWrite;
|
|
476
|
-
while (node.receiver instanceof
|
|
476
|
+
while (node.receiver instanceof checker.PropertyRead) {
|
|
477
477
|
node = node.receiver;
|
|
478
478
|
path.unshift(node.name);
|
|
479
479
|
}
|
|
480
|
-
if (!(node.receiver instanceof
|
|
480
|
+
if (!(node.receiver instanceof checker.ImplicitReceiver || node.receiver instanceof checker.ThisReceiver)) {
|
|
481
481
|
return null;
|
|
482
482
|
}
|
|
483
|
-
const classType = checker.getTypeAtLocation(componentClass.name);
|
|
484
|
-
return (lookupPropertyAccess(checker, classType, path, {
|
|
483
|
+
const classType = checker$1.getTypeAtLocation(componentClass.name);
|
|
484
|
+
return (lookupPropertyAccess(checker$1, classType, path, {
|
|
485
485
|
// Necessary to avoid breaking the resolution if there is
|
|
486
486
|
// some narrowing involved. E.g. `myClass ? myClass.input`.
|
|
487
487
|
ignoreNullability: true,
|
|
@@ -489,8 +489,8 @@ function traverseReceiverAndLookupSymbol(readOrWrite, componentClass, checker) {
|
|
|
489
489
|
}
|
|
490
490
|
/** Whether the given node refers to a two-way binding AST node. */
|
|
491
491
|
function isTwoWayBindingNode(node) {
|
|
492
|
-
return ((node instanceof
|
|
493
|
-
(node instanceof
|
|
492
|
+
return ((node instanceof checker.BoundAttribute && node.type === checker.BindingType.TwoWay) ||
|
|
493
|
+
(node instanceof checker.BoundEvent && node.type === checker.ParsedEventType.TwoWay));
|
|
494
494
|
}
|
|
495
495
|
|
|
496
496
|
/** Possible types of references to known fields detected. */
|
|
@@ -582,11 +582,11 @@ function identifyHostBindingReferences(node, programInfo, checker$1, reflector,
|
|
|
582
582
|
if (!isPropertyBinding && !isEventBinding) {
|
|
583
583
|
continue;
|
|
584
584
|
}
|
|
585
|
-
const parser =
|
|
586
|
-
const sourceSpan = new
|
|
585
|
+
const parser = checker.makeBindingParser();
|
|
586
|
+
const sourceSpan = new checker.ParseSourceSpan(
|
|
587
587
|
// Fake source span to keep parsing offsets zero-based.
|
|
588
588
|
// We then later combine these with the expression TS node offsets.
|
|
589
|
-
new
|
|
589
|
+
new checker.ParseLocation({ content: '', url: '' }, 0, 0, 0), new checker.ParseLocation({ content: '', url: '' }, 0, 0, 0));
|
|
590
590
|
const name = rawName.substring(1, rawName.length - 1);
|
|
591
591
|
let parsed = undefined;
|
|
592
592
|
if (isEventBinding) {
|
|
@@ -650,7 +650,7 @@ function attemptExtractTemplateDefinition(node, checker$1, reflector, resourceLo
|
|
|
650
650
|
return {
|
|
651
651
|
isInline: true,
|
|
652
652
|
expression: templateProp,
|
|
653
|
-
interpolationConfig:
|
|
653
|
+
interpolationConfig: checker.DEFAULT_INTERPOLATION_CONFIG,
|
|
654
654
|
preserveWhitespaces: false,
|
|
655
655
|
resolvedTemplateUrl: containingFile,
|
|
656
656
|
templateUrl: containingFile,
|
|
@@ -664,7 +664,7 @@ function attemptExtractTemplateDefinition(node, checker$1, reflector, resourceLo
|
|
|
664
664
|
if (typeof templateUrl === 'string') {
|
|
665
665
|
return {
|
|
666
666
|
isInline: false,
|
|
667
|
-
interpolationConfig:
|
|
667
|
+
interpolationConfig: checker.DEFAULT_INTERPOLATION_CONFIG,
|
|
668
668
|
preserveWhitespaces: false,
|
|
669
669
|
templateUrlExpression: templateUrlProp,
|
|
670
670
|
templateUrl,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.0
|
|
3
|
+
* @license Angular v20.1.0-next.0
|
|
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-CuQvkMhs.cjs');
|
|
12
|
+
require('./index-C5wL4qaq.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-KPCsvRfl.cjs');
|
|
15
|
+
var apply_import_manager = require('./apply_import_manager-CSEu0fby.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.0
|
|
3
|
+
* @license Angular v20.1.0-next.0
|
|
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-Biezhzch.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-CuQvkMhs.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.0
|
|
3
|
+
* @license Angular v20.1.0-next.0
|
|
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-CuQvkMhs.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-vkqofxID.cjs');
|
|
14
|
+
var project_paths = require('./project_paths-KPCsvRfl.cjs');
|
|
16
15
|
var leading_space = require('./leading_space-D9nQ8UQC.cjs');
|
|
17
|
-
require('./index-
|
|
16
|
+
require('./index-C5wL4qaq.cjs');
|
|
18
17
|
require('path');
|
|
19
18
|
|
|
20
19
|
/**
|
|
@@ -141,24 +140,25 @@ var BinaryOperator;
|
|
|
141
140
|
(function (BinaryOperator) {
|
|
142
141
|
BinaryOperator[BinaryOperator["Equals"] = 0] = "Equals";
|
|
143
142
|
BinaryOperator[BinaryOperator["NotEquals"] = 1] = "NotEquals";
|
|
144
|
-
BinaryOperator[BinaryOperator["
|
|
145
|
-
BinaryOperator[BinaryOperator["
|
|
146
|
-
BinaryOperator[BinaryOperator["
|
|
147
|
-
BinaryOperator[BinaryOperator["
|
|
148
|
-
BinaryOperator[BinaryOperator["
|
|
149
|
-
BinaryOperator[BinaryOperator["
|
|
150
|
-
BinaryOperator[BinaryOperator["
|
|
151
|
-
BinaryOperator[BinaryOperator["
|
|
152
|
-
BinaryOperator[BinaryOperator["
|
|
153
|
-
BinaryOperator[BinaryOperator["
|
|
154
|
-
BinaryOperator[BinaryOperator["
|
|
155
|
-
BinaryOperator[BinaryOperator["
|
|
156
|
-
BinaryOperator[BinaryOperator["
|
|
157
|
-
BinaryOperator[BinaryOperator["
|
|
158
|
-
BinaryOperator[BinaryOperator["
|
|
159
|
-
BinaryOperator[BinaryOperator["
|
|
160
|
-
BinaryOperator[BinaryOperator["
|
|
161
|
-
BinaryOperator[BinaryOperator["
|
|
143
|
+
BinaryOperator[BinaryOperator["Assign"] = 2] = "Assign";
|
|
144
|
+
BinaryOperator[BinaryOperator["Identical"] = 3] = "Identical";
|
|
145
|
+
BinaryOperator[BinaryOperator["NotIdentical"] = 4] = "NotIdentical";
|
|
146
|
+
BinaryOperator[BinaryOperator["Minus"] = 5] = "Minus";
|
|
147
|
+
BinaryOperator[BinaryOperator["Plus"] = 6] = "Plus";
|
|
148
|
+
BinaryOperator[BinaryOperator["Divide"] = 7] = "Divide";
|
|
149
|
+
BinaryOperator[BinaryOperator["Multiply"] = 8] = "Multiply";
|
|
150
|
+
BinaryOperator[BinaryOperator["Modulo"] = 9] = "Modulo";
|
|
151
|
+
BinaryOperator[BinaryOperator["And"] = 10] = "And";
|
|
152
|
+
BinaryOperator[BinaryOperator["Or"] = 11] = "Or";
|
|
153
|
+
BinaryOperator[BinaryOperator["BitwiseOr"] = 12] = "BitwiseOr";
|
|
154
|
+
BinaryOperator[BinaryOperator["BitwiseAnd"] = 13] = "BitwiseAnd";
|
|
155
|
+
BinaryOperator[BinaryOperator["Lower"] = 14] = "Lower";
|
|
156
|
+
BinaryOperator[BinaryOperator["LowerEquals"] = 15] = "LowerEquals";
|
|
157
|
+
BinaryOperator[BinaryOperator["Bigger"] = 16] = "Bigger";
|
|
158
|
+
BinaryOperator[BinaryOperator["BiggerEquals"] = 17] = "BiggerEquals";
|
|
159
|
+
BinaryOperator[BinaryOperator["NullishCoalesce"] = 18] = "NullishCoalesce";
|
|
160
|
+
BinaryOperator[BinaryOperator["Exponentiation"] = 19] = "Exponentiation";
|
|
161
|
+
BinaryOperator[BinaryOperator["In"] = 20] = "In";
|
|
162
162
|
})(BinaryOperator || (BinaryOperator = {}));
|
|
163
163
|
function nullSafeIsEquivalent(base, other) {
|
|
164
164
|
if (base == null || other == null) {
|
|
@@ -269,58 +269,6 @@ class Expression {
|
|
|
269
269
|
return new ExpressionStatement(this, null);
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
|
-
class WriteKeyExpr extends Expression {
|
|
273
|
-
receiver;
|
|
274
|
-
index;
|
|
275
|
-
value;
|
|
276
|
-
constructor(receiver, index, value, type, sourceSpan) {
|
|
277
|
-
super(type || value.type, sourceSpan);
|
|
278
|
-
this.receiver = receiver;
|
|
279
|
-
this.index = index;
|
|
280
|
-
this.value = value;
|
|
281
|
-
}
|
|
282
|
-
isEquivalent(e) {
|
|
283
|
-
return (e instanceof WriteKeyExpr &&
|
|
284
|
-
this.receiver.isEquivalent(e.receiver) &&
|
|
285
|
-
this.index.isEquivalent(e.index) &&
|
|
286
|
-
this.value.isEquivalent(e.value));
|
|
287
|
-
}
|
|
288
|
-
isConstant() {
|
|
289
|
-
return false;
|
|
290
|
-
}
|
|
291
|
-
visitExpression(visitor, context) {
|
|
292
|
-
return visitor.visitWriteKeyExpr(this, context);
|
|
293
|
-
}
|
|
294
|
-
clone() {
|
|
295
|
-
return new WriteKeyExpr(this.receiver.clone(), this.index.clone(), this.value.clone(), this.type, this.sourceSpan);
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
class WritePropExpr extends Expression {
|
|
299
|
-
receiver;
|
|
300
|
-
name;
|
|
301
|
-
value;
|
|
302
|
-
constructor(receiver, name, value, type, sourceSpan) {
|
|
303
|
-
super(type || value.type, sourceSpan);
|
|
304
|
-
this.receiver = receiver;
|
|
305
|
-
this.name = name;
|
|
306
|
-
this.value = value;
|
|
307
|
-
}
|
|
308
|
-
isEquivalent(e) {
|
|
309
|
-
return (e instanceof WritePropExpr &&
|
|
310
|
-
this.receiver.isEquivalent(e.receiver) &&
|
|
311
|
-
this.name === e.name &&
|
|
312
|
-
this.value.isEquivalent(e.value));
|
|
313
|
-
}
|
|
314
|
-
isConstant() {
|
|
315
|
-
return false;
|
|
316
|
-
}
|
|
317
|
-
visitExpression(visitor, context) {
|
|
318
|
-
return visitor.visitWritePropExpr(this, context);
|
|
319
|
-
}
|
|
320
|
-
clone() {
|
|
321
|
-
return new WritePropExpr(this.receiver.clone(), this.name, this.value.clone(), this.type, this.sourceSpan);
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
272
|
class InvokeFunctionExpr extends Expression {
|
|
325
273
|
fn;
|
|
326
274
|
args;
|
|
@@ -467,7 +415,7 @@ class ReadPropExpr extends Expression {
|
|
|
467
415
|
return visitor.visitReadPropExpr(this, context);
|
|
468
416
|
}
|
|
469
417
|
set(value) {
|
|
470
|
-
return new
|
|
418
|
+
return new BinaryOperatorExpr(BinaryOperator.Assign, this.receiver.prop(this.name), value, null, this.sourceSpan);
|
|
471
419
|
}
|
|
472
420
|
clone() {
|
|
473
421
|
return new ReadPropExpr(this.receiver.clone(), this.name, this.type, this.sourceSpan);
|
|
@@ -493,7 +441,7 @@ class ReadKeyExpr extends Expression {
|
|
|
493
441
|
return visitor.visitReadKeyExpr(this, context);
|
|
494
442
|
}
|
|
495
443
|
set(value) {
|
|
496
|
-
return new
|
|
444
|
+
return new BinaryOperatorExpr(BinaryOperator.Assign, this.receiver.key(this.index), value, null, this.sourceSpan);
|
|
497
445
|
}
|
|
498
446
|
clone() {
|
|
499
447
|
return new ReadKeyExpr(this.receiver.clone(), this.index.clone(), this.type, this.sourceSpan);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.0
|
|
3
|
+
* @license Angular v20.1.0-next.0
|
|
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-CuQvkMhs.cjs');
|
|
12
|
+
var index$1 = require('./index-C5wL4qaq.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-KPCsvRfl.cjs');
|
|
15
|
+
var apply_import_manager = require('./apply_import_manager-CSEu0fby.cjs');
|
|
16
|
+
var index = require('./index-vkqofxID.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.0
|
|
3
|
+
* @license Angular v20.1.0-next.0
|
|
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-C5wL4qaq.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-CuQvkMhs.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.0
|
|
3
|
+
* @license Angular v20.1.0-next.0
|
|
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-Biezhzch.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-CuQvkMhs.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.0
|
|
3
|
+
* @license Angular v20.1.0-next.0
|
|
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-CuQvkMhs.cjs');
|
|
12
|
+
require('./index-C5wL4qaq.cjs');
|
|
14
13
|
require('path');
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
14
|
+
var project_paths = require('./project_paths-KPCsvRfl.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,20 +255,16 @@ 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();
|
|
264
263
|
}
|
|
265
264
|
visitElement(element) {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
}
|
|
270
|
-
const hasNoContent = this.elementHasNoContent(element);
|
|
271
|
-
const hasNoClosingTag = this.elementHasNoClosingTag(element);
|
|
272
|
-
if (hasNoContent && !hasNoClosingTag) {
|
|
265
|
+
if (!element.isSelfClosing &&
|
|
266
|
+
!ALL_HTML_TAGS.includes(element.name) &&
|
|
267
|
+
this.elementHasNoContent(element)) {
|
|
273
268
|
this.elements.push({
|
|
274
269
|
tagName: element.name,
|
|
275
270
|
start: element.sourceSpan.start.offset,
|
|
@@ -284,18 +279,10 @@ class AngularElementCollector extends compiler.RecursiveVisitor$1 {
|
|
|
284
279
|
}
|
|
285
280
|
if (element.children.length === 1) {
|
|
286
281
|
const child = element.children[0];
|
|
287
|
-
return child instanceof
|
|
282
|
+
return child instanceof checker.Text && /^\s*$/.test(child.value);
|
|
288
283
|
}
|
|
289
284
|
return false;
|
|
290
285
|
}
|
|
291
|
-
elementHasNoClosingTag(element) {
|
|
292
|
-
const { startSourceSpan, endSourceSpan } = element;
|
|
293
|
-
if (!endSourceSpan) {
|
|
294
|
-
return true;
|
|
295
|
-
}
|
|
296
|
-
return (startSourceSpan.start.offset === endSourceSpan.start.offset &&
|
|
297
|
-
startSourceSpan.end.offset === endSourceSpan.end.offset);
|
|
298
|
-
}
|
|
299
286
|
}
|
|
300
287
|
|
|
301
288
|
class SelfClosingTagsMigration extends project_paths.TsurgeFunnelMigration {
|