Skip to content

Commit fb03d91

Browse files
committed
Merge branch 'master' into allow-relatedinfo-on-diag
2 parents e238490 + 57e652d commit fb03d91

File tree

2,151 files changed

+442585
-470611
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,151 files changed

+442585
-470611
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ tests/services/browser/typescriptServices.js
2323
src/harness/*.js
2424
src/compiler/diagnosticInformationMap.generated.ts
2525
src/compiler/diagnosticMessages.generated.json
26+
src/parser/diagnosticInformationMap.generated.ts
27+
src/parser/diagnosticMessages.generated.json
2628
rwc-report.html
2729
*.swp
2830
build.json

Gulpfile.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ const concat = require("gulp-concat");
1111
const clone = require("gulp-clone");
1212
const newer = require("gulp-newer");
1313
const tsc = require("gulp-typescript");
14+
const tsc_oop = require("./scripts/build/gulp-typescript-oop");
15+
const getDirSize = require("./scripts/build/getDirSize");
1416
const insert = require("gulp-insert");
1517
const sourcemaps = require("gulp-sourcemaps");
1618
const Q = require("q");
@@ -412,6 +414,10 @@ function prependCopyright(outputCopyright = !useDebugMode) {
412414
return insert.prepend(outputCopyright ? (copyrightContent || (copyrightContent = fs.readFileSync(copyright).toString())) : "");
413415
}
414416

417+
function getCompilerPath(useBuiltCompiler) {
418+
return useBuiltCompiler ? "./built/local/typescript.js" : "./lib/typescript.js";
419+
}
420+
415421
gulp.task(builtLocalCompiler, /*help*/ false, [servicesFile], () => {
416422
const localCompilerProject = tsc.createProject("src/compiler/tsconfig.json", getCompilerSettings({}, /*useBuiltCompiler*/ true));
417423
return localCompilerProject.src()
@@ -424,7 +430,7 @@ gulp.task(builtLocalCompiler, /*help*/ false, [servicesFile], () => {
424430
});
425431

426432
gulp.task(servicesFile, /*help*/ false, ["lib", "generate-diagnostics"], () => {
427-
const servicesProject = tsc.createProject("src/services/tsconfig.json", getCompilerSettings({ removeComments: false }, /*useBuiltCompiler*/ false));
433+
const servicesProject = tsc_oop.createProject("src/services/tsconfig.json", getCompilerSettings({ removeComments: false }), { typescript: getCompilerPath(/*useBuiltCompiler*/ false) });
428434
const {js, dts} = servicesProject.src()
429435
.pipe(newer(servicesFile))
430436
.pipe(sourcemaps.init())
@@ -499,7 +505,7 @@ const tsserverLibraryFile = path.join(builtLocalDirectory, "tsserverlibrary.js")
499505
const tsserverLibraryDefinitionFile = path.join(builtLocalDirectory, "tsserverlibrary.d.ts");
500506

501507
gulp.task(tsserverLibraryFile, /*help*/ false, [servicesFile, typesMapJson], (done) => {
502-
const serverLibraryProject = tsc.createProject("src/server/tsconfig.library.json", getCompilerSettings({ removeComments: false }, /*useBuiltCompiler*/ true));
508+
const serverLibraryProject = tsc_oop.createProject("src/server/tsconfig.library.json", getCompilerSettings({ removeComments: false }), { typescript: getCompilerPath(/*useBuiltCompiler*/ true) });
503509
/** @type {{ js: NodeJS.ReadableStream, dts: NodeJS.ReadableStream }} */
504510
const {js, dts} = serverLibraryProject.src()
505511
.pipe(sourcemaps.init())
@@ -583,14 +589,20 @@ gulp.task("VerifyLKG", /*help*/ false, [], () => {
583589
gulp.task("LKGInternal", /*help*/ false, ["lib", "local"]);
584590

585591
gulp.task("LKG", "Makes a new LKG out of the built js files", ["clean", "dontUseDebugMode"], () => {
586-
return runSequence("LKGInternal", "VerifyLKG");
592+
const sizeBefore = getDirSize(lkgDirectory);
593+
const seq = runSequence("LKGInternal", "VerifyLKG");
594+
const sizeAfter = getDirSize(lkgDirectory);
595+
if (sizeAfter > (sizeBefore * 1.10)) {
596+
throw new Error("The lib folder increased by 10% or more. This likely indicates a bug.");
597+
}
598+
return seq;
587599
});
588600

589601

590602
// Task to build the tests infrastructure using the built compiler
591603
const run = path.join(builtLocalDirectory, "run.js");
592604
gulp.task(run, /*help*/ false, [servicesFile, tsserverLibraryFile], () => {
593-
const testProject = tsc.createProject("src/harness/tsconfig.json", getCompilerSettings({}, /*useBuiltCompiler*/ true));
605+
const testProject = tsc_oop.createProject("src/harness/tsconfig.json", getCompilerSettings({}), { typescript: getCompilerPath(/*useBuiltCompiler*/ true) });
594606
return testProject.src()
595607
.pipe(newer(run))
596608
.pipe(sourcemaps.init())

Jakefile.js

Lines changed: 161 additions & 126 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,29 +61,29 @@ Change to the TypeScript directory:
6161
cd TypeScript
6262
```
6363

64-
Install Gulp tools and dev dependencies:
64+
Install Jake tools and dev dependencies:
6565

6666
```bash
67-
npm install -g gulp
67+
npm install -g jake
6868
npm install
6969
```
7070

7171
Use one of the following to build and test:
7272

7373
```
74-
gulp local # Build the compiler into built/local
75-
gulp clean # Delete the built compiler
76-
gulp LKG # Replace the last known good with the built one.
74+
jake local # Build the compiler into built/local
75+
jake clean # Delete the built compiler
76+
jake LKG # Replace the last known good with the built one.
7777
# Bootstrapping step to be executed when the built compiler reaches a stable state.
78-
gulp tests # Build the test infrastructure using the built compiler.
79-
gulp runtests # Run tests using the built compiler and test infrastructure.
78+
jake tests # Build the test infrastructure using the built compiler.
79+
jake runtests # Run tests using the built compiler and test infrastructure.
8080
# You can override the host or specify a test for this command.
8181
# Use host=<hostName> or tests=<testPath>.
82-
gulp runtests-browser # Runs the tests using the built run.js file. Syntax is gulp runtests. Optional
82+
jake runtests-browser # Runs the tests using the built run.js file. Syntax is jake runtests. Optional
8383
parameters 'host=', 'tests=[regex], reporter=[list|spec|json|<more>]'.
84-
gulp baseline-accept # This replaces the baseline test results with the results obtained from gulp runtests.
85-
gulp lint # Runs tslint on the TypeScript source.
86-
gulp help # List the above commands.
84+
jake baseline-accept # This replaces the baseline test results with the results obtained from jake runtests.
85+
jake lint # Runs tslint on the TypeScript source.
86+
jake help # List the above commands.
8787
```
8888

8989

ThirdPartyNoticeText.txt

Lines changed: 93 additions & 21 deletions
Large diffs are not rendered by default.

lib/cancellationToken.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/cs/diagnosticMessages.generated.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
"Add_initializer_to_property_0_95019": "Přidat inicializační výraz k vlastnosti {0}",
107107
"Add_initializers_to_all_uninitialized_properties_95027": "Přidat inicializátory do všech neinicializovaných vlastností",
108108
"Add_missing_super_call_90001": "Přidat chybějící volání metody super()",
109+
"Add_missing_typeof_95052": "Přidat chybějící typeof",
109110
"Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037": "Přidat kvalifikátor do všech nerozpoznaných proměnných odpovídajících názvu členu",
110111
"Add_to_all_uncalled_decorators_95044": "Přidat () do všech nevolaných dekorátorů",
111112
"Add_ts_ignore_to_all_error_messages_95042": "Přidat @ts-ignore do všech chybových zpráv",
@@ -119,6 +120,7 @@
119120
"All_declarations_of_an_abstract_method_must_be_consecutive_2516": "Všechny deklarace abstraktní metody musí jít po sobě.",
120121
"All_destructured_elements_are_unused_6198": "Žádný z destrukturovaných elementů se nepoužívá.",
121122
"All_imports_in_import_declaration_are_unused_6192": "Žádné importy z deklarace importu se nepoužívají.",
123+
"All_variables_are_unused_6199": "Žádná z proměnných se nepoužívá.",
122124
"Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011": "Povolte výchozí importy z modulů bez výchozího exportu. Nebude to mít vliv na generování kódu, jenom na kontrolu typů.",
123125
"Allow_javascript_files_to_be_compiled_6102": "Povolí kompilaci souborů javascript.",
124126
"Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209": "Když se zadá příznak --isolatedModules, nepovolují se ambientní výčty.",
@@ -206,6 +208,8 @@
206208
"Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057": "Soubor tsconfig.json nejde najít v zadaném adresáři: {0}",
207209
"Cannot_find_global_type_0_2318": "Globální typ {0} se nenašel.",
208210
"Cannot_find_global_value_0_2468": "Globální hodnota {0} se nenašla.",
211+
"Cannot_find_lib_definition_for_0_2726": "Nepovedlo se najít definici knihovny pro {0}.",
212+
"Cannot_find_lib_definition_for_0_Did_you_mean_1_2727": "Nepovedlo se najít definici knihovny pro {0}. Neměli jste na mysli spíš {1}?",
209213
"Cannot_find_module_0_2307": "Nenašel se modul {0}.",
210214
"Cannot_find_name_0_2304": "Název {0} se nenašel.",
211215
"Cannot_find_name_0_Did_you_mean_1_2552": "Nepovedlo se najít název {0}. Měli jste na mysli {1}?",
@@ -255,6 +259,7 @@
255259
"Class_0_used_before_its_declaration_2449": "Třída {0} se používá dříve, než se deklaruje.",
256260
"Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025": "Deklarace tříd nemůžou mít více než jednu značku @augments nebo @extends.",
257261
"Class_name_cannot_be_0_2414": "Třída nemůže mít název {0}.",
262+
"Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725": "Když se cílí na ES5 s modulem {0}, název třídy nemůže být Object.",
258263
"Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417": "Statická strana třídy {0} nesprávně rozšiřuje statickou stranu základní třídy {1}.",
259264
"Classes_can_only_extend_a_single_class_1174": "Třídy můžou rozšířit jenom jednu třídu.",
260265
"Classes_containing_abstract_methods_must_be_marked_abstract_2514": "Třídy obsahující abstraktní metody musí být označené jako abstraktní.",
@@ -273,11 +278,14 @@
273278
"Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674": "Konstruktor třídy {0} je chráněný a dostupný jenom v rámci deklarace třídy.",
274279
"Constructors_for_derived_classes_must_contain_a_super_call_2377": "Konstruktory odvozených tříd musí obsahovat volání příkazu super.",
275280
"Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126": "Není zadaný obsažený soubor a nedá se určit kořenový adresář – přeskakuje se vyhledávání ve složce node_modules.",
281+
"Convert_0_to_mapped_object_type_95055": "Převést {0} na typ mapovaného objektu",
276282
"Convert_all_constructor_functions_to_classes_95045": "Převést všechny funkce konstruktoru na třídy",
277283
"Convert_all_require_to_import_95048": "Převést všechna volání require na import",
278284
"Convert_all_to_default_imports_95035": "Převést vše na výchozí importy",
279285
"Convert_function_0_to_class_95002": "Převést funkci {0} na třídu",
280286
"Convert_function_to_an_ES2015_class_95001": "Převést funkci na třídu ES2015",
287+
"Convert_named_imports_to_namespace_import_95057": "Převést pojmenované importy na import oboru názvů",
288+
"Convert_namespace_import_to_named_imports_95056": "Převést import oboru názvů na pojmenované importy",
281289
"Convert_require_to_import_95047": "Převést require na import",
282290
"Convert_to_ES6_module_95017": "Převést na modul ES6",
283291
"Convert_to_default_import_95013": "Převést na výchozí import",
@@ -580,6 +588,7 @@
580588
"Not_all_code_paths_return_a_value_7030": "Ne všechny cesty kódu vracejí hodnotu.",
581589
"Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413": "Typ číselného indexu {0} se nedá přiřadit k typu indexu řetězce {1}.",
582590
"Numeric_separators_are_not_allowed_here_6188": "Číselné oddělovače tady nejsou povolené.",
591+
"Object_is_of_type_unknown_2571": "Objekt je typu Neznámý.",
583592
"Object_is_possibly_null_2531": "Objekt je pravděpodobně null.",
584593
"Object_is_possibly_null_or_undefined_2533": "Objekt je pravděpodobně null nebo undefined.",
585594
"Object_is_possibly_undefined_2532": "Objekt je pravděpodobně undefined.",
@@ -708,10 +717,13 @@
708717
"Redirect_output_structure_to_the_directory_6006": "Přesměrování výstupní struktury do adresáře",
709718
"Referenced_project_0_must_have_setting_composite_Colon_true_6306": "Odkazovaný projekt {0} musí mít nastavení \"composite\": true.",
710719
"Remove_all_unreachable_code_95051": "Odebrat veškerý nedosažitelný kód",
720+
"Remove_all_unused_labels_95054": "Odebrat všechny nepoužívané popisky",
711721
"Remove_declaration_for_Colon_0_90004": "Odebrat deklaraci pro {0}",
712722
"Remove_destructuring_90009": "Odebrat destrukci",
713723
"Remove_import_from_0_90005": "Odebrat import z {0}",
714724
"Remove_unreachable_code_95050": "Odebrat nedosažitelný kód",
725+
"Remove_unused_label_95053": "Odebrat nepoužitý popisek",
726+
"Remove_variable_statement_90010": "Odebrat příkaz proměnné",
715727
"Replace_import_with_0_95015": "Nahradí import použitím: {0}.",
716728
"Report_error_when_not_all_code_paths_in_function_return_a_value_6075": "Oznámí se chyba, když některé cesty kódu ve funkci nevracejí hodnotu.",
717729
"Report_errors_for_fallthrough_cases_in_switch_statement_6076": "Oznámí se chyby v případech fallthrough v příkazu switch.",
@@ -931,6 +943,7 @@
931943
"Unexpected_end_of_text_1126": "Neočekávaný konec textu",
932944
"Unexpected_token_1012": "Neočekávaný token",
933945
"Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068": "Neočekávaný token. Očekával se konstruktor, metoda, přístupový objekt nebo vlastnost.",
946+
"Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069": "Neočekávaný token. Očekával se název parametru typu bez složených závorek.",
934947
"Unexpected_token_expected_1179": "Neočekávaný token. Očekává se znak {.",
935948
"Unknown_compiler_option_0_5023": "Neznámá možnost kompilátoru {0}",
936949
"Unknown_option_excludes_Did_you_mean_exclude_6114": "Neznámá možnost excludes. Měli jste na mysli exclude?",

0 commit comments

Comments
 (0)