@angular/compiler 19.0.0 → 19.1.0-next.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 +27 -14
- package/fesm2022/compiler.mjs.map +1 -1
- package/index.d.ts +28 -9
- package/package.json +2 -2
package/fesm2022/compiler.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v19.0.0
|
|
2
|
+
* @license Angular v19.1.0-next.0
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -6894,10 +6894,23 @@ class ParseError {
|
|
|
6894
6894
|
span;
|
|
6895
6895
|
msg;
|
|
6896
6896
|
level;
|
|
6897
|
-
|
|
6897
|
+
relatedError;
|
|
6898
|
+
constructor(
|
|
6899
|
+
/** Location of the error. */
|
|
6900
|
+
span,
|
|
6901
|
+
/** Error message. */
|
|
6902
|
+
msg,
|
|
6903
|
+
/** Severity level of the error. */
|
|
6904
|
+
level = ParseErrorLevel.ERROR,
|
|
6905
|
+
/**
|
|
6906
|
+
* Error that caused the error to be surfaced. For example, an error in a sub-expression that
|
|
6907
|
+
* couldn't be parsed. Not guaranteed to be defined, but can be used to provide more context.
|
|
6908
|
+
*/
|
|
6909
|
+
relatedError) {
|
|
6898
6910
|
this.span = span;
|
|
6899
6911
|
this.msg = msg;
|
|
6900
6912
|
this.level = level;
|
|
6913
|
+
this.relatedError = relatedError;
|
|
6901
6914
|
}
|
|
6902
6915
|
contextualMessage() {
|
|
6903
6916
|
const ctx = this.span.start.getContext(100, 3);
|
|
@@ -26975,12 +26988,12 @@ class BindingParser {
|
|
|
26975
26988
|
return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo, absoluteOffset);
|
|
26976
26989
|
}
|
|
26977
26990
|
}
|
|
26978
|
-
_reportError(message, sourceSpan, level = ParseErrorLevel.ERROR) {
|
|
26979
|
-
this.errors.push(new ParseError(sourceSpan, message, level));
|
|
26991
|
+
_reportError(message, sourceSpan, level = ParseErrorLevel.ERROR, relatedError) {
|
|
26992
|
+
this.errors.push(new ParseError(sourceSpan, message, level, relatedError));
|
|
26980
26993
|
}
|
|
26981
26994
|
_reportExpressionParserErrors(errors, sourceSpan) {
|
|
26982
26995
|
for (const error of errors) {
|
|
26983
|
-
this._reportError(error.message, sourceSpan);
|
|
26996
|
+
this._reportError(error.message, sourceSpan, undefined, error);
|
|
26984
26997
|
}
|
|
26985
26998
|
}
|
|
26986
26999
|
/**
|
|
@@ -30872,7 +30885,7 @@ function publishFacade(global) {
|
|
|
30872
30885
|
* @description
|
|
30873
30886
|
* Entry point for all public APIs of the compiler package.
|
|
30874
30887
|
*/
|
|
30875
|
-
const VERSION = new Version('19.0.0');
|
|
30888
|
+
const VERSION = new Version('19.1.0-next.0');
|
|
30876
30889
|
|
|
30877
30890
|
class CompilerConfig {
|
|
30878
30891
|
defaultEncapsulation;
|
|
@@ -32716,7 +32729,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
|
|
|
32716
32729
|
function compileDeclareClassMetadata(metadata) {
|
|
32717
32730
|
const definitionMap = new DefinitionMap();
|
|
32718
32731
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
32719
|
-
definitionMap.set('version', literal('19.0.0'));
|
|
32732
|
+
definitionMap.set('version', literal('19.1.0-next.0'));
|
|
32720
32733
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
32721
32734
|
definitionMap.set('type', metadata.type);
|
|
32722
32735
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -32734,7 +32747,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
32734
32747
|
callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? literal(null));
|
|
32735
32748
|
callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? literal(null));
|
|
32736
32749
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
32737
|
-
definitionMap.set('version', literal('19.0.0'));
|
|
32750
|
+
definitionMap.set('version', literal('19.1.0-next.0'));
|
|
32738
32751
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
32739
32752
|
definitionMap.set('type', metadata.type);
|
|
32740
32753
|
definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -32829,7 +32842,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
32829
32842
|
const definitionMap = new DefinitionMap();
|
|
32830
32843
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
32831
32844
|
definitionMap.set('minVersion', literal(minVersion));
|
|
32832
|
-
definitionMap.set('version', literal('19.0.0'));
|
|
32845
|
+
definitionMap.set('version', literal('19.1.0-next.0'));
|
|
32833
32846
|
// e.g. `type: MyDirective`
|
|
32834
32847
|
definitionMap.set('type', meta.type.value);
|
|
32835
32848
|
if (meta.isStandalone !== undefined) {
|
|
@@ -33248,7 +33261,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
33248
33261
|
function compileDeclareFactoryFunction(meta) {
|
|
33249
33262
|
const definitionMap = new DefinitionMap();
|
|
33250
33263
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
33251
|
-
definitionMap.set('version', literal('19.0.0'));
|
|
33264
|
+
definitionMap.set('version', literal('19.1.0-next.0'));
|
|
33252
33265
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
33253
33266
|
definitionMap.set('type', meta.type.value);
|
|
33254
33267
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -33283,7 +33296,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
33283
33296
|
function createInjectableDefinitionMap(meta) {
|
|
33284
33297
|
const definitionMap = new DefinitionMap();
|
|
33285
33298
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
33286
|
-
definitionMap.set('version', literal('19.0.0'));
|
|
33299
|
+
definitionMap.set('version', literal('19.1.0-next.0'));
|
|
33287
33300
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
33288
33301
|
definitionMap.set('type', meta.type.value);
|
|
33289
33302
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -33334,7 +33347,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
33334
33347
|
function createInjectorDefinitionMap(meta) {
|
|
33335
33348
|
const definitionMap = new DefinitionMap();
|
|
33336
33349
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
33337
|
-
definitionMap.set('version', literal('19.0.0'));
|
|
33350
|
+
definitionMap.set('version', literal('19.1.0-next.0'));
|
|
33338
33351
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
33339
33352
|
definitionMap.set('type', meta.type.value);
|
|
33340
33353
|
definitionMap.set('providers', meta.providers);
|
|
@@ -33367,7 +33380,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
33367
33380
|
throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
|
|
33368
33381
|
}
|
|
33369
33382
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
33370
|
-
definitionMap.set('version', literal('19.0.0'));
|
|
33383
|
+
definitionMap.set('version', literal('19.1.0-next.0'));
|
|
33371
33384
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
33372
33385
|
definitionMap.set('type', meta.type.value);
|
|
33373
33386
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -33418,7 +33431,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
33418
33431
|
function createPipeDefinitionMap(meta) {
|
|
33419
33432
|
const definitionMap = new DefinitionMap();
|
|
33420
33433
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
33421
|
-
definitionMap.set('version', literal('19.0.0'));
|
|
33434
|
+
definitionMap.set('version', literal('19.1.0-next.0'));
|
|
33422
33435
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
33423
33436
|
// e.g. `type: MyPipe`
|
|
33424
33437
|
definitionMap.set('type', meta.type.value);
|