@angular/compiler 20.0.0-next.9 → 20.0.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 +19 -21
- package/fesm2022/compiler.mjs.map +1 -1
- package/index.d.ts +1 -1
- package/package.json +2 -2
package/fesm2022/compiler.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v20.0.0-
|
|
2
|
+
* @license Angular v20.0.0-rc.0
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -3218,28 +3218,26 @@ function stringify(token) {
|
|
|
3218
3218
|
return token;
|
|
3219
3219
|
}
|
|
3220
3220
|
if (Array.isArray(token)) {
|
|
3221
|
-
return
|
|
3221
|
+
return `[${token.map(stringify).join(', ')}]`;
|
|
3222
3222
|
}
|
|
3223
3223
|
if (token == null) {
|
|
3224
3224
|
return '' + token;
|
|
3225
3225
|
}
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
if (token.name) {
|
|
3230
|
-
return `${token.name}`;
|
|
3226
|
+
const name = token.overriddenName || token.name;
|
|
3227
|
+
if (name) {
|
|
3228
|
+
return `${name}`;
|
|
3231
3229
|
}
|
|
3232
3230
|
if (!token.toString) {
|
|
3233
3231
|
return 'object';
|
|
3234
3232
|
}
|
|
3235
3233
|
// WARNING: do not try to `JSON.stringify(token)` here
|
|
3236
3234
|
// see https://github.com/angular/angular/issues/23440
|
|
3237
|
-
const
|
|
3238
|
-
if (
|
|
3239
|
-
return '' +
|
|
3235
|
+
const result = token.toString();
|
|
3236
|
+
if (result == null) {
|
|
3237
|
+
return '' + result;
|
|
3240
3238
|
}
|
|
3241
|
-
const newLineIndex =
|
|
3242
|
-
return newLineIndex
|
|
3239
|
+
const newLineIndex = result.indexOf('\n');
|
|
3240
|
+
return newLineIndex >= 0 ? result.slice(0, newLineIndex) : result;
|
|
3243
3241
|
}
|
|
3244
3242
|
class Version {
|
|
3245
3243
|
full;
|
|
@@ -33870,7 +33868,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
|
|
|
33870
33868
|
function compileDeclareClassMetadata(metadata) {
|
|
33871
33869
|
const definitionMap = new DefinitionMap();
|
|
33872
33870
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
33873
|
-
definitionMap.set('version', literal('20.0.0-
|
|
33871
|
+
definitionMap.set('version', literal('20.0.0-rc.0'));
|
|
33874
33872
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
33875
33873
|
definitionMap.set('type', metadata.type);
|
|
33876
33874
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -33888,7 +33886,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
33888
33886
|
callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? literal(null));
|
|
33889
33887
|
callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? literal(null));
|
|
33890
33888
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
33891
|
-
definitionMap.set('version', literal('20.0.0-
|
|
33889
|
+
definitionMap.set('version', literal('20.0.0-rc.0'));
|
|
33892
33890
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
33893
33891
|
definitionMap.set('type', metadata.type);
|
|
33894
33892
|
definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -33983,7 +33981,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
33983
33981
|
const definitionMap = new DefinitionMap();
|
|
33984
33982
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
33985
33983
|
definitionMap.set('minVersion', literal(minVersion));
|
|
33986
|
-
definitionMap.set('version', literal('20.0.0-
|
|
33984
|
+
definitionMap.set('version', literal('20.0.0-rc.0'));
|
|
33987
33985
|
// e.g. `type: MyDirective`
|
|
33988
33986
|
definitionMap.set('type', meta.type.value);
|
|
33989
33987
|
if (meta.isStandalone !== undefined) {
|
|
@@ -34399,7 +34397,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
34399
34397
|
function compileDeclareFactoryFunction(meta) {
|
|
34400
34398
|
const definitionMap = new DefinitionMap();
|
|
34401
34399
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
34402
|
-
definitionMap.set('version', literal('20.0.0-
|
|
34400
|
+
definitionMap.set('version', literal('20.0.0-rc.0'));
|
|
34403
34401
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
34404
34402
|
definitionMap.set('type', meta.type.value);
|
|
34405
34403
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -34434,7 +34432,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
34434
34432
|
function createInjectableDefinitionMap(meta) {
|
|
34435
34433
|
const definitionMap = new DefinitionMap();
|
|
34436
34434
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
34437
|
-
definitionMap.set('version', literal('20.0.0-
|
|
34435
|
+
definitionMap.set('version', literal('20.0.0-rc.0'));
|
|
34438
34436
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
34439
34437
|
definitionMap.set('type', meta.type.value);
|
|
34440
34438
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -34485,7 +34483,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
34485
34483
|
function createInjectorDefinitionMap(meta) {
|
|
34486
34484
|
const definitionMap = new DefinitionMap();
|
|
34487
34485
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
34488
|
-
definitionMap.set('version', literal('20.0.0-
|
|
34486
|
+
definitionMap.set('version', literal('20.0.0-rc.0'));
|
|
34489
34487
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
34490
34488
|
definitionMap.set('type', meta.type.value);
|
|
34491
34489
|
definitionMap.set('providers', meta.providers);
|
|
@@ -34518,7 +34516,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
34518
34516
|
throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
|
|
34519
34517
|
}
|
|
34520
34518
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
34521
|
-
definitionMap.set('version', literal('20.0.0-
|
|
34519
|
+
definitionMap.set('version', literal('20.0.0-rc.0'));
|
|
34522
34520
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
34523
34521
|
definitionMap.set('type', meta.type.value);
|
|
34524
34522
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -34569,7 +34567,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
34569
34567
|
function createPipeDefinitionMap(meta) {
|
|
34570
34568
|
const definitionMap = new DefinitionMap();
|
|
34571
34569
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
34572
|
-
definitionMap.set('version', literal('20.0.0-
|
|
34570
|
+
definitionMap.set('version', literal('20.0.0-rc.0'));
|
|
34573
34571
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
34574
34572
|
// e.g. `type: MyPipe`
|
|
34575
34573
|
definitionMap.set('type', meta.type.value);
|
|
@@ -34727,7 +34725,7 @@ function compileHmrUpdateCallback(definitions, constantStatements, meta) {
|
|
|
34727
34725
|
* @description
|
|
34728
34726
|
* Entry point for all public APIs of the compiler package.
|
|
34729
34727
|
*/
|
|
34730
|
-
const VERSION = new Version('20.0.0-
|
|
34728
|
+
const VERSION = new Version('20.0.0-rc.0');
|
|
34731
34729
|
|
|
34732
34730
|
//////////////////////////////////////
|
|
34733
34731
|
// THIS FILE HAS GLOBAL SIDE EFFECT //
|