Skip to content

Commit 7bd14a7

Browse files
committed
Merge branch 'master' into es6importcheck
Conflicts: src/compiler/checker.ts
2 parents 89f58d0 + 759ced3 commit 7bd14a7

File tree

1,324 files changed

+93461
-9096
lines changed

Some content is hidden

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

1,324 files changed

+93461
-9096
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ scripts/word2md.js
4343
scripts/ior.js
4444
scripts/*.js.map
4545
coverage/
46+
internal/

Jakefile

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ var compilerFilename = "tsc.js";
194194
* @param keepComments: false to compile using --removeComments
195195
* @param callback: a function to execute after the compilation process ends
196196
*/
197-
function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOutFile, generateDeclarations, outDir, preserveConstEnums, keepComments, noResolve, callback) {
197+
function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOutFile, generateDeclarations, outDir, preserveConstEnums, keepComments, noResolve, stripInternal, callback) {
198198
file(outFile, prereqs, function() {
199199
var dir = useBuiltCompiler ? builtLocalDirectory : LKGDirectory;
200200
var options = "--module commonjs -noImplicitAny";
@@ -227,6 +227,10 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOu
227227
options += " -sourcemap -mapRoot file:///" + path.resolve(path.dirname(outFile));
228228
}
229229

230+
if (stripInternal) {
231+
options += " --stripInternal"
232+
}
233+
230234
var cmd = host + " " + dir + compilerFilename + " " + options + " ";
231235
cmd = cmd + sources.join(" ");
232236
console.log(cmd + "\n");
@@ -331,7 +335,8 @@ compileFile(servicesFile, servicesSources,[builtLocalDirectory, copyright].conca
331335
/*outDir*/ undefined,
332336
/*preserveConstEnums*/ true,
333337
/*keepComments*/ false,
334-
/*noResolve*/ false);
338+
/*noResolve*/ false,
339+
/*stripInternal*/ false);
335340

336341
var nodeDefinitionsFile = path.join(builtLocalDirectory, "typescript.d.ts");
337342
var standaloneDefinitionsFile = path.join(builtLocalDirectory, "typescriptServices.d.ts");
@@ -347,6 +352,7 @@ compileFile(nodeDefinitionsFile, servicesSources,[builtLocalDirectory, copyright
347352
/*preserveConstEnums*/ true,
348353
/*keepComments*/ true,
349354
/*noResolve*/ true,
355+
/*stripInternal*/ true,
350356
/*callback*/ function () {
351357
function makeDefinitionFiles(definitionsRoots, standaloneDefinitionsFile, nodeDefinitionsFile) {
352358
// Create the standalone definition file
@@ -376,6 +382,10 @@ compileFile(nodeDefinitionsFile, servicesSources,[builtLocalDirectory, copyright
376382
desc("Builds the full compiler and services");
377383
task("local", ["generate-diagnostics", "lib", tscFile, servicesFile, nodeDefinitionsFile]);
378384

385+
// Local target to build only tsc.js
386+
desc("Builds only the compiler");
387+
task("tsc", ["generate-diagnostics", "lib", tscFile]);
388+
379389
// Local target to build the compiler and services
380390
desc("Sets release mode flag");
381391
task("release", function() {
@@ -451,14 +461,16 @@ directory(builtLocalDirectory);
451461
var run = path.join(builtLocalDirectory, "run.js");
452462
compileFile(run, harnessSources, [builtLocalDirectory, tscFile].concat(libraryTargets).concat(harnessSources), [], /*useBuiltCompiler:*/ true);
453463

464+
var internalTests = "internal/"
465+
454466
var localBaseline = "tests/baselines/local/";
455467
var refBaseline = "tests/baselines/reference/";
456468

457-
var localRwcBaseline = "tests/baselines/rwc/local/";
458-
var refRwcBaseline = "tests/baselines/rwc/reference/";
469+
var localRwcBaseline = path.join(internalTests, "baselines/rwc/local");
470+
var refRwcBaseline = path.join(internalTests, "baselines/rwc/reference");
459471

460-
var localTest262Baseline = "tests/baselines/test262/local/";
461-
var refTest262Baseline = "tests/baselines/test262/reference/";
472+
var localTest262Baseline = path.join(internalTests, "baselines/test262/local");
473+
var refTest262Baseline = path.join(internalTests, "baselines/test262/reference");
462474

463475
desc("Builds the test infrastructure using the built compiler");
464476
task("tests", ["local", run].concat(libraryTargets));
@@ -491,11 +503,13 @@ function cleanTestDirs() {
491503
jake.rmRf(localBaseline);
492504
}
493505

494-
// Clean the local Rwc baselines directory
506+
// Clean the local Rwc baselines directory
495507
if (fs.existsSync(localRwcBaseline)) {
496508
jake.rmRf(localRwcBaseline);
497509
}
498510

511+
jake.mkdirP(localRwcBaseline);
512+
jake.mkdirP(localTest262Baseline);
499513
jake.mkdirP(localBaseline);
500514
}
501515

@@ -507,8 +521,8 @@ function writeTestConfigFile(tests, testConfigFile) {
507521
}
508522

509523
function deleteTemporaryProjectOutput() {
510-
if (fs.existsSync(localBaseline + "projectOutput/")) {
511-
jake.rmRf(localBaseline + "projectOutput/");
524+
if (fs.existsSync(path.join(localBaseline, "projectOutput/"))) {
525+
jake.rmRf(path.join(localBaseline, "projectOutput/"));
512526
}
513527
}
514528

0 commit comments

Comments
 (0)