@schematics/angular 20.2.0-next.1 → 20.2.0-next.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schematics/angular",
3
- "version": "20.2.0-next.1",
3
+ "version": "20.2.0-next.2",
4
4
  "description": "Schematics specific to Angular",
5
5
  "homepage": "https://github.com/angular/angular-cli",
6
6
  "keywords": [
@@ -22,8 +22,8 @@
22
22
  },
23
23
  "schematics": "./collection.json",
24
24
  "dependencies": {
25
- "@angular-devkit/core": "20.2.0-next.1",
26
- "@angular-devkit/schematics": "20.2.0-next.1",
25
+ "@angular-devkit/core": "20.2.0-next.2",
26
+ "@angular-devkit/schematics": "20.2.0-next.2",
27
27
  "jsonc-parser": "3.3.1"
28
28
  },
29
29
  "repository": {
@@ -2285,7 +2285,7 @@ module.exports = __toCommonJS(typescript_exports);
2285
2285
 
2286
2286
  // src/compiler/corePublic.ts
2287
2287
  var versionMajorMinor = "5.9";
2288
- var version = "5.9.0-beta";
2288
+ var version = "5.9.1-rc";
2289
2289
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2290
2290
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2291
2291
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -9400,15 +9400,16 @@ var Diagnostics = {
9400
9400
  An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration: diag(1283, 1 /* Error */, "An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolve_1283", "An 'export =' declaration must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),
9401
9401
  An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type: diag(1284, 1 /* Error */, "An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_1284", "An 'export default' must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."),
9402
9402
  An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration: diag(1285, 1 /* Error */, "An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_1285", "An 'export default' must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),
9403
- ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: diag(1286, 1 /* Error */, "ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled_1286", "ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled."),
9403
+ ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax: diag(1286, 1 /* Error */, "ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax_1286", "ECMAScript imports and exports cannot be written in a CommonJS file under 'verbatimModuleSyntax'."),
9404
9404
  A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: diag(1287, 1 /* Error */, "A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimM_1287", "A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled."),
9405
9405
  An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled: diag(1288, 1 /* Error */, "An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabl_1288", "An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled."),
9406
9406
  _0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported: diag(1289, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1289", "'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."),
9407
9407
  _0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default: diag(1290, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1290", "'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."),
9408
9408
  _0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported: diag(1291, 1 /* Error */, "_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1291", "'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."),
9409
9409
  _0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default: diag(1292, 1 /* Error */, "_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1292", "'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."),
9410
- ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve: diag(1293, 1 /* Error */, "ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve_1293", "ESM syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'."),
9410
+ ECMAScript_module_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve: diag(1293, 1 /* Error */, "ECMAScript_module_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve_1293", "ECMAScript module syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'."),
9411
9411
  This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled: diag(1294, 1 /* Error */, "This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled_1294", "This syntax is not allowed when 'erasableSyntaxOnly' is enabled."),
9412
+ ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax_Adjust_the_type_field_in_the_nearest_package_json_to_make_this_file_an_ECMAScript_module_or_adjust_your_verbatimModuleSyntax_module_and_moduleResolution_settings_in_TypeScript: diag(1295, 1 /* Error */, "ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax_Adjus_1295", "ECMAScript imports and exports cannot be written in a CommonJS file under 'verbatimModuleSyntax'. Adjust the 'type' field in the nearest 'package.json' to make this file an ECMAScript module, or adjust your 'verbatimModuleSyntax', 'module', and 'moduleResolution' settings in TypeScript."),
9412
9413
  with_statements_are_not_allowed_in_an_async_function_block: diag(1300, 1 /* Error */, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."),
9413
9414
  await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1308, 1 /* Error */, "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308", "'await' expressions are only allowed within async functions and at the top levels of modules."),
9414
9415
  The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level: diag(1309, 1 /* Error */, "The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309", "The current file is a CommonJS module and cannot use 'await' at the top level."),
@@ -52126,6 +52127,15 @@ function createTypeChecker(host) {
52126
52127
  diagnostics.add(diagnostic);
52127
52128
  return diagnostic;
52128
52129
  }
52130
+ function getVerbatimModuleSyntaxErrorMessage(node) {
52131
+ const sourceFile = getSourceFileOfNode(node);
52132
+ const fileName = sourceFile.fileName;
52133
+ if (fileExtensionIsOneOf(fileName, [".cts" /* Cts */, ".cjs" /* Cjs */])) {
52134
+ return Diagnostics.ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax;
52135
+ } else {
52136
+ return Diagnostics.ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax_Adjust_the_type_field_in_the_nearest_package_json_to_make_this_file_an_ECMAScript_module_or_adjust_your_verbatimModuleSyntax_module_and_moduleResolution_settings_in_TypeScript;
52137
+ }
52138
+ }
52129
52139
  function addErrorOrSuggestion(isError, diagnostic) {
52130
52140
  if (isError) {
52131
52141
  diagnostics.add(diagnostic);
@@ -55204,7 +55214,7 @@ function createTypeChecker(host) {
55204
55214
  }
55205
55215
  }
55206
55216
  function typeToString(type, enclosingDeclaration, flags = 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */, writer = createTextWriter(""), maximumLength, verbosityLevel, out) {
55207
- const noTruncation = compilerOptions.noErrorTruncation || flags & 1 /* NoTruncation */;
55217
+ const noTruncation = !maximumLength && compilerOptions.noErrorTruncation || flags & 1 /* NoTruncation */;
55208
55218
  const typeNode = nodeBuilder.typeToTypeNode(
55209
55219
  type,
55210
55220
  enclosingDeclaration,
@@ -78010,6 +78020,9 @@ function createTypeChecker(host) {
78010
78020
  }
78011
78021
  function popContextualType() {
78012
78022
  contextualTypeCount--;
78023
+ contextualTypeNodes[contextualTypeCount] = void 0;
78024
+ contextualTypes[contextualTypeCount] = void 0;
78025
+ contextualIsCache[contextualTypeCount] = void 0;
78013
78026
  }
78014
78027
  function findContextualNode(node, includeCaches) {
78015
78028
  for (let i = contextualTypeCount - 1; i >= 0; i--) {
@@ -78026,6 +78039,8 @@ function createTypeChecker(host) {
78026
78039
  }
78027
78040
  function popInferenceContext() {
78028
78041
  inferenceContextCount--;
78042
+ inferenceContextNodes[inferenceContextCount] = void 0;
78043
+ inferenceContexts[inferenceContextCount] = void 0;
78029
78044
  }
78030
78045
  function getInferenceContext(node) {
78031
78046
  for (let i = inferenceContextCount - 1; i >= 0; i--) {
@@ -78036,11 +78051,13 @@ function createTypeChecker(host) {
78036
78051
  }
78037
78052
  function pushActiveMapper(mapper) {
78038
78053
  activeTypeMappers[activeTypeMappersCount] = mapper;
78039
- activeTypeMappersCaches[activeTypeMappersCount] = /* @__PURE__ */ new Map();
78054
+ activeTypeMappersCaches[activeTypeMappersCount] ?? (activeTypeMappersCaches[activeTypeMappersCount] = /* @__PURE__ */ new Map());
78040
78055
  activeTypeMappersCount++;
78041
78056
  }
78042
78057
  function popActiveMapper() {
78043
78058
  activeTypeMappersCount--;
78059
+ activeTypeMappers[activeTypeMappersCount] = void 0;
78060
+ activeTypeMappersCaches[activeTypeMappersCount].clear();
78044
78061
  }
78045
78062
  function findActiveMapper(mapper) {
78046
78063
  for (let i = activeTypeMappersCount - 1; i >= 0; i--) {
@@ -90487,9 +90504,9 @@ function createTypeChecker(host) {
90487
90504
  }
90488
90505
  }
90489
90506
  if (compilerOptions.verbatimModuleSyntax && node.kind !== 272 /* ImportEqualsDeclaration */ && !isInJSFile(node) && host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) === 1 /* CommonJS */) {
90490
- error2(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);
90507
+ error2(node, getVerbatimModuleSyntaxErrorMessage(node));
90491
90508
  } else if (moduleKind === 200 /* Preserve */ && node.kind !== 272 /* ImportEqualsDeclaration */ && node.kind !== 261 /* VariableDeclaration */ && host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) === 1 /* CommonJS */) {
90492
- error2(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve);
90509
+ error2(node, Diagnostics.ECMAScript_module_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve);
90493
90510
  }
90494
90511
  if (compilerOptions.verbatimModuleSyntax && !isTypeOnlyImportOrExportDeclaration(node) && !(node.flags & 33554432 /* Ambient */) && targetFlags & 128 /* ConstEnum */) {
90495
90512
  const constEnumDeclaration = target.valueDeclaration;
@@ -90848,7 +90865,7 @@ function createTypeChecker(host) {
90848
90865
  checkExpressionCached(node.expression);
90849
90866
  }
90850
90867
  if (isIllegalExportDefaultInCJS) {
90851
- error2(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);
90868
+ error2(node, getVerbatimModuleSyntaxErrorMessage(node));
90852
90869
  }
90853
90870
  checkExternalModuleExports(container);
90854
90871
  if (node.flags & 33554432 /* Ambient */ && !isEntityNameExpression(node.expression)) {
@@ -94716,7 +94733,7 @@ function createTypeChecker(host) {
94716
94733
  }
94717
94734
  function checkGrammarImportCallExpression(node) {
94718
94735
  if (compilerOptions.verbatimModuleSyntax && moduleKind === 1 /* CommonJS */) {
94719
- return grammarErrorOnNode(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);
94736
+ return grammarErrorOnNode(node, getVerbatimModuleSyntaxErrorMessage(node));
94720
94737
  }
94721
94738
  if (node.expression.kind === 237 /* MetaProperty */) {
94722
94739
  if (moduleKind !== 99 /* ESNext */ && moduleKind !== 200 /* Preserve */) {
@@ -169201,6 +169218,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
169201
169218
  if (firstAccessibleSymbolId && addToSeen(seenPropertySymbols, firstAccessibleSymbolId)) {
169202
169219
  const index = symbols.length;
169203
169220
  symbols.push(firstAccessibleSymbol);
169221
+ symbolToSortTextMap[getSymbolId(firstAccessibleSymbol)] = SortText.GlobalsOrKeywords;
169204
169222
  const moduleSymbol = firstAccessibleSymbol.parent;
169205
169223
  if (!moduleSymbol || !isExternalModuleSymbol(moduleSymbol) || typeChecker.tryGetMemberInModuleExportsAndProperties(firstAccessibleSymbol.name, moduleSymbol) !== firstAccessibleSymbol) {
169206
169224
  symbolToOriginInfoMap[index] = { kind: getNullableSymbolOriginInfoKind(2 /* SymbolMemberNoExport */) };
@@ -176938,7 +176956,7 @@ function collectElements(sourceFile, cancellationToken) {
176938
176956
  function addNodeOutliningSpans(sourceFile, cancellationToken, out) {
176939
176957
  let depthRemaining = 40;
176940
176958
  let current = 0;
176941
- const statements = [...sourceFile.statements, sourceFile.endOfFileToken];
176959
+ const statements = sourceFile.statements;
176942
176960
  const n = statements.length;
176943
176961
  while (current < n) {
176944
176962
  while (current < n && !isAnyImportSyntax(statements[current])) {
@@ -176956,6 +176974,7 @@ function addNodeOutliningSpans(sourceFile, cancellationToken, out) {
176956
176974
  out.push(createOutliningSpanFromBounds(findChildOfKind(statements[firstImport], 102 /* ImportKeyword */, sourceFile).getStart(sourceFile), statements[lastImport].getEnd(), "imports" /* Imports */));
176957
176975
  }
176958
176976
  }
176977
+ visitNode3(sourceFile.endOfFileToken);
176959
176978
  function visitNode3(n2) {
176960
176979
  var _a;
176961
176980
  if (depthRemaining === 0) return;
@@ -16,7 +16,7 @@ exports.latestVersions = {
16
16
  // As Angular CLI works with same minor versions of Angular Framework, a tilde match for the current
17
17
  Angular: '^20.2.0-next.0',
18
18
  NgPackagr: '^20.2.0-next.0',
19
- DevkitBuildAngular: '^20.2.0-next.1',
20
- AngularBuild: '^20.2.0-next.1',
21
- AngularSSR: '^20.2.0-next.1',
19
+ DevkitBuildAngular: '^20.2.0-next.2',
20
+ AngularBuild: '^20.2.0-next.2',
21
+ AngularSSR: '^20.2.0-next.2',
22
22
  };