typescript 5.6.0-dev.20240815 → 5.6.0-dev.20240817

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.
@@ -62,6 +62,7 @@
62
62
  "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433": "Eine Namespacedeklaration darf sich nicht in einer anderen Datei als die Klasse oder Funktion befinden, mit der sie zusammengeführt wird.",
63
63
  "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434": "Eine Namespacedeklaration darf nicht vor der Klasse oder Funktion positioniert werden, mit der sie zusammengeführt wird.",
64
64
  "A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235": "Eine Namespacedeklaration ist nur auf der obersten Ebene eines Namespaces oder Moduls zulässig.",
65
+ "A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_key_1540": "Eine Namespace-Deklaration darf nicht mit dem Schlüsselwort \"module\" deklariert werden. Verwenden Sie stattdessen das Schlüsselwort \"namespace\".",
65
66
  "A_non_dry_build_would_build_project_0_6357": "Bei einem Build ohne das Flag \"-dry\" würde das Projekt \"{0}\" erstellt.",
66
67
  "A_non_dry_build_would_delete_the_following_files_Colon_0_6356": "Bei einem Build ohne das Flag \"-dry\" würden die folgenden Dateien gelöscht: {0}",
67
68
  "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374": "Ein Build ohne das Flag \"-dry\" würde die Zeitstempel der Ausgabe von Projekt \"{0}\" aktualisieren.",
@@ -62,6 +62,7 @@
62
62
  "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433": "Una declaración de espacio de nombres no puede estar en un archivo distinto de una clase o función con la que se combina.",
63
63
  "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434": "Una declaración de espacio de nombres no se puede situar antes que una clase o función con la que se combina.",
64
64
  "A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235": "Una declaración de espacio de nombres solo se permite en el nivel superior de un espacio de nombres o módulo.",
65
+ "A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_key_1540": "Una declaración \"namespace\" no debe declararse con la palabra clave \"module\". Use la palabra clave \"namespace\" en su lugar.",
65
66
  "A_non_dry_build_would_build_project_0_6357": "Una compilación no -dry compilaría el proyecto \"{0}\"",
66
67
  "A_non_dry_build_would_delete_the_following_files_Colon_0_6356": "Una compilación no -dry eliminaría los archivos siguientes: {0}",
67
68
  "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374": "Una compilación no -dry actualizaría las marcas de tiempo para la salida del proyecto \"{0}\".",
@@ -62,6 +62,7 @@
62
62
  "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433": "Une déclaration d'espace de noms ne peut pas se trouver dans un autre fichier que celui d'une classe ou d'une fonction avec laquelle elle est fusionnée.",
63
63
  "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434": "Une déclaration d'espace de noms ne peut pas se trouver avant une classe ou une fonction avec laquelle elle est fusionnée.",
64
64
  "A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235": "Une déclaration d’espace de noms n’est autorisée qu’au niveau supérieur d’un espace de noms ou d’un module.",
65
+ "A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_key_1540": "Une déclaration d’« espace de noms » ne doit pas être déclarée à l’aide du mot clé « module ». Utilisez plutôt le mot clé « espace de noms ».",
65
66
  "A_non_dry_build_would_build_project_0_6357": "Une build non-dry va générer le projet '{0}'",
66
67
  "A_non_dry_build_would_delete_the_following_files_Colon_0_6356": "Une build non-dry va supprimer les fichiers suivants : {0}",
67
68
  "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374": "Une build non-dry va mettre à jour les horodatages de la sortie du projet '{0}'",
@@ -62,6 +62,7 @@
62
62
  "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433": "Una dichiarazione di spazio dei nomi non può essere presente in un file diverso rispetto a una classe o funzione con cui è stato eseguito il merge.",
63
63
  "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434": "Una dichiarazione di spazio dei nomi non può essere specificata prima di una classe o funzione con cui è stato eseguito il merge.",
64
64
  "A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235": "Una dichiarazione di spazio dei nomi è consentita solo al livello superiore di uno spazio dei nomi o di un modulo.",
65
+ "A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_key_1540": "Una dichiarazione 'namespace' non deve essere dichiarata usando la parola chiave 'module'. Usare invece la parola chiave 'namespace'.",
65
66
  "A_non_dry_build_would_build_project_0_6357": "Se si esegue una compilazione senza flag -dry, verrà compilato il progetto '{0}'",
66
67
  "A_non_dry_build_would_delete_the_following_files_Colon_0_6356": "Se si esegue una compilazione senza flag -dry, i file seguenti verranno eliminati: {0}",
67
68
  "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374": "Se si esegue una compilazione non di prova, i timestamp dell'output del progetto '{0}' verranno aggiornati",
@@ -62,6 +62,7 @@
62
62
  "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433": "名前空間宣言は、それとマージするクラスや関数と異なるファイルに配置できません。",
63
63
  "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434": "名前空間宣言は、それとマージするクラスや関数より前に配置できません。",
64
64
  "A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235": "名前空間宣言は、名前空間またはモジュールの最上位レベルでのみ許可されます。",
65
+ "A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_key_1540": "'namespace' 宣言を 'module' キーワードを使用して宣言することはできません。代わりに 'namespace' キーワードを使用してください。",
65
66
  "A_non_dry_build_would_build_project_0_6357": "非 -dry ビルドを実行した場合、プロジェクト '{0}' がビルドされます",
66
67
  "A_non_dry_build_would_delete_the_following_files_Colon_0_6356": "非 -dry ビルドを実行した場合、次のファイルが削除されます: {0}",
67
68
  "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374": "non-dry build では、プロジェクト '{0}' の出力のタイムスタンプが更新されます",
@@ -62,6 +62,7 @@
62
62
  "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433": "네임스페이스 선언은 해당 선언이 병합된 클래스나 함수와 다른 파일에 있을 수 없습니다,",
63
63
  "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434": "네임스페이스 선언은 해당 선언이 병합된 클래스나 함수 앞에 있을 수 없습니다.",
64
64
  "A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235": "네임스페이스 선언은 네임스페이스 또는 모듈의 최상위 수준에서만 허용됩니다.",
65
+ "A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_key_1540": "'module' 키워드를 사용하여 'namespace' 선언을 선언하면 안 됩니다. 대신 'namespace' 키워드를 사용하세요.",
65
66
  "A_non_dry_build_would_build_project_0_6357": "-dry가 아닌 빌드는 프로젝트 '{0}'을(를) 빌드합니다.",
66
67
  "A_non_dry_build_would_delete_the_following_files_Colon_0_6356": "-dry가 아닌 빌드는 다음 파일을 삭제합니다. {0}",
67
68
  "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374": "DRY가 아닌 빌드는 '{0}' 프로젝트의 출력 타임스탬프를 업데이트합니다.",
@@ -17,6 +17,8 @@ and limitations under the License.
17
17
  /// <reference no-default-lib="true"/>
18
18
 
19
19
  /// <reference lib="es2015.symbol" />
20
+ /// <reference lib="es2015.iterable" />
21
+ /// <reference lib="es2018.asynciterable" />
20
22
 
21
23
  interface SymbolConstructor {
22
24
  /**
@@ -183,3 +185,9 @@ interface AsyncDisposableStackConstructor {
183
185
  readonly prototype: AsyncDisposableStack;
184
186
  }
185
187
  declare var AsyncDisposableStack: AsyncDisposableStackConstructor;
188
+
189
+ interface IteratorObject<T, TReturn, TNext> extends Disposable {
190
+ }
191
+
192
+ interface AsyncIteratorObject<T, TReturn, TNext> extends AsyncDisposable {
193
+ }
@@ -62,6 +62,7 @@
62
62
  "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433": "Uma declaração de namespace não pode estar em um arquivo diferente de uma classe ou função com a qual ela é mesclada.",
63
63
  "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434": "Uma declaração de namespace não pode estar localizada antes de uma classe ou função com a qual ela é mesclada.",
64
64
  "A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235": "Uma declaração de namespace só é permitida no nível superior de um namespace ou módulo.",
65
+ "A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_key_1540": "Uma declaração \"namespace\" não deve ser declarada usando a palavra-chave \"module\". Use a palavra-chave \"namespace\".",
65
66
  "A_non_dry_build_would_build_project_0_6357": "Um build não -dry criaria o projeto '{0}'",
66
67
  "A_non_dry_build_would_delete_the_following_files_Colon_0_6356": "Um build não -dry excluiria os seguintes arquivos: {0}",
67
68
  "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374": "Um build não -dry atualizaria carimbos de data/hora para a saída do projeto '{0}'",
@@ -62,6 +62,7 @@
62
62
  "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433": "Объявление пространства имен и класс или функция, с которыми оно объединено, не могут находится в разных файлах.",
63
63
  "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434": "Объявление пространства имен не может располагаться раньше класса или функции, с которыми оно объединено.",
64
64
  "A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235": "Объявление пространства имен разрешено только на верхнем уровне пространства имен или модуля.",
65
+ "A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_key_1540": "Объявление \"namespace\" с использованием ключевого слова \"module\" недопустимо. Вместо него используйте ключевое слово \"namespace\".",
65
66
  "A_non_dry_build_would_build_project_0_6357": "При сборке без флага -dry будет собран проект \"{0}\"",
66
67
  "A_non_dry_build_would_delete_the_following_files_Colon_0_6356": "При сборке без флага -dry будут удалены следующие файлы: {0}",
67
68
  "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374": "Сборка без флага -dry обновит метки времени для выходных данных проекта \"{0}\"",
@@ -62,6 +62,7 @@
62
62
  "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433": "Bir ad alanı bildirimi, birleştirildiği sınıf veya işlevden farklı bir dosyada olamaz.",
63
63
  "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434": "Bir ad alanı bildirimi, birleştirildiği sınıf veya işlevden önce gelemez.",
64
64
  "A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235": "Ad alanı bildirimine yalnızca bir ad alanının veya modülün en üst düzeyinde izin verilir.",
65
+ "A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_key_1540": "'module' anahtar sözcüğü kullanılarak 'namespace' bildirimi bildirilmez. Lütfen bunun yerine 'namespace' anahtar sözcüğünü kullanın.",
65
66
  "A_non_dry_build_would_build_project_0_6357": "-dry bayrağı kullanılmayan bir derleme '{0}' projesini derler",
66
67
  "A_non_dry_build_would_delete_the_following_files_Colon_0_6356": "-dry bayrağı kullanılmayan bir derleme şu dosyaları siler: {0}",
67
68
  "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374": "DRY dışı bir derleme, '{0}' projesinin çıkışı için zaman damgalarını güncelleştirir",
package/lib/tsc.js CHANGED
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "5.6";
21
- var version = `${versionMajorMinor}.0-dev.20240815`;
21
+ var version = `${versionMajorMinor}.0-dev.20240817`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -7193,6 +7193,8 @@ var Diagnostics = {
7193
7193
  Building_project_0: diag(6358, 3 /* Message */, "Building_project_0_6358", "Building project '{0}'..."),
7194
7194
  Updating_output_timestamps_of_project_0: diag(6359, 3 /* Message */, "Updating_output_timestamps_of_project_0_6359", "Updating output timestamps of project '{0}'..."),
7195
7195
  Project_0_is_up_to_date: diag(6361, 3 /* Message */, "Project_0_is_up_to_date_6361", "Project '{0}' is up to date"),
7196
+ Skipping_build_of_project_0_because_its_dependency_1_has_errors: diag(6362, 3 /* Message */, "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362", "Skipping build of project '{0}' because its dependency '{1}' has errors"),
7197
+ Project_0_can_t_be_built_because_its_dependency_1_has_errors: diag(6363, 3 /* Message */, "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363", "Project '{0}' can't be built because its dependency '{1}' has errors"),
7196
7198
  Build_one_or_more_projects_and_their_dependencies_if_out_of_date: diag(6364, 3 /* Message */, "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364", "Build one or more projects and their dependencies, if out of date"),
7197
7199
  Delete_the_outputs_of_all_projects: diag(6365, 3 /* Message */, "Delete_the_outputs_of_all_projects_6365", "Delete the outputs of all projects."),
7198
7200
  Show_what_would_be_built_or_deleted_if_specified_with_clean: diag(6367, 3 /* Message */, "Show_what_would_be_built_or_deleted_if_specified_with_clean_6367", "Show what would be built (or deleted, if specified with '--clean')"),
@@ -7204,6 +7206,8 @@ var Diagnostics = {
7204
7206
  Composite_projects_may_not_disable_incremental_compilation: diag(6379, 1 /* Error */, "Composite_projects_may_not_disable_incremental_compilation_6379", "Composite projects may not disable incremental compilation."),
7205
7207
  Specify_file_to_store_incremental_compilation_information: diag(6380, 3 /* Message */, "Specify_file_to_store_incremental_compilation_information_6380", "Specify file to store incremental compilation information"),
7206
7208
  Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2: diag(6381, 3 /* Message */, "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381", "Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'"),
7209
+ Skipping_build_of_project_0_because_its_dependency_1_was_not_built: diag(6382, 3 /* Message */, "Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382", "Skipping build of project '{0}' because its dependency '{1}' was not built"),
7210
+ Project_0_can_t_be_built_because_its_dependency_1_was_not_built: diag(6383, 3 /* Message */, "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383", "Project '{0}' can't be built because its dependency '{1}' was not built"),
7207
7211
  Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it: diag(6384, 3 /* Message */, "Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384", "Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it."),
7208
7212
  _0_is_deprecated: diag(
7209
7213
  6385,
@@ -7309,6 +7313,7 @@ var Diagnostics = {
7309
7313
  Ensure_that_casing_is_correct_in_imports: diag(6637, 3 /* Message */, "Ensure_that_casing_is_correct_in_imports_6637", "Ensure that casing is correct in imports."),
7310
7314
  Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging: diag(6638, 3 /* Message */, "Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638", "Emit a v8 CPU profile of the compiler run for debugging."),
7311
7315
  Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file: diag(6639, 3 /* Message */, "Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639", "Allow importing helper functions from tslib once per project, instead of including them per-file."),
7316
+ Skip_building_downstream_projects_on_error_in_upstream_project: diag(6640, 3 /* Message */, "Skip_building_downstream_projects_on_error_in_upstream_project_6640", "Skip building downstream projects on error in upstream project."),
7312
7317
  Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation: diag(6641, 3 /* Message */, "Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641", "Specify a list of glob patterns that match files to be included in compilation."),
7313
7318
  Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects: diag(6642, 3 /* Message */, "Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642", "Save .tsbuildinfo files to allow for incremental compilation of projects."),
7314
7319
  Include_sourcemap_files_inside_the_emitted_JavaScript: diag(6643, 3 /* Message */, "Include_sourcemap_files_inside_the_emitted_JavaScript_6643", "Include sourcemap files inside the emitted JavaScript."),
@@ -35840,7 +35845,6 @@ var commonOptionsWithBuild = [
35840
35845
  name: "generateTrace",
35841
35846
  type: "string",
35842
35847
  isFilePath: true,
35843
- isCommandLineOnly: true,
35844
35848
  paramType: Diagnostics.DIRECTORY,
35845
35849
  category: Diagnostics.Compiler_Diagnostics,
35846
35850
  description: Diagnostics.Generates_an_event_trace_and_a_list_of_types
@@ -37062,6 +37066,13 @@ var optionsForBuild = [
37062
37066
  description: Diagnostics.Delete_the_outputs_of_all_projects,
37063
37067
  type: "boolean",
37064
37068
  defaultValueDescription: false
37069
+ },
37070
+ {
37071
+ name: "stopBuildOnErrors",
37072
+ category: Diagnostics.Command_line_Options,
37073
+ description: Diagnostics.Skip_building_downstream_projects_on_error_in_upstream_project,
37074
+ type: "boolean",
37075
+ defaultValueDescription: false
37065
37076
  }
37066
37077
  ];
37067
37078
  var buildOpts = [
@@ -46692,7 +46703,7 @@ function createTypeChecker(host) {
46692
46703
  }
46693
46704
  if (source.exports) {
46694
46705
  if (!target.exports) target.exports = createSymbolTable();
46695
- mergeSymbolTable(target.exports, source.exports, unidirectional);
46706
+ mergeSymbolTable(target.exports, source.exports, unidirectional, target);
46696
46707
  }
46697
46708
  if (!unidirectional) {
46698
46709
  recordMergedSymbol(target, source);
@@ -46772,10 +46783,14 @@ function createTypeChecker(host) {
46772
46783
  mergeSymbolTable(combined, second);
46773
46784
  return combined;
46774
46785
  }
46775
- function mergeSymbolTable(target, source, unidirectional = false) {
46786
+ function mergeSymbolTable(target, source, unidirectional = false, mergedParent) {
46776
46787
  source.forEach((sourceSymbol, id) => {
46777
46788
  const targetSymbol = target.get(id);
46778
- target.set(id, targetSymbol ? mergeSymbol(targetSymbol, sourceSymbol, unidirectional) : getMergedSymbol(sourceSymbol));
46789
+ const merged = targetSymbol ? mergeSymbol(targetSymbol, sourceSymbol, unidirectional) : getMergedSymbol(sourceSymbol);
46790
+ if (mergedParent && targetSymbol) {
46791
+ merged.parent = mergedParent;
46792
+ }
46793
+ target.set(id, merged);
46779
46794
  });
46780
46795
  }
46781
46796
  function mergeModuleAugmentation(moduleName) {
@@ -49618,10 +49633,17 @@ function createTypeChecker(host) {
49618
49633
  if (!location) {
49619
49634
  return range;
49620
49635
  }
49621
- if (!context.enclosingFile || context.enclosingFile !== getSourceFileOfNode(getOriginalNode(location))) {
49622
- return setOriginalNode(range, location);
49636
+ let original = range.original;
49637
+ while (original && original !== location) {
49638
+ original = original.original;
49639
+ }
49640
+ if (!original) {
49641
+ setOriginalNode(range, location);
49623
49642
  }
49624
- return setTextRange(setOriginalNode(range, location), location);
49643
+ if (context.enclosingFile && context.enclosingFile === getSourceFileOfNode(getOriginalNode(location))) {
49644
+ return setTextRange(range, location);
49645
+ }
49646
+ return range;
49625
49647
  }
49626
49648
  function expressionOrTypeToTypeNode(context, expr, type, addUndefined) {
49627
49649
  const restoreFlags = saveRestoreFlags(context);
@@ -76913,11 +76935,6 @@ function createTypeChecker(host) {
76913
76935
  /*errorNode*/
76914
76936
  void 0
76915
76937
  ) || unknownType;
76916
- nextType = resolver.resolveIterationType(
76917
- nextType,
76918
- /*errorNode*/
76919
- void 0
76920
- ) || unknownType;
76921
76938
  if (globalGeneratorType === emptyGenericType) {
76922
76939
  const globalIterableIteratorType = resolver.getGlobalIterableIteratorType(
76923
76940
  /*reportErrors*/
@@ -78522,9 +78539,8 @@ function createTypeChecker(host) {
78522
78539
  const iterationTypes = returnType && getIterationTypesOfGeneratorFunctionReturnType(returnType, isAsync);
78523
78540
  const signatureYieldType = iterationTypes && iterationTypes.yieldType || anyType;
78524
78541
  const signatureNextType = iterationTypes && iterationTypes.nextType || anyType;
78525
- const resolvedSignatureNextType = isAsync ? getAwaitedType(signatureNextType) || anyType : signatureNextType;
78526
78542
  const yieldExpressionType = node.expression ? checkExpression(node.expression) : undefinedWideningType;
78527
- const yieldedType = getYieldedTypeOfYieldExpression(node, yieldExpressionType, resolvedSignatureNextType, isAsync);
78543
+ const yieldedType = getYieldedTypeOfYieldExpression(node, yieldExpressionType, signatureNextType, isAsync);
78528
78544
  if (returnType && yieldedType) {
78529
78545
  checkTypeAssignableToAndOptionallyElaborate(yieldedType, signatureYieldType, node.expression || node, node.expression);
78530
78546
  }
@@ -128192,7 +128208,7 @@ function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) {
128192
128208
  }
128193
128209
  continue;
128194
128210
  }
128195
- if (status.type === 2 /* UpToDateWithUpstreamTypes */ || status.type === 14 /* UpToDateWithInputFileText */) {
128211
+ if (status.type === 2 /* UpToDateWithUpstreamTypes */ || status.type === 15 /* UpToDateWithInputFileText */) {
128196
128212
  reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
128197
128213
  return {
128198
128214
  kind: 1 /* UpdateOutputFileStamps */,
@@ -128204,7 +128220,21 @@ function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) {
128204
128220
  };
128205
128221
  }
128206
128222
  }
128207
- if (status.type === 15 /* ContainerOnly */) {
128223
+ if (status.type === 12 /* UpstreamBlocked */) {
128224
+ verboseReportProjectStatus(state, project, status);
128225
+ reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
128226
+ projectPendingBuild.delete(projectPath);
128227
+ if (options.verbose) {
128228
+ reportStatus(
128229
+ state,
128230
+ status.upstreamProjectBlocked ? Diagnostics.Skipping_build_of_project_0_because_its_dependency_1_was_not_built : Diagnostics.Skipping_build_of_project_0_because_its_dependency_1_has_errors,
128231
+ project,
128232
+ status.upstreamProjectName
128233
+ );
128234
+ }
128235
+ continue;
128236
+ }
128237
+ if (status.type === 16 /* ContainerOnly */) {
128208
128238
  verboseReportProjectStatus(state, project, status);
128209
128239
  reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
128210
128240
  projectPendingBuild.delete(projectPath);
@@ -128346,25 +128376,32 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
128346
128376
  var _a, _b, _c, _d, _e;
128347
128377
  if (!project.fileNames.length && !canJsonReportNoInputFiles(project.raw)) {
128348
128378
  return {
128349
- type: 15 /* ContainerOnly */
128379
+ type: 16 /* ContainerOnly */
128350
128380
  };
128351
128381
  }
128352
128382
  let referenceStatuses;
128353
128383
  const force = !!state.options.force;
128354
128384
  if (project.projectReferences) {
128355
- state.projectStatus.set(resolvedPath, { type: 12 /* ComputingUpstream */ });
128385
+ state.projectStatus.set(resolvedPath, { type: 13 /* ComputingUpstream */ });
128356
128386
  for (const ref of project.projectReferences) {
128357
128387
  const resolvedRef = resolveProjectReferencePath(ref);
128358
128388
  const resolvedRefPath = toResolvedConfigFilePath(state, resolvedRef);
128359
128389
  const resolvedConfig = parseConfigFile(state, resolvedRef, resolvedRefPath);
128360
128390
  const refStatus = getUpToDateStatus(state, resolvedConfig, resolvedRefPath);
128361
- if (refStatus.type === 12 /* ComputingUpstream */ || refStatus.type === 15 /* ContainerOnly */) {
128391
+ if (refStatus.type === 13 /* ComputingUpstream */ || refStatus.type === 16 /* ContainerOnly */) {
128362
128392
  continue;
128363
128393
  }
128394
+ if (state.options.stopBuildOnErrors && (refStatus.type === 0 /* Unbuildable */ || refStatus.type === 12 /* UpstreamBlocked */)) {
128395
+ return {
128396
+ type: 12 /* UpstreamBlocked */,
128397
+ upstreamProjectName: ref.path,
128398
+ upstreamProjectBlocked: refStatus.type === 12 /* UpstreamBlocked */
128399
+ };
128400
+ }
128364
128401
  if (!force) (referenceStatuses || (referenceStatuses = [])).push({ ref, refStatus, resolvedRefPath, resolvedConfig });
128365
128402
  }
128366
128403
  }
128367
- if (force) return { type: 16 /* ForceBuild */ };
128404
+ if (force) return { type: 17 /* ForceBuild */ };
128368
128405
  const { host } = state;
128369
128406
  const buildInfoPath = getTsBuildInfoEmitOutputFilePath(project.options);
128370
128407
  const isIncremental = isIncrementalCompilation(project.options);
@@ -128393,7 +128430,7 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
128393
128430
  const incrementalBuildInfo = isIncremental && isIncrementalBuildInfo(buildInfo) ? buildInfo : void 0;
128394
128431
  if ((incrementalBuildInfo || !isIncremental) && buildInfo.version !== version) {
128395
128432
  return {
128396
- type: 13 /* TsVersionOutputOfDate */,
128433
+ type: 14 /* TsVersionOutputOfDate */,
128397
128434
  version: buildInfo.version
128398
128435
  };
128399
128436
  }
@@ -128559,7 +128596,7 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
128559
128596
  );
128560
128597
  if (dependentPackageFileStatus) return dependentPackageFileStatus;
128561
128598
  return {
128562
- type: pseudoUpToDate ? 2 /* UpToDateWithUpstreamTypes */ : pseudoInputUpToDate ? 14 /* UpToDateWithInputFileText */ : 1 /* UpToDate */,
128599
+ type: pseudoUpToDate ? 2 /* UpToDateWithUpstreamTypes */ : pseudoInputUpToDate ? 15 /* UpToDateWithInputFileText */ : 1 /* UpToDate */,
128563
128600
  newestInputFileTime,
128564
128601
  newestInputFileName,
128565
128602
  oldestOutputFileName
@@ -128642,6 +128679,7 @@ function updateOutputTimestamps(state, proj, resolvedPath) {
128642
128679
  });
128643
128680
  }
128644
128681
  function queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, buildResult) {
128682
+ if (state.options.stopBuildOnErrors && buildResult & 4 /* AnyErrors */) return;
128645
128683
  if (!config.options.composite) return;
128646
128684
  for (let index = projectIndex + 1; index < buildOrder.length; index++) {
128647
128685
  const nextProject = buildOrder[index];
@@ -128660,7 +128698,7 @@ function queueReferencingProjects(state, project, projectPath, projectIndex, con
128660
128698
  status.type = 2 /* UpToDateWithUpstreamTypes */;
128661
128699
  break;
128662
128700
  }
128663
- case 14 /* UpToDateWithInputFileText */:
128701
+ case 15 /* UpToDateWithInputFileText */:
128664
128702
  case 2 /* UpToDateWithUpstreamTypes */:
128665
128703
  if (!(buildResult & 2 /* DeclarationOutputUnchanged */)) {
128666
128704
  state.projectStatus.set(nextProjectPath, {
@@ -128670,6 +128708,11 @@ function queueReferencingProjects(state, project, projectPath, projectIndex, con
128670
128708
  });
128671
128709
  }
128672
128710
  break;
128711
+ case 12 /* UpstreamBlocked */:
128712
+ if (toResolvedConfigFilePath(state, resolveProjectName(state, status.upstreamProjectName)) === projectPath) {
128713
+ clearProjectStatus(state, nextProjectPath);
128714
+ }
128715
+ break;
128673
128716
  }
128674
128717
  }
128675
128718
  addProjToQueue(state, nextProjectPath, 0 /* Update */);
@@ -129130,7 +129173,7 @@ function reportUpToDateStatus(state, configFileName, status) {
129130
129173
  Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies,
129131
129174
  relName(state, configFileName)
129132
129175
  );
129133
- case 14 /* UpToDateWithInputFileText */:
129176
+ case 15 /* UpToDateWithInputFileText */:
129134
129177
  return reportStatus(
129135
129178
  state,
129136
129179
  Diagnostics.Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files,
@@ -129143,6 +129186,13 @@ function reportUpToDateStatus(state, configFileName, status) {
129143
129186
  relName(state, configFileName),
129144
129187
  relName(state, status.upstreamProjectName)
129145
129188
  );
129189
+ case 12 /* UpstreamBlocked */:
129190
+ return reportStatus(
129191
+ state,
129192
+ status.upstreamProjectBlocked ? Diagnostics.Project_0_can_t_be_built_because_its_dependency_1_was_not_built : Diagnostics.Project_0_can_t_be_built_because_its_dependency_1_has_errors,
129193
+ relName(state, configFileName),
129194
+ relName(state, status.upstreamProjectName)
129195
+ );
129146
129196
  case 0 /* Unbuildable */:
129147
129197
  return reportStatus(
129148
129198
  state,
@@ -129150,7 +129200,7 @@ function reportUpToDateStatus(state, configFileName, status) {
129150
129200
  relName(state, configFileName),
129151
129201
  status.reason
129152
129202
  );
129153
- case 13 /* TsVersionOutputOfDate */:
129203
+ case 14 /* TsVersionOutputOfDate */:
129154
129204
  return reportStatus(
129155
129205
  state,
129156
129206
  Diagnostics.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2,
@@ -129158,14 +129208,14 @@ function reportUpToDateStatus(state, configFileName, status) {
129158
129208
  status.version,
129159
129209
  version
129160
129210
  );
129161
- case 16 /* ForceBuild */:
129211
+ case 17 /* ForceBuild */:
129162
129212
  return reportStatus(
129163
129213
  state,
129164
129214
  Diagnostics.Project_0_is_being_forcibly_rebuilt,
129165
129215
  relName(state, configFileName)
129166
129216
  );
129167
- case 15 /* ContainerOnly */:
129168
- case 12 /* ComputingUpstream */:
129217
+ case 16 /* ContainerOnly */:
129218
+ case 13 /* ComputingUpstream */:
129169
129219
  break;
129170
129220
  default:
129171
129221
  assertType(status);
@@ -9802,6 +9802,7 @@ declare namespace ts {
9802
9802
  dry?: boolean;
9803
9803
  force?: boolean;
9804
9804
  verbose?: boolean;
9805
+ stopBuildOnErrors?: boolean;
9805
9806
  incremental?: boolean;
9806
9807
  assumeChangesOnlyAffectDirectDependencies?: boolean;
9807
9808
  declaration?: boolean;
package/lib/typescript.js CHANGED
@@ -541,6 +541,7 @@ __export(typescript_exports, {
541
541
  extensionsNotSupportingExtensionlessResolution: () => extensionsNotSupportingExtensionlessResolution,
542
542
  externalHelpersModuleNameText: () => externalHelpersModuleNameText,
543
543
  factory: () => factory,
544
+ fileContainsPackageImport: () => fileContainsPackageImport,
544
545
  fileExtensionIs: () => fileExtensionIs,
545
546
  fileExtensionIsOneOf: () => fileExtensionIsOneOf,
546
547
  fileIncludeReasonToDiagnostics: () => fileIncludeReasonToDiagnostics,
@@ -2262,7 +2263,7 @@ module.exports = __toCommonJS(typescript_exports);
2262
2263
 
2263
2264
  // src/compiler/corePublic.ts
2264
2265
  var versionMajorMinor = "5.6";
2265
- var version = `${versionMajorMinor}.0-dev.20240815`;
2266
+ var version = `${versionMajorMinor}.0-dev.20240817`;
2266
2267
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2267
2268
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2268
2269
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -10590,6 +10591,8 @@ var Diagnostics = {
10590
10591
  Building_project_0: diag(6358, 3 /* Message */, "Building_project_0_6358", "Building project '{0}'..."),
10591
10592
  Updating_output_timestamps_of_project_0: diag(6359, 3 /* Message */, "Updating_output_timestamps_of_project_0_6359", "Updating output timestamps of project '{0}'..."),
10592
10593
  Project_0_is_up_to_date: diag(6361, 3 /* Message */, "Project_0_is_up_to_date_6361", "Project '{0}' is up to date"),
10594
+ Skipping_build_of_project_0_because_its_dependency_1_has_errors: diag(6362, 3 /* Message */, "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362", "Skipping build of project '{0}' because its dependency '{1}' has errors"),
10595
+ Project_0_can_t_be_built_because_its_dependency_1_has_errors: diag(6363, 3 /* Message */, "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363", "Project '{0}' can't be built because its dependency '{1}' has errors"),
10593
10596
  Build_one_or_more_projects_and_their_dependencies_if_out_of_date: diag(6364, 3 /* Message */, "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364", "Build one or more projects and their dependencies, if out of date"),
10594
10597
  Delete_the_outputs_of_all_projects: diag(6365, 3 /* Message */, "Delete_the_outputs_of_all_projects_6365", "Delete the outputs of all projects."),
10595
10598
  Show_what_would_be_built_or_deleted_if_specified_with_clean: diag(6367, 3 /* Message */, "Show_what_would_be_built_or_deleted_if_specified_with_clean_6367", "Show what would be built (or deleted, if specified with '--clean')"),
@@ -10601,6 +10604,8 @@ var Diagnostics = {
10601
10604
  Composite_projects_may_not_disable_incremental_compilation: diag(6379, 1 /* Error */, "Composite_projects_may_not_disable_incremental_compilation_6379", "Composite projects may not disable incremental compilation."),
10602
10605
  Specify_file_to_store_incremental_compilation_information: diag(6380, 3 /* Message */, "Specify_file_to_store_incremental_compilation_information_6380", "Specify file to store incremental compilation information"),
10603
10606
  Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2: diag(6381, 3 /* Message */, "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381", "Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'"),
10607
+ Skipping_build_of_project_0_because_its_dependency_1_was_not_built: diag(6382, 3 /* Message */, "Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382", "Skipping build of project '{0}' because its dependency '{1}' was not built"),
10608
+ Project_0_can_t_be_built_because_its_dependency_1_was_not_built: diag(6383, 3 /* Message */, "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383", "Project '{0}' can't be built because its dependency '{1}' was not built"),
10604
10609
  Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it: diag(6384, 3 /* Message */, "Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384", "Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it."),
10605
10610
  _0_is_deprecated: diag(
10606
10611
  6385,
@@ -10706,6 +10711,7 @@ var Diagnostics = {
10706
10711
  Ensure_that_casing_is_correct_in_imports: diag(6637, 3 /* Message */, "Ensure_that_casing_is_correct_in_imports_6637", "Ensure that casing is correct in imports."),
10707
10712
  Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging: diag(6638, 3 /* Message */, "Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638", "Emit a v8 CPU profile of the compiler run for debugging."),
10708
10713
  Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file: diag(6639, 3 /* Message */, "Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639", "Allow importing helper functions from tslib once per project, instead of including them per-file."),
10714
+ Skip_building_downstream_projects_on_error_in_upstream_project: diag(6640, 3 /* Message */, "Skip_building_downstream_projects_on_error_in_upstream_project_6640", "Skip building downstream projects on error in upstream project."),
10709
10715
  Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation: diag(6641, 3 /* Message */, "Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641", "Specify a list of glob patterns that match files to be included in compilation."),
10710
10716
  Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects: diag(6642, 3 /* Message */, "Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642", "Save .tsbuildinfo files to allow for incremental compilation of projects."),
10711
10717
  Include_sourcemap_files_inside_the_emitted_JavaScript: diag(6643, 3 /* Message */, "Include_sourcemap_files_inside_the_emitted_JavaScript_6643", "Include sourcemap files inside the emitted JavaScript."),
@@ -40110,7 +40116,6 @@ var commonOptionsWithBuild = [
40110
40116
  name: "generateTrace",
40111
40117
  type: "string",
40112
40118
  isFilePath: true,
40113
- isCommandLineOnly: true,
40114
40119
  paramType: Diagnostics.DIRECTORY,
40115
40120
  category: Diagnostics.Compiler_Diagnostics,
40116
40121
  description: Diagnostics.Generates_an_event_trace_and_a_list_of_types
@@ -41332,6 +41337,13 @@ var optionsForBuild = [
41332
41337
  description: Diagnostics.Delete_the_outputs_of_all_projects,
41333
41338
  type: "boolean",
41334
41339
  defaultValueDescription: false
41340
+ },
41341
+ {
41342
+ name: "stopBuildOnErrors",
41343
+ category: Diagnostics.Command_line_Options,
41344
+ description: Diagnostics.Skip_building_downstream_projects_on_error_in_upstream_project,
41345
+ type: "boolean",
41346
+ defaultValueDescription: false
41335
41347
  }
41336
41348
  ];
41337
41349
  var buildOpts = [
@@ -51311,7 +51323,7 @@ function createTypeChecker(host) {
51311
51323
  }
51312
51324
  if (source.exports) {
51313
51325
  if (!target.exports) target.exports = createSymbolTable();
51314
- mergeSymbolTable(target.exports, source.exports, unidirectional);
51326
+ mergeSymbolTable(target.exports, source.exports, unidirectional, target);
51315
51327
  }
51316
51328
  if (!unidirectional) {
51317
51329
  recordMergedSymbol(target, source);
@@ -51391,10 +51403,14 @@ function createTypeChecker(host) {
51391
51403
  mergeSymbolTable(combined, second);
51392
51404
  return combined;
51393
51405
  }
51394
- function mergeSymbolTable(target, source, unidirectional = false) {
51406
+ function mergeSymbolTable(target, source, unidirectional = false, mergedParent) {
51395
51407
  source.forEach((sourceSymbol, id) => {
51396
51408
  const targetSymbol = target.get(id);
51397
- target.set(id, targetSymbol ? mergeSymbol(targetSymbol, sourceSymbol, unidirectional) : getMergedSymbol(sourceSymbol));
51409
+ const merged = targetSymbol ? mergeSymbol(targetSymbol, sourceSymbol, unidirectional) : getMergedSymbol(sourceSymbol);
51410
+ if (mergedParent && targetSymbol) {
51411
+ merged.parent = mergedParent;
51412
+ }
51413
+ target.set(id, merged);
51398
51414
  });
51399
51415
  }
51400
51416
  function mergeModuleAugmentation(moduleName) {
@@ -54237,10 +54253,17 @@ function createTypeChecker(host) {
54237
54253
  if (!location) {
54238
54254
  return range;
54239
54255
  }
54240
- if (!context.enclosingFile || context.enclosingFile !== getSourceFileOfNode(getOriginalNode(location))) {
54241
- return setOriginalNode(range, location);
54256
+ let original = range.original;
54257
+ while (original && original !== location) {
54258
+ original = original.original;
54259
+ }
54260
+ if (!original) {
54261
+ setOriginalNode(range, location);
54242
54262
  }
54243
- return setTextRange(setOriginalNode(range, location), location);
54263
+ if (context.enclosingFile && context.enclosingFile === getSourceFileOfNode(getOriginalNode(location))) {
54264
+ return setTextRange(range, location);
54265
+ }
54266
+ return range;
54244
54267
  }
54245
54268
  function expressionOrTypeToTypeNode(context, expr, type, addUndefined) {
54246
54269
  const restoreFlags = saveRestoreFlags(context);
@@ -81532,11 +81555,6 @@ function createTypeChecker(host) {
81532
81555
  /*errorNode*/
81533
81556
  void 0
81534
81557
  ) || unknownType;
81535
- nextType = resolver.resolveIterationType(
81536
- nextType,
81537
- /*errorNode*/
81538
- void 0
81539
- ) || unknownType;
81540
81558
  if (globalGeneratorType === emptyGenericType) {
81541
81559
  const globalIterableIteratorType = resolver.getGlobalIterableIteratorType(
81542
81560
  /*reportErrors*/
@@ -83141,9 +83159,8 @@ function createTypeChecker(host) {
83141
83159
  const iterationTypes = returnType && getIterationTypesOfGeneratorFunctionReturnType(returnType, isAsync);
83142
83160
  const signatureYieldType = iterationTypes && iterationTypes.yieldType || anyType;
83143
83161
  const signatureNextType = iterationTypes && iterationTypes.nextType || anyType;
83144
- const resolvedSignatureNextType = isAsync ? getAwaitedType(signatureNextType) || anyType : signatureNextType;
83145
83162
  const yieldExpressionType = node.expression ? checkExpression(node.expression) : undefinedWideningType;
83146
- const yieldedType = getYieldedTypeOfYieldExpression(node, yieldExpressionType, resolvedSignatureNextType, isAsync);
83163
+ const yieldedType = getYieldedTypeOfYieldExpression(node, yieldExpressionType, signatureNextType, isAsync);
83147
83164
  if (returnType && yieldedType) {
83148
83165
  checkTypeAssignableToAndOptionallyElaborate(yieldedType, signatureYieldType, node.expression || node, node.expression);
83149
83166
  }
@@ -132438,11 +132455,12 @@ var UpToDateStatusType = /* @__PURE__ */ ((UpToDateStatusType2) => {
132438
132455
  UpToDateStatusType2[UpToDateStatusType2["OutOfDateOptions"] = 9] = "OutOfDateOptions";
132439
132456
  UpToDateStatusType2[UpToDateStatusType2["OutOfDateRoots"] = 10] = "OutOfDateRoots";
132440
132457
  UpToDateStatusType2[UpToDateStatusType2["UpstreamOutOfDate"] = 11] = "UpstreamOutOfDate";
132441
- UpToDateStatusType2[UpToDateStatusType2["ComputingUpstream"] = 12] = "ComputingUpstream";
132442
- UpToDateStatusType2[UpToDateStatusType2["TsVersionOutputOfDate"] = 13] = "TsVersionOutputOfDate";
132443
- UpToDateStatusType2[UpToDateStatusType2["UpToDateWithInputFileText"] = 14] = "UpToDateWithInputFileText";
132444
- UpToDateStatusType2[UpToDateStatusType2["ContainerOnly"] = 15] = "ContainerOnly";
132445
- UpToDateStatusType2[UpToDateStatusType2["ForceBuild"] = 16] = "ForceBuild";
132458
+ UpToDateStatusType2[UpToDateStatusType2["UpstreamBlocked"] = 12] = "UpstreamBlocked";
132459
+ UpToDateStatusType2[UpToDateStatusType2["ComputingUpstream"] = 13] = "ComputingUpstream";
132460
+ UpToDateStatusType2[UpToDateStatusType2["TsVersionOutputOfDate"] = 14] = "TsVersionOutputOfDate";
132461
+ UpToDateStatusType2[UpToDateStatusType2["UpToDateWithInputFileText"] = 15] = "UpToDateWithInputFileText";
132462
+ UpToDateStatusType2[UpToDateStatusType2["ContainerOnly"] = 16] = "ContainerOnly";
132463
+ UpToDateStatusType2[UpToDateStatusType2["ForceBuild"] = 17] = "ForceBuild";
132446
132464
  return UpToDateStatusType2;
132447
132465
  })(UpToDateStatusType || {});
132448
132466
  function resolveConfigFileProjectName(project) {
@@ -133161,7 +133179,7 @@ function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) {
133161
133179
  }
133162
133180
  continue;
133163
133181
  }
133164
- if (status.type === 2 /* UpToDateWithUpstreamTypes */ || status.type === 14 /* UpToDateWithInputFileText */) {
133182
+ if (status.type === 2 /* UpToDateWithUpstreamTypes */ || status.type === 15 /* UpToDateWithInputFileText */) {
133165
133183
  reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
133166
133184
  return {
133167
133185
  kind: 1 /* UpdateOutputFileStamps */,
@@ -133173,7 +133191,21 @@ function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) {
133173
133191
  };
133174
133192
  }
133175
133193
  }
133176
- if (status.type === 15 /* ContainerOnly */) {
133194
+ if (status.type === 12 /* UpstreamBlocked */) {
133195
+ verboseReportProjectStatus(state, project, status);
133196
+ reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
133197
+ projectPendingBuild.delete(projectPath);
133198
+ if (options.verbose) {
133199
+ reportStatus(
133200
+ state,
133201
+ status.upstreamProjectBlocked ? Diagnostics.Skipping_build_of_project_0_because_its_dependency_1_was_not_built : Diagnostics.Skipping_build_of_project_0_because_its_dependency_1_has_errors,
133202
+ project,
133203
+ status.upstreamProjectName
133204
+ );
133205
+ }
133206
+ continue;
133207
+ }
133208
+ if (status.type === 16 /* ContainerOnly */) {
133177
133209
  verboseReportProjectStatus(state, project, status);
133178
133210
  reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
133179
133211
  projectPendingBuild.delete(projectPath);
@@ -133315,25 +133347,32 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
133315
133347
  var _a, _b, _c, _d, _e;
133316
133348
  if (!project.fileNames.length && !canJsonReportNoInputFiles(project.raw)) {
133317
133349
  return {
133318
- type: 15 /* ContainerOnly */
133350
+ type: 16 /* ContainerOnly */
133319
133351
  };
133320
133352
  }
133321
133353
  let referenceStatuses;
133322
133354
  const force = !!state.options.force;
133323
133355
  if (project.projectReferences) {
133324
- state.projectStatus.set(resolvedPath, { type: 12 /* ComputingUpstream */ });
133356
+ state.projectStatus.set(resolvedPath, { type: 13 /* ComputingUpstream */ });
133325
133357
  for (const ref of project.projectReferences) {
133326
133358
  const resolvedRef = resolveProjectReferencePath(ref);
133327
133359
  const resolvedRefPath = toResolvedConfigFilePath(state, resolvedRef);
133328
133360
  const resolvedConfig = parseConfigFile(state, resolvedRef, resolvedRefPath);
133329
133361
  const refStatus = getUpToDateStatus(state, resolvedConfig, resolvedRefPath);
133330
- if (refStatus.type === 12 /* ComputingUpstream */ || refStatus.type === 15 /* ContainerOnly */) {
133362
+ if (refStatus.type === 13 /* ComputingUpstream */ || refStatus.type === 16 /* ContainerOnly */) {
133331
133363
  continue;
133332
133364
  }
133365
+ if (state.options.stopBuildOnErrors && (refStatus.type === 0 /* Unbuildable */ || refStatus.type === 12 /* UpstreamBlocked */)) {
133366
+ return {
133367
+ type: 12 /* UpstreamBlocked */,
133368
+ upstreamProjectName: ref.path,
133369
+ upstreamProjectBlocked: refStatus.type === 12 /* UpstreamBlocked */
133370
+ };
133371
+ }
133333
133372
  if (!force) (referenceStatuses || (referenceStatuses = [])).push({ ref, refStatus, resolvedRefPath, resolvedConfig });
133334
133373
  }
133335
133374
  }
133336
- if (force) return { type: 16 /* ForceBuild */ };
133375
+ if (force) return { type: 17 /* ForceBuild */ };
133337
133376
  const { host } = state;
133338
133377
  const buildInfoPath = getTsBuildInfoEmitOutputFilePath(project.options);
133339
133378
  const isIncremental = isIncrementalCompilation(project.options);
@@ -133362,7 +133401,7 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
133362
133401
  const incrementalBuildInfo = isIncremental && isIncrementalBuildInfo(buildInfo) ? buildInfo : void 0;
133363
133402
  if ((incrementalBuildInfo || !isIncremental) && buildInfo.version !== version) {
133364
133403
  return {
133365
- type: 13 /* TsVersionOutputOfDate */,
133404
+ type: 14 /* TsVersionOutputOfDate */,
133366
133405
  version: buildInfo.version
133367
133406
  };
133368
133407
  }
@@ -133528,7 +133567,7 @@ function getUpToDateStatusWorker(state, project, resolvedPath) {
133528
133567
  );
133529
133568
  if (dependentPackageFileStatus) return dependentPackageFileStatus;
133530
133569
  return {
133531
- type: pseudoUpToDate ? 2 /* UpToDateWithUpstreamTypes */ : pseudoInputUpToDate ? 14 /* UpToDateWithInputFileText */ : 1 /* UpToDate */,
133570
+ type: pseudoUpToDate ? 2 /* UpToDateWithUpstreamTypes */ : pseudoInputUpToDate ? 15 /* UpToDateWithInputFileText */ : 1 /* UpToDate */,
133532
133571
  newestInputFileTime,
133533
133572
  newestInputFileName,
133534
133573
  oldestOutputFileName
@@ -133611,6 +133650,7 @@ function updateOutputTimestamps(state, proj, resolvedPath) {
133611
133650
  });
133612
133651
  }
133613
133652
  function queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, buildResult) {
133653
+ if (state.options.stopBuildOnErrors && buildResult & 4 /* AnyErrors */) return;
133614
133654
  if (!config.options.composite) return;
133615
133655
  for (let index = projectIndex + 1; index < buildOrder.length; index++) {
133616
133656
  const nextProject = buildOrder[index];
@@ -133629,7 +133669,7 @@ function queueReferencingProjects(state, project, projectPath, projectIndex, con
133629
133669
  status.type = 2 /* UpToDateWithUpstreamTypes */;
133630
133670
  break;
133631
133671
  }
133632
- case 14 /* UpToDateWithInputFileText */:
133672
+ case 15 /* UpToDateWithInputFileText */:
133633
133673
  case 2 /* UpToDateWithUpstreamTypes */:
133634
133674
  if (!(buildResult & 2 /* DeclarationOutputUnchanged */)) {
133635
133675
  state.projectStatus.set(nextProjectPath, {
@@ -133639,6 +133679,11 @@ function queueReferencingProjects(state, project, projectPath, projectIndex, con
133639
133679
  });
133640
133680
  }
133641
133681
  break;
133682
+ case 12 /* UpstreamBlocked */:
133683
+ if (toResolvedConfigFilePath(state, resolveProjectName(state, status.upstreamProjectName)) === projectPath) {
133684
+ clearProjectStatus(state, nextProjectPath);
133685
+ }
133686
+ break;
133642
133687
  }
133643
133688
  }
133644
133689
  addProjToQueue(state, nextProjectPath, 0 /* Update */);
@@ -134099,7 +134144,7 @@ function reportUpToDateStatus(state, configFileName, status) {
134099
134144
  Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies,
134100
134145
  relName(state, configFileName)
134101
134146
  );
134102
- case 14 /* UpToDateWithInputFileText */:
134147
+ case 15 /* UpToDateWithInputFileText */:
134103
134148
  return reportStatus(
134104
134149
  state,
134105
134150
  Diagnostics.Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files,
@@ -134112,6 +134157,13 @@ function reportUpToDateStatus(state, configFileName, status) {
134112
134157
  relName(state, configFileName),
134113
134158
  relName(state, status.upstreamProjectName)
134114
134159
  );
134160
+ case 12 /* UpstreamBlocked */:
134161
+ return reportStatus(
134162
+ state,
134163
+ status.upstreamProjectBlocked ? Diagnostics.Project_0_can_t_be_built_because_its_dependency_1_was_not_built : Diagnostics.Project_0_can_t_be_built_because_its_dependency_1_has_errors,
134164
+ relName(state, configFileName),
134165
+ relName(state, status.upstreamProjectName)
134166
+ );
134115
134167
  case 0 /* Unbuildable */:
134116
134168
  return reportStatus(
134117
134169
  state,
@@ -134119,7 +134171,7 @@ function reportUpToDateStatus(state, configFileName, status) {
134119
134171
  relName(state, configFileName),
134120
134172
  status.reason
134121
134173
  );
134122
- case 13 /* TsVersionOutputOfDate */:
134174
+ case 14 /* TsVersionOutputOfDate */:
134123
134175
  return reportStatus(
134124
134176
  state,
134125
134177
  Diagnostics.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2,
@@ -134127,14 +134179,14 @@ function reportUpToDateStatus(state, configFileName, status) {
134127
134179
  status.version,
134128
134180
  version
134129
134181
  );
134130
- case 16 /* ForceBuild */:
134182
+ case 17 /* ForceBuild */:
134131
134183
  return reportStatus(
134132
134184
  state,
134133
134185
  Diagnostics.Project_0_is_being_forcibly_rebuilt,
134134
134186
  relName(state, configFileName)
134135
134187
  );
134136
- case 15 /* ContainerOnly */:
134137
- case 12 /* ComputingUpstream */:
134188
+ case 16 /* ContainerOnly */:
134189
+ case 13 /* ComputingUpstream */:
134138
134190
  break;
134139
134191
  default:
134140
134192
  assertType(status);
@@ -138717,7 +138769,7 @@ function createPackageJsonImportFilter(fromFile, preferences, host) {
138717
138769
  let sourceFileCache;
138718
138770
  return {
138719
138771
  allowsImportingAmbientModule,
138720
- allowsImportingSourceFile,
138772
+ getSourceFileInfo,
138721
138773
  allowsImportingSpecifier
138722
138774
  };
138723
138775
  function moduleSpecifierIsCoveredByPackageJson(specifier) {
@@ -138756,9 +138808,9 @@ function createPackageJsonImportFilter(fromFile, preferences, host) {
138756
138808
  ambientModuleCache.set(moduleSymbol, result);
138757
138809
  return result;
138758
138810
  }
138759
- function allowsImportingSourceFile(sourceFile, moduleSpecifierResolutionHost) {
138811
+ function getSourceFileInfo(sourceFile, moduleSpecifierResolutionHost) {
138760
138812
  if (!packageJsons.length) {
138761
- return true;
138813
+ return { importable: true, packageName: void 0 };
138762
138814
  }
138763
138815
  if (!sourceFileCache) {
138764
138816
  sourceFileCache = /* @__PURE__ */ new Map();
@@ -138768,12 +138820,14 @@ function createPackageJsonImportFilter(fromFile, preferences, host) {
138768
138820
  return cached;
138769
138821
  }
138770
138822
  }
138771
- const moduleSpecifier = getNodeModulesPackageNameFromFileName(sourceFile.fileName, moduleSpecifierResolutionHost);
138772
- if (!moduleSpecifier) {
138773
- sourceFileCache.set(sourceFile, true);
138774
- return true;
138823
+ const packageName = getNodeModulesPackageNameFromFileName(sourceFile.fileName, moduleSpecifierResolutionHost);
138824
+ if (!packageName) {
138825
+ const result2 = { importable: true, packageName };
138826
+ sourceFileCache.set(sourceFile, result2);
138827
+ return result2;
138775
138828
  }
138776
- const result = moduleSpecifierIsCoveredByPackageJson(moduleSpecifier);
138829
+ const importable = moduleSpecifierIsCoveredByPackageJson(packageName);
138830
+ const result = { importable, packageName };
138777
138831
  sourceFileCache.set(sourceFile, result);
138778
138832
  return result;
138779
138833
  }
@@ -139319,7 +139373,7 @@ function isImportableFile(program, from, to, preferences, packageJsonFilter, mod
139319
139373
  if (from === to) return false;
139320
139374
  const cachedResult = moduleSpecifierCache == null ? void 0 : moduleSpecifierCache.get(from.path, to.path, preferences, {});
139321
139375
  if ((cachedResult == null ? void 0 : cachedResult.isBlockedByPackageJsonDependencies) !== void 0) {
139322
- return !cachedResult.isBlockedByPackageJsonDependencies;
139376
+ return !cachedResult.isBlockedByPackageJsonDependencies || !!cachedResult.packageName && fileContainsPackageImport(from, cachedResult.packageName);
139323
139377
  }
139324
139378
  const getCanonicalFileName = hostGetCanonicalFileName(moduleSpecifierResolutionHost);
139325
139379
  const globalTypingsCache = (_a = moduleSpecifierResolutionHost.getGlobalTypingsCacheLocation) == null ? void 0 : _a.call(moduleSpecifierResolutionHost);
@@ -139335,12 +139389,15 @@ function isImportableFile(program, from, to, preferences, packageJsonFilter, mod
139335
139389
  }
139336
139390
  );
139337
139391
  if (packageJsonFilter) {
139338
- const isAutoImportable = hasImportablePath && packageJsonFilter.allowsImportingSourceFile(to, moduleSpecifierResolutionHost);
139339
- moduleSpecifierCache == null ? void 0 : moduleSpecifierCache.setBlockedByPackageJsonDependencies(from.path, to.path, preferences, {}, !isAutoImportable);
139340
- return isAutoImportable;
139392
+ const importInfo = hasImportablePath ? packageJsonFilter.getSourceFileInfo(to, moduleSpecifierResolutionHost) : void 0;
139393
+ moduleSpecifierCache == null ? void 0 : moduleSpecifierCache.setBlockedByPackageJsonDependencies(from.path, to.path, preferences, {}, importInfo == null ? void 0 : importInfo.packageName, !(importInfo == null ? void 0 : importInfo.importable));
139394
+ return !!(importInfo == null ? void 0 : importInfo.importable) || !!(importInfo == null ? void 0 : importInfo.packageName) && fileContainsPackageImport(from, importInfo.packageName);
139341
139395
  }
139342
139396
  return hasImportablePath;
139343
139397
  }
139398
+ function fileContainsPackageImport(sourceFile, packageName) {
139399
+ return sourceFile.imports && sourceFile.imports.some((i) => i.text === packageName || i.text.startsWith(packageName + "/"));
139400
+ }
139344
139401
  function isImportablePath(fromPath, toPath3, getCanonicalFileName, globalCachePath) {
139345
139402
  const toNodeModules = forEachAncestorDirectory(toPath3, (ancestor) => getBaseFileName(ancestor) === "node_modules" ? ancestor : void 0);
139346
139403
  const toNodeModulesParent = toNodeModules && getDirectoryPath(getCanonicalFileName(toNodeModules));
@@ -142338,6 +142395,7 @@ function transpileWorker(input, transpileOptions, declaration) {
142338
142395
  options.isolatedDeclarations = true;
142339
142396
  } else {
142340
142397
  options.declaration = false;
142398
+ options.declarationMap = false;
142341
142399
  }
142342
142400
  const newLine = getNewLineCharacter(options);
142343
142401
  const compilerHost = {
@@ -145117,7 +145175,12 @@ registerRefactor(refactorName4, {
145117
145175
  const { references, declaration, replacement } = info;
145118
145176
  const edits = ts_textChanges_exports.ChangeTracker.with(context, (tracker) => {
145119
145177
  for (const node of references) {
145120
- tracker.replaceNode(file, node, getReplacementExpression(node, replacement));
145178
+ const closestStringIdentifierParent = isStringLiteral(replacement) && isIdentifier(node) && walkUpParenthesizedExpressions(node.parent);
145179
+ if (closestStringIdentifierParent && isTemplateSpan(closestStringIdentifierParent) && !isTaggedTemplateExpression(closestStringIdentifierParent.parent.parent)) {
145180
+ replaceTemplateStringVariableWithLiteral(tracker, file, closestStringIdentifierParent, replacement);
145181
+ } else {
145182
+ tracker.replaceNode(file, node, getReplacementExpression(node, replacement));
145183
+ }
145121
145184
  }
145122
145185
  tracker.delete(file, declaration);
145123
145186
  });
@@ -145206,6 +145269,19 @@ function getReplacementExpression(reference, replacement) {
145206
145269
  }
145207
145270
  return replacement;
145208
145271
  }
145272
+ function replaceTemplateStringVariableWithLiteral(tracker, sourceFile, reference, replacement) {
145273
+ const templateExpression = reference.parent;
145274
+ const index = templateExpression.templateSpans.indexOf(reference);
145275
+ const prevNode = index === 0 ? templateExpression.head : templateExpression.templateSpans[index - 1];
145276
+ tracker.replaceRangeWithText(
145277
+ sourceFile,
145278
+ {
145279
+ pos: prevNode.getEnd() - 2,
145280
+ end: reference.literal.getStart() + 1
145281
+ },
145282
+ replacement.text.replace(/\\/g, "\\\\").replace(/`/g, "\\`")
145283
+ );
145284
+ }
145209
145285
 
145210
145286
  // src/services/refactors/moveToNewFile.ts
145211
145287
  var refactorName5 = "Move to a new file";
@@ -156144,7 +156220,7 @@ function getExportInfos(symbolName2, isJsxTagName, currentTokenMeaning, cancella
156144
156220
  });
156145
156221
  function addSymbol(moduleSymbol, toFile, exportedSymbol, exportKind, program2, isFromPackageJson) {
156146
156222
  const moduleSpecifierResolutionHost = getModuleSpecifierResolutionHost(isFromPackageJson);
156147
- if (toFile && isImportableFile(program2, fromFile, toFile, preferences, packageJsonFilter, moduleSpecifierResolutionHost, moduleSpecifierCache) || !toFile && packageJsonFilter.allowsImportingAmbientModule(moduleSymbol, moduleSpecifierResolutionHost)) {
156223
+ if (toFile && isImportableFile(program2, fromFile, toFile, preferences, packageJsonFilter, moduleSpecifierResolutionHost, moduleSpecifierCache) || (!toFile && packageJsonFilter.allowsImportingAmbientModule(moduleSymbol, moduleSpecifierResolutionHost) || fileContainsPackageImport(fromFile, stripQuotes(moduleSymbol.name)))) {
156148
156224
  const checker = program2.getTypeChecker();
156149
156225
  originalSymbolToExportInfos.add(getUniqueSymbolId(exportedSymbol, checker).toString(), { symbol: exportedSymbol, moduleSymbol, moduleFileName: toFile == null ? void 0 : toFile.fileName, exportKind, targetFlags: skipAlias(exportedSymbol, checker).flags, isFromPackageJson });
156150
156226
  }
@@ -161766,6 +161842,9 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con
161766
161842
  break;
161767
161843
  }
161768
161844
  for (const signature of signatures) {
161845
+ if (signature.declaration && signature.declaration.flags & 33554432 /* Ambient */) {
161846
+ continue;
161847
+ }
161769
161848
  outputMethod(quotePreference, signature, modifiers, createName(declarationName));
161770
161849
  }
161771
161850
  if (!ambient) {
@@ -166115,7 +166194,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
166115
166194
  if (ts_JsTyping_exports.nodeCoreModules.has(moduleName) && startsWith(moduleName, "node:") !== shouldUseUriStyleNodeCoreModules(sourceFile, program)) {
166116
166195
  return false;
166117
166196
  }
166118
- return packageJsonFilter ? packageJsonFilter.allowsImportingAmbientModule(info.moduleSymbol, getModuleSpecifierResolutionHost(info.isFromPackageJson)) : true;
166197
+ return ((packageJsonFilter == null ? void 0 : packageJsonFilter.allowsImportingAmbientModule(info.moduleSymbol, getModuleSpecifierResolutionHost(info.isFromPackageJson))) ?? true) || fileContainsPackageImport(sourceFile, moduleName);
166119
166198
  }
166120
166199
  return isImportableFile(
166121
166200
  info.isFromPackageJson ? packageJsonAutoImportProvider : program,
@@ -170828,12 +170907,13 @@ function getDefinitionAtPosition(program, sourceFile, position, searchOtherFiles
170828
170907
  const calledDeclaration = tryGetSignatureDeclaration(typeChecker, node);
170829
170908
  if (calledDeclaration && !(isJsxOpeningLikeElement(node.parent) && isJsxConstructorLike(calledDeclaration))) {
170830
170909
  const sigInfo = createDefinitionFromSignatureDeclaration(typeChecker, calledDeclaration, failedAliasResolution);
170910
+ let declarationFilter = (d) => d !== calledDeclaration;
170831
170911
  if (typeChecker.getRootSymbols(symbol).some((s) => symbolMatchesSignature(s, calledDeclaration))) {
170832
- return [sigInfo];
170833
- } else {
170834
- const defs = getDefinitionFromSymbol(typeChecker, symbol, node, failedAliasResolution, calledDeclaration) || emptyArray;
170835
- return node.kind === 108 /* SuperKeyword */ ? [sigInfo, ...defs] : [...defs, sigInfo];
170912
+ if (!isConstructorDeclaration(calledDeclaration)) return [sigInfo];
170913
+ declarationFilter = (d) => d !== calledDeclaration && (isClassDeclaration(d) || isClassExpression(d));
170836
170914
  }
170915
+ const defs = getDefinitionFromSymbol(typeChecker, symbol, node, failedAliasResolution, declarationFilter) || emptyArray;
170916
+ return node.kind === 108 /* SuperKeyword */ ? [sigInfo, ...defs] : [...defs, sigInfo];
170837
170917
  }
170838
170918
  if (node.parent.kind === 304 /* ShorthandPropertyAssignment */) {
170839
170919
  const shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(symbol.valueDeclaration);
@@ -171090,9 +171170,9 @@ function isExpandoDeclaration(node) {
171090
171170
  });
171091
171171
  return !!containingAssignment && getAssignmentDeclarationKind(containingAssignment) === 5 /* Property */;
171092
171172
  }
171093
- function getDefinitionFromSymbol(typeChecker, symbol, node, failedAliasResolution, excludeDeclaration) {
171094
- const filteredDeclarations = filter(symbol.declarations, (d) => d !== excludeDeclaration);
171095
- const signatureDefinition = getConstructSignatureDefinition() || getCallSignatureDefinition();
171173
+ function getDefinitionFromSymbol(typeChecker, symbol, node, failedAliasResolution, declarationFilter) {
171174
+ const filteredDeclarations = declarationFilter !== void 0 ? filter(symbol.declarations, declarationFilter) : symbol.declarations;
171175
+ const signatureDefinition = !declarationFilter && (getConstructSignatureDefinition() || getCallSignatureDefinition());
171096
171176
  if (signatureDefinition) {
171097
171177
  return signatureDefinition;
171098
171178
  }
@@ -179896,6 +179976,7 @@ __export(ts_exports2, {
179896
179976
  extensionsNotSupportingExtensionlessResolution: () => extensionsNotSupportingExtensionlessResolution,
179897
179977
  externalHelpersModuleNameText: () => externalHelpersModuleNameText,
179898
179978
  factory: () => factory,
179979
+ fileContainsPackageImport: () => fileContainsPackageImport,
179899
179980
  fileExtensionIs: () => fileExtensionIs,
179900
179981
  fileExtensionIsOneOf: () => fileExtensionIsOneOf,
179901
179982
  fileIncludeReasonToDiagnostics: () => fileIncludeReasonToDiagnostics,
@@ -185667,23 +185748,8 @@ var nullTypingsInstaller = {
185667
185748
  };
185668
185749
  var noopConfigFileWatcher = { close: noop };
185669
185750
  function getConfigFileNameFromCache(info, cache) {
185670
- if (!cache) return void 0;
185671
- const configFileForOpenFile = cache.get(info.path);
185672
- if (configFileForOpenFile === void 0) return void 0;
185673
- if (!isAncestorConfigFileInfo(info)) {
185674
- return isString(configFileForOpenFile) || !configFileForOpenFile ? configFileForOpenFile : (
185675
- // direct result
185676
- configFileForOpenFile.get(
185677
- /*key*/
185678
- false
185679
- )
185680
- );
185681
- } else {
185682
- return configFileForOpenFile && !isString(configFileForOpenFile) ? (
185683
- // Map with fileName as key
185684
- configFileForOpenFile.get(info.fileName)
185685
- ) : void 0;
185686
- }
185751
+ if (!cache || isAncestorConfigFileInfo(info)) return void 0;
185752
+ return cache.get(info.path);
185687
185753
  }
185688
185754
  function isOpenScriptInfo(infoOrFileNameOrConfig) {
185689
185755
  return !!infoOrFileNameOrConfig.containingProjects;
@@ -185697,17 +185763,13 @@ var ConfiguredProjectLoadKind = /* @__PURE__ */ ((ConfiguredProjectLoadKind2) =>
185697
185763
  ConfiguredProjectLoadKind2[ConfiguredProjectLoadKind2["Reload"] = 2] = "Reload";
185698
185764
  return ConfiguredProjectLoadKind2;
185699
185765
  })(ConfiguredProjectLoadKind || {});
185700
- function forEachAncestorProject(info, project, cb, kind, reason, allowDeferredClosed, reloadedProjects, searchOnlyPotentialSolution, delayReloadedConfiguredProjects) {
185766
+ function forEachAncestorProject(info, project, cb, kind, reason, allowDeferredClosed, reloadedProjects, delayReloadedConfiguredProjects) {
185701
185767
  while (true) {
185702
- if (!project.isInitialLoadPending() && (searchOnlyPotentialSolution && !project.getCompilerOptions().composite || // Currently disableSolutionSearching is shared for finding solution/project when
185703
- // - loading solution for find all references
185704
- // - trying to find default project
185705
- project.getCompilerOptions().disableSolutionSearching)) return;
185768
+ if (!project.isInitialLoadPending() && (!project.getCompilerOptions().composite || project.getCompilerOptions().disableSolutionSearching)) return;
185706
185769
  const configFileName = project.projectService.getConfigFileNameForFile({
185707
185770
  fileName: project.getConfigFilePath(),
185708
185771
  path: info.path,
185709
- configFileInfo: true,
185710
- isForDefaultProject: !searchOnlyPotentialSolution
185772
+ configFileInfo: true
185711
185773
  }, kind === 0 /* Find */);
185712
185774
  if (!configFileName) return;
185713
185775
  const ancestor = project.projectService.findCreateOrReloadConfiguredProject(
@@ -185715,11 +185777,11 @@ function forEachAncestorProject(info, project, cb, kind, reason, allowDeferredCl
185715
185777
  kind,
185716
185778
  reason,
185717
185779
  allowDeferredClosed,
185718
- !searchOnlyPotentialSolution ? info.fileName : void 0,
185719
- // Config Diag event for project if its for default project
185780
+ /*triggerFile*/
185781
+ void 0,
185720
185782
  reloadedProjects,
185721
- searchOnlyPotentialSolution,
185722
- // Delay load if we are searching for solution
185783
+ /*delayLoad*/
185784
+ true,
185723
185785
  delayReloadedConfiguredProjects
185724
185786
  );
185725
185787
  if (!ancestor) return;
@@ -186830,7 +186892,7 @@ var _ProjectService = class _ProjectService {
186830
186892
  configFileExists(configFileName, canonicalConfigFilePath, info) {
186831
186893
  const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath);
186832
186894
  let openFilesImpactedByConfigFile;
186833
- if (this.openFiles.has(info.path) && (!isAncestorConfigFileInfo(info) || info.isForDefaultProject)) {
186895
+ if (this.openFiles.has(info.path) && !isAncestorConfigFileInfo(info)) {
186834
186896
  if (configFileExistenceInfo) (configFileExistenceInfo.openFilesImpactedByConfigFile ?? (configFileExistenceInfo.openFilesImpactedByConfigFile = /* @__PURE__ */ new Set())).add(info.path);
186835
186897
  else (openFilesImpactedByConfigFile = /* @__PURE__ */ new Set()).add(info.path);
186836
186898
  }
@@ -186957,31 +187019,24 @@ var _ProjectService = class _ProjectService {
186957
187019
  let searchPath = asNormalizedPath(getDirectoryPath(info.fileName));
186958
187020
  const isSearchPathInProjectRoot = () => containsPath(projectRootPath, searchPath, this.currentDirectory, !this.host.useCaseSensitiveFileNames);
186959
187021
  const anySearchPathOk = !projectRootPath || !isSearchPathInProjectRoot();
186960
- let searchTsconfig = true;
186961
- let searchJsconfig = true;
186962
- if (isAncestorConfigFileInfo(info)) {
186963
- if (endsWith(info.fileName, "tsconfig.json")) searchTsconfig = false;
186964
- else searchTsconfig = searchJsconfig = false;
186965
- }
187022
+ let searchInDirectory = !isAncestorConfigFileInfo(info);
186966
187023
  do {
186967
- const canonicalSearchPath = normalizedPathToPath(searchPath, this.currentDirectory, this.toCanonicalFileName);
186968
- if (searchTsconfig) {
187024
+ if (searchInDirectory) {
187025
+ const canonicalSearchPath = normalizedPathToPath(searchPath, this.currentDirectory, this.toCanonicalFileName);
186969
187026
  const tsconfigFileName = asNormalizedPath(combinePaths(searchPath, "tsconfig.json"));
186970
- const result = action(combinePaths(canonicalSearchPath, "tsconfig.json"), tsconfigFileName);
187027
+ let result = action(combinePaths(canonicalSearchPath, "tsconfig.json"), tsconfigFileName);
186971
187028
  if (result) return tsconfigFileName;
186972
- }
186973
- if (searchJsconfig) {
186974
187029
  const jsconfigFileName = asNormalizedPath(combinePaths(searchPath, "jsconfig.json"));
186975
- const result = action(combinePaths(canonicalSearchPath, "jsconfig.json"), jsconfigFileName);
187030
+ result = action(combinePaths(canonicalSearchPath, "jsconfig.json"), jsconfigFileName);
186976
187031
  if (result) return jsconfigFileName;
186977
- }
186978
- if (isNodeModulesDirectory(canonicalSearchPath)) {
186979
- break;
187032
+ if (isNodeModulesDirectory(canonicalSearchPath)) {
187033
+ break;
187034
+ }
186980
187035
  }
186981
187036
  const parentPath = asNormalizedPath(getDirectoryPath(searchPath));
186982
187037
  if (parentPath === searchPath) break;
186983
187038
  searchPath = parentPath;
186984
- searchTsconfig = searchJsconfig = true;
187039
+ searchInDirectory = true;
186985
187040
  } while (anySearchPathOk || isSearchPathInProjectRoot());
186986
187041
  return void 0;
186987
187042
  }
@@ -187004,19 +187059,8 @@ var _ProjectService = class _ProjectService {
187004
187059
  /** Caches the configFilename for script info or ancestor of open script info */
187005
187060
  setConfigFileNameForFileInCache(info, configFileName) {
187006
187061
  if (!this.openFiles.has(info.path)) return;
187007
- const config = configFileName || false;
187008
- if (!isAncestorConfigFileInfo(info)) {
187009
- this.configFileForOpenFiles.set(info.path, config);
187010
- } else {
187011
- let configFileForOpenFile = this.configFileForOpenFiles.get(info.path);
187012
- if (!configFileForOpenFile || isString(configFileForOpenFile)) {
187013
- this.configFileForOpenFiles.set(
187014
- info.path,
187015
- configFileForOpenFile = (/* @__PURE__ */ new Map()).set(false, configFileForOpenFile)
187016
- );
187017
- }
187018
- configFileForOpenFile.set(info.fileName, config);
187019
- }
187062
+ if (isAncestorConfigFileInfo(info)) return;
187063
+ this.configFileForOpenFiles.set(info.path, configFileName || false);
187020
187064
  }
187021
187065
  /**
187022
187066
  * This function tries to search for a tsconfig.json for the given file.
@@ -188402,7 +188446,7 @@ Dynamic files must always be opened with service's current directory or service
188402
188446
  seenProjects
188403
188447
  };
188404
188448
  function tryFindDefaultConfiguredProject(project) {
188405
- return isDefaultProject(project) ? defaultProject : tryFindDefaultConfiguredProjectFromReferences(project) ?? tryFindDefaultConfiguredProjectFromAncestor(project);
188449
+ return isDefaultProject(project) ? defaultProject : tryFindDefaultConfiguredProjectFromReferences(project);
188406
188450
  }
188407
188451
  function isDefaultProject(project) {
188408
188452
  if (!tryAddToSet(seenProjects, project)) return;
@@ -188425,20 +188469,6 @@ Dynamic files must always be opened with service's current directory or service
188425
188469
  reloadedProjects
188426
188470
  );
188427
188471
  }
188428
- function tryFindDefaultConfiguredProjectFromAncestor(project) {
188429
- return forEachAncestorProject(
188430
- // If not in referenced projects, try ancestors and its references
188431
- info,
188432
- project,
188433
- tryFindDefaultConfiguredProject,
188434
- kind,
188435
- `Creating possible configured project for ${info.fileName} to open`,
188436
- allowDeferredClosed,
188437
- reloadedProjects,
188438
- /*searchOnlyPotentialSolution*/
188439
- false
188440
- );
188441
- }
188442
188472
  }
188443
188473
  tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(info, kind, reloadedProjects, delayReloadedConfiguredProjects) {
188444
188474
  const allowDeferredClosed = kind === 0 /* Find */;
@@ -188461,8 +188491,6 @@ Dynamic files must always be opened with service's current directory or service
188461
188491
  `Creating project possibly referencing default composite project ${defaultProject.getProjectName()} of open file ${info.fileName}`,
188462
188492
  allowDeferredClosed,
188463
188493
  reloadedProjects,
188464
- /*searchOnlyPotentialSolution*/
188465
- true,
188466
188494
  delayReloadedConfiguredProjects
188467
188495
  );
188468
188496
  }
@@ -189234,6 +189262,8 @@ function createModuleSpecifierCache(host) {
189234
189262
  kind,
189235
189263
  modulePaths,
189236
189264
  moduleSpecifiers,
189265
+ /*packageName*/
189266
+ void 0,
189237
189267
  /*isBlockedByPackageJsonDependencies*/
189238
189268
  false
189239
189269
  ));
@@ -189264,16 +189294,19 @@ function createModuleSpecifierCache(host) {
189264
189294
  modulePaths,
189265
189295
  /*moduleSpecifiers*/
189266
189296
  void 0,
189297
+ /*packageName*/
189298
+ void 0,
189267
189299
  /*isBlockedByPackageJsonDependencies*/
189268
189300
  void 0
189269
189301
  ));
189270
189302
  }
189271
189303
  },
189272
- setBlockedByPackageJsonDependencies(fromFileName, toFileName2, preferences, options, isBlockedByPackageJsonDependencies) {
189304
+ setBlockedByPackageJsonDependencies(fromFileName, toFileName2, preferences, options, packageName, isBlockedByPackageJsonDependencies) {
189273
189305
  const cache2 = ensureCache(fromFileName, preferences, options);
189274
189306
  const info = cache2.get(toFileName2);
189275
189307
  if (info) {
189276
189308
  info.isBlockedByPackageJsonDependencies = isBlockedByPackageJsonDependencies;
189309
+ info.packageName = packageName;
189277
189310
  } else {
189278
189311
  cache2.set(toFileName2, createInfo(
189279
189312
  /*kind*/
@@ -189282,6 +189315,7 @@ function createModuleSpecifierCache(host) {
189282
189315
  void 0,
189283
189316
  /*moduleSpecifiers*/
189284
189317
  void 0,
189318
+ packageName,
189285
189319
  isBlockedByPackageJsonDependencies
189286
189320
  ));
189287
189321
  }
@@ -189311,8 +189345,8 @@ function createModuleSpecifierCache(host) {
189311
189345
  function key(fromFileName, preferences, options) {
189312
189346
  return `${fromFileName},${preferences.importModuleSpecifierEnding},${preferences.importModuleSpecifierPreference},${options.overrideImportMode}`;
189313
189347
  }
189314
- function createInfo(kind, modulePaths, moduleSpecifiers, isBlockedByPackageJsonDependencies) {
189315
- return { kind, modulePaths, moduleSpecifiers, isBlockedByPackageJsonDependencies };
189348
+ function createInfo(kind, modulePaths, moduleSpecifiers, packageName, isBlockedByPackageJsonDependencies) {
189349
+ return { kind, modulePaths, moduleSpecifiers, packageName, isBlockedByPackageJsonDependencies };
189316
189350
  }
189317
189351
  }
189318
189352
 
@@ -194300,6 +194334,7 @@ if (typeof console !== "undefined") {
194300
194334
  extensionsNotSupportingExtensionlessResolution,
194301
194335
  externalHelpersModuleNameText,
194302
194336
  factory,
194337
+ fileContainsPackageImport,
194303
194338
  fileExtensionIs,
194304
194339
  fileExtensionIsOneOf,
194305
194340
  fileIncludeReasonToDiagnostics,
@@ -62,6 +62,7 @@
62
62
  "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433": "命名空間宣告的所在檔案位置,不得與其要合併的類別或函式不同。",
63
63
  "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434": "命名空間宣告的位置不得先於其要合併的類別或函式。",
64
64
  "A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235": "命名空間宣告只允許在命名空間或模組的頂層。",
65
+ "A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_key_1540": "不應該使用 'module' 關鍵字宣告 'namespace' 宣告。請改為使用 'namespace' 關鍵字。",
65
66
  "A_non_dry_build_would_build_project_0_6357": "非 -dry 組建會建置專案 '{0}'",
66
67
  "A_non_dry_build_would_delete_the_following_files_Colon_0_6356": "非 -dry 組建會刪除下列檔案: {0}",
67
68
  "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374": "非 DRY 組建將會更新專案 '{0}' 輸出的時間戳記",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "typescript",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "5.6.0-dev.20240815",
5
+ "version": "5.6.0-dev.20240817",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -117,5 +117,5 @@
117
117
  "node": "20.1.0",
118
118
  "npm": "8.19.4"
119
119
  },
120
- "gitHead": "3ed2e8ed34419890228935f0cd59df80e7a10f1f"
120
+ "gitHead": "d06fb82d7c79cf26893b50d7787af0fe2ffbe845"
121
121
  }