@angular/compiler-cli 19.1.4 → 19.1.6
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/bundles/{chunk-FKFYHCYY.js → chunk-2MIQQ3RF.js} +3 -3
- package/bundles/{chunk-VKWVSPWR.js → chunk-2NHOVPL3.js} +2 -2
- package/bundles/{chunk-XZ4L2FK2.js → chunk-3Q7JGQD2.js} +2 -2
- package/bundles/{chunk-DTXH7LOW.js → chunk-K3P5YJTN.js} +70 -17
- package/bundles/chunk-K3P5YJTN.js.map +6 -0
- package/bundles/chunk-KEYCV7GA.js +1 -1
- package/bundles/{chunk-IWQC66R5.js → chunk-QVVMVGOA.js} +2 -2
- package/bundles/index.js +5 -5
- package/bundles/private/migrations.js +1 -1
- package/bundles/private/tooling.js +3 -3
- package/bundles/src/bin/ng_xi18n.js +4 -4
- package/bundles/src/bin/ngc.js +4 -4
- package/bundles_metadata.json +1 -1
- package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
- package/package.json +2 -2
- package/src/ngtsc/hmr/src/extract_dependencies.d.ts +8 -4
- package/src/ngtsc/hmr/src/metadata.d.ts +2 -1
- package/bundles/chunk-DTXH7LOW.js.map +0 -6
- /package/bundles/{chunk-FKFYHCYY.js.map → chunk-2MIQQ3RF.js.map} +0 -0
- /package/bundles/{chunk-VKWVSPWR.js.map → chunk-2NHOVPL3.js.map} +0 -0
- /package/bundles/{chunk-XZ4L2FK2.js.map → chunk-3Q7JGQD2.js.map} +0 -0
- /package/bundles/{chunk-IWQC66R5.js.map → chunk-QVVMVGOA.js.map} +0 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
angularJitApplicationTransform
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2NHOVPL3.js";
|
|
8
8
|
import {
|
|
9
9
|
CompilationMode,
|
|
10
10
|
ComponentDecoratorHandler,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
retagAllTsFiles,
|
|
52
52
|
tryParseInitializerApi,
|
|
53
53
|
untagAllTsFiles
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-K3P5YJTN.js";
|
|
55
55
|
import {
|
|
56
56
|
AbsoluteModuleStrategy,
|
|
57
57
|
AliasStrategy,
|
|
@@ -5034,4 +5034,4 @@ export {
|
|
|
5034
5034
|
* Use of this source code is governed by an MIT-style license that can be
|
|
5035
5035
|
* found in the LICENSE file at https://angular.dev/license
|
|
5036
5036
|
*/
|
|
5037
|
-
//# sourceMappingURL=chunk-
|
|
5037
|
+
//# sourceMappingURL=chunk-2MIQQ3RF.js.map
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
tryParseSignalInputMapping,
|
|
11
11
|
tryParseSignalModelMapping,
|
|
12
12
|
tryParseSignalQueryFromInitializer
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-K3P5YJTN.js";
|
|
14
14
|
import {
|
|
15
15
|
ImportManager,
|
|
16
16
|
ImportedSymbolsTracker,
|
|
@@ -536,4 +536,4 @@ export {
|
|
|
536
536
|
* Use of this source code is governed by an MIT-style license that can be
|
|
537
537
|
* found in the LICENSE file at https://angular.dev/license
|
|
538
538
|
*/
|
|
539
|
-
//# sourceMappingURL=chunk-
|
|
539
|
+
//# sourceMappingURL=chunk-2NHOVPL3.js.map
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
angularJitApplicationTransform
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2NHOVPL3.js";
|
|
8
8
|
|
|
9
9
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/private/tooling.mjs
|
|
10
10
|
var GLOBAL_DEFS_FOR_TERSER = {
|
|
@@ -31,4 +31,4 @@ export {
|
|
|
31
31
|
* Use of this source code is governed by an MIT-style license that can be
|
|
32
32
|
* found in the LICENSE file at https://angular.dev/license
|
|
33
33
|
*/
|
|
34
|
-
//# sourceMappingURL=chunk-
|
|
34
|
+
//# sourceMappingURL=chunk-3Q7JGQD2.js.map
|
|
@@ -741,10 +741,10 @@ var StaticInterpreter = class {
|
|
|
741
741
|
visitEnumDeclaration(node, context) {
|
|
742
742
|
const enumRef = this.getReference(node, context);
|
|
743
743
|
const map = /* @__PURE__ */ new Map();
|
|
744
|
-
node.members.forEach((member) => {
|
|
744
|
+
node.members.forEach((member, index) => {
|
|
745
745
|
const name = this.stringNameFromPropertyName(member.name, context);
|
|
746
746
|
if (name !== void 0) {
|
|
747
|
-
const resolved = member.initializer
|
|
747
|
+
const resolved = member.initializer ? this.visit(member.initializer, context) : index;
|
|
748
748
|
map.set(name, new EnumValue(enumRef, name, resolved));
|
|
749
749
|
}
|
|
750
750
|
});
|
|
@@ -13638,7 +13638,7 @@ import { outputAst as o3 } from "@angular/compiler";
|
|
|
13638
13638
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/extract_dependencies.mjs
|
|
13639
13639
|
import { outputAst as o2 } from "@angular/compiler";
|
|
13640
13640
|
import ts45 from "typescript";
|
|
13641
|
-
function extractHmrDependencies(node, definition, factory, deferBlockMetadata, classMetadata, debugInfo) {
|
|
13641
|
+
function extractHmrDependencies(node, definition, factory, deferBlockMetadata, classMetadata, debugInfo, reflection, evaluator) {
|
|
13642
13642
|
var _a, _b;
|
|
13643
13643
|
const name = ts45.isClassDeclaration(node) && node.name ? node.name.text : null;
|
|
13644
13644
|
const visitor = new PotentialTopLevelReadsVisitor();
|
|
@@ -13655,19 +13655,55 @@ function extractHmrDependencies(node, definition, factory, deferBlockMetadata, c
|
|
|
13655
13655
|
(_b = deferBlockMetadata.dependenciesFn) == null ? void 0 : _b.visitExpression(visitor, null);
|
|
13656
13656
|
}
|
|
13657
13657
|
const availableTopLevel = getTopLevelDeclarationNames(sourceFile);
|
|
13658
|
+
const local = [];
|
|
13659
|
+
const seenLocals = /* @__PURE__ */ new Set();
|
|
13660
|
+
for (const readNode of visitor.allReads) {
|
|
13661
|
+
const readName = readNode instanceof o2.ReadVarExpr ? readNode.name : readNode.text;
|
|
13662
|
+
if (readName !== name && !seenLocals.has(readName) && availableTopLevel.has(readName)) {
|
|
13663
|
+
const runtimeRepresentation = getRuntimeRepresentation(readNode, reflection, evaluator);
|
|
13664
|
+
if (runtimeRepresentation === null) {
|
|
13665
|
+
return null;
|
|
13666
|
+
}
|
|
13667
|
+
local.push({ name: readName, runtimeRepresentation });
|
|
13668
|
+
seenLocals.add(readName);
|
|
13669
|
+
}
|
|
13670
|
+
}
|
|
13658
13671
|
return {
|
|
13659
|
-
local
|
|
13672
|
+
local,
|
|
13660
13673
|
external: Array.from(visitor.namespaceReads, (name2, index) => ({
|
|
13661
13674
|
moduleName: name2,
|
|
13662
13675
|
assignedName: `\u0275hmr${index}`
|
|
13663
13676
|
}))
|
|
13664
13677
|
};
|
|
13665
13678
|
}
|
|
13679
|
+
function getRuntimeRepresentation(node, reflection, evaluator) {
|
|
13680
|
+
if (node instanceof o2.ReadVarExpr) {
|
|
13681
|
+
return o2.variable(node.name);
|
|
13682
|
+
}
|
|
13683
|
+
if (isConstEnumReference(node, reflection)) {
|
|
13684
|
+
const evaluated = evaluator.evaluate(node);
|
|
13685
|
+
if (evaluated instanceof Map) {
|
|
13686
|
+
const members = [];
|
|
13687
|
+
for (const [name, value] of evaluated.entries()) {
|
|
13688
|
+
if (value instanceof EnumValue && (value.resolved == null || typeof value.resolved === "string" || typeof value.resolved === "boolean" || typeof value.resolved === "number")) {
|
|
13689
|
+
members.push({
|
|
13690
|
+
key: name,
|
|
13691
|
+
quoted: false,
|
|
13692
|
+
value: o2.literal(value.resolved)
|
|
13693
|
+
});
|
|
13694
|
+
} else {
|
|
13695
|
+
return null;
|
|
13696
|
+
}
|
|
13697
|
+
}
|
|
13698
|
+
return o2.literalMap(members);
|
|
13699
|
+
}
|
|
13700
|
+
}
|
|
13701
|
+
return o2.variable(node.text);
|
|
13702
|
+
}
|
|
13666
13703
|
function getTopLevelDeclarationNames(sourceFile) {
|
|
13667
|
-
var _a;
|
|
13668
13704
|
const results = /* @__PURE__ */ new Set();
|
|
13669
13705
|
for (const node of sourceFile.statements) {
|
|
13670
|
-
if (ts45.isClassDeclaration(node) || ts45.isFunctionDeclaration(node) || ts45.isEnumDeclaration(node)
|
|
13706
|
+
if (ts45.isClassDeclaration(node) || ts45.isFunctionDeclaration(node) || ts45.isEnumDeclaration(node)) {
|
|
13671
13707
|
if (node.name) {
|
|
13672
13708
|
results.add(node.name.text);
|
|
13673
13709
|
}
|
|
@@ -13725,7 +13761,7 @@ var PotentialTopLevelReadsVisitor = class extends o2.RecursiveAstVisitor {
|
|
|
13725
13761
|
super.visitExternalExpr(ast, context);
|
|
13726
13762
|
}
|
|
13727
13763
|
visitReadVarExpr(ast, context) {
|
|
13728
|
-
this.allReads.add(ast
|
|
13764
|
+
this.allReads.add(ast);
|
|
13729
13765
|
super.visitReadVarExpr(ast, context);
|
|
13730
13766
|
}
|
|
13731
13767
|
visitWrappedNodeExpr(ast, context) {
|
|
@@ -13736,7 +13772,7 @@ var PotentialTopLevelReadsVisitor = class extends o2.RecursiveAstVisitor {
|
|
|
13736
13772
|
}
|
|
13737
13773
|
addAllTopLevelIdentifiers = (node) => {
|
|
13738
13774
|
if (ts45.isIdentifier(node) && this.isTopLevelIdentifierReference(node)) {
|
|
13739
|
-
this.allReads.add(node
|
|
13775
|
+
this.allReads.add(node);
|
|
13740
13776
|
} else {
|
|
13741
13777
|
ts45.forEachChild(node, this.addAllTopLevelIdentifiers);
|
|
13742
13778
|
}
|
|
@@ -13801,15 +13837,27 @@ var PotentialTopLevelReadsVisitor = class extends o2.RecursiveAstVisitor {
|
|
|
13801
13837
|
return !!value && typeof value.kind === "number";
|
|
13802
13838
|
}
|
|
13803
13839
|
};
|
|
13840
|
+
function isConstEnumReference(node, reflection) {
|
|
13841
|
+
var _a;
|
|
13842
|
+
const parent = node.parent;
|
|
13843
|
+
if (!parent || !ts45.isPropertyAccessExpression(parent) || parent.expression !== node || !ts45.isIdentifier(parent.name)) {
|
|
13844
|
+
return false;
|
|
13845
|
+
}
|
|
13846
|
+
const declaration = reflection.getDeclarationOfIdentifier(node);
|
|
13847
|
+
return declaration !== null && ts45.isEnumDeclaration(declaration.node) && !!((_a = declaration.node.modifiers) == null ? void 0 : _a.some((m) => m.kind === ts45.SyntaxKind.ConstKeyword));
|
|
13848
|
+
}
|
|
13804
13849
|
|
|
13805
13850
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/metadata.mjs
|
|
13806
|
-
function extractHmrMetatadata(clazz, reflection, compilerHost, rootDirs, definition, factory, deferBlockMetadata, classMetadata, debugInfo) {
|
|
13851
|
+
function extractHmrMetatadata(clazz, reflection, evaluator, compilerHost, rootDirs, definition, factory, deferBlockMetadata, classMetadata, debugInfo) {
|
|
13807
13852
|
if (!reflection.isClass(clazz)) {
|
|
13808
13853
|
return null;
|
|
13809
13854
|
}
|
|
13810
13855
|
const sourceFile = clazz.getSourceFile();
|
|
13811
13856
|
const filePath = getProjectRelativePath(sourceFile.fileName, rootDirs, compilerHost) || compilerHost.getCanonicalFileName(sourceFile.fileName);
|
|
13812
|
-
const dependencies = extractHmrDependencies(clazz, definition, factory, deferBlockMetadata, classMetadata, debugInfo);
|
|
13857
|
+
const dependencies = extractHmrDependencies(clazz, definition, factory, deferBlockMetadata, classMetadata, debugInfo, reflection, evaluator);
|
|
13858
|
+
if (dependencies === null) {
|
|
13859
|
+
return null;
|
|
13860
|
+
}
|
|
13813
13861
|
const meta = {
|
|
13814
13862
|
type: new o3.WrappedNodeExpr(clazz.name),
|
|
13815
13863
|
className: clazz.name.text,
|
|
@@ -14721,7 +14769,7 @@ var ComponentDecoratorHandler = class {
|
|
|
14721
14769
|
const inputTransformFields = compileInputTransformFields(analysis.inputs);
|
|
14722
14770
|
const classMetadata = analysis.classMetadata !== null ? compileComponentClassMetadata(analysis.classMetadata, perComponentDeferredDeps).toStmt() : null;
|
|
14723
14771
|
const debugInfo = analysis.classDebugInfo !== null ? compileClassDebugInfo(analysis.classDebugInfo).toStmt() : null;
|
|
14724
|
-
const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, defer, classMetadata, debugInfo) : null;
|
|
14772
|
+
const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.evaluator, this.compilerHost, this.rootDirs, def, fac, defer, classMetadata, debugInfo) : null;
|
|
14725
14773
|
const hmrInitializer = hmrMeta ? compileHmrInitializer(hmrMeta).toStmt() : null;
|
|
14726
14774
|
const deferrableImports = this.canDeferDeps ? this.deferredSymbolTracker.getDeferrableImportDecls() : null;
|
|
14727
14775
|
return compileResults(fac, def, classMetadata, "\u0275cmp", inputTransformFields, deferrableImports, debugInfo, hmrInitializer);
|
|
@@ -14747,7 +14795,7 @@ var ComponentDecoratorHandler = class {
|
|
|
14747
14795
|
const inputTransformFields = compileInputTransformFields(analysis.inputs);
|
|
14748
14796
|
const def = compileDeclareComponentFromMetadata(meta, analysis.template, templateInfo);
|
|
14749
14797
|
const classMetadata = analysis.classMetadata !== null ? compileComponentDeclareClassMetadata(analysis.classMetadata, perComponentDeferredDeps).toStmt() : null;
|
|
14750
|
-
const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, defer, classMetadata, null) : null;
|
|
14798
|
+
const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.evaluator, this.compilerHost, this.rootDirs, def, fac, defer, classMetadata, null) : null;
|
|
14751
14799
|
const hmrInitializer = hmrMeta ? compileHmrInitializer(hmrMeta).toStmt() : null;
|
|
14752
14800
|
const deferrableImports = this.canDeferDeps ? this.deferredSymbolTracker.getDeferrableImportDecls() : null;
|
|
14753
14801
|
return compileResults(fac, def, classMetadata, "\u0275cmp", inputTransformFields, deferrableImports, null, hmrInitializer);
|
|
@@ -14768,7 +14816,7 @@ var ComponentDecoratorHandler = class {
|
|
|
14768
14816
|
const inputTransformFields = compileInputTransformFields(analysis.inputs);
|
|
14769
14817
|
const classMetadata = analysis.classMetadata !== null ? compileComponentClassMetadata(analysis.classMetadata, deferrableTypes).toStmt() : null;
|
|
14770
14818
|
const debugInfo = analysis.classDebugInfo !== null ? compileClassDebugInfo(analysis.classDebugInfo).toStmt() : null;
|
|
14771
|
-
const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, defer, classMetadata, debugInfo) : null;
|
|
14819
|
+
const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.evaluator, this.compilerHost, this.rootDirs, def, fac, defer, classMetadata, debugInfo) : null;
|
|
14772
14820
|
const hmrInitializer = hmrMeta ? compileHmrInitializer(hmrMeta).toStmt() : null;
|
|
14773
14821
|
const deferrableImports = this.canDeferDeps ? this.deferredSymbolTracker.getDeferrableImportDecls() : null;
|
|
14774
14822
|
return compileResults(fac, def, classMetadata, "\u0275cmp", inputTransformFields, deferrableImports, debugInfo, hmrInitializer);
|
|
@@ -14788,7 +14836,7 @@ var ComponentDecoratorHandler = class {
|
|
|
14788
14836
|
const def = compileComponentFromMetadata(meta, pool, makeBindingParser2());
|
|
14789
14837
|
const classMetadata = analysis.classMetadata !== null ? compileComponentClassMetadata(analysis.classMetadata, null).toStmt() : null;
|
|
14790
14838
|
const debugInfo = analysis.classDebugInfo !== null ? compileClassDebugInfo(analysis.classDebugInfo).toStmt() : null;
|
|
14791
|
-
const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, defer, classMetadata, debugInfo) : null;
|
|
14839
|
+
const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.evaluator, this.compilerHost, this.rootDirs, def, fac, defer, classMetadata, debugInfo) : null;
|
|
14792
14840
|
const res = compileResults(fac, def, classMetadata, "\u0275cmp", null, null, debugInfo, null);
|
|
14793
14841
|
return hmrMeta === null || res.length === 0 ? null : getHmrUpdateDeclaration(res, pool.statements, hmrMeta, node.getSourceFile());
|
|
14794
14842
|
}
|
|
@@ -14804,15 +14852,20 @@ var ComponentDecoratorHandler = class {
|
|
|
14804
14852
|
}
|
|
14805
14853
|
resolveAllDeferredDependencies(resolution) {
|
|
14806
14854
|
var _a;
|
|
14855
|
+
const seenDeps = /* @__PURE__ */ new Set();
|
|
14807
14856
|
const deferrableTypes = [];
|
|
14808
14857
|
for (const [_, deps] of resolution.deferPerBlockDependencies) {
|
|
14809
14858
|
for (const deferBlockDep of deps) {
|
|
14810
|
-
const
|
|
14859
|
+
const node = deferBlockDep.declaration.node;
|
|
14860
|
+
const importDecl = (_a = resolution.deferrableDeclToImportDecl.get(node)) != null ? _a : null;
|
|
14811
14861
|
if (importDecl !== null && this.deferredSymbolTracker.canDefer(importDecl)) {
|
|
14812
14862
|
deferBlockDep.isDeferrable = true;
|
|
14813
14863
|
deferBlockDep.importPath = importDecl.moduleSpecifier.text;
|
|
14814
14864
|
deferBlockDep.isDefaultImport = isDefaultImport(importDecl);
|
|
14815
|
-
|
|
14865
|
+
if (!seenDeps.has(node)) {
|
|
14866
|
+
seenDeps.add(node);
|
|
14867
|
+
deferrableTypes.push(deferBlockDep);
|
|
14868
|
+
}
|
|
14816
14869
|
}
|
|
14817
14870
|
}
|
|
14818
14871
|
}
|
|
@@ -15518,4 +15571,4 @@ export {
|
|
|
15518
15571
|
* Use of this source code is governed by an MIT-style license that can be
|
|
15519
15572
|
* found in the LICENSE file at https://angular.dev/license
|
|
15520
15573
|
*/
|
|
15521
|
-
//# sourceMappingURL=chunk-
|
|
15574
|
+
//# sourceMappingURL=chunk-K3P5YJTN.js.map
|