@angular/compiler 20.2.0-next.6 → 20.2.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/fesm2022/compiler.mjs +16 -13
- package/fesm2022/compiler.mjs.map +1 -1
- package/index.d.ts +1 -1
- package/package.json +1 -1
package/fesm2022/compiler.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v20.2.0-
|
|
2
|
+
* @license Angular v20.2.0-rc.0
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -12060,6 +12060,7 @@ function generateConditionalExpressions(job) {
|
|
|
12060
12060
|
}
|
|
12061
12061
|
// Switch expressions assign their main test to a temporary, to avoid re-executing it.
|
|
12062
12062
|
let tmp = op.test == null ? null : new AssignTemporaryExpr(op.test, job.allocateXrefId());
|
|
12063
|
+
let caseExpressionTemporaryXref = null;
|
|
12063
12064
|
// For each remaining condition, test whether the temporary satifies the check. (If no temp is
|
|
12064
12065
|
// present, just check each expression directly.)
|
|
12065
12066
|
for (let i = op.conditions.length - 1; i >= 0; i--) {
|
|
@@ -12072,7 +12073,9 @@ function generateConditionalExpressions(job) {
|
|
|
12072
12073
|
conditionalCase.expr = new BinaryOperatorExpr(BinaryOperator.Identical, useTmp, conditionalCase.expr);
|
|
12073
12074
|
}
|
|
12074
12075
|
else if (conditionalCase.alias !== null) {
|
|
12075
|
-
|
|
12076
|
+
// Since we can only pass one variable into the conditional instruction,
|
|
12077
|
+
// reuse the same variable to store the result of the expressions.
|
|
12078
|
+
caseExpressionTemporaryXref ??= job.allocateXrefId();
|
|
12076
12079
|
conditionalCase.expr = new AssignTemporaryExpr(conditionalCase.expr, caseExpressionTemporaryXref);
|
|
12077
12080
|
op.contextValue = new ReadTemporaryExpr(caseExpressionTemporaryXref);
|
|
12078
12081
|
}
|
|
@@ -28767,8 +28770,8 @@ function parseConditionalBlockParameters(block, errors, bindingParser) {
|
|
|
28767
28770
|
if (aliasMatch === null) {
|
|
28768
28771
|
errors.push(new ParseError(param.sourceSpan, `Unrecognized conditional parameter "${param.expression}"`));
|
|
28769
28772
|
}
|
|
28770
|
-
else if (block.name !== 'if') {
|
|
28771
|
-
errors.push(new ParseError(param.sourceSpan, '"as" expression is only allowed on
|
|
28773
|
+
else if (block.name !== 'if' && !ELSE_IF_PATTERN.test(block.name)) {
|
|
28774
|
+
errors.push(new ParseError(param.sourceSpan, '"as" expression is only allowed on `@if` and `@else if` blocks'));
|
|
28772
28775
|
}
|
|
28773
28776
|
else if (expressionAlias !== null) {
|
|
28774
28777
|
errors.push(new ParseError(param.sourceSpan, 'Conditional can only have one "as" expression'));
|
|
@@ -34273,7 +34276,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
|
|
|
34273
34276
|
function compileDeclareClassMetadata(metadata) {
|
|
34274
34277
|
const definitionMap = new DefinitionMap();
|
|
34275
34278
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
34276
|
-
definitionMap.set('version', literal('20.2.0-
|
|
34279
|
+
definitionMap.set('version', literal('20.2.0-rc.0'));
|
|
34277
34280
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
34278
34281
|
definitionMap.set('type', metadata.type);
|
|
34279
34282
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -34291,7 +34294,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
34291
34294
|
callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? literal(null));
|
|
34292
34295
|
callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? literal(null));
|
|
34293
34296
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
34294
|
-
definitionMap.set('version', literal('20.2.0-
|
|
34297
|
+
definitionMap.set('version', literal('20.2.0-rc.0'));
|
|
34295
34298
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
34296
34299
|
definitionMap.set('type', metadata.type);
|
|
34297
34300
|
definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -34386,7 +34389,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
34386
34389
|
const definitionMap = new DefinitionMap();
|
|
34387
34390
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
34388
34391
|
definitionMap.set('minVersion', literal(minVersion));
|
|
34389
|
-
definitionMap.set('version', literal('20.2.0-
|
|
34392
|
+
definitionMap.set('version', literal('20.2.0-rc.0'));
|
|
34390
34393
|
// e.g. `type: MyDirective`
|
|
34391
34394
|
definitionMap.set('type', meta.type.value);
|
|
34392
34395
|
if (meta.isStandalone !== undefined) {
|
|
@@ -34802,7 +34805,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
34802
34805
|
function compileDeclareFactoryFunction(meta) {
|
|
34803
34806
|
const definitionMap = new DefinitionMap();
|
|
34804
34807
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
34805
|
-
definitionMap.set('version', literal('20.2.0-
|
|
34808
|
+
definitionMap.set('version', literal('20.2.0-rc.0'));
|
|
34806
34809
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
34807
34810
|
definitionMap.set('type', meta.type.value);
|
|
34808
34811
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -34837,7 +34840,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
34837
34840
|
function createInjectableDefinitionMap(meta) {
|
|
34838
34841
|
const definitionMap = new DefinitionMap();
|
|
34839
34842
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
34840
|
-
definitionMap.set('version', literal('20.2.0-
|
|
34843
|
+
definitionMap.set('version', literal('20.2.0-rc.0'));
|
|
34841
34844
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
34842
34845
|
definitionMap.set('type', meta.type.value);
|
|
34843
34846
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -34888,7 +34891,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
34888
34891
|
function createInjectorDefinitionMap(meta) {
|
|
34889
34892
|
const definitionMap = new DefinitionMap();
|
|
34890
34893
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
34891
|
-
definitionMap.set('version', literal('20.2.0-
|
|
34894
|
+
definitionMap.set('version', literal('20.2.0-rc.0'));
|
|
34892
34895
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
34893
34896
|
definitionMap.set('type', meta.type.value);
|
|
34894
34897
|
definitionMap.set('providers', meta.providers);
|
|
@@ -34921,7 +34924,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
34921
34924
|
throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
|
|
34922
34925
|
}
|
|
34923
34926
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
34924
|
-
definitionMap.set('version', literal('20.2.0-
|
|
34927
|
+
definitionMap.set('version', literal('20.2.0-rc.0'));
|
|
34925
34928
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
34926
34929
|
definitionMap.set('type', meta.type.value);
|
|
34927
34930
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -34972,7 +34975,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
34972
34975
|
function createPipeDefinitionMap(meta) {
|
|
34973
34976
|
const definitionMap = new DefinitionMap();
|
|
34974
34977
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
34975
|
-
definitionMap.set('version', literal('20.2.0-
|
|
34978
|
+
definitionMap.set('version', literal('20.2.0-rc.0'));
|
|
34976
34979
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
34977
34980
|
// e.g. `type: MyPipe`
|
|
34978
34981
|
definitionMap.set('type', meta.type.value);
|
|
@@ -35128,7 +35131,7 @@ function compileHmrUpdateCallback(definitions, constantStatements, meta) {
|
|
|
35128
35131
|
* @description
|
|
35129
35132
|
* Entry point for all public APIs of the compiler package.
|
|
35130
35133
|
*/
|
|
35131
|
-
const VERSION = new Version('20.2.0-
|
|
35134
|
+
const VERSION = new Version('20.2.0-rc.0');
|
|
35132
35135
|
|
|
35133
35136
|
//////////////////////////////////////
|
|
35134
35137
|
// THIS FILE HAS GLOBAL SIDE EFFECT //
|