@angular/core 19.2.12 → 19.2.13
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/event_dispatcher.d-K56StcHr.d.ts +1 -1
- package/fesm2022/core.mjs +4 -4
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/di.mjs +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +28 -2
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/untracked-BKcld_ew.mjs +1 -1
- package/index.d.ts +155 -21
- package/navigation_types.d-fAxd92YV.d.ts +1 -1
- package/package.json +1 -1
- 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 +1 -1
- package/schematics/bundles/{apply_import_manager-Celp9ClC.cjs → apply_import_manager-QQDfWa1Z.cjs} +2 -2
- package/schematics/bundles/checker-5pyJrZ9G.cjs +2 -2
- package/schematics/bundles/cleanup-unused-imports.cjs +22 -51
- package/schematics/bundles/compiler_host-B1Gyeytz.cjs +1 -1
- package/schematics/bundles/control-flow-migration.cjs +1 -1
- package/schematics/bundles/explicit-standalone-flag.cjs +1 -1
- package/schematics/bundles/imports-CIX-JgAN.cjs +1 -1
- package/schematics/bundles/index-BIvVb6in.cjs +11 -11
- package/schematics/bundles/{index-DZhSIkG9.cjs → index-BPhQoCcF.cjs} +2 -2
- package/schematics/bundles/inject-migration.cjs +1 -1
- package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
- package/schematics/bundles/{migrate_ts_type_references-CjGOIOBV.cjs → migrate_ts_type_references-Czrg1gcB.cjs} +3 -3
- package/schematics/bundles/ng_decorators-B5HCqr20.cjs +1 -1
- package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
- package/schematics/bundles/output-migration.cjs +4 -4
- package/schematics/bundles/pending-tasks.cjs +1 -1
- package/schematics/bundles/{project_paths-HwOMxrvM.cjs → project_paths-CyWVEsbT.cjs} +63 -34
- package/schematics/bundles/project_tsconfig_paths-CDVxT6Ov.cjs +1 -1
- package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
- package/schematics/bundles/provide-initializer.cjs +1 -1
- package/schematics/bundles/route-lazy-loading.cjs +1 -1
- package/schematics/bundles/self-closing-tags-migration.cjs +5 -19
- package/schematics/bundles/signal-input-migration.cjs +15 -11
- package/schematics/bundles/signal-queries-migration.cjs +5 -5
- package/schematics/bundles/signals.cjs +5 -5
- package/schematics/bundles/standalone-migration.cjs +1 -1
- package/testing/index.d.ts +14 -2
- package/weak_ref.d-DWHPG08n.d.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.
|
|
3
|
+
* @license Angular v19.2.13
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -1005,7 +1005,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
|
|
|
1005
1005
|
function compileDeclareClassMetadata(metadata) {
|
|
1006
1006
|
const definitionMap = new checker.DefinitionMap();
|
|
1007
1007
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
1008
|
-
definitionMap.set('version', checker.literal('19.2.
|
|
1008
|
+
definitionMap.set('version', checker.literal('19.2.13'));
|
|
1009
1009
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1010
1010
|
definitionMap.set('type', metadata.type);
|
|
1011
1011
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -1023,7 +1023,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
1023
1023
|
callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? checker.literal(null));
|
|
1024
1024
|
callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? checker.literal(null));
|
|
1025
1025
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
1026
|
-
definitionMap.set('version', checker.literal('19.2.
|
|
1026
|
+
definitionMap.set('version', checker.literal('19.2.13'));
|
|
1027
1027
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1028
1028
|
definitionMap.set('type', metadata.type);
|
|
1029
1029
|
definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -1118,7 +1118,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
1118
1118
|
const definitionMap = new checker.DefinitionMap();
|
|
1119
1119
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
1120
1120
|
definitionMap.set('minVersion', checker.literal(minVersion));
|
|
1121
|
-
definitionMap.set('version', checker.literal('19.2.
|
|
1121
|
+
definitionMap.set('version', checker.literal('19.2.13'));
|
|
1122
1122
|
// e.g. `type: MyDirective`
|
|
1123
1123
|
definitionMap.set('type', meta.type.value);
|
|
1124
1124
|
if (meta.isStandalone !== undefined) {
|
|
@@ -1534,7 +1534,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
1534
1534
|
function compileDeclareFactoryFunction(meta) {
|
|
1535
1535
|
const definitionMap = new checker.DefinitionMap();
|
|
1536
1536
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
1537
|
-
definitionMap.set('version', checker.literal('19.2.
|
|
1537
|
+
definitionMap.set('version', checker.literal('19.2.13'));
|
|
1538
1538
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1539
1539
|
definitionMap.set('type', meta.type.value);
|
|
1540
1540
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -1569,7 +1569,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
1569
1569
|
function createInjectableDefinitionMap(meta) {
|
|
1570
1570
|
const definitionMap = new checker.DefinitionMap();
|
|
1571
1571
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
1572
|
-
definitionMap.set('version', checker.literal('19.2.
|
|
1572
|
+
definitionMap.set('version', checker.literal('19.2.13'));
|
|
1573
1573
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1574
1574
|
definitionMap.set('type', meta.type.value);
|
|
1575
1575
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -1620,7 +1620,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
1620
1620
|
function createInjectorDefinitionMap(meta) {
|
|
1621
1621
|
const definitionMap = new checker.DefinitionMap();
|
|
1622
1622
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
1623
|
-
definitionMap.set('version', checker.literal('19.2.
|
|
1623
|
+
definitionMap.set('version', checker.literal('19.2.13'));
|
|
1624
1624
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1625
1625
|
definitionMap.set('type', meta.type.value);
|
|
1626
1626
|
definitionMap.set('providers', meta.providers);
|
|
@@ -1653,7 +1653,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
1653
1653
|
throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
|
|
1654
1654
|
}
|
|
1655
1655
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
1656
|
-
definitionMap.set('version', checker.literal('19.2.
|
|
1656
|
+
definitionMap.set('version', checker.literal('19.2.13'));
|
|
1657
1657
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1658
1658
|
definitionMap.set('type', meta.type.value);
|
|
1659
1659
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -1704,7 +1704,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
1704
1704
|
function createPipeDefinitionMap(meta) {
|
|
1705
1705
|
const definitionMap = new checker.DefinitionMap();
|
|
1706
1706
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
1707
|
-
definitionMap.set('version', checker.literal('19.2.
|
|
1707
|
+
definitionMap.set('version', checker.literal('19.2.13'));
|
|
1708
1708
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1709
1709
|
// e.g. `type: MyPipe`
|
|
1710
1710
|
definitionMap.set('type', meta.type.value);
|
|
@@ -10730,7 +10730,7 @@ class PipeDecoratorHandler {
|
|
|
10730
10730
|
* @description
|
|
10731
10731
|
* Entry point for all public APIs of the compiler-cli package.
|
|
10732
10732
|
*/
|
|
10733
|
-
new checker.Version('19.2.
|
|
10733
|
+
new checker.Version('19.2.13');
|
|
10734
10734
|
|
|
10735
10735
|
/**
|
|
10736
10736
|
* Whether a given decorator should be treated as an Angular decorator.
|
|
@@ -18585,7 +18585,7 @@ var semver = /*@__PURE__*/getDefaultExportFromCjs(semverExports);
|
|
|
18585
18585
|
* @param minVersion Minimum required version for the feature.
|
|
18586
18586
|
*/
|
|
18587
18587
|
function coreVersionSupportsFeature(coreVersion, minVersion) {
|
|
18588
|
-
// A version of `19.2.
|
|
18588
|
+
// A version of `19.2.13` usually means that core is at head so it supports
|
|
18589
18589
|
// all features. Use string interpolation prevent the placeholder from being replaced
|
|
18590
18590
|
// with the current version during build time.
|
|
18591
18591
|
if (coreVersion === `0.0.0-${'PLACEHOLDER'}`) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.
|
|
3
|
+
* @license Angular v19.2.13
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -11,7 +11,7 @@ require('os');
|
|
|
11
11
|
var checker = require('./checker-5pyJrZ9G.cjs');
|
|
12
12
|
var index = require('./index-BIvVb6in.cjs');
|
|
13
13
|
require('path');
|
|
14
|
-
var project_paths = require('./project_paths-
|
|
14
|
+
var project_paths = require('./project_paths-CyWVEsbT.cjs');
|
|
15
15
|
|
|
16
16
|
function getMemberName(member) {
|
|
17
17
|
if (member.name === undefined) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.
|
|
3
|
+
* @license Angular v19.2.13
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -10,8 +10,8 @@ var checker = require('./checker-5pyJrZ9G.cjs');
|
|
|
10
10
|
var ts = require('typescript');
|
|
11
11
|
require('os');
|
|
12
12
|
var assert = require('assert');
|
|
13
|
-
var index = require('./index-
|
|
14
|
-
var project_paths = require('./project_paths-
|
|
13
|
+
var index = require('./index-BPhQoCcF.cjs');
|
|
14
|
+
var project_paths = require('./project_paths-CyWVEsbT.cjs');
|
|
15
15
|
var leading_space = require('./leading_space-D9nQ8UQC.cjs');
|
|
16
16
|
require('./index-BIvVb6in.cjs');
|
|
17
17
|
require('path');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.
|
|
3
|
+
* @license Angular v19.2.13
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -11,9 +11,9 @@ require('os');
|
|
|
11
11
|
var checker = require('./checker-5pyJrZ9G.cjs');
|
|
12
12
|
var index$1 = require('./index-BIvVb6in.cjs');
|
|
13
13
|
require('path');
|
|
14
|
-
var project_paths = require('./project_paths-
|
|
15
|
-
var apply_import_manager = require('./apply_import_manager-
|
|
16
|
-
var index = require('./index-
|
|
14
|
+
var project_paths = require('./project_paths-CyWVEsbT.cjs');
|
|
15
|
+
var apply_import_manager = require('./apply_import_manager-QQDfWa1Z.cjs');
|
|
16
|
+
var index = require('./index-BPhQoCcF.cjs');
|
|
17
17
|
require('@angular-devkit/core');
|
|
18
18
|
require('node:path/posix');
|
|
19
19
|
require('fs');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.
|
|
3
|
+
* @license Angular v19.2.13
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -480,7 +480,7 @@ function createPlainTsProgram(tsHost, tsconfig, optionOverrides) {
|
|
|
480
480
|
ngCompiler: null,
|
|
481
481
|
program,
|
|
482
482
|
userOptions: tsconfig.options,
|
|
483
|
-
|
|
483
|
+
__programAbsoluteRootFileNames: tsconfig.rootNames,
|
|
484
484
|
host: tsHost,
|
|
485
485
|
};
|
|
486
486
|
}
|
|
@@ -503,7 +503,7 @@ function createNgtscProgram(tsHost, tsconfig, optionOverrides) {
|
|
|
503
503
|
ngCompiler: ngtscProgram.compiler,
|
|
504
504
|
program: ngtscProgram.getTsProgram(),
|
|
505
505
|
userOptions: tsconfig.options,
|
|
506
|
-
|
|
506
|
+
__programAbsoluteRootFileNames: tsconfig.rootNames,
|
|
507
507
|
host: tsHost,
|
|
508
508
|
};
|
|
509
509
|
}
|
|
@@ -538,6 +538,33 @@ function createBaseProgramInfo(absoluteTsconfigPath, fs, optionOverrides = {}) {
|
|
|
538
538
|
}
|
|
539
539
|
return createNgtscProgram(tsHost, tsconfig, optionOverrides);
|
|
540
540
|
}
|
|
541
|
+
/**
|
|
542
|
+
* Creates the {@link ProgramInfo} from the given base information.
|
|
543
|
+
*
|
|
544
|
+
* This function purely exists to support custom programs that are
|
|
545
|
+
* intended to be injected into Tsurge migrations. e.g. for language
|
|
546
|
+
* service refactorings.
|
|
547
|
+
*/
|
|
548
|
+
function getProgramInfoFromBaseInfo(baseInfo) {
|
|
549
|
+
const fullProgramSourceFiles = [...baseInfo.program.getSourceFiles()];
|
|
550
|
+
const sourceFiles = fullProgramSourceFiles.filter((f) => !f.isDeclarationFile &&
|
|
551
|
+
// Note `isShim` will work for the initial program, but for TCB programs, the shims are no longer annotated.
|
|
552
|
+
!checker.isShim(f) &&
|
|
553
|
+
!f.fileName.endsWith('.ngtypecheck.ts'));
|
|
554
|
+
// Sort it by length in reverse order (longest first). This speeds up lookups,
|
|
555
|
+
// since there's no need to keep going through the array once a match is found.
|
|
556
|
+
const sortedRootDirs = checker.getRootDirs(baseInfo.host, baseInfo.userOptions).sort((a, b) => b.length - a.length);
|
|
557
|
+
// TODO: Consider also following TS's logic here, finding the common source root.
|
|
558
|
+
// See: Program#getCommonSourceDirectory.
|
|
559
|
+
const primaryRoot = checker.absoluteFrom(baseInfo.userOptions.rootDir ?? sortedRootDirs.at(-1) ?? baseInfo.program.getCurrentDirectory());
|
|
560
|
+
return {
|
|
561
|
+
...baseInfo,
|
|
562
|
+
sourceFiles,
|
|
563
|
+
fullProgramSourceFiles,
|
|
564
|
+
sortedRootDirs,
|
|
565
|
+
projectRoot: primaryRoot,
|
|
566
|
+
};
|
|
567
|
+
}
|
|
541
568
|
|
|
542
569
|
/**
|
|
543
570
|
* @private
|
|
@@ -549,37 +576,14 @@ function createBaseProgramInfo(absoluteTsconfigPath, fs, optionOverrides = {}) {
|
|
|
549
576
|
*/
|
|
550
577
|
class TsurgeBaseMigration {
|
|
551
578
|
/**
|
|
552
|
-
*
|
|
553
|
-
* overriding {@link prepareProgram} is more desirable.
|
|
579
|
+
* Creates the TypeScript program for a given compilation unit.
|
|
554
580
|
*
|
|
555
581
|
* By default:
|
|
556
582
|
* - In 3P: Ngtsc programs are being created.
|
|
557
583
|
* - In 1P: Ngtsc or TS programs are created based on the Blaze target.
|
|
558
584
|
*/
|
|
559
|
-
createProgram(tsconfigAbsPath, fs,
|
|
560
|
-
return createBaseProgramInfo(tsconfigAbsPath, fs,
|
|
561
|
-
}
|
|
562
|
-
// Optional function to prepare the base `ProgramInfo` even further,
|
|
563
|
-
// for the analyze and migrate phases. E.g. determining source files.
|
|
564
|
-
prepareProgram(info) {
|
|
565
|
-
const fullProgramSourceFiles = [...info.program.getSourceFiles()];
|
|
566
|
-
const sourceFiles = fullProgramSourceFiles.filter((f) => !f.isDeclarationFile &&
|
|
567
|
-
// Note `isShim` will work for the initial program, but for TCB programs, the shims are no longer annotated.
|
|
568
|
-
!checker.isShim(f) &&
|
|
569
|
-
!f.fileName.endsWith('.ngtypecheck.ts'));
|
|
570
|
-
// Sort it by length in reverse order (longest first). This speeds up lookups,
|
|
571
|
-
// since there's no need to keep going through the array once a match is found.
|
|
572
|
-
const sortedRootDirs = checker.getRootDirs(info.host, info.userOptions).sort((a, b) => b.length - a.length);
|
|
573
|
-
// TODO: Consider also following TS's logic here, finding the common source root.
|
|
574
|
-
// See: Program#getCommonSourceDirectory.
|
|
575
|
-
const primaryRoot = checker.absoluteFrom(info.userOptions.rootDir ?? sortedRootDirs.at(-1) ?? info.program.getCurrentDirectory());
|
|
576
|
-
return {
|
|
577
|
-
...info,
|
|
578
|
-
sourceFiles,
|
|
579
|
-
fullProgramSourceFiles,
|
|
580
|
-
sortedRootDirs,
|
|
581
|
-
projectRoot: primaryRoot,
|
|
582
|
-
};
|
|
585
|
+
createProgram(tsconfigAbsPath, fs, optionsOverride) {
|
|
586
|
+
return getProgramInfoFromBaseInfo(createBaseProgramInfo(tsconfigAbsPath, fs, optionsOverride));
|
|
583
587
|
}
|
|
584
588
|
}
|
|
585
589
|
|
|
@@ -635,10 +639,11 @@ async function runMigrationInDevkit(config) {
|
|
|
635
639
|
const migration = config.getMigration(fs);
|
|
636
640
|
const unitResults = [];
|
|
637
641
|
const isFunnelMigration = migration instanceof TsurgeFunnelMigration;
|
|
642
|
+
const compilationUnitAssignments = new Map();
|
|
638
643
|
for (const tsconfigPath of tsconfigPaths) {
|
|
639
644
|
config.beforeProgramCreation?.(tsconfigPath, exports.MigrationStage.Analysis);
|
|
640
|
-
const
|
|
641
|
-
|
|
645
|
+
const info = migration.createProgram(tsconfigPath, fs);
|
|
646
|
+
modifyProgramInfoToEnsureNonOverlappingFiles(tsconfigPath, info, compilationUnitAssignments);
|
|
642
647
|
config.afterProgramCreation?.(info, fs, exports.MigrationStage.Analysis);
|
|
643
648
|
config.beforeUnitAnalysis?.(tsconfigPath);
|
|
644
649
|
unitResults.push(await migration.analyze(info));
|
|
@@ -658,8 +663,8 @@ async function runMigrationInDevkit(config) {
|
|
|
658
663
|
replacements = [];
|
|
659
664
|
for (const tsconfigPath of tsconfigPaths) {
|
|
660
665
|
config.beforeProgramCreation?.(tsconfigPath, exports.MigrationStage.Migrate);
|
|
661
|
-
const
|
|
662
|
-
|
|
666
|
+
const info = migration.createProgram(tsconfigPath, fs);
|
|
667
|
+
modifyProgramInfoToEnsureNonOverlappingFiles(tsconfigPath, info, compilationUnitAssignments);
|
|
663
668
|
config.afterProgramCreation?.(info, fs, exports.MigrationStage.Migrate);
|
|
664
669
|
const result = await migration.migrate(globalMeta, info);
|
|
665
670
|
replacements.push(...result.replacements);
|
|
@@ -683,6 +688,31 @@ async function runMigrationInDevkit(config) {
|
|
|
683
688
|
}
|
|
684
689
|
config.whenDone?.(await migration.stats(globalMeta));
|
|
685
690
|
}
|
|
691
|
+
/**
|
|
692
|
+
* Special logic for devkit migrations. In the Angular CLI, or in 3P precisely,
|
|
693
|
+
* projects can have tsconfigs with overlapping source files. i.e. two tsconfigs
|
|
694
|
+
* like e.g. build or test include the same `ts.SourceFile` (`.ts`). Migrations
|
|
695
|
+
* should never have 2+ compilation units with overlapping source files as this
|
|
696
|
+
* can result in duplicated replacements or analysis— hence we only ever assign a
|
|
697
|
+
* source file to a compilation unit *once*.
|
|
698
|
+
*
|
|
699
|
+
* Note that this is fine as we expect Tsurge migrations to work together as
|
|
700
|
+
* isolated compilation units— so it shouldn't matter if worst case a `.ts`
|
|
701
|
+
* file ends up in the e.g. test program.
|
|
702
|
+
*/
|
|
703
|
+
function modifyProgramInfoToEnsureNonOverlappingFiles(tsconfigPath, info, compilationUnitAssignments) {
|
|
704
|
+
const sourceFiles = [];
|
|
705
|
+
for (const sf of info.sourceFiles) {
|
|
706
|
+
const assignment = compilationUnitAssignments.get(sf.fileName);
|
|
707
|
+
// File is already assigned to a different compilation unit.
|
|
708
|
+
if (assignment !== undefined && assignment !== tsconfigPath) {
|
|
709
|
+
continue;
|
|
710
|
+
}
|
|
711
|
+
compilationUnitAssignments.set(sf.fileName, tsconfigPath);
|
|
712
|
+
sourceFiles.push(sf);
|
|
713
|
+
}
|
|
714
|
+
info.sourceFiles = sourceFiles;
|
|
715
|
+
}
|
|
686
716
|
|
|
687
717
|
/** A text replacement for the given file. */
|
|
688
718
|
class Replacement {
|
|
@@ -750,6 +780,5 @@ exports.TextUpdate = TextUpdate;
|
|
|
750
780
|
exports.TsurgeComplexMigration = TsurgeComplexMigration;
|
|
751
781
|
exports.TsurgeFunnelMigration = TsurgeFunnelMigration;
|
|
752
782
|
exports.confirmAsSerializable = confirmAsSerializable;
|
|
753
|
-
exports.createBaseProgramInfo = createBaseProgramInfo;
|
|
754
783
|
exports.projectFile = projectFile;
|
|
755
784
|
exports.runMigrationInDevkit = runMigrationInDevkit;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.
|
|
3
|
+
* @license Angular v19.2.13
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -11,7 +11,7 @@ require('os');
|
|
|
11
11
|
var checker = require('./checker-5pyJrZ9G.cjs');
|
|
12
12
|
require('./index-BIvVb6in.cjs');
|
|
13
13
|
require('path');
|
|
14
|
-
var project_paths = require('./project_paths-
|
|
14
|
+
var project_paths = require('./project_paths-CyWVEsbT.cjs');
|
|
15
15
|
var ng_decorators = require('./ng_decorators-B5HCqr20.cjs');
|
|
16
16
|
var property_name = require('./property_name-BBwFuqMe.cjs');
|
|
17
17
|
require('@angular-devkit/core');
|
|
@@ -345,11 +345,9 @@ class SelfClosingTagsMigration extends project_paths.TsurgeFunnelMigration {
|
|
|
345
345
|
return project_paths.confirmAsSerializable({ tagReplacements });
|
|
346
346
|
}
|
|
347
347
|
async combine(unitA, unitB) {
|
|
348
|
-
|
|
349
|
-
...unitA.tagReplacements,
|
|
350
|
-
|
|
351
|
-
]);
|
|
352
|
-
return project_paths.confirmAsSerializable({ tagReplacements: uniqueReplacements });
|
|
348
|
+
return project_paths.confirmAsSerializable({
|
|
349
|
+
tagReplacements: [...unitA.tagReplacements, ...unitB.tagReplacements],
|
|
350
|
+
});
|
|
353
351
|
}
|
|
354
352
|
async globalMeta(combinedData) {
|
|
355
353
|
const globalMeta = {
|
|
@@ -378,18 +376,6 @@ function prepareTextReplacement(file, replacement, start, end) {
|
|
|
378
376
|
toInsert: replacement,
|
|
379
377
|
}));
|
|
380
378
|
}
|
|
381
|
-
function removeDuplicateReplacements(replacements) {
|
|
382
|
-
const uniqueFiles = new Set();
|
|
383
|
-
const result = [];
|
|
384
|
-
for (const replacement of replacements) {
|
|
385
|
-
const fileId = replacement.file.id;
|
|
386
|
-
if (!uniqueFiles.has(fileId)) {
|
|
387
|
-
uniqueFiles.add(fileId);
|
|
388
|
-
result.push(replacement);
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
return result;
|
|
392
|
-
}
|
|
393
379
|
|
|
394
380
|
function migrate(options) {
|
|
395
381
|
return async (tree, context) => {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.
|
|
3
|
+
* @license Angular v19.2.13
|
|
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-Czrg1gcB.cjs');
|
|
10
10
|
var ts = require('typescript');
|
|
11
11
|
require('os');
|
|
12
12
|
var checker = require('./checker-5pyJrZ9G.cjs');
|
|
13
13
|
var index$1 = require('./index-BIvVb6in.cjs');
|
|
14
14
|
require('path');
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
16
|
-
var index = require('./index-
|
|
15
|
+
var project_paths = require('./project_paths-CyWVEsbT.cjs');
|
|
16
|
+
var index = require('./index-BPhQoCcF.cjs');
|
|
17
17
|
var assert = require('assert');
|
|
18
|
-
var apply_import_manager = require('./apply_import_manager-
|
|
18
|
+
var apply_import_manager = require('./apply_import_manager-QQDfWa1Z.cjs');
|
|
19
19
|
require('@angular-devkit/core');
|
|
20
20
|
require('node:path/posix');
|
|
21
21
|
require('./leading_space-D9nQ8UQC.cjs');
|
|
@@ -1263,9 +1263,8 @@ class SignalInputMigration extends project_paths.TsurgeComplexMigration {
|
|
|
1263
1263
|
super();
|
|
1264
1264
|
this.config = config;
|
|
1265
1265
|
}
|
|
1266
|
-
// Override the default program creation, to add extra flags.
|
|
1267
1266
|
createProgram(tsconfigAbsPath, fs) {
|
|
1268
|
-
return
|
|
1267
|
+
return super.createProgram(tsconfigAbsPath, fs, {
|
|
1269
1268
|
_compilePoisonedComponents: true,
|
|
1270
1269
|
// We want to migrate non-exported classes too.
|
|
1271
1270
|
compileNonExportedClasses: true,
|
|
@@ -1275,8 +1274,11 @@ class SignalInputMigration extends project_paths.TsurgeComplexMigration {
|
|
|
1275
1274
|
strictTemplates: true,
|
|
1276
1275
|
});
|
|
1277
1276
|
}
|
|
1278
|
-
|
|
1279
|
-
|
|
1277
|
+
/**
|
|
1278
|
+
* Prepares the program for this migration with additional custom
|
|
1279
|
+
* fields to allow for batch-mode testing.
|
|
1280
|
+
*/
|
|
1281
|
+
_prepareProgram(info) {
|
|
1280
1282
|
// Optional filter for testing. Allows for simulation of parallel execution
|
|
1281
1283
|
// even if some tsconfig's have overlap due to sharing of TS sources.
|
|
1282
1284
|
// (this is commonly not the case in g3 where deps are `.d.ts` files).
|
|
@@ -1285,7 +1287,7 @@ class SignalInputMigration extends project_paths.TsurgeComplexMigration {
|
|
|
1285
1287
|
// Optional replacement filter. Allows parallel execution in case
|
|
1286
1288
|
// some tsconfig's have overlap due to sharing of TS sources.
|
|
1287
1289
|
// (this is commonly not the case in g3 where deps are `.d.ts` files).
|
|
1288
|
-
!limitToRootNamesOnly || info.
|
|
1290
|
+
!limitToRootNamesOnly || info.__programAbsoluteRootFileNames.includes(f.fileName));
|
|
1289
1291
|
return {
|
|
1290
1292
|
...info,
|
|
1291
1293
|
sourceFiles: filteredSourceFiles,
|
|
@@ -1295,11 +1297,12 @@ class SignalInputMigration extends project_paths.TsurgeComplexMigration {
|
|
|
1295
1297
|
prepareAnalysisDeps(info) {
|
|
1296
1298
|
const analysisInfo = {
|
|
1297
1299
|
...info,
|
|
1298
|
-
...prepareAnalysisInfo(info.program, info.ngCompiler, info.
|
|
1300
|
+
...prepareAnalysisInfo(info.program, info.ngCompiler, info.__programAbsoluteRootFileNames),
|
|
1299
1301
|
};
|
|
1300
1302
|
return analysisInfo;
|
|
1301
1303
|
}
|
|
1302
1304
|
async analyze(info) {
|
|
1305
|
+
info = this._prepareProgram(info);
|
|
1303
1306
|
const analysisDeps = this.prepareAnalysisDeps(info);
|
|
1304
1307
|
const knownInputs = new KnownInputs(info, this.config);
|
|
1305
1308
|
const result = new MigrationResult();
|
|
@@ -1346,6 +1349,7 @@ class SignalInputMigration extends project_paths.TsurgeComplexMigration {
|
|
|
1346
1349
|
return project_paths.confirmAsSerializable(convertToGlobalMeta(combinedData));
|
|
1347
1350
|
}
|
|
1348
1351
|
async migrate(globalMetadata, info, nonBatchData) {
|
|
1352
|
+
info = this._prepareProgram(info);
|
|
1349
1353
|
const knownInputs = nonBatchData?.knownInputs ?? new KnownInputs(info, this.config);
|
|
1350
1354
|
const result = nonBatchData?.result ?? new MigrationResult();
|
|
1351
1355
|
const host = nonBatchData?.host ?? createMigrationHost(info, this.config);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.
|
|
3
|
+
* @license Angular v19.2.13
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -11,11 +11,11 @@ var ts = require('typescript');
|
|
|
11
11
|
require('os');
|
|
12
12
|
var index$1 = require('./index-BIvVb6in.cjs');
|
|
13
13
|
require('path');
|
|
14
|
-
var project_paths = require('./project_paths-
|
|
15
|
-
var apply_import_manager = require('./apply_import_manager-
|
|
16
|
-
var migrate_ts_type_references = require('./migrate_ts_type_references-
|
|
14
|
+
var project_paths = require('./project_paths-CyWVEsbT.cjs');
|
|
15
|
+
var apply_import_manager = require('./apply_import_manager-QQDfWa1Z.cjs');
|
|
16
|
+
var migrate_ts_type_references = require('./migrate_ts_type_references-Czrg1gcB.cjs');
|
|
17
17
|
var assert = require('assert');
|
|
18
|
-
var index = require('./index-
|
|
18
|
+
var index = require('./index-BPhQoCcF.cjs');
|
|
19
19
|
require('@angular-devkit/core');
|
|
20
20
|
require('node:path/posix');
|
|
21
21
|
require('fs');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.
|
|
3
|
+
* @license Angular v19.2.13
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -18,14 +18,14 @@ require('module');
|
|
|
18
18
|
require('path');
|
|
19
19
|
require('url');
|
|
20
20
|
require('./index-BIvVb6in.cjs');
|
|
21
|
-
require('./project_paths-
|
|
21
|
+
require('./project_paths-CyWVEsbT.cjs');
|
|
22
22
|
require('@angular-devkit/core');
|
|
23
23
|
require('node:path/posix');
|
|
24
24
|
require('./project_tsconfig_paths-CDVxT6Ov.cjs');
|
|
25
|
-
require('./apply_import_manager-
|
|
26
|
-
require('./migrate_ts_type_references-
|
|
25
|
+
require('./apply_import_manager-QQDfWa1Z.cjs');
|
|
26
|
+
require('./migrate_ts_type_references-Czrg1gcB.cjs');
|
|
27
27
|
require('assert');
|
|
28
|
-
require('./index-
|
|
28
|
+
require('./index-BPhQoCcF.cjs');
|
|
29
29
|
require('./leading_space-D9nQ8UQC.cjs');
|
|
30
30
|
|
|
31
31
|
function migrate(options) {
|
package/testing/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v19.2.
|
|
2
|
+
* @license Angular v19.2.13
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import * as _angular_core from '@angular/core';
|
|
7
8
|
import { ɵDeferBlockDetails as _DeferBlockDetails, ɵDeferBlockState as _DeferBlockState, ComponentRef, DebugElement, ElementRef, ChangeDetectorRef, NgZone, SchemaMetadata, ɵDeferBlockBehavior as _DeferBlockBehavior, InjectionToken, PlatformRef, Type, ProviderToken, InjectOptions, InjectFlags, NgModule, Component, Directive, Pipe } from '@angular/core';
|
|
8
9
|
export { ɵDeferBlockBehavior as DeferBlockBehavior, ɵDeferBlockState as DeferBlockState } from '@angular/core';
|
|
9
10
|
import { Navigation, NavigationHistoryEntry, NavigationNavigateOptions, NavigationResult, NavigationOptions, NavigateEvent, NavigationCurrentEntryChangeEvent, NavigationTransition, NavigationUpdateCurrentEntryOptions, NavigationReloadOptions } from '../navigation_types.d-fAxd92YV.js';
|
|
@@ -688,5 +689,16 @@ declare class FakeNavigationHistoryEntry implements NavigationHistoryEntry {
|
|
|
688
689
|
dispose(): void;
|
|
689
690
|
}
|
|
690
691
|
|
|
691
|
-
|
|
692
|
+
declare class Log<T = string> {
|
|
693
|
+
logItems: T[];
|
|
694
|
+
constructor();
|
|
695
|
+
add(value: T): void;
|
|
696
|
+
fn(value: T): () => void;
|
|
697
|
+
clear(): void;
|
|
698
|
+
result(): string;
|
|
699
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Log<any>, never>;
|
|
700
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<Log<any>>;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
export { ComponentFixture, ComponentFixtureAutoDetect, ComponentFixtureNoNgZone, DeferBlockFixture, InjectSetupWrapper, TestBed, TestComponentRenderer, __core_private_testing_placeholder__, discardPeriodicTasks, fakeAsync, flush, flushMicrotasks, getTestBed, inject, resetFakeAsyncZone, tick, waitForAsync, withModule, FakeNavigation as ɵFakeNavigation, Log as ɵLog, MetadataOverrider as ɵMetadataOverrider };
|
|
692
704
|
export type { MetadataOverride, ModuleTeardownOptions, TestBedStatic, TestEnvironmentOptions, TestModuleMetadata };
|
package/weak_ref.d-DWHPG08n.d.ts
CHANGED