@angular/core 19.1.0-next.3 → 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/LICENSE +1 -1
- package/fesm2022/core.mjs +516 -266
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +1 -24
- package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +5 -5
- package/index.d.ts +169 -17
- package/package.json +1 -1
- package/primitives/event-dispatch/index.d.ts +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/bundles/apply_import_manager-6508401d.js +732 -0
- package/schematics/bundles/{checker-228cb8a8.js → checker-24b68d23.js} +75 -27
- package/schematics/bundles/cleanup-unused-imports.js +295 -0
- package/schematics/bundles/{compiler_host-fc806dbe.js → compiler_host-5f693799.js} +2 -2
- package/schematics/bundles/control-flow-migration.js +3 -3
- package/schematics/bundles/explicit-standalone-flag.js +3 -3
- package/schematics/bundles/imports-abe29092.js +1 -1
- package/schematics/bundles/{combine_units-5d6a7099.js → index-767e341d.js} +10 -723
- package/schematics/bundles/index-b1033cf0.js +30 -0
- package/schematics/bundles/inject-migration.js +3 -3
- package/schematics/bundles/leading_space-d190b83b.js +1 -1
- package/schematics/bundles/{migrate_ts_type_references-d02c6750.js → migrate_ts_type_references-bc7d8784.js} +29 -28
- package/schematics/bundles/nodes-a9f0b985.js +1 -1
- package/schematics/bundles/output-migration.js +26 -25
- package/schematics/bundles/pending-tasks.js +3 -3
- package/schematics/bundles/{program-1591ec8f.js → program-c810a4c2.js} +81 -40
- package/schematics/bundles/project_tsconfig_paths-e9ccccbf.js +1 -1
- package/schematics/bundles/provide-initializer.js +3 -3
- package/schematics/bundles/route-lazy-loading.js +3 -3
- package/schematics/bundles/signal-input-migration.js +31 -30
- package/schematics/bundles/signal-queries-migration.js +48 -47
- package/schematics/bundles/signals.js +6 -5
- package/schematics/bundles/standalone-migration.js +9 -25
- package/schematics/collection.json +5 -0
- package/schematics/ng-generate/cleanup-unused-imports/schema.json +7 -0
- package/testing/index.d.ts +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.1.0-
|
|
3
|
+
* @license Angular v19.1.0-rc.0
|
|
4
4
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
-
var checker = require('./checker-
|
|
9
|
+
var checker = require('./checker-24b68d23.js');
|
|
10
10
|
var ts = require('typescript');
|
|
11
11
|
var p = require('path');
|
|
12
12
|
require('os');
|
|
@@ -995,7 +995,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
|
|
|
995
995
|
function compileDeclareClassMetadata(metadata) {
|
|
996
996
|
const definitionMap = new checker.DefinitionMap();
|
|
997
997
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
998
|
-
definitionMap.set('version', checker.literal('19.1.0-
|
|
998
|
+
definitionMap.set('version', checker.literal('19.1.0-rc.0'));
|
|
999
999
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1000
1000
|
definitionMap.set('type', metadata.type);
|
|
1001
1001
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -1013,7 +1013,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
1013
1013
|
callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? checker.literal(null));
|
|
1014
1014
|
callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? checker.literal(null));
|
|
1015
1015
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
1016
|
-
definitionMap.set('version', checker.literal('19.1.0-
|
|
1016
|
+
definitionMap.set('version', checker.literal('19.1.0-rc.0'));
|
|
1017
1017
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1018
1018
|
definitionMap.set('type', metadata.type);
|
|
1019
1019
|
definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -1108,7 +1108,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
1108
1108
|
const definitionMap = new checker.DefinitionMap();
|
|
1109
1109
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
1110
1110
|
definitionMap.set('minVersion', checker.literal(minVersion));
|
|
1111
|
-
definitionMap.set('version', checker.literal('19.1.0-
|
|
1111
|
+
definitionMap.set('version', checker.literal('19.1.0-rc.0'));
|
|
1112
1112
|
// e.g. `type: MyDirective`
|
|
1113
1113
|
definitionMap.set('type', meta.type.value);
|
|
1114
1114
|
if (meta.isStandalone !== undefined) {
|
|
@@ -1524,7 +1524,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
1524
1524
|
function compileDeclareFactoryFunction(meta) {
|
|
1525
1525
|
const definitionMap = new checker.DefinitionMap();
|
|
1526
1526
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
1527
|
-
definitionMap.set('version', checker.literal('19.1.0-
|
|
1527
|
+
definitionMap.set('version', checker.literal('19.1.0-rc.0'));
|
|
1528
1528
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1529
1529
|
definitionMap.set('type', meta.type.value);
|
|
1530
1530
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -1559,7 +1559,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
1559
1559
|
function createInjectableDefinitionMap(meta) {
|
|
1560
1560
|
const definitionMap = new checker.DefinitionMap();
|
|
1561
1561
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
1562
|
-
definitionMap.set('version', checker.literal('19.1.0-
|
|
1562
|
+
definitionMap.set('version', checker.literal('19.1.0-rc.0'));
|
|
1563
1563
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1564
1564
|
definitionMap.set('type', meta.type.value);
|
|
1565
1565
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -1610,7 +1610,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
1610
1610
|
function createInjectorDefinitionMap(meta) {
|
|
1611
1611
|
const definitionMap = new checker.DefinitionMap();
|
|
1612
1612
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
1613
|
-
definitionMap.set('version', checker.literal('19.1.0-
|
|
1613
|
+
definitionMap.set('version', checker.literal('19.1.0-rc.0'));
|
|
1614
1614
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1615
1615
|
definitionMap.set('type', meta.type.value);
|
|
1616
1616
|
definitionMap.set('providers', meta.providers);
|
|
@@ -1643,7 +1643,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
1643
1643
|
throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
|
|
1644
1644
|
}
|
|
1645
1645
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
1646
|
-
definitionMap.set('version', checker.literal('19.1.0-
|
|
1646
|
+
definitionMap.set('version', checker.literal('19.1.0-rc.0'));
|
|
1647
1647
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1648
1648
|
definitionMap.set('type', meta.type.value);
|
|
1649
1649
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -1694,7 +1694,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
1694
1694
|
function createPipeDefinitionMap(meta) {
|
|
1695
1695
|
const definitionMap = new checker.DefinitionMap();
|
|
1696
1696
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
1697
|
-
definitionMap.set('version', checker.literal('19.1.0-
|
|
1697
|
+
definitionMap.set('version', checker.literal('19.1.0-rc.0'));
|
|
1698
1698
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1699
1699
|
// e.g. `type: MyPipe`
|
|
1700
1700
|
definitionMap.set('type', meta.type.value);
|
|
@@ -10132,14 +10132,15 @@ class TsCreateProgramDriver {
|
|
|
10132
10132
|
* @param sourceFile File in which the file is being compiled.
|
|
10133
10133
|
* @param definition Compiled component definition.
|
|
10134
10134
|
* @param factory Compiled component factory.
|
|
10135
|
+
* @param deferBlockMetadata Metadata about the defer blocks in the component.
|
|
10135
10136
|
* @param classMetadata Compiled `setClassMetadata` expression, if any.
|
|
10136
10137
|
* @param debugInfo Compiled `setClassDebugInfo` expression, if any.
|
|
10137
10138
|
*/
|
|
10138
|
-
function extractHmrDependencies(node, definition, factory, classMetadata, debugInfo) {
|
|
10139
|
+
function extractHmrDependencies(node, definition, factory, deferBlockMetadata, classMetadata, debugInfo) {
|
|
10139
10140
|
const name = ts__default["default"].isClassDeclaration(node) && node.name ? node.name.text : null;
|
|
10140
10141
|
const visitor = new PotentialTopLevelReadsVisitor();
|
|
10141
10142
|
const sourceFile = node.getSourceFile();
|
|
10142
|
-
// Visit all of the compiled
|
|
10143
|
+
// Visit all of the compiled expressions to look for potential
|
|
10143
10144
|
// local references that would have to be retained.
|
|
10144
10145
|
definition.expression.visitExpression(visitor, null);
|
|
10145
10146
|
definition.statements.forEach((statement) => statement.visitStatement(visitor, null));
|
|
@@ -10147,6 +10148,12 @@ function extractHmrDependencies(node, definition, factory, classMetadata, debugI
|
|
|
10147
10148
|
factory.statements.forEach((statement) => statement.visitStatement(visitor, null));
|
|
10148
10149
|
classMetadata?.visitStatement(visitor, null);
|
|
10149
10150
|
debugInfo?.visitStatement(visitor, null);
|
|
10151
|
+
if (deferBlockMetadata.mode === 0 /* DeferBlockDepsEmitMode.PerBlock */) {
|
|
10152
|
+
deferBlockMetadata.blocks.forEach((loader) => loader?.visitExpression(visitor, null));
|
|
10153
|
+
}
|
|
10154
|
+
else {
|
|
10155
|
+
deferBlockMetadata.dependenciesFn?.visitExpression(visitor, null);
|
|
10156
|
+
}
|
|
10150
10157
|
// Filter out only the references to defined top-level symbols. This allows us to ignore local
|
|
10151
10158
|
// variables inside of functions. Note that we filter out the class name since it is always
|
|
10152
10159
|
// defined and it saves us having to repeat this logic wherever the locals are consumed.
|
|
@@ -10294,8 +10301,22 @@ class PotentialTopLevelReadsVisitor extends checker.RecursiveAstVisitor {
|
|
|
10294
10301
|
if (ts__default["default"].isCallExpression(parent)) {
|
|
10295
10302
|
return parent.expression === node || parent.arguments.includes(node);
|
|
10296
10303
|
}
|
|
10297
|
-
// Identifier used in a
|
|
10298
|
-
if (ts__default["default"].isPropertyAccessExpression(parent)
|
|
10304
|
+
// Identifier used in a nested expression is only top-level if it's the actual expression.
|
|
10305
|
+
if (ts__default["default"].isPropertyAccessExpression(parent) ||
|
|
10306
|
+
ts__default["default"].isComputedPropertyName(parent) ||
|
|
10307
|
+
ts__default["default"].isTemplateSpan(parent) ||
|
|
10308
|
+
ts__default["default"].isSpreadAssignment(parent) ||
|
|
10309
|
+
ts__default["default"].isSpreadElement(parent) ||
|
|
10310
|
+
ts__default["default"].isAwaitExpression(parent) ||
|
|
10311
|
+
ts__default["default"].isNonNullExpression(parent) ||
|
|
10312
|
+
ts__default["default"].isIfStatement(parent) ||
|
|
10313
|
+
ts__default["default"].isDoStatement(parent) ||
|
|
10314
|
+
ts__default["default"].isWhileStatement(parent) ||
|
|
10315
|
+
ts__default["default"].isForInStatement(parent) ||
|
|
10316
|
+
ts__default["default"].isForOfStatement(parent) ||
|
|
10317
|
+
ts__default["default"].isSwitchStatement(parent) ||
|
|
10318
|
+
ts__default["default"].isCaseClause(parent) ||
|
|
10319
|
+
ts__default["default"].isThrowStatement(parent)) {
|
|
10299
10320
|
return parent.expression === node;
|
|
10300
10321
|
}
|
|
10301
10322
|
// Identifier used in an array is only top-level if it's one of the elements.
|
|
@@ -10306,10 +10327,25 @@ class PotentialTopLevelReadsVisitor extends checker.RecursiveAstVisitor {
|
|
|
10306
10327
|
if (ts__default["default"].isPropertyAssignment(parent)) {
|
|
10307
10328
|
return parent.initializer === node;
|
|
10308
10329
|
}
|
|
10309
|
-
// Identifier in a
|
|
10310
|
-
|
|
10330
|
+
// Identifier in a declaration is only top level if it's the name.
|
|
10331
|
+
// In shorthand assignments the name is also the value.
|
|
10332
|
+
if (ts__default["default"].isClassDeclaration(parent) ||
|
|
10333
|
+
ts__default["default"].isFunctionDeclaration(parent) ||
|
|
10334
|
+
ts__default["default"].isVariableDeclaration(parent) ||
|
|
10335
|
+
ts__default["default"].isShorthandPropertyAssignment(parent)) {
|
|
10311
10336
|
return parent.name === node;
|
|
10312
10337
|
}
|
|
10338
|
+
if (ts__default["default"].isElementAccessExpression(parent)) {
|
|
10339
|
+
return parent.expression === node || parent.argumentExpression === node;
|
|
10340
|
+
}
|
|
10341
|
+
if (ts__default["default"].isBinaryExpression(parent)) {
|
|
10342
|
+
return parent.left === node || parent.right === node;
|
|
10343
|
+
}
|
|
10344
|
+
// It's unlikely that we'll run into imports/exports in this use case.
|
|
10345
|
+
// We handle them since it's simple and for completeness' sake.
|
|
10346
|
+
if (ts__default["default"].isImportSpecifier(parent) || ts__default["default"].isExportSpecifier(parent)) {
|
|
10347
|
+
return (parent.propertyName || parent.name) === node;
|
|
10348
|
+
}
|
|
10313
10349
|
// Otherwise it's not top-level.
|
|
10314
10350
|
return false;
|
|
10315
10351
|
}
|
|
@@ -10336,17 +10372,18 @@ class PotentialTopLevelReadsVisitor extends checker.RecursiveAstVisitor {
|
|
|
10336
10372
|
* @param rootDirs Root directories configured by the user.
|
|
10337
10373
|
* @param definition Analyzed component definition.
|
|
10338
10374
|
* @param factory Analyzed component factory.
|
|
10375
|
+
* @param deferBlockMetadata Metadata about the defer blocks in the component.
|
|
10339
10376
|
* @param classMetadata Analyzed `setClassMetadata` expression, if any.
|
|
10340
10377
|
* @param debugInfo Analyzed `setClassDebugInfo` expression, if any.
|
|
10341
10378
|
*/
|
|
10342
|
-
function extractHmrMetatadata(clazz, reflection, compilerHost, rootDirs, definition, factory, classMetadata, debugInfo) {
|
|
10379
|
+
function extractHmrMetatadata(clazz, reflection, compilerHost, rootDirs, definition, factory, deferBlockMetadata, classMetadata, debugInfo) {
|
|
10343
10380
|
if (!reflection.isClass(clazz)) {
|
|
10344
10381
|
return null;
|
|
10345
10382
|
}
|
|
10346
10383
|
const sourceFile = clazz.getSourceFile();
|
|
10347
10384
|
const filePath = getProjectRelativePath(sourceFile.fileName, rootDirs, compilerHost) ||
|
|
10348
10385
|
compilerHost.getCanonicalFileName(sourceFile.fileName);
|
|
10349
|
-
const dependencies = extractHmrDependencies(clazz, definition, factory, classMetadata, debugInfo);
|
|
10386
|
+
const dependencies = extractHmrDependencies(clazz, definition, factory, deferBlockMetadata, classMetadata, debugInfo);
|
|
10350
10387
|
const meta = {
|
|
10351
10388
|
type: new checker.WrappedNodeExpr(clazz.name),
|
|
10352
10389
|
className: clazz.name.text,
|
|
@@ -10509,7 +10546,7 @@ class ComponentDecoratorHandler {
|
|
|
10509
10546
|
};
|
|
10510
10547
|
// Dependencies can't be deferred during HMR, because the HMR update module can't have
|
|
10511
10548
|
// dynamic imports and its dependencies need to be passed in directly. If dependencies
|
|
10512
|
-
// are deferred, their imports will be deleted so we
|
|
10549
|
+
// are deferred, their imports will be deleted so we may lose the reference to them.
|
|
10513
10550
|
this.canDeferDeps = !enableHmr;
|
|
10514
10551
|
}
|
|
10515
10552
|
literalCache = new Map();
|
|
@@ -11447,10 +11484,11 @@ class ComponentDecoratorHandler {
|
|
|
11447
11484
|
const perComponentDeferredDeps = this.canDeferDeps
|
|
11448
11485
|
? this.resolveAllDeferredDependencies(resolution)
|
|
11449
11486
|
: null;
|
|
11487
|
+
const defer = this.compileDeferBlocks(resolution);
|
|
11450
11488
|
const meta = {
|
|
11451
11489
|
...analysis.meta,
|
|
11452
11490
|
...resolution,
|
|
11453
|
-
defer
|
|
11491
|
+
defer,
|
|
11454
11492
|
};
|
|
11455
11493
|
const fac = compileNgFactoryDefField(checker.toFactoryMetadata(meta, checker.FactoryTarget.Component));
|
|
11456
11494
|
if (perComponentDeferredDeps !== null) {
|
|
@@ -11465,7 +11503,7 @@ class ComponentDecoratorHandler {
|
|
|
11465
11503
|
? compileClassDebugInfo(analysis.classDebugInfo).toStmt()
|
|
11466
11504
|
: null;
|
|
11467
11505
|
const hmrMeta = this.enableHmr
|
|
11468
|
-
? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, classMetadata, debugInfo)
|
|
11506
|
+
? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, defer, classMetadata, debugInfo)
|
|
11469
11507
|
: null;
|
|
11470
11508
|
const hmrInitializer = hmrMeta ? compileHmrInitializer(hmrMeta).toStmt() : null;
|
|
11471
11509
|
const deferrableImports = this.canDeferDeps
|
|
@@ -11488,10 +11526,11 @@ class ComponentDecoratorHandler {
|
|
|
11488
11526
|
const perComponentDeferredDeps = this.canDeferDeps
|
|
11489
11527
|
? this.resolveAllDeferredDependencies(resolution)
|
|
11490
11528
|
: null;
|
|
11529
|
+
const defer = this.compileDeferBlocks(resolution);
|
|
11491
11530
|
const meta = {
|
|
11492
11531
|
...analysis.meta,
|
|
11493
11532
|
...resolution,
|
|
11494
|
-
defer
|
|
11533
|
+
defer,
|
|
11495
11534
|
};
|
|
11496
11535
|
const fac = compileDeclareFactory(checker.toFactoryMetadata(meta, checker.FactoryTarget.Component));
|
|
11497
11536
|
const inputTransformFields = compileInputTransformFields(analysis.inputs);
|
|
@@ -11500,7 +11539,7 @@ class ComponentDecoratorHandler {
|
|
|
11500
11539
|
? compileComponentDeclareClassMetadata(analysis.classMetadata, perComponentDeferredDeps).toStmt()
|
|
11501
11540
|
: null;
|
|
11502
11541
|
const hmrMeta = this.enableHmr
|
|
11503
|
-
? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, classMetadata, null)
|
|
11542
|
+
? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, defer, classMetadata, null)
|
|
11504
11543
|
: null;
|
|
11505
11544
|
const hmrInitializer = hmrMeta ? compileHmrInitializer(hmrMeta).toStmt() : null;
|
|
11506
11545
|
const deferrableImports = this.canDeferDeps
|
|
@@ -11513,10 +11552,11 @@ class ComponentDecoratorHandler {
|
|
|
11513
11552
|
// within the `@Component.deferredImports` array, because in this mode compiler
|
|
11514
11553
|
// doesn't have information on which dependencies belong to which defer blocks.
|
|
11515
11554
|
const deferrableTypes = this.canDeferDeps ? analysis.explicitlyDeferredTypes : null;
|
|
11555
|
+
const defer = this.compileDeferBlocks(resolution);
|
|
11516
11556
|
const meta = {
|
|
11517
11557
|
...analysis.meta,
|
|
11518
11558
|
...resolution,
|
|
11519
|
-
defer
|
|
11559
|
+
defer,
|
|
11520
11560
|
};
|
|
11521
11561
|
if (deferrableTypes !== null) {
|
|
11522
11562
|
removeDeferrableTypesFromComponentDecorator(analysis, deferrableTypes);
|
|
@@ -11531,7 +11571,7 @@ class ComponentDecoratorHandler {
|
|
|
11531
11571
|
? compileClassDebugInfo(analysis.classDebugInfo).toStmt()
|
|
11532
11572
|
: null;
|
|
11533
11573
|
const hmrMeta = this.enableHmr
|
|
11534
|
-
? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, classMetadata, debugInfo)
|
|
11574
|
+
? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, defer, classMetadata, debugInfo)
|
|
11535
11575
|
: null;
|
|
11536
11576
|
const hmrInitializer = hmrMeta ? compileHmrInitializer(hmrMeta).toStmt() : null;
|
|
11537
11577
|
const deferrableImports = this.canDeferDeps
|
|
@@ -11545,10 +11585,11 @@ class ComponentDecoratorHandler {
|
|
|
11545
11585
|
}
|
|
11546
11586
|
// Create a brand-new constant pool since there shouldn't be any constant sharing.
|
|
11547
11587
|
const pool = new checker.ConstantPool();
|
|
11588
|
+
const defer = this.compileDeferBlocks(resolution);
|
|
11548
11589
|
const meta = {
|
|
11549
11590
|
...analysis.meta,
|
|
11550
11591
|
...resolution,
|
|
11551
|
-
defer
|
|
11592
|
+
defer,
|
|
11552
11593
|
};
|
|
11553
11594
|
const fac = compileNgFactoryDefField(checker.toFactoryMetadata(meta, checker.FactoryTarget.Component));
|
|
11554
11595
|
const def = checker.compileComponentFromMetadata(meta, pool, checker.makeBindingParser());
|
|
@@ -11559,7 +11600,7 @@ class ComponentDecoratorHandler {
|
|
|
11559
11600
|
? compileClassDebugInfo(analysis.classDebugInfo).toStmt()
|
|
11560
11601
|
: null;
|
|
11561
11602
|
const hmrMeta = this.enableHmr
|
|
11562
|
-
? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, classMetadata, debugInfo)
|
|
11603
|
+
? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, defer, classMetadata, debugInfo)
|
|
11563
11604
|
: null;
|
|
11564
11605
|
const res = checker.compileResults(fac, def, classMetadata, 'ɵcmp', null, null, debugInfo, null);
|
|
11565
11606
|
return hmrMeta === null || res.length === 0
|
|
@@ -14692,7 +14733,7 @@ class DocsExtractor {
|
|
|
14692
14733
|
getExportedDeclarations(sourceFile) {
|
|
14693
14734
|
// Use the reflection host to get all the exported declarations from this
|
|
14694
14735
|
// source file entry point.
|
|
14695
|
-
const reflector = new checker.TypeScriptReflectionHost(this.typeChecker);
|
|
14736
|
+
const reflector = new checker.TypeScriptReflectionHost(this.typeChecker, false, true);
|
|
14696
14737
|
const exportedDeclarationMap = reflector.getExportsOfModule(sourceFile);
|
|
14697
14738
|
// Augment each declaration with the exported name in the public API.
|
|
14698
14739
|
let exportedDeclarations = Array.from(exportedDeclarationMap?.entries() ?? []).map(([exportName, declaration]) => [exportName, declaration.node]);
|
|
@@ -17017,7 +17058,7 @@ const factory = {
|
|
|
17017
17058
|
*
|
|
17018
17059
|
* @publicApi
|
|
17019
17060
|
*/
|
|
17020
|
-
|
|
17061
|
+
exports.DiagnosticCategoryLabel = void 0;
|
|
17021
17062
|
(function (DiagnosticCategoryLabel) {
|
|
17022
17063
|
/** Treat the diagnostic as a warning, don't fail the compilation. */
|
|
17023
17064
|
DiagnosticCategoryLabel["Warning"] = "warning";
|
|
@@ -17025,7 +17066,7 @@ var DiagnosticCategoryLabel;
|
|
|
17025
17066
|
DiagnosticCategoryLabel["Error"] = "error";
|
|
17026
17067
|
/** Ignore the diagnostic altogether. */
|
|
17027
17068
|
DiagnosticCategoryLabel["Suppress"] = "suppress";
|
|
17028
|
-
})(DiagnosticCategoryLabel || (DiagnosticCategoryLabel = {}));
|
|
17069
|
+
})(exports.DiagnosticCategoryLabel || (exports.DiagnosticCategoryLabel = {}));
|
|
17029
17070
|
|
|
17030
17071
|
class ExtendedTemplateCheckerImpl {
|
|
17031
17072
|
partialCtx;
|
|
@@ -17037,7 +17078,7 @@ class ExtendedTemplateCheckerImpl {
|
|
|
17037
17078
|
// Read the diagnostic category from compiler options.
|
|
17038
17079
|
const category = diagnosticLabelToCategory(options?.extendedDiagnostics?.checks?.[factory.name] ??
|
|
17039
17080
|
options?.extendedDiagnostics?.defaultCategory ??
|
|
17040
|
-
DiagnosticCategoryLabel.Warning);
|
|
17081
|
+
exports.DiagnosticCategoryLabel.Warning);
|
|
17041
17082
|
// Skip the diagnostic if suppressed via compiler options.
|
|
17042
17083
|
if (category === null) {
|
|
17043
17084
|
continue;
|
|
@@ -17083,11 +17124,11 @@ class ExtendedTemplateCheckerImpl {
|
|
|
17083
17124
|
*/
|
|
17084
17125
|
function diagnosticLabelToCategory(label) {
|
|
17085
17126
|
switch (label) {
|
|
17086
|
-
case DiagnosticCategoryLabel.Warning:
|
|
17127
|
+
case exports.DiagnosticCategoryLabel.Warning:
|
|
17087
17128
|
return ts__default["default"].DiagnosticCategory.Warning;
|
|
17088
|
-
case DiagnosticCategoryLabel.Error:
|
|
17129
|
+
case exports.DiagnosticCategoryLabel.Error:
|
|
17089
17130
|
return ts__default["default"].DiagnosticCategory.Error;
|
|
17090
|
-
case DiagnosticCategoryLabel.Suppress:
|
|
17131
|
+
case exports.DiagnosticCategoryLabel.Suppress:
|
|
17091
17132
|
return null;
|
|
17092
17133
|
default:
|
|
17093
17134
|
return assertNever(label);
|
|
@@ -20166,7 +20207,7 @@ var semver = /*@__PURE__*/getDefaultExportFromCjs(semverExports);
|
|
|
20166
20207
|
* @param minVersion Minimum required version for the feature.
|
|
20167
20208
|
*/
|
|
20168
20209
|
function coreVersionSupportsFeature(coreVersion, minVersion) {
|
|
20169
|
-
// A version of `19.1.0-
|
|
20210
|
+
// A version of `19.1.0-rc.0` usually means that core is at head so it supports
|
|
20170
20211
|
// all features. Use string interpolation prevent the placeholder from being replaced
|
|
20171
20212
|
// with the current version during build time.
|
|
20172
20213
|
if (coreVersion === `0.0.0-${'PLACEHOLDER'}`) {
|
|
@@ -20810,8 +20851,8 @@ class NgCompiler {
|
|
|
20810
20851
|
// (providing the full TemplateTypeChecker API) and if strict mode is not enabled. In strict
|
|
20811
20852
|
// mode, the user is in full control of type inference.
|
|
20812
20853
|
suggestionsForSuboptimalTypeInference: this.enableTemplateTypeChecker && !strictTemplates,
|
|
20813
|
-
controlFlowPreventingContentProjection: this.options.extendedDiagnostics?.defaultCategory || DiagnosticCategoryLabel.Warning,
|
|
20814
|
-
unusedStandaloneImports: this.options.extendedDiagnostics?.defaultCategory || DiagnosticCategoryLabel.Warning,
|
|
20854
|
+
controlFlowPreventingContentProjection: this.options.extendedDiagnostics?.defaultCategory || exports.DiagnosticCategoryLabel.Warning,
|
|
20855
|
+
unusedStandaloneImports: this.options.extendedDiagnostics?.defaultCategory || exports.DiagnosticCategoryLabel.Warning,
|
|
20815
20856
|
allowSignalsInTwoWayBindings,
|
|
20816
20857
|
checkTwoWayBoundEvents,
|
|
20817
20858
|
};
|
|
@@ -20844,8 +20885,8 @@ class NgCompiler {
|
|
|
20844
20885
|
// In "basic" template type-checking mode, no warnings are produced since most things are
|
|
20845
20886
|
// not checked anyways.
|
|
20846
20887
|
suggestionsForSuboptimalTypeInference: false,
|
|
20847
|
-
controlFlowPreventingContentProjection: this.options.extendedDiagnostics?.defaultCategory || DiagnosticCategoryLabel.Warning,
|
|
20848
|
-
unusedStandaloneImports: this.options.extendedDiagnostics?.defaultCategory || DiagnosticCategoryLabel.Warning,
|
|
20888
|
+
controlFlowPreventingContentProjection: this.options.extendedDiagnostics?.defaultCategory || exports.DiagnosticCategoryLabel.Warning,
|
|
20889
|
+
unusedStandaloneImports: this.options.extendedDiagnostics?.defaultCategory || exports.DiagnosticCategoryLabel.Warning,
|
|
20849
20890
|
allowSignalsInTwoWayBindings,
|
|
20850
20891
|
checkTwoWayBoundEvents,
|
|
20851
20892
|
};
|
|
@@ -21235,7 +21276,7 @@ One of the following actions is required:
|
|
|
21235
21276
|
`.trim(),
|
|
21236
21277
|
});
|
|
21237
21278
|
}
|
|
21238
|
-
const allowedCategoryLabels = Array.from(Object.values(DiagnosticCategoryLabel));
|
|
21279
|
+
const allowedCategoryLabels = Array.from(Object.values(exports.DiagnosticCategoryLabel));
|
|
21239
21280
|
const defaultCategory = options.extendedDiagnostics?.defaultCategory;
|
|
21240
21281
|
if (defaultCategory && !allowedCategoryLabels.includes(defaultCategory)) {
|
|
21241
21282
|
yield makeConfigDiagnostic({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.1.0-
|
|
3
|
+
* @license Angular v19.1.0-rc.0
|
|
4
4
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -11,11 +11,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
11
11
|
var schematics = require('@angular-devkit/schematics');
|
|
12
12
|
var p = require('path');
|
|
13
13
|
var project_tsconfig_paths = require('./project_tsconfig_paths-e9ccccbf.js');
|
|
14
|
-
var compiler_host = require('./compiler_host-
|
|
14
|
+
var compiler_host = require('./compiler_host-5f693799.js');
|
|
15
15
|
var ts = require('typescript');
|
|
16
16
|
var imports = require('./imports-abe29092.js');
|
|
17
17
|
require('@angular-devkit/core');
|
|
18
|
-
require('./checker-
|
|
18
|
+
require('./checker-24b68d23.js');
|
|
19
19
|
require('os');
|
|
20
20
|
require('fs');
|
|
21
21
|
require('module');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.1.0-
|
|
3
|
+
* @license Angular v19.1.0-rc.0
|
|
4
4
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -11,10 +11,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
11
11
|
var schematics = require('@angular-devkit/schematics');
|
|
12
12
|
var fs = require('fs');
|
|
13
13
|
var p = require('path');
|
|
14
|
-
var compiler_host = require('./compiler_host-
|
|
14
|
+
var compiler_host = require('./compiler_host-5f693799.js');
|
|
15
15
|
var project_tsconfig_paths = require('./project_tsconfig_paths-e9ccccbf.js');
|
|
16
16
|
var ts = require('typescript');
|
|
17
|
-
var checker = require('./checker-
|
|
17
|
+
var checker = require('./checker-24b68d23.js');
|
|
18
18
|
require('os');
|
|
19
19
|
require('@angular-devkit/core');
|
|
20
20
|
require('module');
|