@angular/core 20.0.0-rc.1 → 20.0.0-rc.2
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-BcbEQ58q.d.ts → api.d-B0vztftH.d.ts} +15 -15
- package/{chrome_dev_tools_performance.d-CARNn07P.d.ts → chrome_dev_tools_performance.d-DvzAxqBc.d.ts} +5 -1
- package/{discovery.d-MmZhhuxb.d.ts → discovery.d-Cf_r2Ojk.d.ts} +6 -13
- 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 -9
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/{debug_node-BTSSF0Vj.mjs → debug_node-Nc-zr65s.mjs} +12163 -12293
- package/fesm2022/debug_node-Nc-zr65s.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 +1 -1
- package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/primitives/signals.mjs.map +1 -1
- package/fesm2022/{resource-DdxAP6ca.mjs → resource-DOwetGLU.mjs} +64 -14
- package/fesm2022/resource-DOwetGLU.mjs.map +1 -0
- package/fesm2022/{root_effect_scheduler-CX0Q-uCT.mjs → root_effect_scheduler-BgGHQ80j.mjs} +26 -16
- package/fesm2022/root_effect_scheduler-BgGHQ80j.mjs.map +1 -0
- package/fesm2022/rxjs-interop.mjs +27 -12
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/signal-ePSl6jXn.mjs +1 -1
- package/fesm2022/signal-ePSl6jXn.mjs.map +1 -1
- package/fesm2022/testing.mjs +43 -26
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/untracked-2ouAFbCz.mjs +1 -1
- package/fesm2022/untracked-2ouAFbCz.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 +204 -313
- package/package.json +3 -3
- package/primitives/di/index.d.ts +1 -1
- package/primitives/event-dispatch/index.d.ts +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +3 -3
- package/schematics/bundles/{apply_import_manager-BdH8vaIZ.js → apply_import_manager-BqwxKJiu.cjs} +3 -3
- package/schematics/bundles/{change_tracker-C_neAOvN.js → change_tracker-B1qegJFu.cjs} +3 -3
- package/schematics/bundles/{checker-DqG0JVTu.js → checker-DmucNdBi.cjs} +55 -45
- package/schematics/bundles/{cleanup-unused-imports.js → cleanup-unused-imports.cjs} +26 -55
- package/schematics/bundles/{compiler-CWuG67kz.js → compiler-DPq1iS19.cjs} +92 -86
- package/schematics/bundles/{compiler_host-CAfDJO3W.js → compiler_host-CAfDJO3W.cjs} +1 -1
- package/schematics/bundles/{control-flow-migration.js → control-flow-migration.cjs} +4 -4
- package/schematics/bundles/{document-core.js → document-core.cjs} +8 -8
- package/schematics/bundles/{imports-CIX-JgAN.js → imports-CIX-JgAN.cjs} +1 -1
- package/schematics/bundles/{index-CGYcUmPq.js → index-1H-qYSW6.cjs} +80 -34
- package/schematics/bundles/{index-DWcLBEg_.js → index-CFmTQ_wx.cjs} +29 -20
- package/schematics/bundles/{inject-flags.js → inject-flags.cjs} +8 -8
- package/schematics/bundles/{inject-migration.js → inject-migration.cjs} +9 -9
- package/schematics/bundles/{leading_space-D9nQ8UQC.js → leading_space-D9nQ8UQC.cjs} +1 -1
- package/schematics/bundles/{migrate_ts_type_references-DAudyiEk.js → migrate_ts_type_references-B2aJNuIK.cjs} +7 -7
- package/schematics/bundles/{ng_decorators-DznZ5jMl.js → ng_decorators-B5HCqr20.cjs} +2 -2
- package/schematics/bundles/{nodes-B16H9JUd.js → nodes-B16H9JUd.cjs} +1 -1
- package/schematics/bundles/{output-migration.js → output-migration.cjs} +8 -8
- package/schematics/bundles/{project_paths-B3YG5aUz.js → project_paths-DmvzlTQL.cjs} +71 -42
- package/schematics/bundles/{project_tsconfig_paths-CDVxT6Ov.js → project_tsconfig_paths-CDVxT6Ov.cjs} +1 -1
- package/schematics/bundles/{property_name-BBwFuqMe.js → property_name-BBwFuqMe.cjs} +1 -1
- package/schematics/bundles/{route-lazy-loading.js → route-lazy-loading.cjs} +7 -7
- package/schematics/bundles/{self-closing-tags-migration.js → self-closing-tags-migration.cjs} +12 -26
- package/schematics/bundles/{signal-input-migration.js → signal-input-migration.cjs} +20 -16
- package/schematics/bundles/{signal-queries-migration.js → signal-queries-migration.cjs} +10 -10
- package/schematics/bundles/{signals.js → signals.cjs} +13 -13
- package/schematics/bundles/{standalone-migration.js → standalone-migration.cjs} +11 -11
- package/schematics/bundles/{symbol-VPWguRxr.js → symbol-VPWguRxr.cjs} +1 -1
- package/schematics/bundles/{test-bed-get.js → test-bed-get.cjs} +8 -8
- package/schematics/collection.json +9 -9
- package/schematics/migrations.json +4 -4
- package/signal.d-D6VJ67xi.d.ts +1 -1
- package/testing/index.d.ts +18 -4
- package/weak_ref.d-eGOEP9S1.d.ts +1 -1
- package/fesm2022/debug_node-BTSSF0Vj.mjs.map +0 -1
- package/fesm2022/resource-DdxAP6ca.mjs.map +0 -1
- package/fesm2022/root_effect_scheduler-CX0Q-uCT.mjs.map +0 -1
- package/schematics/package.json +0 -3
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.0-rc.
|
|
3
|
+
* @license Angular v20.0.0-rc.2
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
-
require('./compiler-
|
|
9
|
+
require('./compiler-DPq1iS19.cjs');
|
|
10
10
|
var ts = require('typescript');
|
|
11
|
-
var checker = require('./checker-
|
|
11
|
+
var checker = require('./checker-DmucNdBi.cjs');
|
|
12
12
|
require('os');
|
|
13
13
|
var assert = require('assert');
|
|
14
|
-
var index = require('./index-
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
16
|
-
var leading_space = require('./leading_space-D9nQ8UQC.
|
|
17
|
-
require('./index-
|
|
14
|
+
var index = require('./index-CFmTQ_wx.cjs');
|
|
15
|
+
var project_paths = require('./project_paths-DmvzlTQL.cjs');
|
|
16
|
+
var leading_space = require('./leading_space-D9nQ8UQC.cjs');
|
|
17
|
+
require('./index-1H-qYSW6.cjs');
|
|
18
18
|
require('path');
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.0-rc.
|
|
3
|
+
* @license Angular v20.0.0-rc.2
|
|
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 imports = require('./imports-CIX-JgAN.
|
|
10
|
+
var imports = require('./imports-CIX-JgAN.cjs');
|
|
11
11
|
|
|
12
12
|
function getCallDecoratorImport(typeChecker, decorator) {
|
|
13
13
|
// Note that this does not cover the edge case where decorators are called from
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.0-rc.
|
|
3
|
+
* @license Angular v20.0.0-rc.2
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,20 +8,20 @@
|
|
|
8
8
|
|
|
9
9
|
var ts = require('typescript');
|
|
10
10
|
require('os');
|
|
11
|
-
var checker = require('./checker-
|
|
12
|
-
var compiler = require('./compiler-
|
|
13
|
-
var index$1 = require('./index-
|
|
11
|
+
var checker = require('./checker-DmucNdBi.cjs');
|
|
12
|
+
var compiler = require('./compiler-DPq1iS19.cjs');
|
|
13
|
+
var index$1 = require('./index-1H-qYSW6.cjs');
|
|
14
14
|
require('path');
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
16
|
-
var apply_import_manager = require('./apply_import_manager-
|
|
17
|
-
var index = require('./index-
|
|
15
|
+
var project_paths = require('./project_paths-DmvzlTQL.cjs');
|
|
16
|
+
var apply_import_manager = require('./apply_import_manager-BqwxKJiu.cjs');
|
|
17
|
+
var index = require('./index-CFmTQ_wx.cjs');
|
|
18
18
|
require('@angular-devkit/core');
|
|
19
19
|
require('node:path/posix');
|
|
20
20
|
require('fs');
|
|
21
21
|
require('module');
|
|
22
22
|
require('url');
|
|
23
23
|
require('@angular-devkit/schematics');
|
|
24
|
-
require('./project_tsconfig_paths-CDVxT6Ov.
|
|
24
|
+
require('./project_tsconfig_paths-CDVxT6Ov.cjs');
|
|
25
25
|
|
|
26
26
|
function isOutputDeclarationEligibleForMigration(node) {
|
|
27
27
|
return (node.initializer !== undefined &&
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.0-rc.
|
|
3
|
+
* @license Angular v20.0.0-rc.2
|
|
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-1H-qYSW6.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-
|
|
15
|
+
var checker = require('./checker-DmucNdBi.cjs');
|
|
16
|
+
require('./compiler-DPq1iS19.cjs');
|
|
17
17
|
require('path');
|
|
18
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-CDVxT6Ov.
|
|
18
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-CDVxT6Ov.cjs');
|
|
19
19
|
|
|
20
20
|
function _interopNamespaceDefault(e) {
|
|
21
21
|
var n = Object.create(null);
|
|
@@ -481,7 +481,7 @@ function createPlainTsProgram(tsHost, tsconfig, optionOverrides) {
|
|
|
481
481
|
ngCompiler: null,
|
|
482
482
|
program,
|
|
483
483
|
userOptions: tsconfig.options,
|
|
484
|
-
|
|
484
|
+
__programAbsoluteRootFileNames: tsconfig.rootNames,
|
|
485
485
|
host: tsHost,
|
|
486
486
|
};
|
|
487
487
|
}
|
|
@@ -504,7 +504,7 @@ function createNgtscProgram(tsHost, tsconfig, optionOverrides) {
|
|
|
504
504
|
ngCompiler: ngtscProgram.compiler,
|
|
505
505
|
program: ngtscProgram.getTsProgram(),
|
|
506
506
|
userOptions: tsconfig.options,
|
|
507
|
-
|
|
507
|
+
__programAbsoluteRootFileNames: tsconfig.rootNames,
|
|
508
508
|
host: tsHost,
|
|
509
509
|
};
|
|
510
510
|
}
|
|
@@ -525,10 +525,10 @@ function parseTsconfigOrDie(absoluteTsconfigPath, fs) {
|
|
|
525
525
|
|
|
526
526
|
/** Creates the base program info for the given tsconfig path. */
|
|
527
527
|
function createBaseProgramInfo(absoluteTsconfigPath, fs, optionOverrides = {}) {
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
528
|
+
// Make sure the FS becomes globally available. Some code paths
|
|
529
|
+
// of the Angular compiler, or tsconfig parsing aren't leveraging
|
|
530
|
+
// the specified file system.
|
|
531
|
+
checker.setFileSystem(fs);
|
|
532
532
|
const tsconfig = parseTsconfigOrDie(absoluteTsconfigPath, fs);
|
|
533
533
|
const tsHost = new NgtscCompilerHost(fs, tsconfig.options);
|
|
534
534
|
// When enabled, use a plain TS program if we are sure it's not
|
|
@@ -539,6 +539,33 @@ function createBaseProgramInfo(absoluteTsconfigPath, fs, optionOverrides = {}) {
|
|
|
539
539
|
}
|
|
540
540
|
return createNgtscProgram(tsHost, tsconfig, optionOverrides);
|
|
541
541
|
}
|
|
542
|
+
/**
|
|
543
|
+
* Creates the {@link ProgramInfo} from the given base information.
|
|
544
|
+
*
|
|
545
|
+
* This function purely exists to support custom programs that are
|
|
546
|
+
* intended to be injected into Tsurge migrations. e.g. for language
|
|
547
|
+
* service refactorings.
|
|
548
|
+
*/
|
|
549
|
+
function getProgramInfoFromBaseInfo(baseInfo) {
|
|
550
|
+
const fullProgramSourceFiles = [...baseInfo.program.getSourceFiles()];
|
|
551
|
+
const sourceFiles = fullProgramSourceFiles.filter((f) => !f.isDeclarationFile &&
|
|
552
|
+
// Note `isShim` will work for the initial program, but for TCB programs, the shims are no longer annotated.
|
|
553
|
+
!checker.isShim(f) &&
|
|
554
|
+
!f.fileName.endsWith('.ngtypecheck.ts'));
|
|
555
|
+
// Sort it by length in reverse order (longest first). This speeds up lookups,
|
|
556
|
+
// since there's no need to keep going through the array once a match is found.
|
|
557
|
+
const sortedRootDirs = checker.getRootDirs(baseInfo.host, baseInfo.userOptions).sort((a, b) => b.length - a.length);
|
|
558
|
+
// TODO: Consider also following TS's logic here, finding the common source root.
|
|
559
|
+
// See: Program#getCommonSourceDirectory.
|
|
560
|
+
const primaryRoot = checker.absoluteFrom(baseInfo.userOptions.rootDir ?? sortedRootDirs.at(-1) ?? baseInfo.program.getCurrentDirectory());
|
|
561
|
+
return {
|
|
562
|
+
...baseInfo,
|
|
563
|
+
sourceFiles,
|
|
564
|
+
fullProgramSourceFiles,
|
|
565
|
+
sortedRootDirs,
|
|
566
|
+
projectRoot: primaryRoot,
|
|
567
|
+
};
|
|
568
|
+
}
|
|
542
569
|
|
|
543
570
|
/**
|
|
544
571
|
* @private
|
|
@@ -550,37 +577,14 @@ function createBaseProgramInfo(absoluteTsconfigPath, fs, optionOverrides = {}) {
|
|
|
550
577
|
*/
|
|
551
578
|
class TsurgeBaseMigration {
|
|
552
579
|
/**
|
|
553
|
-
*
|
|
554
|
-
* overriding {@link prepareProgram} is more desirable.
|
|
580
|
+
* Creates the TypeScript program for a given compilation unit.
|
|
555
581
|
*
|
|
556
582
|
* By default:
|
|
557
583
|
* - In 3P: Ngtsc programs are being created.
|
|
558
584
|
* - In 1P: Ngtsc or TS programs are created based on the Blaze target.
|
|
559
585
|
*/
|
|
560
|
-
createProgram(tsconfigAbsPath, fs,
|
|
561
|
-
return createBaseProgramInfo(tsconfigAbsPath, fs,
|
|
562
|
-
}
|
|
563
|
-
// Optional function to prepare the base `ProgramInfo` even further,
|
|
564
|
-
// for the analyze and migrate phases. E.g. determining source files.
|
|
565
|
-
prepareProgram(info) {
|
|
566
|
-
const fullProgramSourceFiles = [...info.program.getSourceFiles()];
|
|
567
|
-
const sourceFiles = fullProgramSourceFiles.filter((f) => !f.isDeclarationFile &&
|
|
568
|
-
// Note `isShim` will work for the initial program, but for TCB programs, the shims are no longer annotated.
|
|
569
|
-
!checker.isShim(f) &&
|
|
570
|
-
!f.fileName.endsWith('.ngtypecheck.ts'));
|
|
571
|
-
// Sort it by length in reverse order (longest first). This speeds up lookups,
|
|
572
|
-
// since there's no need to keep going through the array once a match is found.
|
|
573
|
-
const sortedRootDirs = checker.getRootDirs(info.host, info.userOptions).sort((a, b) => b.length - a.length);
|
|
574
|
-
// TODO: Consider also following TS's logic here, finding the common source root.
|
|
575
|
-
// See: Program#getCommonSourceDirectory.
|
|
576
|
-
const primaryRoot = checker.absoluteFrom(info.userOptions.rootDir ?? sortedRootDirs.at(-1) ?? info.program.getCurrentDirectory());
|
|
577
|
-
return {
|
|
578
|
-
...info,
|
|
579
|
-
sourceFiles,
|
|
580
|
-
fullProgramSourceFiles,
|
|
581
|
-
sortedRootDirs,
|
|
582
|
-
projectRoot: primaryRoot,
|
|
583
|
-
};
|
|
586
|
+
createProgram(tsconfigAbsPath, fs, optionsOverride) {
|
|
587
|
+
return getProgramInfoFromBaseInfo(createBaseProgramInfo(tsconfigAbsPath, fs, optionsOverride));
|
|
584
588
|
}
|
|
585
589
|
}
|
|
586
590
|
|
|
@@ -636,10 +640,11 @@ async function runMigrationInDevkit(config) {
|
|
|
636
640
|
const migration = config.getMigration(fs);
|
|
637
641
|
const unitResults = [];
|
|
638
642
|
const isFunnelMigration = migration instanceof TsurgeFunnelMigration;
|
|
643
|
+
const compilationUnitAssignments = new Map();
|
|
639
644
|
for (const tsconfigPath of tsconfigPaths) {
|
|
640
645
|
config.beforeProgramCreation?.(tsconfigPath, exports.MigrationStage.Analysis);
|
|
641
|
-
const
|
|
642
|
-
|
|
646
|
+
const info = migration.createProgram(tsconfigPath, fs);
|
|
647
|
+
modifyProgramInfoToEnsureNonOverlappingFiles(tsconfigPath, info, compilationUnitAssignments);
|
|
643
648
|
config.afterProgramCreation?.(info, fs, exports.MigrationStage.Analysis);
|
|
644
649
|
config.beforeUnitAnalysis?.(tsconfigPath);
|
|
645
650
|
unitResults.push(await migration.analyze(info));
|
|
@@ -659,8 +664,8 @@ async function runMigrationInDevkit(config) {
|
|
|
659
664
|
replacements = [];
|
|
660
665
|
for (const tsconfigPath of tsconfigPaths) {
|
|
661
666
|
config.beforeProgramCreation?.(tsconfigPath, exports.MigrationStage.Migrate);
|
|
662
|
-
const
|
|
663
|
-
|
|
667
|
+
const info = migration.createProgram(tsconfigPath, fs);
|
|
668
|
+
modifyProgramInfoToEnsureNonOverlappingFiles(tsconfigPath, info, compilationUnitAssignments);
|
|
664
669
|
config.afterProgramCreation?.(info, fs, exports.MigrationStage.Migrate);
|
|
665
670
|
const result = await migration.migrate(globalMeta, info);
|
|
666
671
|
replacements.push(...result.replacements);
|
|
@@ -684,6 +689,31 @@ async function runMigrationInDevkit(config) {
|
|
|
684
689
|
}
|
|
685
690
|
config.whenDone?.(await migration.stats(globalMeta));
|
|
686
691
|
}
|
|
692
|
+
/**
|
|
693
|
+
* Special logic for devkit migrations. In the Angular CLI, or in 3P precisely,
|
|
694
|
+
* projects can have tsconfigs with overlapping source files. i.e. two tsconfigs
|
|
695
|
+
* like e.g. build or test include the same `ts.SourceFile` (`.ts`). Migrations
|
|
696
|
+
* should never have 2+ compilation units with overlapping source files as this
|
|
697
|
+
* can result in duplicated replacements or analysis— hence we only ever assign a
|
|
698
|
+
* source file to a compilation unit *once*.
|
|
699
|
+
*
|
|
700
|
+
* Note that this is fine as we expect Tsurge migrations to work together as
|
|
701
|
+
* isolated compilation units— so it shouldn't matter if worst case a `.ts`
|
|
702
|
+
* file ends up in the e.g. test program.
|
|
703
|
+
*/
|
|
704
|
+
function modifyProgramInfoToEnsureNonOverlappingFiles(tsconfigPath, info, compilationUnitAssignments) {
|
|
705
|
+
const sourceFiles = [];
|
|
706
|
+
for (const sf of info.sourceFiles) {
|
|
707
|
+
const assignment = compilationUnitAssignments.get(sf.fileName);
|
|
708
|
+
// File is already assigned to a different compilation unit.
|
|
709
|
+
if (assignment !== undefined && assignment !== tsconfigPath) {
|
|
710
|
+
continue;
|
|
711
|
+
}
|
|
712
|
+
compilationUnitAssignments.set(sf.fileName, tsconfigPath);
|
|
713
|
+
sourceFiles.push(sf);
|
|
714
|
+
}
|
|
715
|
+
info.sourceFiles = sourceFiles;
|
|
716
|
+
}
|
|
687
717
|
|
|
688
718
|
/** A text replacement for the given file. */
|
|
689
719
|
class Replacement {
|
|
@@ -751,6 +781,5 @@ exports.TextUpdate = TextUpdate;
|
|
|
751
781
|
exports.TsurgeComplexMigration = TsurgeComplexMigration;
|
|
752
782
|
exports.TsurgeFunnelMigration = TsurgeFunnelMigration;
|
|
753
783
|
exports.confirmAsSerializable = confirmAsSerializable;
|
|
754
|
-
exports.createBaseProgramInfo = createBaseProgramInfo;
|
|
755
784
|
exports.projectFile = projectFile;
|
|
756
785
|
exports.runMigrationInDevkit = runMigrationInDevkit;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.0-rc.
|
|
3
|
+
* @license Angular v20.0.0-rc.2
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
var schematics = require('@angular-devkit/schematics');
|
|
10
10
|
var fs = require('fs');
|
|
11
11
|
var p = require('path');
|
|
12
|
-
var change_tracker = require('./change_tracker-
|
|
13
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-CDVxT6Ov.
|
|
14
|
-
var compiler_host = require('./compiler_host-CAfDJO3W.
|
|
12
|
+
var change_tracker = require('./change_tracker-B1qegJFu.cjs');
|
|
13
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-CDVxT6Ov.cjs');
|
|
14
|
+
var compiler_host = require('./compiler_host-CAfDJO3W.cjs');
|
|
15
15
|
var ts = require('typescript');
|
|
16
|
-
var checker = require('./checker-
|
|
17
|
-
var property_name = require('./property_name-BBwFuqMe.
|
|
18
|
-
require('./compiler-
|
|
16
|
+
var checker = require('./checker-DmucNdBi.cjs');
|
|
17
|
+
var property_name = require('./property_name-BBwFuqMe.cjs');
|
|
18
|
+
require('./compiler-DPq1iS19.cjs');
|
|
19
19
|
require('os');
|
|
20
20
|
require('@angular-devkit/core');
|
|
21
21
|
require('module');
|
package/schematics/bundles/{self-closing-tags-migration.js → self-closing-tags-migration.cjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.0-rc.
|
|
3
|
+
* @license Angular v20.0.0-rc.2
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,21 +8,21 @@
|
|
|
8
8
|
|
|
9
9
|
var ts = require('typescript');
|
|
10
10
|
require('os');
|
|
11
|
-
var checker = require('./checker-
|
|
12
|
-
var compiler = require('./compiler-
|
|
13
|
-
require('./index-
|
|
11
|
+
var checker = require('./checker-DmucNdBi.cjs');
|
|
12
|
+
var compiler = require('./compiler-DPq1iS19.cjs');
|
|
13
|
+
require('./index-1H-qYSW6.cjs');
|
|
14
14
|
require('path');
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
16
|
-
var ng_decorators = require('./ng_decorators-
|
|
17
|
-
var property_name = require('./property_name-BBwFuqMe.
|
|
15
|
+
var project_paths = require('./project_paths-DmvzlTQL.cjs');
|
|
16
|
+
var ng_decorators = require('./ng_decorators-B5HCqr20.cjs');
|
|
17
|
+
var property_name = require('./property_name-BBwFuqMe.cjs');
|
|
18
18
|
require('@angular-devkit/core');
|
|
19
19
|
require('node:path/posix');
|
|
20
20
|
require('fs');
|
|
21
21
|
require('module');
|
|
22
22
|
require('url');
|
|
23
23
|
require('@angular-devkit/schematics');
|
|
24
|
-
require('./project_tsconfig_paths-CDVxT6Ov.
|
|
25
|
-
require('./imports-CIX-JgAN.
|
|
24
|
+
require('./project_tsconfig_paths-CDVxT6Ov.cjs');
|
|
25
|
+
require('./imports-CIX-JgAN.cjs');
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Unwraps a given expression TypeScript node. Expressions can be wrapped within multiple
|
|
@@ -346,11 +346,9 @@ class SelfClosingTagsMigration extends project_paths.TsurgeFunnelMigration {
|
|
|
346
346
|
return project_paths.confirmAsSerializable({ tagReplacements });
|
|
347
347
|
}
|
|
348
348
|
async combine(unitA, unitB) {
|
|
349
|
-
|
|
350
|
-
...unitA.tagReplacements,
|
|
351
|
-
|
|
352
|
-
]);
|
|
353
|
-
return project_paths.confirmAsSerializable({ tagReplacements: uniqueReplacements });
|
|
349
|
+
return project_paths.confirmAsSerializable({
|
|
350
|
+
tagReplacements: [...unitA.tagReplacements, ...unitB.tagReplacements],
|
|
351
|
+
});
|
|
354
352
|
}
|
|
355
353
|
async globalMeta(combinedData) {
|
|
356
354
|
const globalMeta = {
|
|
@@ -377,18 +375,6 @@ function prepareTextReplacement(file, replacement, start, end) {
|
|
|
377
375
|
toInsert: replacement,
|
|
378
376
|
}));
|
|
379
377
|
}
|
|
380
|
-
function removeDuplicateReplacements(replacements) {
|
|
381
|
-
const uniqueFiles = new Set();
|
|
382
|
-
const result = [];
|
|
383
|
-
for (const replacement of replacements) {
|
|
384
|
-
const fileId = replacement.file.id;
|
|
385
|
-
if (!uniqueFiles.has(fileId)) {
|
|
386
|
-
uniqueFiles.add(fileId);
|
|
387
|
-
result.push(replacement);
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
return result;
|
|
391
|
-
}
|
|
392
378
|
|
|
393
379
|
function migrate(options) {
|
|
394
380
|
return async (tree, context) => {
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.0-rc.
|
|
3
|
+
* @license Angular v20.0.0-rc.2
|
|
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-B2aJNuIK.cjs');
|
|
10
10
|
var ts = require('typescript');
|
|
11
11
|
require('os');
|
|
12
|
-
var checker = require('./checker-
|
|
13
|
-
require('./compiler-
|
|
14
|
-
var index$1 = require('./index-
|
|
12
|
+
var checker = require('./checker-DmucNdBi.cjs');
|
|
13
|
+
require('./compiler-DPq1iS19.cjs');
|
|
14
|
+
var index$1 = require('./index-1H-qYSW6.cjs');
|
|
15
15
|
require('path');
|
|
16
|
-
var project_paths = require('./project_paths-
|
|
17
|
-
var index = require('./index-
|
|
16
|
+
var project_paths = require('./project_paths-DmvzlTQL.cjs');
|
|
17
|
+
var index = require('./index-CFmTQ_wx.cjs');
|
|
18
18
|
var assert = require('assert');
|
|
19
|
-
var apply_import_manager = require('./apply_import_manager-
|
|
19
|
+
var apply_import_manager = require('./apply_import_manager-BqwxKJiu.cjs');
|
|
20
20
|
require('@angular-devkit/core');
|
|
21
21
|
require('node:path/posix');
|
|
22
|
-
require('./leading_space-D9nQ8UQC.
|
|
22
|
+
require('./leading_space-D9nQ8UQC.cjs');
|
|
23
23
|
require('fs');
|
|
24
24
|
require('module');
|
|
25
25
|
require('url');
|
|
26
26
|
require('@angular-devkit/schematics');
|
|
27
|
-
require('./project_tsconfig_paths-CDVxT6Ov.
|
|
27
|
+
require('./project_tsconfig_paths-CDVxT6Ov.cjs');
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Class that holds information about a given directive and its input fields.
|
|
@@ -1264,9 +1264,8 @@ class SignalInputMigration extends project_paths.TsurgeComplexMigration {
|
|
|
1264
1264
|
super();
|
|
1265
1265
|
this.config = config;
|
|
1266
1266
|
}
|
|
1267
|
-
// Override the default program creation, to add extra flags.
|
|
1268
1267
|
createProgram(tsconfigAbsPath, fs) {
|
|
1269
|
-
return
|
|
1268
|
+
return super.createProgram(tsconfigAbsPath, fs, {
|
|
1270
1269
|
_compilePoisonedComponents: true,
|
|
1271
1270
|
// We want to migrate non-exported classes too.
|
|
1272
1271
|
compileNonExportedClasses: true,
|
|
@@ -1276,8 +1275,11 @@ class SignalInputMigration extends project_paths.TsurgeComplexMigration {
|
|
|
1276
1275
|
strictTemplates: true,
|
|
1277
1276
|
});
|
|
1278
1277
|
}
|
|
1279
|
-
|
|
1280
|
-
|
|
1278
|
+
/**
|
|
1279
|
+
* Prepares the program for this migration with additional custom
|
|
1280
|
+
* fields to allow for batch-mode testing.
|
|
1281
|
+
*/
|
|
1282
|
+
_prepareProgram(info) {
|
|
1281
1283
|
// Optional filter for testing. Allows for simulation of parallel execution
|
|
1282
1284
|
// even if some tsconfig's have overlap due to sharing of TS sources.
|
|
1283
1285
|
// (this is commonly not the case in g3 where deps are `.d.ts` files).
|
|
@@ -1286,7 +1288,7 @@ class SignalInputMigration extends project_paths.TsurgeComplexMigration {
|
|
|
1286
1288
|
// Optional replacement filter. Allows parallel execution in case
|
|
1287
1289
|
// some tsconfig's have overlap due to sharing of TS sources.
|
|
1288
1290
|
// (this is commonly not the case in g3 where deps are `.d.ts` files).
|
|
1289
|
-
!limitToRootNamesOnly || info.
|
|
1291
|
+
!limitToRootNamesOnly || info.__programAbsoluteRootFileNames.includes(f.fileName));
|
|
1290
1292
|
return {
|
|
1291
1293
|
...info,
|
|
1292
1294
|
sourceFiles: filteredSourceFiles,
|
|
@@ -1296,11 +1298,12 @@ class SignalInputMigration extends project_paths.TsurgeComplexMigration {
|
|
|
1296
1298
|
prepareAnalysisDeps(info) {
|
|
1297
1299
|
const analysisInfo = {
|
|
1298
1300
|
...info,
|
|
1299
|
-
...prepareAnalysisInfo(info.program, info.ngCompiler, info.
|
|
1301
|
+
...prepareAnalysisInfo(info.program, info.ngCompiler, info.__programAbsoluteRootFileNames),
|
|
1300
1302
|
};
|
|
1301
1303
|
return analysisInfo;
|
|
1302
1304
|
}
|
|
1303
1305
|
async analyze(info) {
|
|
1306
|
+
info = this._prepareProgram(info);
|
|
1304
1307
|
const analysisDeps = this.prepareAnalysisDeps(info);
|
|
1305
1308
|
const knownInputs = new KnownInputs(info, this.config);
|
|
1306
1309
|
const result = new MigrationResult();
|
|
@@ -1347,6 +1350,7 @@ class SignalInputMigration extends project_paths.TsurgeComplexMigration {
|
|
|
1347
1350
|
return project_paths.confirmAsSerializable(convertToGlobalMeta(combinedData));
|
|
1348
1351
|
}
|
|
1349
1352
|
async migrate(globalMetadata, info, nonBatchData) {
|
|
1353
|
+
info = this._prepareProgram(info);
|
|
1350
1354
|
const knownInputs = nonBatchData?.knownInputs ?? new KnownInputs(info, this.config);
|
|
1351
1355
|
const result = nonBatchData?.result ?? new MigrationResult();
|
|
1352
1356
|
const host = nonBatchData?.host ?? createMigrationHost(info, this.config);
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.0-rc.
|
|
3
|
+
* @license Angular v20.0.0-rc.2
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
-
var compiler = require('./compiler-
|
|
9
|
+
var compiler = require('./compiler-DPq1iS19.cjs');
|
|
10
10
|
var ts = require('typescript');
|
|
11
|
-
var checker = require('./checker-
|
|
11
|
+
var checker = require('./checker-DmucNdBi.cjs');
|
|
12
12
|
require('os');
|
|
13
|
-
var index$1 = require('./index-
|
|
13
|
+
var index$1 = require('./index-1H-qYSW6.cjs');
|
|
14
14
|
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-
|
|
15
|
+
var project_paths = require('./project_paths-DmvzlTQL.cjs');
|
|
16
|
+
var apply_import_manager = require('./apply_import_manager-BqwxKJiu.cjs');
|
|
17
|
+
var migrate_ts_type_references = require('./migrate_ts_type_references-B2aJNuIK.cjs');
|
|
18
18
|
var assert = require('assert');
|
|
19
|
-
var index = require('./index-
|
|
19
|
+
var index = require('./index-CFmTQ_wx.cjs');
|
|
20
20
|
require('@angular-devkit/core');
|
|
21
21
|
require('node:path/posix');
|
|
22
22
|
require('fs');
|
|
23
23
|
require('module');
|
|
24
24
|
require('url');
|
|
25
25
|
require('@angular-devkit/schematics');
|
|
26
|
-
require('./project_tsconfig_paths-CDVxT6Ov.
|
|
27
|
-
require('./leading_space-D9nQ8UQC.
|
|
26
|
+
require('./project_tsconfig_paths-CDVxT6Ov.cjs');
|
|
27
|
+
require('./leading_space-D9nQ8UQC.cjs');
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Phase that migrates Angular host binding references to
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.0-rc.
|
|
3
|
+
* @license Angular v20.0.0-rc.2
|
|
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 signalQueriesMigration = require('./signal-queries-migration.
|
|
11
|
-
var signalInputMigration = require('./signal-input-migration.
|
|
12
|
-
var outputMigration = require('./output-migration.
|
|
13
|
-
require('./compiler-
|
|
10
|
+
var signalQueriesMigration = require('./signal-queries-migration.cjs');
|
|
11
|
+
var signalInputMigration = require('./signal-input-migration.cjs');
|
|
12
|
+
var outputMigration = require('./output-migration.cjs');
|
|
13
|
+
require('./compiler-DPq1iS19.cjs');
|
|
14
14
|
require('typescript');
|
|
15
|
-
require('./checker-
|
|
15
|
+
require('./checker-DmucNdBi.cjs');
|
|
16
16
|
require('os');
|
|
17
17
|
require('fs');
|
|
18
18
|
require('module');
|
|
19
19
|
require('path');
|
|
20
20
|
require('url');
|
|
21
|
-
require('./index-
|
|
22
|
-
require('./project_paths-
|
|
21
|
+
require('./index-1H-qYSW6.cjs');
|
|
22
|
+
require('./project_paths-DmvzlTQL.cjs');
|
|
23
23
|
require('@angular-devkit/core');
|
|
24
24
|
require('node:path/posix');
|
|
25
|
-
require('./project_tsconfig_paths-CDVxT6Ov.
|
|
26
|
-
require('./apply_import_manager-
|
|
27
|
-
require('./migrate_ts_type_references-
|
|
25
|
+
require('./project_tsconfig_paths-CDVxT6Ov.cjs');
|
|
26
|
+
require('./apply_import_manager-BqwxKJiu.cjs');
|
|
27
|
+
require('./migrate_ts_type_references-B2aJNuIK.cjs');
|
|
28
28
|
require('assert');
|
|
29
|
-
require('./index-
|
|
30
|
-
require('./leading_space-D9nQ8UQC.
|
|
29
|
+
require('./index-CFmTQ_wx.cjs');
|
|
30
|
+
require('./leading_space-D9nQ8UQC.cjs');
|
|
31
31
|
|
|
32
32
|
function migrate(options) {
|
|
33
33
|
// The migrations are independent so we can run them in any order, but we sort them here
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.0-rc.
|
|
3
|
+
* @license Angular v20.0.0-rc.2
|
|
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-1H-qYSW6.cjs');
|
|
11
11
|
var fs = require('fs');
|
|
12
12
|
var p = require('path');
|
|
13
13
|
var ts = require('typescript');
|
|
14
|
-
var change_tracker = require('./change_tracker-
|
|
15
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-CDVxT6Ov.
|
|
16
|
-
var compiler_host = require('./compiler_host-CAfDJO3W.
|
|
17
|
-
var ng_decorators = require('./ng_decorators-
|
|
18
|
-
var nodes = require('./nodes-B16H9JUd.
|
|
19
|
-
var symbol = require('./symbol-VPWguRxr.
|
|
20
|
-
var imports = require('./imports-CIX-JgAN.
|
|
21
|
-
require('./compiler-
|
|
22
|
-
var checker = require('./checker-
|
|
14
|
+
var change_tracker = require('./change_tracker-B1qegJFu.cjs');
|
|
15
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-CDVxT6Ov.cjs');
|
|
16
|
+
var compiler_host = require('./compiler_host-CAfDJO3W.cjs');
|
|
17
|
+
var ng_decorators = require('./ng_decorators-B5HCqr20.cjs');
|
|
18
|
+
var nodes = require('./nodes-B16H9JUd.cjs');
|
|
19
|
+
var symbol = require('./symbol-VPWguRxr.cjs');
|
|
20
|
+
var imports = require('./imports-CIX-JgAN.cjs');
|
|
21
|
+
require('./compiler-DPq1iS19.cjs');
|
|
22
|
+
var checker = require('./checker-DmucNdBi.cjs');
|
|
23
23
|
require('os');
|
|
24
24
|
require('@angular-devkit/core');
|
|
25
25
|
require('module');
|