@angular/core 19.2.11 → 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 +108 -45
- package/fesm2022/core.mjs.map +1 -1
- 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/rxjs-interop.mjs +10 -3
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/testing.mjs +29 -3
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/untracked-BKcld_ew.mjs +1 -1
- package/fesm2022/untracked-BKcld_ew.mjs.map +1 -1
- package/index.d.ts +168 -23
- 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-DdHXpkne.js → apply_import_manager-QQDfWa1Z.cjs} +3 -3
- package/schematics/bundles/{checker-CGGdizaF.js → checker-5pyJrZ9G.cjs} +81 -63
- package/schematics/bundles/{cleanup-unused-imports.js → cleanup-unused-imports.cjs} +25 -54
- package/schematics/bundles/{compiler_host-BmQrIxJT.js → compiler_host-B1Gyeytz.cjs} +2 -2
- package/schematics/bundles/{control-flow-migration.js → control-flow-migration.cjs} +3 -3
- package/schematics/bundles/{explicit-standalone-flag.js → explicit-standalone-flag.cjs} +5 -5
- package/schematics/bundles/{imports-CIX-JgAN.js → imports-CIX-JgAN.cjs} +1 -1
- package/schematics/bundles/{index-BF06LaCS.js → index-BIvVb6in.cjs} +26 -26
- package/schematics/bundles/{index-DGcgCgNa.js → index-BPhQoCcF.cjs} +28 -19
- package/schematics/bundles/{inject-migration.js → inject-migration.cjs} +7 -7
- package/schematics/bundles/{leading_space-D9nQ8UQC.js → leading_space-D9nQ8UQC.cjs} +1 -1
- package/schematics/bundles/{migrate_ts_type_references-CE_V0IM9.js → migrate_ts_type_references-Czrg1gcB.cjs} +6 -6
- 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} +7 -7
- package/schematics/bundles/{pending-tasks.js → pending-tasks.cjs} +5 -5
- package/schematics/bundles/{project_paths-CmS2U6KE.js → project_paths-CyWVEsbT.cjs} +66 -37
- 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/{provide-initializer.js → provide-initializer.cjs} +5 -5
- package/schematics/bundles/{route-lazy-loading.js → route-lazy-loading.cjs} +5 -5
- package/schematics/bundles/{self-closing-tags-migration.js → self-closing-tags-migration.cjs} +11 -25
- package/schematics/bundles/{signal-input-migration.js → signal-input-migration.cjs} +19 -15
- package/schematics/bundles/{signal-queries-migration.js → signal-queries-migration.cjs} +9 -9
- package/schematics/bundles/{signals.js → signals.cjs} +12 -12
- package/schematics/bundles/{standalone-migration.js → standalone-migration.cjs} +8 -8
- package/schematics/collection.json +10 -10
- package/schematics/migrations.json +3 -3
- package/testing/index.d.ts +14 -2
- package/weak_ref.d-DWHPG08n.d.ts +1 -1
- package/schematics/package.json +0 -3
package/rxjs-interop/index.d.ts
CHANGED
package/schematics/bundles/{apply_import_manager-DdHXpkne.js → apply_import_manager-QQDfWa1Z.cjs}
RENAMED
|
@@ -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
|
*/
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
var ts = require('typescript');
|
|
10
10
|
require('os');
|
|
11
|
-
var checker = require('./checker-
|
|
12
|
-
var project_paths = require('./project_paths-
|
|
11
|
+
var checker = require('./checker-5pyJrZ9G.cjs');
|
|
12
|
+
var project_paths = require('./project_paths-CyWVEsbT.cjs');
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Applies import manager changes, and writes them as replacements the
|
|
@@ -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
|
*/
|
|
@@ -514,6 +514,28 @@ function parseSelectorToR3Selector(selector) {
|
|
|
514
514
|
return selector ? CssSelector.parse(selector).map(parserSelectorToR3Selector) : [];
|
|
515
515
|
}
|
|
516
516
|
|
|
517
|
+
exports.FactoryTarget = void 0;
|
|
518
|
+
(function (FactoryTarget) {
|
|
519
|
+
FactoryTarget[FactoryTarget["Directive"] = 0] = "Directive";
|
|
520
|
+
FactoryTarget[FactoryTarget["Component"] = 1] = "Component";
|
|
521
|
+
FactoryTarget[FactoryTarget["Injectable"] = 2] = "Injectable";
|
|
522
|
+
FactoryTarget[FactoryTarget["Pipe"] = 3] = "Pipe";
|
|
523
|
+
FactoryTarget[FactoryTarget["NgModule"] = 4] = "NgModule";
|
|
524
|
+
})(exports.FactoryTarget || (exports.FactoryTarget = {}));
|
|
525
|
+
var R3TemplateDependencyKind;
|
|
526
|
+
(function (R3TemplateDependencyKind) {
|
|
527
|
+
R3TemplateDependencyKind[R3TemplateDependencyKind["Directive"] = 0] = "Directive";
|
|
528
|
+
R3TemplateDependencyKind[R3TemplateDependencyKind["Pipe"] = 1] = "Pipe";
|
|
529
|
+
R3TemplateDependencyKind[R3TemplateDependencyKind["NgModule"] = 2] = "NgModule";
|
|
530
|
+
})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
|
|
531
|
+
var ViewEncapsulation;
|
|
532
|
+
(function (ViewEncapsulation) {
|
|
533
|
+
ViewEncapsulation[ViewEncapsulation["Emulated"] = 0] = "Emulated";
|
|
534
|
+
// Historically the 1 value was for `Native` encapsulation which has been removed as of v11.
|
|
535
|
+
ViewEncapsulation[ViewEncapsulation["None"] = 2] = "None";
|
|
536
|
+
ViewEncapsulation[ViewEncapsulation["ShadowDom"] = 3] = "ShadowDom";
|
|
537
|
+
})(ViewEncapsulation || (ViewEncapsulation = {}));
|
|
538
|
+
|
|
517
539
|
/**
|
|
518
540
|
* A lazily created TextEncoder instance for converting strings into UTF-8 bytes
|
|
519
541
|
*/
|
|
@@ -2829,6 +2851,10 @@ class Identifiers {
|
|
|
2829
2851
|
static forwardRef = { name: 'forwardRef', moduleName: CORE };
|
|
2830
2852
|
static resolveForwardRef = { name: 'resolveForwardRef', moduleName: CORE };
|
|
2831
2853
|
static replaceMetadata = { name: 'ɵɵreplaceMetadata', moduleName: CORE };
|
|
2854
|
+
static getReplaceMetadataURL = {
|
|
2855
|
+
name: 'ɵɵgetReplaceMetadataURL',
|
|
2856
|
+
moduleName: CORE,
|
|
2857
|
+
};
|
|
2832
2858
|
static ɵɵdefineInjectable = { name: 'ɵɵdefineInjectable', moduleName: CORE };
|
|
2833
2859
|
static declareInjectable = { name: 'ɵɵngDeclareInjectable', moduleName: CORE };
|
|
2834
2860
|
static InjectableDeclaration = {
|
|
@@ -3823,14 +3849,6 @@ var R3FactoryDelegateType;
|
|
|
3823
3849
|
R3FactoryDelegateType[R3FactoryDelegateType["Class"] = 0] = "Class";
|
|
3824
3850
|
R3FactoryDelegateType[R3FactoryDelegateType["Function"] = 1] = "Function";
|
|
3825
3851
|
})(R3FactoryDelegateType || (R3FactoryDelegateType = {}));
|
|
3826
|
-
exports.FactoryTarget = void 0;
|
|
3827
|
-
(function (FactoryTarget) {
|
|
3828
|
-
FactoryTarget[FactoryTarget["Directive"] = 0] = "Directive";
|
|
3829
|
-
FactoryTarget[FactoryTarget["Component"] = 1] = "Component";
|
|
3830
|
-
FactoryTarget[FactoryTarget["Injectable"] = 2] = "Injectable";
|
|
3831
|
-
FactoryTarget[FactoryTarget["Pipe"] = 3] = "Pipe";
|
|
3832
|
-
FactoryTarget[FactoryTarget["NgModule"] = 4] = "NgModule";
|
|
3833
|
-
})(exports.FactoryTarget || (exports.FactoryTarget = {}));
|
|
3834
3852
|
/**
|
|
3835
3853
|
* Construct a factory function expression for the given `R3FactoryMetadata`.
|
|
3836
3854
|
*/
|
|
@@ -30726,7 +30744,7 @@ function publishFacade(global) {
|
|
|
30726
30744
|
* @description
|
|
30727
30745
|
* Entry point for all public APIs of the compiler package.
|
|
30728
30746
|
*/
|
|
30729
|
-
new Version('19.2.
|
|
30747
|
+
new Version('19.2.13');
|
|
30730
30748
|
|
|
30731
30749
|
const _I18N_ATTR = 'i18n';
|
|
30732
30750
|
const _I18N_ATTR_PREFIX = 'i18n-';
|
|
@@ -31195,15 +31213,6 @@ function isAttrNode(ast) {
|
|
|
31195
31213
|
return ast.length === 1 && ast[0] instanceof Attribute;
|
|
31196
31214
|
}
|
|
31197
31215
|
|
|
31198
|
-
var FactoryTarget;
|
|
31199
|
-
(function (FactoryTarget) {
|
|
31200
|
-
FactoryTarget[FactoryTarget["Directive"] = 0] = "Directive";
|
|
31201
|
-
FactoryTarget[FactoryTarget["Component"] = 1] = "Component";
|
|
31202
|
-
FactoryTarget[FactoryTarget["Injectable"] = 2] = "Injectable";
|
|
31203
|
-
FactoryTarget[FactoryTarget["Pipe"] = 3] = "Pipe";
|
|
31204
|
-
FactoryTarget[FactoryTarget["NgModule"] = 4] = "NgModule";
|
|
31205
|
-
})(FactoryTarget || (FactoryTarget = {}));
|
|
31206
|
-
|
|
31207
31216
|
//////////////////////////////////////
|
|
31208
31217
|
// THIS FILE HAS GLOBAL SIDE EFFECT //
|
|
31209
31218
|
// (see bottom of file) //
|
|
@@ -32153,7 +32162,7 @@ class NodeJSPathManipulation {
|
|
|
32153
32162
|
// G3-ESM-MARKER: G3 uses CommonJS, but externally everything in ESM.
|
|
32154
32163
|
// CommonJS/ESM interop for determining the current file name and containing dir.
|
|
32155
32164
|
const isCommonJS = typeof __filename !== 'undefined';
|
|
32156
|
-
const currentFileUrl = isCommonJS ? null : (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('checker-
|
|
32165
|
+
const currentFileUrl = isCommonJS ? null : (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('checker-5pyJrZ9G.cjs', document.baseURI).href));
|
|
32157
32166
|
const currentFileName = isCommonJS ? __filename : url.fileURLToPath(currentFileUrl);
|
|
32158
32167
|
/**
|
|
32159
32168
|
* A wrapper around the Node.js file-system that supports readonly operations and path manipulation.
|
|
@@ -32956,14 +32965,14 @@ exports.ClassMemberKind = void 0;
|
|
|
32956
32965
|
ClassMemberKind[ClassMemberKind["Method"] = 4] = "Method";
|
|
32957
32966
|
})(exports.ClassMemberKind || (exports.ClassMemberKind = {}));
|
|
32958
32967
|
/** Possible access levels of a class member. */
|
|
32959
|
-
|
|
32968
|
+
exports.ClassMemberAccessLevel = void 0;
|
|
32960
32969
|
(function (ClassMemberAccessLevel) {
|
|
32961
32970
|
ClassMemberAccessLevel[ClassMemberAccessLevel["PublicWritable"] = 0] = "PublicWritable";
|
|
32962
32971
|
ClassMemberAccessLevel[ClassMemberAccessLevel["PublicReadonly"] = 1] = "PublicReadonly";
|
|
32963
32972
|
ClassMemberAccessLevel[ClassMemberAccessLevel["Protected"] = 2] = "Protected";
|
|
32964
32973
|
ClassMemberAccessLevel[ClassMemberAccessLevel["Private"] = 3] = "Private";
|
|
32965
32974
|
ClassMemberAccessLevel[ClassMemberAccessLevel["EcmaScriptPrivate"] = 4] = "EcmaScriptPrivate";
|
|
32966
|
-
})(ClassMemberAccessLevel || (ClassMemberAccessLevel = {}));
|
|
32975
|
+
})(exports.ClassMemberAccessLevel || (exports.ClassMemberAccessLevel = {}));
|
|
32967
32976
|
/** Indicates that a declaration is referenced through an ambient type. */
|
|
32968
32977
|
const AmbientImport = {};
|
|
32969
32978
|
|
|
@@ -33242,15 +33251,15 @@ function isIdentifier(node) {
|
|
|
33242
33251
|
*/
|
|
33243
33252
|
function classMemberAccessLevelToString(level) {
|
|
33244
33253
|
switch (level) {
|
|
33245
|
-
case ClassMemberAccessLevel.EcmaScriptPrivate:
|
|
33254
|
+
case exports.ClassMemberAccessLevel.EcmaScriptPrivate:
|
|
33246
33255
|
return 'ES private';
|
|
33247
|
-
case ClassMemberAccessLevel.Private:
|
|
33256
|
+
case exports.ClassMemberAccessLevel.Private:
|
|
33248
33257
|
return 'private';
|
|
33249
|
-
case ClassMemberAccessLevel.Protected:
|
|
33258
|
+
case exports.ClassMemberAccessLevel.Protected:
|
|
33250
33259
|
return 'protected';
|
|
33251
|
-
case ClassMemberAccessLevel.PublicReadonly:
|
|
33260
|
+
case exports.ClassMemberAccessLevel.PublicReadonly:
|
|
33252
33261
|
return 'public readonly';
|
|
33253
|
-
case ClassMemberAccessLevel.PublicWritable:
|
|
33262
|
+
case exports.ClassMemberAccessLevel.PublicWritable:
|
|
33254
33263
|
default:
|
|
33255
33264
|
return 'public';
|
|
33256
33265
|
}
|
|
@@ -33754,7 +33763,7 @@ function extractModifiersOfMember(node) {
|
|
|
33754
33763
|
const modifiers = ts.getModifiers(node);
|
|
33755
33764
|
let isStatic = false;
|
|
33756
33765
|
let isReadonly = false;
|
|
33757
|
-
let accessLevel = ClassMemberAccessLevel.PublicWritable;
|
|
33766
|
+
let accessLevel = exports.ClassMemberAccessLevel.PublicWritable;
|
|
33758
33767
|
if (modifiers !== undefined) {
|
|
33759
33768
|
for (const modifier of modifiers) {
|
|
33760
33769
|
switch (modifier.kind) {
|
|
@@ -33762,10 +33771,10 @@ function extractModifiersOfMember(node) {
|
|
|
33762
33771
|
isStatic = true;
|
|
33763
33772
|
break;
|
|
33764
33773
|
case ts.SyntaxKind.PrivateKeyword:
|
|
33765
|
-
accessLevel = ClassMemberAccessLevel.Private;
|
|
33774
|
+
accessLevel = exports.ClassMemberAccessLevel.Private;
|
|
33766
33775
|
break;
|
|
33767
33776
|
case ts.SyntaxKind.ProtectedKeyword:
|
|
33768
|
-
accessLevel = ClassMemberAccessLevel.Protected;
|
|
33777
|
+
accessLevel = exports.ClassMemberAccessLevel.Protected;
|
|
33769
33778
|
break;
|
|
33770
33779
|
case ts.SyntaxKind.ReadonlyKeyword:
|
|
33771
33780
|
isReadonly = true;
|
|
@@ -33773,11 +33782,11 @@ function extractModifiersOfMember(node) {
|
|
|
33773
33782
|
}
|
|
33774
33783
|
}
|
|
33775
33784
|
}
|
|
33776
|
-
if (isReadonly && accessLevel === ClassMemberAccessLevel.PublicWritable) {
|
|
33777
|
-
accessLevel = ClassMemberAccessLevel.PublicReadonly;
|
|
33785
|
+
if (isReadonly && accessLevel === exports.ClassMemberAccessLevel.PublicWritable) {
|
|
33786
|
+
accessLevel = exports.ClassMemberAccessLevel.PublicReadonly;
|
|
33778
33787
|
}
|
|
33779
33788
|
if (node.name !== undefined && ts.isPrivateIdentifier(node.name)) {
|
|
33780
|
-
accessLevel = ClassMemberAccessLevel.EcmaScriptPrivate;
|
|
33789
|
+
accessLevel = exports.ClassMemberAccessLevel.EcmaScriptPrivate;
|
|
33781
33790
|
}
|
|
33782
33791
|
return { accessLevel, isStatic };
|
|
33783
33792
|
}
|
|
@@ -38625,9 +38634,9 @@ const INPUT_INITIALIZER_FN = {
|
|
|
38625
38634
|
// cases where the input is intentionally not part of the public API, programmatically.
|
|
38626
38635
|
// Note: `private` is omitted intentionally as this would be a conceptual confusion point.
|
|
38627
38636
|
allowedAccessLevels: [
|
|
38628
|
-
ClassMemberAccessLevel.PublicWritable,
|
|
38629
|
-
ClassMemberAccessLevel.PublicReadonly,
|
|
38630
|
-
ClassMemberAccessLevel.Protected,
|
|
38637
|
+
exports.ClassMemberAccessLevel.PublicWritable,
|
|
38638
|
+
exports.ClassMemberAccessLevel.PublicReadonly,
|
|
38639
|
+
exports.ClassMemberAccessLevel.Protected,
|
|
38631
38640
|
],
|
|
38632
38641
|
};
|
|
38633
38642
|
/**
|
|
@@ -38666,9 +38675,9 @@ const MODEL_INITIALIZER_FN = {
|
|
|
38666
38675
|
// accessing `protected` or `private` members works at runtime, so we can allow
|
|
38667
38676
|
// cases where the input is intentionally not part of the public API, programmatically.
|
|
38668
38677
|
allowedAccessLevels: [
|
|
38669
|
-
ClassMemberAccessLevel.PublicWritable,
|
|
38670
|
-
ClassMemberAccessLevel.PublicReadonly,
|
|
38671
|
-
ClassMemberAccessLevel.Protected,
|
|
38678
|
+
exports.ClassMemberAccessLevel.PublicWritable,
|
|
38679
|
+
exports.ClassMemberAccessLevel.PublicReadonly,
|
|
38680
|
+
exports.ClassMemberAccessLevel.Protected,
|
|
38672
38681
|
],
|
|
38673
38682
|
};
|
|
38674
38683
|
/**
|
|
@@ -38711,9 +38720,9 @@ function tryParseSignalModelMapping(member, reflector, importTracker) {
|
|
|
38711
38720
|
// component API, programmatically.
|
|
38712
38721
|
// Note: `private` is omitted intentionally as this would be a conceptual confusion point.
|
|
38713
38722
|
const allowedAccessLevels = [
|
|
38714
|
-
ClassMemberAccessLevel.PublicWritable,
|
|
38715
|
-
ClassMemberAccessLevel.PublicReadonly,
|
|
38716
|
-
ClassMemberAccessLevel.Protected,
|
|
38723
|
+
exports.ClassMemberAccessLevel.PublicWritable,
|
|
38724
|
+
exports.ClassMemberAccessLevel.PublicReadonly,
|
|
38725
|
+
exports.ClassMemberAccessLevel.Protected,
|
|
38717
38726
|
];
|
|
38718
38727
|
/** Possible functions that can declare an output. */
|
|
38719
38728
|
const OUTPUT_INITIALIZER_FNS = [
|
|
@@ -38776,10 +38785,10 @@ const QUERY_INITIALIZER_FNS = queryFunctionNames.map((fnName) => ({
|
|
|
38776
38785
|
// Support for ES private fields requires special caution and complexity when partial
|
|
38777
38786
|
// output is linked— hence not supported. TS private members are allowed in static blocks.
|
|
38778
38787
|
allowedAccessLevels: [
|
|
38779
|
-
ClassMemberAccessLevel.PublicWritable,
|
|
38780
|
-
ClassMemberAccessLevel.PublicReadonly,
|
|
38781
|
-
ClassMemberAccessLevel.Protected,
|
|
38782
|
-
ClassMemberAccessLevel.Private,
|
|
38788
|
+
exports.ClassMemberAccessLevel.PublicWritable,
|
|
38789
|
+
exports.ClassMemberAccessLevel.PublicReadonly,
|
|
38790
|
+
exports.ClassMemberAccessLevel.Protected,
|
|
38791
|
+
exports.ClassMemberAccessLevel.Private,
|
|
38783
38792
|
],
|
|
38784
38793
|
}));
|
|
38785
38794
|
// The `descendants` option is enabled by default, except for content children.
|
|
@@ -47437,6 +47446,7 @@ class TemplateTypeCheckerImpl {
|
|
|
47437
47446
|
*/
|
|
47438
47447
|
elementTagCache = new Map();
|
|
47439
47448
|
isComplete = false;
|
|
47449
|
+
priorResultsAdopted = false;
|
|
47440
47450
|
constructor(originalProgram, programDriver, typeCheckAdapter, config, refEmitter, reflector, compilerHost, priorBuild, metaReader, localMetaReader, ngModuleIndex, componentScopeReader, typeCheckScopeRegistry, perf) {
|
|
47441
47451
|
this.originalProgram = originalProgram;
|
|
47442
47452
|
this.programDriver = programDriver;
|
|
@@ -47683,26 +47693,36 @@ class TemplateTypeCheckerImpl {
|
|
|
47683
47693
|
this.completionCache.set(component, engine);
|
|
47684
47694
|
return engine;
|
|
47685
47695
|
}
|
|
47686
|
-
|
|
47687
|
-
|
|
47688
|
-
if (this.state.has(sfPath)) {
|
|
47689
|
-
const existingResults = this.state.get(sfPath);
|
|
47690
|
-
if (existingResults.isComplete) {
|
|
47691
|
-
// All data for this file has already been generated, so no need to adopt anything.
|
|
47692
|
-
return;
|
|
47693
|
-
}
|
|
47694
|
-
}
|
|
47695
|
-
const previousResults = this.priorBuild.priorTypeCheckingResultsFor(sf);
|
|
47696
|
-
if (previousResults === null || !previousResults.isComplete) {
|
|
47696
|
+
maybeAdoptPriorResults() {
|
|
47697
|
+
if (this.priorResultsAdopted) {
|
|
47697
47698
|
return;
|
|
47698
47699
|
}
|
|
47699
|
-
this.
|
|
47700
|
-
|
|
47700
|
+
for (const sf of this.originalProgram.getSourceFiles()) {
|
|
47701
|
+
if (sf.isDeclarationFile || isShim(sf)) {
|
|
47702
|
+
continue;
|
|
47703
|
+
}
|
|
47704
|
+
const sfPath = absoluteFromSourceFile(sf);
|
|
47705
|
+
if (this.state.has(sfPath)) {
|
|
47706
|
+
const existingResults = this.state.get(sfPath);
|
|
47707
|
+
if (existingResults.isComplete) {
|
|
47708
|
+
// All data for this file has already been generated, so no need to adopt anything.
|
|
47709
|
+
continue;
|
|
47710
|
+
}
|
|
47711
|
+
}
|
|
47712
|
+
const previousResults = this.priorBuild.priorTypeCheckingResultsFor(sf);
|
|
47713
|
+
if (previousResults === null || !previousResults.isComplete) {
|
|
47714
|
+
continue;
|
|
47715
|
+
}
|
|
47716
|
+
this.perf.eventCount(exports.PerfEvent.ReuseTypeCheckFile);
|
|
47717
|
+
this.state.set(sfPath, previousResults);
|
|
47718
|
+
}
|
|
47719
|
+
this.priorResultsAdopted = true;
|
|
47701
47720
|
}
|
|
47702
47721
|
ensureAllShimsForAllFiles() {
|
|
47703
47722
|
if (this.isComplete) {
|
|
47704
47723
|
return;
|
|
47705
47724
|
}
|
|
47725
|
+
this.maybeAdoptPriorResults();
|
|
47706
47726
|
this.perf.inPhase(exports.PerfPhase.TcbGeneration, () => {
|
|
47707
47727
|
const host = new WholeProgramTypeCheckingHost(this);
|
|
47708
47728
|
const ctx = this.newContext(host);
|
|
@@ -47710,7 +47730,6 @@ class TemplateTypeCheckerImpl {
|
|
|
47710
47730
|
if (sf.isDeclarationFile || isShim(sf)) {
|
|
47711
47731
|
continue;
|
|
47712
47732
|
}
|
|
47713
|
-
this.maybeAdoptPriorResultsForFile(sf);
|
|
47714
47733
|
const sfPath = absoluteFromSourceFile(sf);
|
|
47715
47734
|
const fileData = this.getFileData(sfPath);
|
|
47716
47735
|
if (fileData.isComplete) {
|
|
@@ -47724,8 +47743,8 @@ class TemplateTypeCheckerImpl {
|
|
|
47724
47743
|
});
|
|
47725
47744
|
}
|
|
47726
47745
|
ensureAllShimsForOneFile(sf) {
|
|
47746
|
+
this.maybeAdoptPriorResults();
|
|
47727
47747
|
this.perf.inPhase(exports.PerfPhase.TcbGeneration, () => {
|
|
47728
|
-
this.maybeAdoptPriorResultsForFile(sf);
|
|
47729
47748
|
const sfPath = absoluteFromSourceFile(sf);
|
|
47730
47749
|
const fileData = this.getFileData(sfPath);
|
|
47731
47750
|
if (fileData.isComplete) {
|
|
@@ -47740,10 +47759,10 @@ class TemplateTypeCheckerImpl {
|
|
|
47740
47759
|
});
|
|
47741
47760
|
}
|
|
47742
47761
|
ensureShimForComponent(component) {
|
|
47762
|
+
this.maybeAdoptPriorResults();
|
|
47743
47763
|
const sf = component.getSourceFile();
|
|
47744
47764
|
const sfPath = absoluteFromSourceFile(sf);
|
|
47745
47765
|
const shimPath = TypeCheckShimGenerator.shimFor(sfPath);
|
|
47746
|
-
this.maybeAdoptPriorResultsForFile(sf);
|
|
47747
47766
|
const fileData = this.getFileData(sfPath);
|
|
47748
47767
|
if (fileData.shimData.has(shimPath)) {
|
|
47749
47768
|
// All data for this component is available.
|
|
@@ -48248,7 +48267,6 @@ exports.IcuPlaceholder = IcuPlaceholder;
|
|
|
48248
48267
|
exports.Identifiers = Identifiers;
|
|
48249
48268
|
exports.ImplicitReceiver = ImplicitReceiver;
|
|
48250
48269
|
exports.ImportManager = ImportManager;
|
|
48251
|
-
exports.InstantiateExpr = InstantiateExpr;
|
|
48252
48270
|
exports.Interpolation = Interpolation$1;
|
|
48253
48271
|
exports.InterpolationConfig = InterpolationConfig;
|
|
48254
48272
|
exports.InvokeFunctionExpr = InvokeFunctionExpr;
|
|
@@ -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
|
*/
|
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
|
|
9
9
|
require('@angular-devkit/core');
|
|
10
10
|
require('node:path/posix');
|
|
11
|
-
var project_paths = require('./project_paths-
|
|
11
|
+
var project_paths = require('./project_paths-CyWVEsbT.cjs');
|
|
12
12
|
var ts = require('typescript');
|
|
13
13
|
require('os');
|
|
14
|
-
var checker = require('./checker-
|
|
15
|
-
var index = require('./index-
|
|
14
|
+
var checker = require('./checker-5pyJrZ9G.cjs');
|
|
15
|
+
var index = require('./index-BIvVb6in.cjs');
|
|
16
16
|
require('path');
|
|
17
|
-
var apply_import_manager = require('./apply_import_manager-
|
|
17
|
+
var apply_import_manager = require('./apply_import_manager-QQDfWa1Z.cjs');
|
|
18
18
|
require('@angular-devkit/schematics');
|
|
19
|
-
require('./project_tsconfig_paths-CDVxT6Ov.
|
|
19
|
+
require('./project_tsconfig_paths-CDVxT6Ov.cjs');
|
|
20
20
|
require('fs');
|
|
21
21
|
require('module');
|
|
22
22
|
require('url');
|
|
@@ -37,61 +37,42 @@ class UnusedImportsMigration extends project_paths.TsurgeFunnelMigration {
|
|
|
37
37
|
async analyze(info) {
|
|
38
38
|
const nodePositions = new Map();
|
|
39
39
|
const replacements = [];
|
|
40
|
-
|
|
40
|
+
let removedImports = 0;
|
|
41
41
|
let changedFiles = 0;
|
|
42
42
|
info.ngCompiler?.getDiagnostics().forEach((diag) => {
|
|
43
43
|
if (diag.file !== undefined &&
|
|
44
44
|
diag.start !== undefined &&
|
|
45
45
|
diag.length !== undefined &&
|
|
46
46
|
diag.code === checker.ngErrorCode(checker.ErrorCode.UNUSED_STANDALONE_IMPORTS)) {
|
|
47
|
+
// Skip files that aren't owned by this compilation unit.
|
|
48
|
+
if (!info.sourceFiles.includes(diag.file)) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
47
51
|
if (!nodePositions.has(diag.file)) {
|
|
48
52
|
nodePositions.set(diag.file, new Set());
|
|
49
53
|
}
|
|
50
|
-
nodePositions.get(diag.file).add(this.
|
|
54
|
+
nodePositions.get(diag.file).add(this.getNodeKey(diag.start, diag.length));
|
|
51
55
|
}
|
|
52
56
|
});
|
|
53
57
|
nodePositions.forEach((locations, sourceFile) => {
|
|
54
58
|
const resolvedLocations = this.resolveRemovalLocations(sourceFile, locations);
|
|
55
59
|
const usageAnalysis = this.analyzeUsages(sourceFile, resolvedLocations);
|
|
56
60
|
if (resolvedLocations.allRemovedIdentifiers.size > 0) {
|
|
61
|
+
removedImports += resolvedLocations.allRemovedIdentifiers.size;
|
|
57
62
|
changedFiles++;
|
|
58
|
-
resolvedLocations.allRemovedIdentifiers.forEach((identifier) => {
|
|
59
|
-
removedIdentifiers.push(this.getNodeID(identifier.getStart(), identifier.getWidth()));
|
|
60
|
-
});
|
|
61
63
|
}
|
|
62
64
|
this.generateReplacements(sourceFile, resolvedLocations, usageAnalysis, info, replacements);
|
|
63
65
|
});
|
|
64
|
-
return project_paths.confirmAsSerializable({ replacements,
|
|
66
|
+
return project_paths.confirmAsSerializable({ replacements, removedImports, changedFiles });
|
|
65
67
|
}
|
|
66
68
|
async migrate(globalData) {
|
|
67
69
|
return project_paths.confirmAsSerializable(globalData);
|
|
68
70
|
}
|
|
69
71
|
async combine(unitA, unitB) {
|
|
70
|
-
const combinedReplacements = [];
|
|
71
|
-
const combinedRemovedIdentifiers = [];
|
|
72
|
-
const seenReplacements = new Set();
|
|
73
|
-
const seenIdentifiers = new Set();
|
|
74
|
-
const changedFileIds = new Set();
|
|
75
|
-
[unitA, unitB].forEach((unit) => {
|
|
76
|
-
for (const replacement of unit.replacements) {
|
|
77
|
-
const key = this.getReplacementID(replacement);
|
|
78
|
-
changedFileIds.add(replacement.projectFile.id);
|
|
79
|
-
if (!seenReplacements.has(key)) {
|
|
80
|
-
seenReplacements.add(key);
|
|
81
|
-
combinedReplacements.push(replacement);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
for (const identifier of unit.removedIdentifiers) {
|
|
85
|
-
if (!seenIdentifiers.has(identifier)) {
|
|
86
|
-
seenIdentifiers.add(identifier);
|
|
87
|
-
combinedRemovedIdentifiers.push(identifier);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
72
|
return project_paths.confirmAsSerializable({
|
|
92
|
-
replacements:
|
|
93
|
-
|
|
94
|
-
changedFiles:
|
|
73
|
+
replacements: [...unitA.replacements, ...unitB.replacements],
|
|
74
|
+
removedImports: unitA.removedImports + unitB.removedImports,
|
|
75
|
+
changedFiles: unitA.changedFiles + unitB.changedFiles,
|
|
95
76
|
});
|
|
96
77
|
}
|
|
97
78
|
async globalMeta(combinedData) {
|
|
@@ -100,20 +81,15 @@ class UnusedImportsMigration extends project_paths.TsurgeFunnelMigration {
|
|
|
100
81
|
async stats(globalMetadata) {
|
|
101
82
|
return {
|
|
102
83
|
counters: {
|
|
103
|
-
removedImports: globalMetadata.
|
|
84
|
+
removedImports: globalMetadata.removedImports,
|
|
104
85
|
changedFiles: globalMetadata.changedFiles,
|
|
105
86
|
},
|
|
106
87
|
};
|
|
107
88
|
}
|
|
108
|
-
/** Gets
|
|
109
|
-
|
|
89
|
+
/** Gets a key that can be used to look up a node based on its location. */
|
|
90
|
+
getNodeKey(start, length) {
|
|
110
91
|
return `${start}/${length}`;
|
|
111
92
|
}
|
|
112
|
-
/** Gets a unique ID for a replacement. */
|
|
113
|
-
getReplacementID(replacement) {
|
|
114
|
-
const { position, end, toInsert } = replacement.update.data;
|
|
115
|
-
return replacement.projectFile.id + '/' + position + '/' + end + '/' + toInsert;
|
|
116
|
-
}
|
|
117
93
|
/**
|
|
118
94
|
* Resolves a set of node locations to the actual AST nodes that need to be migrated.
|
|
119
95
|
* @param sourceFile File in which to resolve the locations.
|
|
@@ -135,7 +111,7 @@ class UnusedImportsMigration extends project_paths.TsurgeFunnelMigration {
|
|
|
135
111
|
if (!parent) {
|
|
136
112
|
return;
|
|
137
113
|
}
|
|
138
|
-
if (locations.has(this.
|
|
114
|
+
if (locations.has(this.getNodeKey(node.getStart(), node.getWidth()))) {
|
|
139
115
|
// When the entire array needs to be cleared, the diagnostic is
|
|
140
116
|
// reported on the property assignment, rather than an array element.
|
|
141
117
|
if (ts.isPropertyAssignment(parent) &&
|
|
@@ -144,7 +120,7 @@ class UnusedImportsMigration extends project_paths.TsurgeFunnelMigration {
|
|
|
144
120
|
result.fullRemovals.add(parent.initializer);
|
|
145
121
|
parent.initializer.elements.forEach((element) => {
|
|
146
122
|
if (ts.isIdentifier(element)) {
|
|
147
|
-
result.allRemovedIdentifiers.add(element);
|
|
123
|
+
result.allRemovedIdentifiers.add(element.text);
|
|
148
124
|
}
|
|
149
125
|
});
|
|
150
126
|
}
|
|
@@ -153,7 +129,7 @@ class UnusedImportsMigration extends project_paths.TsurgeFunnelMigration {
|
|
|
153
129
|
result.partialRemovals.set(parent, new Set());
|
|
154
130
|
}
|
|
155
131
|
result.partialRemovals.get(parent).add(node);
|
|
156
|
-
result.allRemovedIdentifiers.add(node);
|
|
132
|
+
result.allRemovedIdentifiers.add(node.text);
|
|
157
133
|
}
|
|
158
134
|
}
|
|
159
135
|
};
|
|
@@ -247,13 +223,8 @@ class UnusedImportsMigration extends project_paths.TsurgeFunnelMigration {
|
|
|
247
223
|
names.forEach((symbolName, localName) => {
|
|
248
224
|
// Note that in the `identifierCounts` lookup both zero and undefined
|
|
249
225
|
// are valid and mean that the identifiers isn't being used anymore.
|
|
250
|
-
if (!identifierCounts.get(localName)) {
|
|
251
|
-
|
|
252
|
-
if (identifier.text === localName) {
|
|
253
|
-
importManager.removeImport(sourceFile, symbolName, moduleName);
|
|
254
|
-
break;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
226
|
+
if (allRemovedIdentifiers.has(localName) && !identifierCounts.get(localName)) {
|
|
227
|
+
importManager.removeImport(sourceFile, symbolName, moduleName);
|
|
257
228
|
}
|
|
258
229
|
});
|
|
259
230
|
});
|
|
@@ -1,13 +1,13 @@
|
|
|
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
9
|
var ts = require('typescript');
|
|
10
|
-
var checker = require('./checker-
|
|
10
|
+
var checker = require('./checker-5pyJrZ9G.cjs');
|
|
11
11
|
require('os');
|
|
12
12
|
var p = require('path');
|
|
13
13
|
|
|
@@ -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
|
*/
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
var schematics = require('@angular-devkit/schematics');
|
|
10
10
|
var p = require('path');
|
|
11
|
-
var compiler_host = require('./compiler_host-
|
|
12
|
-
var checker = require('./checker-
|
|
11
|
+
var compiler_host = require('./compiler_host-B1Gyeytz.cjs');
|
|
12
|
+
var checker = require('./checker-5pyJrZ9G.cjs');
|
|
13
13
|
var ts = require('typescript');
|
|
14
14
|
require('os');
|
|
15
15
|
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
|
*/
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
var schematics = require('@angular-devkit/schematics');
|
|
10
10
|
var p = require('path');
|
|
11
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-CDVxT6Ov.
|
|
12
|
-
var compiler_host = require('./compiler_host-
|
|
11
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-CDVxT6Ov.cjs');
|
|
12
|
+
var compiler_host = require('./compiler_host-B1Gyeytz.cjs');
|
|
13
13
|
var ts = require('typescript');
|
|
14
|
-
var imports = require('./imports-CIX-JgAN.
|
|
14
|
+
var imports = require('./imports-CIX-JgAN.cjs');
|
|
15
15
|
require('@angular-devkit/core');
|
|
16
|
-
require('./checker-
|
|
16
|
+
require('./checker-5pyJrZ9G.cjs');
|
|
17
17
|
require('os');
|
|
18
18
|
require('fs');
|
|
19
19
|
require('module');
|