@angular/compiler 20.0.6 → 20.0.7
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 +25 -14
- package/fesm2022/compiler.mjs.map +1 -1
- package/index.d.ts +2 -2
- package/package.json +1 -1
package/fesm2022/compiler.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v20.0.
|
|
2
|
+
* @license Angular v20.0.7
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -6766,7 +6766,7 @@ var ParseErrorLevel;
|
|
|
6766
6766
|
ParseErrorLevel[ParseErrorLevel["WARNING"] = 0] = "WARNING";
|
|
6767
6767
|
ParseErrorLevel[ParseErrorLevel["ERROR"] = 1] = "ERROR";
|
|
6768
6768
|
})(ParseErrorLevel || (ParseErrorLevel = {}));
|
|
6769
|
-
class ParseError {
|
|
6769
|
+
class ParseError extends Error {
|
|
6770
6770
|
span;
|
|
6771
6771
|
msg;
|
|
6772
6772
|
level;
|
|
@@ -6783,10 +6783,15 @@ class ParseError {
|
|
|
6783
6783
|
* couldn't be parsed. Not guaranteed to be defined, but can be used to provide more context.
|
|
6784
6784
|
*/
|
|
6785
6785
|
relatedError) {
|
|
6786
|
+
super(msg);
|
|
6786
6787
|
this.span = span;
|
|
6787
6788
|
this.msg = msg;
|
|
6788
6789
|
this.level = level;
|
|
6789
6790
|
this.relatedError = relatedError;
|
|
6791
|
+
// Extending `Error` ends up breaking some internal tests. This appears to be a known issue
|
|
6792
|
+
// when extending errors in TS and the workaround is to explicitly set the prototype.
|
|
6793
|
+
// https://stackoverflow.com/questions/41102060/typescript-extending-error-class
|
|
6794
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
6790
6795
|
}
|
|
6791
6796
|
contextualMessage() {
|
|
6792
6797
|
const ctx = this.span.start.getContext(100, 3);
|
|
@@ -10720,7 +10725,7 @@ class OpList {
|
|
|
10720
10725
|
oldOp.next = null;
|
|
10721
10726
|
let prev = oldPrev;
|
|
10722
10727
|
for (const newOp of newOps) {
|
|
10723
|
-
|
|
10728
|
+
OpList.assertIsUnowned(newOp);
|
|
10724
10729
|
newOp.debugListId = listId;
|
|
10725
10730
|
prev.next = newOp;
|
|
10726
10731
|
newOp.prev = prev;
|
|
@@ -10761,7 +10766,7 @@ class OpList {
|
|
|
10761
10766
|
static insertBefore(op, target) {
|
|
10762
10767
|
if (Array.isArray(op)) {
|
|
10763
10768
|
for (const o of op) {
|
|
10764
|
-
|
|
10769
|
+
OpList.insertBefore(o, target);
|
|
10765
10770
|
}
|
|
10766
10771
|
return;
|
|
10767
10772
|
}
|
|
@@ -17232,12 +17237,16 @@ class EscapedCharacterCursor extends PlainCharacterCursor {
|
|
|
17232
17237
|
}
|
|
17233
17238
|
}
|
|
17234
17239
|
}
|
|
17235
|
-
class CursorError {
|
|
17240
|
+
class CursorError extends Error {
|
|
17236
17241
|
msg;
|
|
17237
17242
|
cursor;
|
|
17238
17243
|
constructor(msg, cursor) {
|
|
17244
|
+
super(msg);
|
|
17239
17245
|
this.msg = msg;
|
|
17240
17246
|
this.cursor = cursor;
|
|
17247
|
+
// Extending `Error` does not always work when code is transpiled. See:
|
|
17248
|
+
// https://stackoverflow.com/questions/41102060/typescript-extending-error-class
|
|
17249
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
17241
17250
|
}
|
|
17242
17251
|
}
|
|
17243
17252
|
|
|
@@ -18224,9 +18233,11 @@ class Token {
|
|
|
18224
18233
|
return this.type === TokenType.Number ? this.numValue : -1;
|
|
18225
18234
|
}
|
|
18226
18235
|
isTemplateLiteralPart() {
|
|
18236
|
+
// Note: Explicit type is needed for Closure.
|
|
18227
18237
|
return this.isString() && this.kind === StringTokenKind.TemplateLiteralPart;
|
|
18228
18238
|
}
|
|
18229
18239
|
isTemplateLiteralEnd() {
|
|
18240
|
+
// Note: Explicit type is needed for Closure.
|
|
18230
18241
|
return this.isString() && this.kind === StringTokenKind.TemplateLiteralEnd;
|
|
18231
18242
|
}
|
|
18232
18243
|
isTemplateLiteralInterpolationStart() {
|
|
@@ -33656,7 +33667,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
|
|
|
33656
33667
|
function compileDeclareClassMetadata(metadata) {
|
|
33657
33668
|
const definitionMap = new DefinitionMap();
|
|
33658
33669
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
33659
|
-
definitionMap.set('version', literal('20.0.
|
|
33670
|
+
definitionMap.set('version', literal('20.0.7'));
|
|
33660
33671
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
33661
33672
|
definitionMap.set('type', metadata.type);
|
|
33662
33673
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -33674,7 +33685,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
33674
33685
|
callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? literal(null));
|
|
33675
33686
|
callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? literal(null));
|
|
33676
33687
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
33677
|
-
definitionMap.set('version', literal('20.0.
|
|
33688
|
+
definitionMap.set('version', literal('20.0.7'));
|
|
33678
33689
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
33679
33690
|
definitionMap.set('type', metadata.type);
|
|
33680
33691
|
definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -33769,7 +33780,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
33769
33780
|
const definitionMap = new DefinitionMap();
|
|
33770
33781
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
33771
33782
|
definitionMap.set('minVersion', literal(minVersion));
|
|
33772
|
-
definitionMap.set('version', literal('20.0.
|
|
33783
|
+
definitionMap.set('version', literal('20.0.7'));
|
|
33773
33784
|
// e.g. `type: MyDirective`
|
|
33774
33785
|
definitionMap.set('type', meta.type.value);
|
|
33775
33786
|
if (meta.isStandalone !== undefined) {
|
|
@@ -34185,7 +34196,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
34185
34196
|
function compileDeclareFactoryFunction(meta) {
|
|
34186
34197
|
const definitionMap = new DefinitionMap();
|
|
34187
34198
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
34188
|
-
definitionMap.set('version', literal('20.0.
|
|
34199
|
+
definitionMap.set('version', literal('20.0.7'));
|
|
34189
34200
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
34190
34201
|
definitionMap.set('type', meta.type.value);
|
|
34191
34202
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -34220,7 +34231,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
34220
34231
|
function createInjectableDefinitionMap(meta) {
|
|
34221
34232
|
const definitionMap = new DefinitionMap();
|
|
34222
34233
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
34223
|
-
definitionMap.set('version', literal('20.0.
|
|
34234
|
+
definitionMap.set('version', literal('20.0.7'));
|
|
34224
34235
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
34225
34236
|
definitionMap.set('type', meta.type.value);
|
|
34226
34237
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -34271,7 +34282,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
34271
34282
|
function createInjectorDefinitionMap(meta) {
|
|
34272
34283
|
const definitionMap = new DefinitionMap();
|
|
34273
34284
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
34274
|
-
definitionMap.set('version', literal('20.0.
|
|
34285
|
+
definitionMap.set('version', literal('20.0.7'));
|
|
34275
34286
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
34276
34287
|
definitionMap.set('type', meta.type.value);
|
|
34277
34288
|
definitionMap.set('providers', meta.providers);
|
|
@@ -34304,7 +34315,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
34304
34315
|
throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
|
|
34305
34316
|
}
|
|
34306
34317
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
34307
|
-
definitionMap.set('version', literal('20.0.
|
|
34318
|
+
definitionMap.set('version', literal('20.0.7'));
|
|
34308
34319
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
34309
34320
|
definitionMap.set('type', meta.type.value);
|
|
34310
34321
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -34355,7 +34366,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
34355
34366
|
function createPipeDefinitionMap(meta) {
|
|
34356
34367
|
const definitionMap = new DefinitionMap();
|
|
34357
34368
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
34358
|
-
definitionMap.set('version', literal('20.0.
|
|
34369
|
+
definitionMap.set('version', literal('20.0.7'));
|
|
34359
34370
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
34360
34371
|
// e.g. `type: MyPipe`
|
|
34361
34372
|
definitionMap.set('type', meta.type.value);
|
|
@@ -34511,7 +34522,7 @@ function compileHmrUpdateCallback(definitions, constantStatements, meta) {
|
|
|
34511
34522
|
* @description
|
|
34512
34523
|
* Entry point for all public APIs of the compiler package.
|
|
34513
34524
|
*/
|
|
34514
|
-
const VERSION = new Version('20.0.
|
|
34525
|
+
const VERSION = new Version('20.0.7');
|
|
34515
34526
|
|
|
34516
34527
|
//////////////////////////////////////
|
|
34517
34528
|
// THIS FILE HAS GLOBAL SIDE EFFECT //
|