@angular/core 19.2.0-next.3 → 19.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.
Files changed (42) hide show
  1. package/fesm2022/core.mjs +973 -988
  2. package/fesm2022/core.mjs.map +1 -1
  3. package/fesm2022/primitives/event-dispatch.mjs +1 -1
  4. package/fesm2022/primitives/signals.mjs +5 -5
  5. package/fesm2022/primitives/signals.mjs.map +1 -1
  6. package/fesm2022/rxjs-interop.mjs +1 -1
  7. package/fesm2022/testing.mjs +4 -4
  8. package/index.d.ts +68 -35
  9. package/package.json +1 -1
  10. package/primitives/event-dispatch/index.d.ts +1 -1
  11. package/primitives/signals/index.d.ts +2 -2
  12. package/rxjs-interop/index.d.ts +1 -1
  13. package/schematics/bundles/apply_import_manager-a930fcf1.js +71 -0
  14. package/schematics/bundles/{checker-32db85a6.js → checker-2eecc677.js} +17 -16
  15. package/schematics/bundles/cleanup-unused-imports.js +16 -15
  16. package/schematics/bundles/{compiler_host-540e221c.js → compiler_host-c280a924.js} +2 -2
  17. package/schematics/bundles/control-flow-migration.js +3 -3
  18. package/schematics/bundles/explicit-standalone-flag.js +3 -3
  19. package/schematics/bundles/imports-abe29092.js +1 -1
  20. package/schematics/bundles/{index-d5020c9c.js → index-24a2ad1e.js} +9 -9
  21. package/schematics/bundles/{index-7ee8967e.js → index-3891dd55.js} +4 -4
  22. package/schematics/bundles/inject-migration.js +8 -7
  23. package/schematics/bundles/leading_space-d190b83b.js +1 -1
  24. package/schematics/bundles/{migrate_ts_type_references-26986908.js → migrate_ts_type_references-71b3a951.js} +20 -20
  25. package/schematics/bundles/{nodes-a9f0b985.js → ng_decorators-e699c081.js} +1 -14
  26. package/schematics/bundles/nodes-a535b2be.js +27 -0
  27. package/schematics/bundles/output-migration.js +21 -20
  28. package/schematics/bundles/pending-tasks.js +3 -3
  29. package/schematics/bundles/{program-507de2f1.js → program-24da9092.js} +90 -45
  30. package/schematics/bundles/{apply_import_manager-f4d044b2.js → project_paths-b073c4d6.js} +3 -57
  31. package/schematics/bundles/project_tsconfig_paths-e9ccccbf.js +1 -1
  32. package/schematics/bundles/property_name-7c8433f5.js +31 -0
  33. package/schematics/bundles/provide-initializer.js +3 -3
  34. package/schematics/bundles/route-lazy-loading.js +8 -12
  35. package/schematics/bundles/self-closing-tags-migration.js +448 -0
  36. package/schematics/bundles/signal-input-migration.js +20 -19
  37. package/schematics/bundles/signal-queries-migration.js +26 -25
  38. package/schematics/bundles/signals.js +7 -6
  39. package/schematics/bundles/standalone-migration.js +12 -11
  40. package/schematics/collection.json +6 -0
  41. package/schematics/ng-generate/self-closing-tags-migration/schema.json +14 -0
  42. package/testing/index.d.ts +1 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v19.2.0-next.3
3
+ * @license Angular v19.2.0-rc.0
4
4
  * (c) 2010-2024 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -10,13 +10,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
10
10
 
11
11
  var schematics = require('@angular-devkit/schematics');
12
12
  var project_tsconfig_paths = require('./project_tsconfig_paths-e9ccccbf.js');
13
- var apply_import_manager = require('./apply_import_manager-f4d044b2.js');
13
+ var project_paths = require('./project_paths-b073c4d6.js');
14
14
  require('os');
15
15
  var ts = require('typescript');
16
- var checker = require('./checker-32db85a6.js');
17
- var program = require('./program-507de2f1.js');
16
+ var checker = require('./checker-2eecc677.js');
17
+ var program = require('./program-24da9092.js');
18
18
  require('path');
19
- var index = require('./index-d5020c9c.js');
19
+ var apply_import_manager = require('./apply_import_manager-a930fcf1.js');
20
+ var index = require('./index-24a2ad1e.js');
20
21
  require('@angular-devkit/core');
21
22
  require('node:path/posix');
22
23
  require('fs');
@@ -95,7 +96,7 @@ function getOutputDecorator(node, reflector) {
95
96
  // THINK: this utility + type is not specific to @Output, really, maybe move it to tsurge?
96
97
  /** Computes an unique ID for a given Angular `@Output` property. */
97
98
  function getUniqueIdForProperty(info, prop) {
98
- const { id } = apply_import_manager.projectFile(prop.getSourceFile(), info);
99
+ const { id } = project_paths.projectFile(prop.getSourceFile(), info);
99
100
  id.replace(/\.d\.ts$/, '.ts');
100
101
  return `${id}@@${prop.parent.name ?? 'unknown-class'}@@${prop.name.getText()}`;
101
102
  }
@@ -174,7 +175,7 @@ function calculateImportReplacements(info, sourceFiles) {
174
175
  const importManager = new checker.ImportManager();
175
176
  const addOnly = [];
176
177
  const addRemove = [];
177
- const file = apply_import_manager.projectFile(sf, info);
178
+ const file = project_paths.projectFile(sf, info);
178
179
  importManager.addImport({
179
180
  requestedFile: sf,
180
181
  exportModuleSpecifier: '@angular/core',
@@ -230,21 +231,21 @@ function calculatePipeCallReplacement(info, node) {
230
231
  }
231
232
  function prepareTextReplacementForNode(info, node, replacement, start) {
232
233
  const sf = node.getSourceFile();
233
- return new apply_import_manager.Replacement(apply_import_manager.projectFile(sf, info), new apply_import_manager.TextUpdate({
234
+ return new project_paths.Replacement(project_paths.projectFile(sf, info), new project_paths.TextUpdate({
234
235
  position: start ?? node.getStart(),
235
236
  end: node.getEnd(),
236
237
  toInsert: replacement,
237
238
  }));
238
239
  }
239
240
  function prepareTextReplacement(file, replacement, start, end) {
240
- return new apply_import_manager.Replacement(file, new apply_import_manager.TextUpdate({
241
+ return new project_paths.Replacement(file, new project_paths.TextUpdate({
241
242
  position: start,
242
243
  end: end,
243
244
  toInsert: replacement,
244
245
  }));
245
246
  }
246
247
 
247
- class OutputMigration extends apply_import_manager.TsurgeFunnelMigration {
248
+ class OutputMigration extends project_paths.TsurgeFunnelMigration {
248
249
  config;
249
250
  constructor(config = {}) {
250
251
  super();
@@ -295,7 +296,7 @@ class OutputMigration extends apply_import_manager.TsurgeFunnelMigration {
295
296
  id: getUniqueIdForProperty(info, node),
296
297
  aliasParam: outputDecorator.args?.at(0),
297
298
  };
298
- const outputFile = apply_import_manager.projectFile(node.getSourceFile(), info);
299
+ const outputFile = project_paths.projectFile(node.getSourceFile(), info);
299
300
  if (this.config.shouldMigrate === undefined ||
300
301
  this.config.shouldMigrate({
301
302
  key: outputDef.id,
@@ -323,7 +324,7 @@ class OutputMigration extends apply_import_manager.TsurgeFunnelMigration {
323
324
  const propertyDeclaration = isTargetOutputDeclaration(node.expression.expression, checker$1, reflector, dtsReader);
324
325
  if (propertyDeclaration !== null) {
325
326
  const id = getUniqueIdForProperty(info, propertyDeclaration);
326
- const outputFile = apply_import_manager.projectFile(node.getSourceFile(), info);
327
+ const outputFile = project_paths.projectFile(node.getSourceFile(), info);
327
328
  addOutputReplacement(outputFieldReplacements, id, outputFile, calculateNextFnReplacement(info, node.expression.name));
328
329
  }
329
330
  }
@@ -332,7 +333,7 @@ class OutputMigration extends apply_import_manager.TsurgeFunnelMigration {
332
333
  const propertyDeclaration = isTargetOutputDeclaration(node.expression.expression, checker$1, reflector, dtsReader);
333
334
  if (propertyDeclaration !== null) {
334
335
  const id = getUniqueIdForProperty(info, propertyDeclaration);
335
- const outputFile = apply_import_manager.projectFile(node.getSourceFile(), info);
336
+ const outputFile = project_paths.projectFile(node.getSourceFile(), info);
336
337
  if (ts__default["default"].isExpressionStatement(node.parent)) {
337
338
  addOutputReplacement(outputFieldReplacements, id, outputFile, calculateCompleteCallReplacement(info, node.parent));
338
339
  }
@@ -351,7 +352,7 @@ class OutputMigration extends apply_import_manager.TsurgeFunnelMigration {
351
352
  if (propertyDeclaration !== null) {
352
353
  const id = getUniqueIdForProperty(info, propertyDeclaration);
353
354
  if (isTestFile) {
354
- const outputFile = apply_import_manager.projectFile(node.getSourceFile(), info);
355
+ const outputFile = project_paths.projectFile(node.getSourceFile(), info);
355
356
  addOutputReplacement(outputFieldReplacements, id, outputFile, ...calculatePipeCallReplacement(info, node));
356
357
  }
357
358
  else {
@@ -395,7 +396,7 @@ class OutputMigration extends apply_import_manager.TsurgeFunnelMigration {
395
396
  }
396
397
  // calculate import replacements but do so only for files that have output declarations
397
398
  const importReplacements = calculateImportReplacements(info, filesWithOutputDeclarations);
398
- return apply_import_manager.confirmAsSerializable({
399
+ return project_paths.confirmAsSerializable({
399
400
  problematicDeclarationCount,
400
401
  outputFields: outputFieldReplacements,
401
402
  importReplacements,
@@ -425,7 +426,7 @@ class OutputMigration extends apply_import_manager.TsurgeFunnelMigration {
425
426
  problematicUsages[declId] = unit.problematicUsages[declId];
426
427
  }
427
428
  }
428
- return apply_import_manager.confirmAsSerializable({
429
+ return project_paths.confirmAsSerializable({
429
430
  problematicDeclarationCount,
430
431
  outputFields,
431
432
  importReplacements,
@@ -447,7 +448,7 @@ class OutputMigration extends apply_import_manager.TsurgeFunnelMigration {
447
448
  }
448
449
  }
449
450
  // Noop here as we don't have any form of special global metadata.
450
- return apply_import_manager.confirmAsSerializable(combinedData);
451
+ return project_paths.confirmAsSerializable(combinedData);
451
452
  }
452
453
  async stats(globalMetadata) {
453
454
  const detectedOutputs = new Set(Object.keys(globalMetadata.outputFields)).size +
@@ -510,7 +511,7 @@ function migrate(options) {
510
511
  if (!buildPaths.length && !testPaths.length) {
511
512
  throw new schematics.SchematicsException('Could not find any tsconfig file. Cannot run output migration.');
512
513
  }
513
- const fs = new apply_import_manager.DevkitMigrationFilesystem(tree);
514
+ const fs = new project_paths.DevkitMigrationFilesystem(tree);
514
515
  checker.setFileSystem(fs);
515
516
  const migration = new OutputMigration({
516
517
  shouldMigrate: (_, file) => {
@@ -540,7 +541,7 @@ function migrate(options) {
540
541
  context.logger.info(``);
541
542
  context.logger.info(`Processing analysis data between targets..`);
542
543
  context.logger.info(``);
543
- const combined = await apply_import_manager.synchronouslyCombineUnitData(migration, unitResults);
544
+ const combined = await project_paths.synchronouslyCombineUnitData(migration, unitResults);
544
545
  if (combined === null) {
545
546
  context.logger.error('Migration failed unexpectedly with no analysis data');
546
547
  return;
@@ -550,7 +551,7 @@ function migrate(options) {
550
551
  for (const { info, tsconfigPath } of programInfos) {
551
552
  context.logger.info(`Migrating: ${tsconfigPath}..`);
552
553
  const { replacements } = await migration.migrate(globalMeta);
553
- const changesPerFile = apply_import_manager.groupReplacementsByFile(replacements);
554
+ const changesPerFile = project_paths.groupReplacementsByFile(replacements);
554
555
  for (const [file, changes] of changesPerFile) {
555
556
  if (!replacementsPerFile.has(file)) {
556
557
  replacementsPerFile.set(file, changes);
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v19.2.0-next.3
3
+ * @license Angular v19.2.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-540e221c.js');
14
+ var compiler_host = require('./compiler_host-c280a924.js');
15
15
  var ts = require('typescript');
16
16
  var imports = require('./imports-abe29092.js');
17
17
  require('@angular-devkit/core');
18
- require('./checker-32db85a6.js');
18
+ require('./checker-2eecc677.js');
19
19
  require('os');
20
20
  require('fs');
21
21
  require('module');
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v19.2.0-next.3
3
+ * @license Angular v19.2.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-32db85a6.js');
9
+ var checker = require('./checker-2eecc677.js');
10
10
  var ts = require('typescript');
11
11
  var p = require('path');
12
12
  require('os');
@@ -1011,7 +1011,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
1011
1011
  function compileDeclareClassMetadata(metadata) {
1012
1012
  const definitionMap = new checker.DefinitionMap();
1013
1013
  definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
1014
- definitionMap.set('version', checker.literal('19.2.0-next.3'));
1014
+ definitionMap.set('version', checker.literal('19.2.0-rc.0'));
1015
1015
  definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
1016
1016
  definitionMap.set('type', metadata.type);
1017
1017
  definitionMap.set('decorators', metadata.decorators);
@@ -1029,7 +1029,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
1029
1029
  callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? checker.literal(null));
1030
1030
  callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? checker.literal(null));
1031
1031
  definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
1032
- definitionMap.set('version', checker.literal('19.2.0-next.3'));
1032
+ definitionMap.set('version', checker.literal('19.2.0-rc.0'));
1033
1033
  definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
1034
1034
  definitionMap.set('type', metadata.type);
1035
1035
  definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
@@ -1124,7 +1124,7 @@ function createDirectiveDefinitionMap(meta) {
1124
1124
  const definitionMap = new checker.DefinitionMap();
1125
1125
  const minVersion = getMinimumVersionForPartialOutput(meta);
1126
1126
  definitionMap.set('minVersion', checker.literal(minVersion));
1127
- definitionMap.set('version', checker.literal('19.2.0-next.3'));
1127
+ definitionMap.set('version', checker.literal('19.2.0-rc.0'));
1128
1128
  // e.g. `type: MyDirective`
1129
1129
  definitionMap.set('type', meta.type.value);
1130
1130
  if (meta.isStandalone !== undefined) {
@@ -1540,7 +1540,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
1540
1540
  function compileDeclareFactoryFunction(meta) {
1541
1541
  const definitionMap = new checker.DefinitionMap();
1542
1542
  definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
1543
- definitionMap.set('version', checker.literal('19.2.0-next.3'));
1543
+ definitionMap.set('version', checker.literal('19.2.0-rc.0'));
1544
1544
  definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
1545
1545
  definitionMap.set('type', meta.type.value);
1546
1546
  definitionMap.set('deps', compileDependencies(meta.deps));
@@ -1575,7 +1575,7 @@ function compileDeclareInjectableFromMetadata(meta) {
1575
1575
  function createInjectableDefinitionMap(meta) {
1576
1576
  const definitionMap = new checker.DefinitionMap();
1577
1577
  definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
1578
- definitionMap.set('version', checker.literal('19.2.0-next.3'));
1578
+ definitionMap.set('version', checker.literal('19.2.0-rc.0'));
1579
1579
  definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
1580
1580
  definitionMap.set('type', meta.type.value);
1581
1581
  // Only generate providedIn property if it has a non-null value
@@ -1626,7 +1626,7 @@ function compileDeclareInjectorFromMetadata(meta) {
1626
1626
  function createInjectorDefinitionMap(meta) {
1627
1627
  const definitionMap = new checker.DefinitionMap();
1628
1628
  definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
1629
- definitionMap.set('version', checker.literal('19.2.0-next.3'));
1629
+ definitionMap.set('version', checker.literal('19.2.0-rc.0'));
1630
1630
  definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
1631
1631
  definitionMap.set('type', meta.type.value);
1632
1632
  definitionMap.set('providers', meta.providers);
@@ -1659,7 +1659,7 @@ function createNgModuleDefinitionMap(meta) {
1659
1659
  throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
1660
1660
  }
1661
1661
  definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
1662
- definitionMap.set('version', checker.literal('19.2.0-next.3'));
1662
+ definitionMap.set('version', checker.literal('19.2.0-rc.0'));
1663
1663
  definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
1664
1664
  definitionMap.set('type', meta.type.value);
1665
1665
  // We only generate the keys in the metadata if the arrays contain values.
@@ -1710,7 +1710,7 @@ function compileDeclarePipeFromMetadata(meta) {
1710
1710
  function createPipeDefinitionMap(meta) {
1711
1711
  const definitionMap = new checker.DefinitionMap();
1712
1712
  definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION));
1713
- definitionMap.set('version', checker.literal('19.2.0-next.3'));
1713
+ definitionMap.set('version', checker.literal('19.2.0-rc.0'));
1714
1714
  definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
1715
1715
  // e.g. `type: MyPipe`
1716
1716
  definitionMap.set('type', meta.type.value);
@@ -12821,7 +12821,7 @@ function getDownlevelDecoratorsTransform(typeChecker, host, diagnostics, isCore,
12821
12821
  // ensure that the alias declaration is not elided by TypeScript, and use its
12822
12822
  // name identifier to reference it at runtime.
12823
12823
  if (checker.isAliasImportDeclaration(decl)) {
12824
- referencedParameterTypes.add(decl);
12824
+ referencedParameterTypes?.add(decl);
12825
12825
  // If the entity name resolves to an alias import declaration, we reference the
12826
12826
  // entity based on the alias import name. This ensures that TypeScript properly
12827
12827
  // resolves the link to the import. Cloning the original entity name identifier
@@ -16781,7 +16781,7 @@ function buildDiagnosticForSignal(ctx, node, component) {
16781
16781
  }
16782
16782
  return [];
16783
16783
  }
16784
- const factory$9 = {
16784
+ const factory$a = {
16785
16785
  code: checker.ErrorCode.INTERPOLATED_SIGNAL_NOT_INVOKED,
16786
16786
  name: checker.ExtendedTemplateDiagnosticName.INTERPOLATED_SIGNAL_NOT_INVOKED,
16787
16787
  create: () => new InterpolatedSignalCheck(),
@@ -16807,7 +16807,7 @@ class InvalidBananaInBoxCheck extends TemplateCheckWithVisitor {
16807
16807
  return [diagnostic];
16808
16808
  }
16809
16809
  }
16810
- const factory$8 = {
16810
+ const factory$9 = {
16811
16811
  code: checker.ErrorCode.INVALID_BANANA_IN_BOX,
16812
16812
  name: checker.ExtendedTemplateDiagnosticName.INVALID_BANANA_IN_BOX,
16813
16813
  create: () => new InvalidBananaInBoxCheck(),
@@ -16868,7 +16868,7 @@ class MissingControlFlowDirectiveCheck extends TemplateCheckWithVisitor {
16868
16868
  return [diagnostic];
16869
16869
  }
16870
16870
  }
16871
- const factory$7 = {
16871
+ const factory$8 = {
16872
16872
  code: checker.ErrorCode.MISSING_CONTROL_FLOW_DIRECTIVE,
16873
16873
  name: checker.ExtendedTemplateDiagnosticName.MISSING_CONTROL_FLOW_DIRECTIVE,
16874
16874
  create: (options) => {
@@ -16901,7 +16901,7 @@ class MissingNgForOfLetCheck extends TemplateCheckWithVisitor {
16901
16901
  return [diagnostic];
16902
16902
  }
16903
16903
  }
16904
- const factory$6 = {
16904
+ const factory$7 = {
16905
16905
  code: checker.ErrorCode.MISSING_NGFOROF_LET,
16906
16906
  name: checker.ExtendedTemplateDiagnosticName.MISSING_NGFOROF_LET,
16907
16907
  create: () => new MissingNgForOfLetCheck(),
@@ -16946,7 +16946,7 @@ class NullishCoalescingNotNullableCheck extends TemplateCheckWithVisitor {
16946
16946
  return [diagnostic];
16947
16947
  }
16948
16948
  }
16949
- const factory$5 = {
16949
+ const factory$6 = {
16950
16950
  code: checker.ErrorCode.NULLISH_COALESCING_NOT_NULLABLE,
16951
16951
  name: checker.ExtendedTemplateDiagnosticName.NULLISH_COALESCING_NOT_NULLABLE,
16952
16952
  create: (options) => {
@@ -17003,7 +17003,7 @@ class OptionalChainNotNullableCheck extends TemplateCheckWithVisitor {
17003
17003
  return [diagnostic];
17004
17004
  }
17005
17005
  }
17006
- const factory$4 = {
17006
+ const factory$5 = {
17007
17007
  code: checker.ErrorCode.OPTIONAL_CHAIN_NOT_NULLABLE,
17008
17008
  name: checker.ExtendedTemplateDiagnosticName.OPTIONAL_CHAIN_NOT_NULLABLE,
17009
17009
  create: (options) => {
@@ -17034,7 +17034,7 @@ class SuffixNotSupportedCheck extends TemplateCheckWithVisitor {
17034
17034
  return [diagnostic];
17035
17035
  }
17036
17036
  }
17037
- const factory$3 = {
17037
+ const factory$4 = {
17038
17038
  code: checker.ErrorCode.SUFFIX_NOT_SUPPORTED,
17039
17039
  name: checker.ExtendedTemplateDiagnosticName.SUFFIX_NOT_SUPPORTED,
17040
17040
  create: () => new SuffixNotSupportedCheck(),
@@ -17079,7 +17079,7 @@ class TextAttributeNotBindingSpec extends TemplateCheckWithVisitor {
17079
17079
  return [diagnostic];
17080
17080
  }
17081
17081
  }
17082
- const factory$2 = {
17082
+ const factory$3 = {
17083
17083
  code: checker.ErrorCode.TEXT_ATTRIBUTE_NOT_BINDING,
17084
17084
  name: checker.ExtendedTemplateDiagnosticName.TEXT_ATTRIBUTE_NOT_BINDING,
17085
17085
  create: () => new TextAttributeNotBindingSpec(),
@@ -17139,7 +17139,7 @@ function assertExpressionInvoked(expression, component, node, expressionText, ct
17139
17139
  function generateStringFromExpression(expression, source) {
17140
17140
  return source.substring(expression.span.start, expression.span.end);
17141
17141
  }
17142
- const factory$1 = {
17142
+ const factory$2 = {
17143
17143
  code: checker.ErrorCode.UNINVOKED_FUNCTION_IN_EVENT_BINDING,
17144
17144
  name: checker.ExtendedTemplateDiagnosticName.UNINVOKED_FUNCTION_IN_EVENT_BINDING,
17145
17145
  create: () => new UninvokedFunctionInEventBindingSpec(),
@@ -17183,12 +17183,45 @@ class UnusedLetDeclarationCheck extends TemplateCheckWithVisitor {
17183
17183
  return this.analysis.get(node);
17184
17184
  }
17185
17185
  }
17186
- const factory = {
17186
+ const factory$1 = {
17187
17187
  code: checker.ErrorCode.UNUSED_LET_DECLARATION,
17188
17188
  name: checker.ExtendedTemplateDiagnosticName.UNUSED_LET_DECLARATION,
17189
17189
  create: () => new UnusedLetDeclarationCheck(),
17190
17190
  };
17191
17191
 
17192
+ const NG_SKIP_HYDRATION_ATTR_NAME = 'ngSkipHydration';
17193
+ /**
17194
+ * Ensures that the special attribute `ngSkipHydration` is not a binding and has no other
17195
+ * value than `"true"` or an empty value.
17196
+ */
17197
+ class NgSkipHydrationSpec extends TemplateCheckWithVisitor {
17198
+ code = checker.ErrorCode.SKIP_HYDRATION_NOT_STATIC;
17199
+ visitNode(ctx, component, node) {
17200
+ /** Binding should always error */
17201
+ if (node instanceof checker.BoundAttribute && node.name === NG_SKIP_HYDRATION_ATTR_NAME) {
17202
+ const errorString = `ngSkipHydration should not be used as a binding.`;
17203
+ const diagnostic = ctx.makeTemplateDiagnostic(node.sourceSpan, errorString);
17204
+ return [diagnostic];
17205
+ }
17206
+ /** No value, empty string or `"true"` are the only valid values */
17207
+ const acceptedValues = ['true', '' /* empty string */];
17208
+ if (node instanceof checker.TextAttribute &&
17209
+ node.name === NG_SKIP_HYDRATION_ATTR_NAME &&
17210
+ !acceptedValues.includes(node.value) &&
17211
+ node.value !== undefined) {
17212
+ const errorString = `ngSkipHydration only accepts "true" or "" as value or no value at all. For example 'ngSkipHydration="true"' or 'ngSkipHydration'`;
17213
+ const diagnostic = ctx.makeTemplateDiagnostic(node.sourceSpan, errorString);
17214
+ return [diagnostic];
17215
+ }
17216
+ return [];
17217
+ }
17218
+ }
17219
+ const factory = {
17220
+ code: checker.ErrorCode.SKIP_HYDRATION_NOT_STATIC,
17221
+ name: checker.ExtendedTemplateDiagnosticName.SKIP_HYDRATION_NOT_STATIC,
17222
+ create: () => new NgSkipHydrationSpec(),
17223
+ };
17224
+
17192
17225
  /**
17193
17226
  * A label referring to a `ts.DiagnosticCategory` or `'suppress'`, meaning the associated diagnostic
17194
17227
  * should not be displayed at all.
@@ -17276,14 +17309,15 @@ function assertNever(value) {
17276
17309
  }
17277
17310
 
17278
17311
  const ALL_DIAGNOSTIC_FACTORIES = [
17279
- factory$8,
17312
+ factory$9,
17313
+ factory$6,
17280
17314
  factory$5,
17281
- factory$4,
17315
+ factory$8,
17316
+ factory$3,
17282
17317
  factory$7,
17318
+ factory$4,
17319
+ factory$a,
17283
17320
  factory$2,
17284
- factory$6,
17285
- factory$3,
17286
- factory$9,
17287
17321
  factory$1,
17288
17322
  factory,
17289
17323
  ];
@@ -17768,6 +17802,7 @@ function requireRe () {
17768
17802
  const re = exports.re = [];
17769
17803
  const safeRe = exports.safeRe = [];
17770
17804
  const src = exports.src = [];
17805
+ const safeSrc = exports.safeSrc = [];
17771
17806
  const t = exports.t = {};
17772
17807
  let R = 0;
17773
17808
 
@@ -17800,6 +17835,7 @@ function requireRe () {
17800
17835
  debug(name, index, value);
17801
17836
  t[name] = index;
17802
17837
  src[index] = value;
17838
+ safeSrc[index] = safe;
17803
17839
  re[index] = new RegExp(value, isGlobal ? 'g' : undefined);
17804
17840
  safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined);
17805
17841
  };
@@ -18041,7 +18077,7 @@ function requireSemver$1 () {
18041
18077
  hasRequiredSemver$1 = 1;
18042
18078
  const debug = requireDebug();
18043
18079
  const { MAX_LENGTH, MAX_SAFE_INTEGER } = requireConstants();
18044
- const { safeRe: re, t } = requireRe();
18080
+ const { safeRe: re, safeSrc: src, t } = requireRe();
18045
18081
 
18046
18082
  const parseOptions = requireParseOptions();
18047
18083
  const { compareIdentifiers } = requireIdentifiers();
@@ -18051,7 +18087,7 @@ function requireSemver$1 () {
18051
18087
 
18052
18088
  if (version instanceof SemVer) {
18053
18089
  if (version.loose === !!options.loose &&
18054
- version.includePrerelease === !!options.includePrerelease) {
18090
+ version.includePrerelease === !!options.includePrerelease) {
18055
18091
  return version
18056
18092
  } else {
18057
18093
  version = version.version;
@@ -18217,6 +18253,20 @@ function requireSemver$1 () {
18217
18253
  // preminor will bump the version up to the next minor release, and immediately
18218
18254
  // down to pre-release. premajor and prepatch work the same way.
18219
18255
  inc (release, identifier, identifierBase) {
18256
+ if (release.startsWith('pre')) {
18257
+ if (!identifier && identifierBase === false) {
18258
+ throw new Error('invalid increment argument: identifier is empty')
18259
+ }
18260
+ // Avoid an invalid semver results
18261
+ if (identifier) {
18262
+ const r = new RegExp(`^${this.options.loose ? src[t.PRERELEASELOOSE] : src[t.PRERELEASE]}$`);
18263
+ const match = `-${identifier}`.match(r);
18264
+ if (!match || match[1] !== identifier) {
18265
+ throw new Error(`invalid identifier: ${identifier}`)
18266
+ }
18267
+ }
18268
+ }
18269
+
18220
18270
  switch (release) {
18221
18271
  case 'premajor':
18222
18272
  this.prerelease.length = 0;
@@ -18247,6 +18297,12 @@ function requireSemver$1 () {
18247
18297
  }
18248
18298
  this.inc('pre', identifier, identifierBase);
18249
18299
  break
18300
+ case 'release':
18301
+ if (this.prerelease.length === 0) {
18302
+ throw new Error(`version ${this.raw} is not a prerelease`)
18303
+ }
18304
+ this.prerelease.length = 0;
18305
+ break
18250
18306
 
18251
18307
  case 'major':
18252
18308
  // If this is a pre-major version, bump up to the same major version.
@@ -18290,10 +18346,6 @@ function requireSemver$1 () {
18290
18346
  case 'pre': {
18291
18347
  const base = Number(identifierBase) ? 1 : 0;
18292
18348
 
18293
- if (!identifier && identifierBase === false) {
18294
- throw new Error('invalid increment argument: identifier is empty')
18295
- }
18296
-
18297
18349
  if (this.prerelease.length === 0) {
18298
18350
  this.prerelease = [base];
18299
18351
  } else {
@@ -18462,20 +18514,13 @@ function requireDiff () {
18462
18514
  return 'major'
18463
18515
  }
18464
18516
 
18465
- // Otherwise it can be determined by checking the high version
18466
-
18467
- if (highVersion.patch) {
18468
- // anything higher than a patch bump would result in the wrong version
18517
+ // If the main part has no difference
18518
+ if (lowVersion.compareMain(highVersion) === 0) {
18519
+ if (lowVersion.minor && !lowVersion.patch) {
18520
+ return 'minor'
18521
+ }
18469
18522
  return 'patch'
18470
18523
  }
18471
-
18472
- if (highVersion.minor) {
18473
- // anything higher than a minor bump would result in the wrong version
18474
- return 'minor'
18475
- }
18476
-
18477
- // bumping major/minor/patch all have same result
18478
- return 'major'
18479
18524
  }
18480
18525
 
18481
18526
  // add the `pre` prefix if we are going to a prerelease version
@@ -20344,7 +20389,7 @@ var semver = /*@__PURE__*/getDefaultExportFromCjs(semverExports);
20344
20389
  * @param minVersion Minimum required version for the feature.
20345
20390
  */
20346
20391
  function coreVersionSupportsFeature(coreVersion, minVersion) {
20347
- // A version of `19.2.0-next.3` usually means that core is at head so it supports
20392
+ // A version of `19.2.0-rc.0` usually means that core is at head so it supports
20348
20393
  // all features. Use string interpolation prevent the placeholder from being replaced
20349
20394
  // with the current version during build time.
20350
20395
  if (coreVersion === `0.0.0-${'PLACEHOLDER'}`) {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v19.2.0-next.3
3
+ * @license Angular v19.2.0-rc.0
4
4
  * (c) 2010-2024 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -10,8 +10,8 @@ var core = require('@angular-devkit/core');
10
10
  var posixPath = require('node:path/posix');
11
11
  var os = require('os');
12
12
  var ts = require('typescript');
13
- var checker = require('./checker-32db85a6.js');
14
- var program = require('./program-507de2f1.js');
13
+ var checker = require('./checker-2eecc677.js');
14
+ var program = require('./program-24da9092.js');
15
15
  require('path');
16
16
 
17
17
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -666,65 +666,11 @@ function isWithinBasePath(fs, base, path) {
666
666
  return checker.isLocalRelativePath(fs.relative(base, path));
667
667
  }
668
668
 
669
- /**
670
- * Applies import manager changes, and writes them as replacements the
671
- * given result array.
672
- */
673
- function applyImportManagerChanges(importManager, replacements, sourceFiles, info) {
674
- const { newImports, updatedImports, deletedImports } = importManager.finalize();
675
- const printer = ts__default["default"].createPrinter({});
676
- const pathToFile = new Map(sourceFiles.map((s) => [s.fileName, s]));
677
- // Capture new imports
678
- newImports.forEach((newImports, fileName) => {
679
- newImports.forEach((newImport) => {
680
- const printedImport = printer.printNode(ts__default["default"].EmitHint.Unspecified, newImport, pathToFile.get(fileName));
681
- replacements.push(new Replacement(projectFile(checker.absoluteFrom(fileName), info), new TextUpdate({ position: 0, end: 0, toInsert: `${printedImport}\n` })));
682
- });
683
- });
684
- // Capture updated imports
685
- for (const [oldBindings, newBindings] of updatedImports.entries()) {
686
- // The import will be generated as multi-line if it already is multi-line,
687
- // or if the number of elements significantly increased and it previously
688
- // consisted of very few specifiers.
689
- const isMultiline = oldBindings.getText().includes('\n') ||
690
- (newBindings.elements.length >= 6 && oldBindings.elements.length <= 3);
691
- const hasSpaceBetweenBraces = oldBindings.getText().startsWith('{ ');
692
- let formatFlags = ts__default["default"].ListFormat.NamedImportsOrExportsElements |
693
- ts__default["default"].ListFormat.Indented |
694
- ts__default["default"].ListFormat.Braces |
695
- ts__default["default"].ListFormat.PreserveLines |
696
- (isMultiline ? ts__default["default"].ListFormat.MultiLine : ts__default["default"].ListFormat.SingleLine);
697
- if (hasSpaceBetweenBraces) {
698
- formatFlags |= ts__default["default"].ListFormat.SpaceBetweenBraces;
699
- }
700
- else {
701
- formatFlags &= ~ts__default["default"].ListFormat.SpaceBetweenBraces;
702
- }
703
- const printedBindings = printer.printList(formatFlags, newBindings.elements, oldBindings.getSourceFile());
704
- replacements.push(new Replacement(projectFile(oldBindings.getSourceFile(), info), new TextUpdate({
705
- position: oldBindings.getStart(),
706
- end: oldBindings.getEnd(),
707
- // TS uses four spaces as indent. We migrate to two spaces as we
708
- // assume this to be more common.
709
- toInsert: printedBindings.replace(/^ {4}/gm, ' '),
710
- })));
711
- }
712
- // Update removed imports
713
- for (const removedImport of deletedImports) {
714
- replacements.push(new Replacement(projectFile(removedImport.getSourceFile(), info), new TextUpdate({
715
- position: removedImport.getStart(),
716
- end: removedImport.getEnd(),
717
- toInsert: '',
718
- })));
719
- }
720
- }
721
-
722
669
  exports.DevkitMigrationFilesystem = DevkitMigrationFilesystem;
723
670
  exports.Replacement = Replacement;
724
671
  exports.TextUpdate = TextUpdate;
725
672
  exports.TsurgeComplexMigration = TsurgeComplexMigration;
726
673
  exports.TsurgeFunnelMigration = TsurgeFunnelMigration;
727
- exports.applyImportManagerChanges = applyImportManagerChanges;
728
674
  exports.confirmAsSerializable = confirmAsSerializable;
729
675
  exports.createBaseProgramInfo = createBaseProgramInfo;
730
676
  exports.groupReplacementsByFile = groupReplacementsByFile;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v19.2.0-next.3
3
+ * @license Angular v19.2.0-rc.0
4
4
  * (c) 2010-2024 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+ /**
3
+ * @license Angular v19.2.0-rc.0
4
+ * (c) 2010-2024 Google LLC. https://angular.io/
5
+ * License: MIT
6
+ */
7
+ 'use strict';
8
+
9
+ var ts = require('typescript');
10
+
11
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
+
13
+ var ts__default = /*#__PURE__*/_interopDefaultLegacy(ts);
14
+
15
+ /**
16
+ * Gets the text of the given property name. Returns null if the property
17
+ * name couldn't be determined statically.
18
+ */
19
+ function getPropertyNameText(node) {
20
+ if (ts__default["default"].isIdentifier(node) || ts__default["default"].isStringLiteralLike(node)) {
21
+ return node.text;
22
+ }
23
+ return null;
24
+ }
25
+ /** Finds a property with a specific name in an object literal expression. */
26
+ function findLiteralProperty(literal, name) {
27
+ return literal.properties.find((prop) => prop.name && ts__default["default"].isIdentifier(prop.name) && prop.name.text === name);
28
+ }
29
+
30
+ exports.findLiteralProperty = findLiteralProperty;
31
+ exports.getPropertyNameText = getPropertyNameText;