@angular/compiler-cli 19.1.0-next.4 → 19.1.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/{chunk-JQUCZAGS.js → chunk-BG43WWWL.js} +2 -2
- package/bundles/{chunk-LSXJNKBJ.js → chunk-FL5MUNIS.js} +3 -3
- package/bundles/{chunk-Q73LD63I.js → chunk-MMGTGRB2.js} +14 -6
- package/bundles/chunk-MMGTGRB2.js.map +6 -0
- package/bundles/{chunk-AHHY35ZY.js → chunk-NLSHLQF3.js} +5 -5
- package/bundles/chunk-NLSHLQF3.js.map +6 -0
- package/bundles/{chunk-ACKPW32M.js → chunk-O7ZKVJOW.js} +34 -16
- package/bundles/{chunk-ACKPW32M.js.map → chunk-O7ZKVJOW.js.map} +1 -1
- package/bundles/{chunk-QFDZTXLY.js → chunk-PXMCBAEC.js} +2 -2
- package/bundles/{chunk-AAMTATB3.js → chunk-T2HQMWRH.js} +3 -3
- package/bundles/index.js +11 -7
- package/bundles/index.js.map +1 -1
- package/bundles/linker/babel/index.js +2 -2
- package/bundles/linker/index.js +2 -2
- package/bundles/private/migrations.js +2 -2
- package/bundles/private/tooling.js +4 -4
- package/bundles/src/bin/ng_xi18n.js +5 -5
- package/bundles/src/bin/ngc.js +5 -5
- package/bundles_metadata.json +1 -1
- package/index.d.ts +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 +3 -2
- package/src/ngtsc/hmr/src/metadata.d.ts +3 -2
- package/src/ngtsc/reflection/src/typescript.d.ts +7 -1
- package/bundles/chunk-AHHY35ZY.js.map +0 -6
- package/bundles/chunk-Q73LD63I.js.map +0 -6
- /package/bundles/{chunk-JQUCZAGS.js.map → chunk-BG43WWWL.js.map} +0 -0
- /package/bundles/{chunk-LSXJNKBJ.js.map → chunk-FL5MUNIS.js.map} +0 -0
- /package/bundles/{chunk-QFDZTXLY.js.map → chunk-PXMCBAEC.js.map} +0 -0
- /package/bundles/{chunk-AAMTATB3.js.map → chunk-T2HQMWRH.js.map} +0 -0
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
translateStatement,
|
|
49
49
|
translateType,
|
|
50
50
|
typeNodeToValueExpr
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-MMGTGRB2.js";
|
|
52
52
|
import {
|
|
53
53
|
PerfCheckpoint,
|
|
54
54
|
PerfEvent,
|
|
@@ -13638,8 +13638,8 @@ import { outputAst as o3 } from "@angular/compiler";
|
|
|
13638
13638
|
// bazel-out/k8-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, classMetadata, debugInfo) {
|
|
13642
|
-
var _a;
|
|
13641
|
+
function extractHmrDependencies(node, definition, factory, deferBlockMetadata, classMetadata, debugInfo) {
|
|
13642
|
+
var _a, _b;
|
|
13643
13643
|
const name = ts45.isClassDeclaration(node) && node.name ? node.name.text : null;
|
|
13644
13644
|
const visitor = new PotentialTopLevelReadsVisitor();
|
|
13645
13645
|
const sourceFile = node.getSourceFile();
|
|
@@ -13649,6 +13649,11 @@ function extractHmrDependencies(node, definition, factory, classMetadata, debugI
|
|
|
13649
13649
|
factory.statements.forEach((statement) => statement.visitStatement(visitor, null));
|
|
13650
13650
|
classMetadata == null ? void 0 : classMetadata.visitStatement(visitor, null);
|
|
13651
13651
|
debugInfo == null ? void 0 : debugInfo.visitStatement(visitor, null);
|
|
13652
|
+
if (deferBlockMetadata.mode === 0) {
|
|
13653
|
+
deferBlockMetadata.blocks.forEach((loader) => loader == null ? void 0 : loader.visitExpression(visitor, null));
|
|
13654
|
+
} else {
|
|
13655
|
+
(_b = deferBlockMetadata.dependenciesFn) == null ? void 0 : _b.visitExpression(visitor, null);
|
|
13656
|
+
}
|
|
13652
13657
|
const availableTopLevel = getTopLevelDeclarationNames(sourceFile);
|
|
13653
13658
|
return {
|
|
13654
13659
|
local: Array.from(visitor.allReads).filter((r) => r !== name && availableTopLevel.has(r)),
|
|
@@ -13747,7 +13752,7 @@ var PotentialTopLevelReadsVisitor = class extends o2.RecursiveAstVisitor {
|
|
|
13747
13752
|
if (ts45.isCallExpression(parent)) {
|
|
13748
13753
|
return parent.expression === node || parent.arguments.includes(node);
|
|
13749
13754
|
}
|
|
13750
|
-
if (ts45.isPropertyAccessExpression(parent)) {
|
|
13755
|
+
if (ts45.isPropertyAccessExpression(parent) || ts45.isComputedPropertyName(parent) || ts45.isTemplateSpan(parent) || ts45.isSpreadAssignment(parent) || ts45.isSpreadElement(parent) || ts45.isAwaitExpression(parent) || ts45.isNonNullExpression(parent) || ts45.isIfStatement(parent) || ts45.isDoStatement(parent) || ts45.isWhileStatement(parent) || ts45.isForInStatement(parent) || ts45.isForOfStatement(parent) || ts45.isSwitchStatement(parent) || ts45.isCaseClause(parent) || ts45.isThrowStatement(parent)) {
|
|
13751
13756
|
return parent.expression === node;
|
|
13752
13757
|
}
|
|
13753
13758
|
if (ts45.isArrayLiteralExpression(parent)) {
|
|
@@ -13756,9 +13761,18 @@ var PotentialTopLevelReadsVisitor = class extends o2.RecursiveAstVisitor {
|
|
|
13756
13761
|
if (ts45.isPropertyAssignment(parent)) {
|
|
13757
13762
|
return parent.initializer === node;
|
|
13758
13763
|
}
|
|
13759
|
-
if (ts45.isClassDeclaration(parent)) {
|
|
13764
|
+
if (ts45.isClassDeclaration(parent) || ts45.isFunctionDeclaration(parent) || ts45.isVariableDeclaration(parent) || ts45.isShorthandPropertyAssignment(parent)) {
|
|
13760
13765
|
return parent.name === node;
|
|
13761
13766
|
}
|
|
13767
|
+
if (ts45.isElementAccessExpression(parent)) {
|
|
13768
|
+
return parent.expression === node || parent.argumentExpression === node;
|
|
13769
|
+
}
|
|
13770
|
+
if (ts45.isBinaryExpression(parent)) {
|
|
13771
|
+
return parent.left === node || parent.right === node;
|
|
13772
|
+
}
|
|
13773
|
+
if (ts45.isImportSpecifier(parent) || ts45.isExportSpecifier(parent)) {
|
|
13774
|
+
return (parent.propertyName || parent.name) === node;
|
|
13775
|
+
}
|
|
13762
13776
|
return false;
|
|
13763
13777
|
}
|
|
13764
13778
|
isTypeScriptNode(value) {
|
|
@@ -13767,13 +13781,13 @@ var PotentialTopLevelReadsVisitor = class extends o2.RecursiveAstVisitor {
|
|
|
13767
13781
|
};
|
|
13768
13782
|
|
|
13769
13783
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/metadata.mjs
|
|
13770
|
-
function extractHmrMetatadata(clazz, reflection, compilerHost, rootDirs, definition, factory, classMetadata, debugInfo) {
|
|
13784
|
+
function extractHmrMetatadata(clazz, reflection, compilerHost, rootDirs, definition, factory, deferBlockMetadata, classMetadata, debugInfo) {
|
|
13771
13785
|
if (!reflection.isClass(clazz)) {
|
|
13772
13786
|
return null;
|
|
13773
13787
|
}
|
|
13774
13788
|
const sourceFile = clazz.getSourceFile();
|
|
13775
13789
|
const filePath = getProjectRelativePath(sourceFile.fileName, rootDirs, compilerHost) || compilerHost.getCanonicalFileName(sourceFile.fileName);
|
|
13776
|
-
const dependencies = extractHmrDependencies(clazz, definition, factory, classMetadata, debugInfo);
|
|
13790
|
+
const dependencies = extractHmrDependencies(clazz, definition, factory, deferBlockMetadata, classMetadata, debugInfo);
|
|
13777
13791
|
const meta = {
|
|
13778
13792
|
type: new o3.WrappedNodeExpr(clazz.name),
|
|
13779
13793
|
className: clazz.name.text,
|
|
@@ -14658,10 +14672,11 @@ var ComponentDecoratorHandler = class {
|
|
|
14658
14672
|
return [];
|
|
14659
14673
|
}
|
|
14660
14674
|
const perComponentDeferredDeps = this.canDeferDeps ? this.resolveAllDeferredDependencies(resolution) : null;
|
|
14675
|
+
const defer = this.compileDeferBlocks(resolution);
|
|
14661
14676
|
const meta = {
|
|
14662
14677
|
...analysis.meta,
|
|
14663
14678
|
...resolution,
|
|
14664
|
-
defer
|
|
14679
|
+
defer
|
|
14665
14680
|
};
|
|
14666
14681
|
const fac = compileNgFactoryDefField(toFactoryMetadata(meta, FactoryTarget3.Component));
|
|
14667
14682
|
if (perComponentDeferredDeps !== null) {
|
|
@@ -14671,7 +14686,7 @@ var ComponentDecoratorHandler = class {
|
|
|
14671
14686
|
const inputTransformFields = compileInputTransformFields(analysis.inputs);
|
|
14672
14687
|
const classMetadata = analysis.classMetadata !== null ? compileComponentClassMetadata(analysis.classMetadata, perComponentDeferredDeps).toStmt() : null;
|
|
14673
14688
|
const debugInfo = analysis.classDebugInfo !== null ? compileClassDebugInfo(analysis.classDebugInfo).toStmt() : null;
|
|
14674
|
-
const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, classMetadata, debugInfo) : null;
|
|
14689
|
+
const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, defer, classMetadata, debugInfo) : null;
|
|
14675
14690
|
const hmrInitializer = hmrMeta ? compileHmrInitializer(hmrMeta).toStmt() : null;
|
|
14676
14691
|
const deferrableImports = this.canDeferDeps ? this.deferredSymbolTracker.getDeferrableImportDecls() : null;
|
|
14677
14692
|
return compileResults(fac, def, classMetadata, "\u0275cmp", inputTransformFields, deferrableImports, debugInfo, hmrInitializer);
|
|
@@ -14687,26 +14702,28 @@ var ComponentDecoratorHandler = class {
|
|
|
14687
14702
|
inlineTemplateLiteralExpression: analysis.template.sourceMapping.type === "direct" ? new o4.WrappedNodeExpr(analysis.template.sourceMapping.node) : null
|
|
14688
14703
|
};
|
|
14689
14704
|
const perComponentDeferredDeps = this.canDeferDeps ? this.resolveAllDeferredDependencies(resolution) : null;
|
|
14705
|
+
const defer = this.compileDeferBlocks(resolution);
|
|
14690
14706
|
const meta = {
|
|
14691
14707
|
...analysis.meta,
|
|
14692
14708
|
...resolution,
|
|
14693
|
-
defer
|
|
14709
|
+
defer
|
|
14694
14710
|
};
|
|
14695
14711
|
const fac = compileDeclareFactory(toFactoryMetadata(meta, FactoryTarget3.Component));
|
|
14696
14712
|
const inputTransformFields = compileInputTransformFields(analysis.inputs);
|
|
14697
14713
|
const def = compileDeclareComponentFromMetadata(meta, analysis.template, templateInfo);
|
|
14698
14714
|
const classMetadata = analysis.classMetadata !== null ? compileComponentDeclareClassMetadata(analysis.classMetadata, perComponentDeferredDeps).toStmt() : null;
|
|
14699
|
-
const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, classMetadata, null) : null;
|
|
14715
|
+
const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, defer, classMetadata, null) : null;
|
|
14700
14716
|
const hmrInitializer = hmrMeta ? compileHmrInitializer(hmrMeta).toStmt() : null;
|
|
14701
14717
|
const deferrableImports = this.canDeferDeps ? this.deferredSymbolTracker.getDeferrableImportDecls() : null;
|
|
14702
14718
|
return compileResults(fac, def, classMetadata, "\u0275cmp", inputTransformFields, deferrableImports, null, hmrInitializer);
|
|
14703
14719
|
}
|
|
14704
14720
|
compileLocal(node, analysis, resolution, pool) {
|
|
14705
14721
|
const deferrableTypes = this.canDeferDeps ? analysis.explicitlyDeferredTypes : null;
|
|
14722
|
+
const defer = this.compileDeferBlocks(resolution);
|
|
14706
14723
|
const meta = {
|
|
14707
14724
|
...analysis.meta,
|
|
14708
14725
|
...resolution,
|
|
14709
|
-
defer
|
|
14726
|
+
defer
|
|
14710
14727
|
};
|
|
14711
14728
|
if (deferrableTypes !== null) {
|
|
14712
14729
|
removeDeferrableTypesFromComponentDecorator(analysis, deferrableTypes);
|
|
@@ -14716,7 +14733,7 @@ var ComponentDecoratorHandler = class {
|
|
|
14716
14733
|
const inputTransformFields = compileInputTransformFields(analysis.inputs);
|
|
14717
14734
|
const classMetadata = analysis.classMetadata !== null ? compileComponentClassMetadata(analysis.classMetadata, deferrableTypes).toStmt() : null;
|
|
14718
14735
|
const debugInfo = analysis.classDebugInfo !== null ? compileClassDebugInfo(analysis.classDebugInfo).toStmt() : null;
|
|
14719
|
-
const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, classMetadata, debugInfo) : null;
|
|
14736
|
+
const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, defer, classMetadata, debugInfo) : null;
|
|
14720
14737
|
const hmrInitializer = hmrMeta ? compileHmrInitializer(hmrMeta).toStmt() : null;
|
|
14721
14738
|
const deferrableImports = this.canDeferDeps ? this.deferredSymbolTracker.getDeferrableImportDecls() : null;
|
|
14722
14739
|
return compileResults(fac, def, classMetadata, "\u0275cmp", inputTransformFields, deferrableImports, debugInfo, hmrInitializer);
|
|
@@ -14726,16 +14743,17 @@ var ComponentDecoratorHandler = class {
|
|
|
14726
14743
|
return null;
|
|
14727
14744
|
}
|
|
14728
14745
|
const pool = new ConstantPool2();
|
|
14746
|
+
const defer = this.compileDeferBlocks(resolution);
|
|
14729
14747
|
const meta = {
|
|
14730
14748
|
...analysis.meta,
|
|
14731
14749
|
...resolution,
|
|
14732
|
-
defer
|
|
14750
|
+
defer
|
|
14733
14751
|
};
|
|
14734
14752
|
const fac = compileNgFactoryDefField(toFactoryMetadata(meta, FactoryTarget3.Component));
|
|
14735
14753
|
const def = compileComponentFromMetadata(meta, pool, makeBindingParser2());
|
|
14736
14754
|
const classMetadata = analysis.classMetadata !== null ? compileComponentClassMetadata(analysis.classMetadata, null).toStmt() : null;
|
|
14737
14755
|
const debugInfo = analysis.classDebugInfo !== null ? compileClassDebugInfo(analysis.classDebugInfo).toStmt() : null;
|
|
14738
|
-
const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, classMetadata, debugInfo) : null;
|
|
14756
|
+
const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, defer, classMetadata, debugInfo) : null;
|
|
14739
14757
|
const res = compileResults(fac, def, classMetadata, "\u0275cmp", null, null, debugInfo, null);
|
|
14740
14758
|
return hmrMeta === null || res.length === 0 ? null : getHmrUpdateDeclaration(res, pool.statements, hmrMeta, node.getSourceFile());
|
|
14741
14759
|
}
|
|
@@ -15465,4 +15483,4 @@ export {
|
|
|
15465
15483
|
* Use of this source code is governed by an MIT-style license that can be
|
|
15466
15484
|
* found in the LICENSE file at https://angular.dev/license
|
|
15467
15485
|
*/
|
|
15468
|
-
//# sourceMappingURL=chunk-
|
|
15486
|
+
//# sourceMappingURL=chunk-O7ZKVJOW.js.map
|