Skip to content

Commit

Permalink
Merge branch 'master' into allow-relatedinfo-on-diag
Browse files Browse the repository at this point in the history
  • Loading branch information
weswigham committed Jun 14, 2018
2 parents e238490 + 57e652d commit fb03d91
Show file tree
Hide file tree
Showing 2,151 changed files with 442,585 additions and 470,611 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ tests/services/browser/typescriptServices.js
src/harness/*.js
src/compiler/diagnosticInformationMap.generated.ts
src/compiler/diagnosticMessages.generated.json
src/parser/diagnosticInformationMap.generated.ts
src/parser/diagnosticMessages.generated.json
rwc-report.html
*.swp
build.json
Expand Down
20 changes: 16 additions & 4 deletions Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ const concat = require("gulp-concat");
const clone = require("gulp-clone");
const newer = require("gulp-newer");
const tsc = require("gulp-typescript");
const tsc_oop = require("./scripts/build/gulp-typescript-oop");
const getDirSize = require("./scripts/build/getDirSize");
const insert = require("gulp-insert");
const sourcemaps = require("gulp-sourcemaps");
const Q = require("q");
Expand Down Expand Up @@ -412,6 +414,10 @@ function prependCopyright(outputCopyright = !useDebugMode) {
return insert.prepend(outputCopyright ? (copyrightContent || (copyrightContent = fs.readFileSync(copyright).toString())) : "");
}

function getCompilerPath(useBuiltCompiler) {
return useBuiltCompiler ? "./built/local/typescript.js" : "./lib/typescript.js";
}

gulp.task(builtLocalCompiler, /*help*/ false, [servicesFile], () => {
const localCompilerProject = tsc.createProject("src/compiler/tsconfig.json", getCompilerSettings({}, /*useBuiltCompiler*/ true));
return localCompilerProject.src()
Expand All @@ -424,7 +430,7 @@ gulp.task(builtLocalCompiler, /*help*/ false, [servicesFile], () => {
});

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

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

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


// Task to build the tests infrastructure using the built compiler
const run = path.join(builtLocalDirectory, "run.js");
gulp.task(run, /*help*/ false, [servicesFile, tsserverLibraryFile], () => {
const testProject = tsc.createProject("src/harness/tsconfig.json", getCompilerSettings({}, /*useBuiltCompiler*/ true));
const testProject = tsc_oop.createProject("src/harness/tsconfig.json", getCompilerSettings({}), { typescript: getCompilerPath(/*useBuiltCompiler*/ true) });
return testProject.src()
.pipe(newer(run))
.pipe(sourcemaps.init())
Expand Down
287 changes: 161 additions & 126 deletions Jakefile.js

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,29 +61,29 @@ Change to the TypeScript directory:
cd TypeScript
```

Install Gulp tools and dev dependencies:
Install Jake tools and dev dependencies:

```bash
npm install -g gulp
npm install -g jake
npm install
```

Use one of the following to build and test:

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


Expand Down
114 changes: 93 additions & 21 deletions ThirdPartyNoticeText.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions lib/cancellationToken.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions lib/cs/diagnosticMessages.generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
"Add_initializer_to_property_0_95019": "Přidat inicializační výraz k vlastnosti {0}",
"Add_initializers_to_all_uninitialized_properties_95027": "Přidat inicializátory do všech neinicializovaných vlastností",
"Add_missing_super_call_90001": "Přidat chybějící volání metody super()",
"Add_missing_typeof_95052": "Přidat chybějící typeof",
"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",
"Add_to_all_uncalled_decorators_95044": "Přidat () do všech nevolaných dekorátorů",
"Add_ts_ignore_to_all_error_messages_95042": "Přidat @ts-ignore do všech chybových zpráv",
Expand All @@ -119,6 +120,7 @@
"All_declarations_of_an_abstract_method_must_be_consecutive_2516": "Všechny deklarace abstraktní metody musí jít po sobě.",
"All_destructured_elements_are_unused_6198": "Žádný z destrukturovaných elementů se nepoužívá.",
"All_imports_in_import_declaration_are_unused_6192": "Žádné importy z deklarace importu se nepoužívají.",
"All_variables_are_unused_6199": "Žádná z proměnných se nepoužívá.",
"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ů.",
"Allow_javascript_files_to_be_compiled_6102": "Povolí kompilaci souborů javascript.",
"Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209": "Když se zadá příznak --isolatedModules, nepovolují se ambientní výčty.",
Expand Down Expand Up @@ -206,6 +208,8 @@
"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}",
"Cannot_find_global_type_0_2318": "Globální typ {0} se nenašel.",
"Cannot_find_global_value_0_2468": "Globální hodnota {0} se nenašla.",
"Cannot_find_lib_definition_for_0_2726": "Nepovedlo se najít definici knihovny pro {0}.",
"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}?",
"Cannot_find_module_0_2307": "Nenašel se modul {0}.",
"Cannot_find_name_0_2304": "Název {0} se nenašel.",
"Cannot_find_name_0_Did_you_mean_1_2552": "Nepovedlo se najít název {0}. Měli jste na mysli {1}?",
Expand Down Expand Up @@ -255,6 +259,7 @@
"Class_0_used_before_its_declaration_2449": "Třída {0} se používá dříve, než se deklaruje.",
"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.",
"Class_name_cannot_be_0_2414": "Třída nemůže mít název {0}.",
"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.",
"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}.",
"Classes_can_only_extend_a_single_class_1174": "Třídy můžou rozšířit jenom jednu třídu.",
"Classes_containing_abstract_methods_must_be_marked_abstract_2514": "Třídy obsahující abstraktní metody musí být označené jako abstraktní.",
Expand All @@ -273,11 +278,14 @@
"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.",
"Constructors_for_derived_classes_must_contain_a_super_call_2377": "Konstruktory odvozených tříd musí obsahovat volání příkazu super.",
"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.",
"Convert_0_to_mapped_object_type_95055": "Převést {0} na typ mapovaného objektu",
"Convert_all_constructor_functions_to_classes_95045": "Převést všechny funkce konstruktoru na třídy",
"Convert_all_require_to_import_95048": "Převést všechna volání require na import",
"Convert_all_to_default_imports_95035": "Převést vše na výchozí importy",
"Convert_function_0_to_class_95002": "Převést funkci {0} na třídu",
"Convert_function_to_an_ES2015_class_95001": "Převést funkci na třídu ES2015",
"Convert_named_imports_to_namespace_import_95057": "Převést pojmenované importy na import oboru názvů",
"Convert_namespace_import_to_named_imports_95056": "Převést import oboru názvů na pojmenované importy",
"Convert_require_to_import_95047": "Převést require na import",
"Convert_to_ES6_module_95017": "Převést na modul ES6",
"Convert_to_default_import_95013": "Převést na výchozí import",
Expand Down Expand Up @@ -580,6 +588,7 @@
"Not_all_code_paths_return_a_value_7030": "Ne všechny cesty kódu vracejí hodnotu.",
"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}.",
"Numeric_separators_are_not_allowed_here_6188": "Číselné oddělovače tady nejsou povolené.",
"Object_is_of_type_unknown_2571": "Objekt je typu Neznámý.",
"Object_is_possibly_null_2531": "Objekt je pravděpodobně null.",
"Object_is_possibly_null_or_undefined_2533": "Objekt je pravděpodobně null nebo undefined.",
"Object_is_possibly_undefined_2532": "Objekt je pravděpodobně undefined.",
Expand Down Expand Up @@ -708,10 +717,13 @@
"Redirect_output_structure_to_the_directory_6006": "Přesměrování výstupní struktury do adresáře",
"Referenced_project_0_must_have_setting_composite_Colon_true_6306": "Odkazovaný projekt {0} musí mít nastavení \"composite\": true.",
"Remove_all_unreachable_code_95051": "Odebrat veškerý nedosažitelný kód",
"Remove_all_unused_labels_95054": "Odebrat všechny nepoužívané popisky",
"Remove_declaration_for_Colon_0_90004": "Odebrat deklaraci pro {0}",
"Remove_destructuring_90009": "Odebrat destrukci",
"Remove_import_from_0_90005": "Odebrat import z {0}",
"Remove_unreachable_code_95050": "Odebrat nedosažitelný kód",
"Remove_unused_label_95053": "Odebrat nepoužitý popisek",
"Remove_variable_statement_90010": "Odebrat příkaz proměnné",
"Replace_import_with_0_95015": "Nahradí import použitím: {0}.",
"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.",
"Report_errors_for_fallthrough_cases_in_switch_statement_6076": "Oznámí se chyby v případech fallthrough v příkazu switch.",
Expand Down Expand Up @@ -931,6 +943,7 @@
"Unexpected_end_of_text_1126": "Neočekávaný konec textu",
"Unexpected_token_1012": "Neočekávaný token",
"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.",
"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.",
"Unexpected_token_expected_1179": "Neočekávaný token. Očekává se znak {.",
"Unknown_compiler_option_0_5023": "Neznámá možnost kompilátoru {0}",
"Unknown_option_excludes_Did_you_mean_exclude_6114": "Neznámá možnost excludes. Měli jste na mysli exclude?",
Expand Down
Loading

0 comments on commit fb03d91

Please sign in to comment.