Skip to content

Commit e4128af

Browse files
committed
Merge branch 'master' into TSServer
Conflicts: Jakefile
2 parents acd4914 + b277695 commit e4128af

File tree

1,864 files changed

+101071
-16409
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,864 files changed

+101071
-16409
lines changed

Jakefile

+22-8
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");
@@ -333,6 +337,7 @@ compileFile(servicesFile, servicesSources,[builtLocalDirectory, copyright].conca
333337
/*preserveConstEnums*/ true,
334338
/*keepComments*/ false,
335339
/*noResolve*/ false,
340+
/*stripInternal*/ false,
336341
/*callback*/ function () {
337342
jake.cpR(servicesFile, nodePackageFile, {silent: true});
338343
});
@@ -351,6 +356,7 @@ compileFile(nodeDefinitionsFile, servicesSources,[builtLocalDirectory, copyright
351356
/*preserveConstEnums*/ true,
352357
/*keepComments*/ true,
353358
/*noResolve*/ true,
359+
/*stripInternal*/ true,
354360
/*callback*/ function () {
355361
function makeDefinitionFiles(definitionsRoots, standaloneDefinitionsFile, nodeDefinitionsFile) {
356362
// Create the standalone definition file
@@ -380,6 +386,10 @@ compileFile(nodeDefinitionsFile, servicesSources,[builtLocalDirectory, copyright
380386
desc("Builds the full compiler and services");
381387
task("local", ["generate-diagnostics", "lib", tscFile, servicesFile, nodeDefinitionsFile]);
382388

389+
// Local target to build only tsc.js
390+
desc("Builds only the compiler");
391+
task("tsc", ["generate-diagnostics", "lib", tscFile]);
392+
383393
// Local target to build the compiler and services
384394
desc("Sets release mode flag");
385395
task("release", function() {
@@ -455,14 +465,16 @@ directory(builtLocalDirectory);
455465
var run = path.join(builtLocalDirectory, "run.js");
456466
compileFile(run, harnessSources, [builtLocalDirectory, tscFile].concat(libraryTargets).concat(harnessSources), [], /*useBuiltCompiler:*/ true);
457467

468+
var internalTests = "internal/"
469+
458470
var localBaseline = "tests/baselines/local/";
459471
var refBaseline = "tests/baselines/reference/";
460472

461-
var localRwcBaseline = "tests/baselines/rwc/local/";
462-
var refRwcBaseline = "tests/baselines/rwc/reference/";
473+
var localRwcBaseline = path.join(internalTests, "baselines/rwc/local");
474+
var refRwcBaseline = path.join(internalTests, "baselines/rwc/reference");
463475

464-
var localTest262Baseline = "tests/baselines/test262/local/";
465-
var refTest262Baseline = "tests/baselines/test262/reference/";
476+
var localTest262Baseline = path.join(internalTests, "baselines/test262/local");
477+
var refTest262Baseline = path.join(internalTests, "baselines/test262/reference");
466478

467479
desc("Builds the test infrastructure using the built compiler");
468480
task("tests", ["local", run].concat(libraryTargets));
@@ -495,11 +507,13 @@ function cleanTestDirs() {
495507
jake.rmRf(localBaseline);
496508
}
497509

498-
// Clean the local Rwc baselines directory
510+
// Clean the local Rwc baselines directory
499511
if (fs.existsSync(localRwcBaseline)) {
500512
jake.rmRf(localRwcBaseline);
501513
}
502514

515+
jake.mkdirP(localRwcBaseline);
516+
jake.mkdirP(localTest262Baseline);
503517
jake.mkdirP(localBaseline);
504518
}
505519

@@ -511,8 +525,8 @@ function writeTestConfigFile(tests, testConfigFile) {
511525
}
512526

513527
function deleteTemporaryProjectOutput() {
514-
if (fs.existsSync(localBaseline + "projectOutput/")) {
515-
jake.rmRf(localBaseline + "projectOutput/");
528+
if (fs.existsSync(path.join(localBaseline, "projectOutput/"))) {
529+
jake.rmRf(path.join(localBaseline, "projectOutput/"));
516530
}
517531
}
518532

bin/lib.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1908,7 +1908,7 @@ declare module Intl {
19081908
second?: string;
19091909
timeZoneName?: string;
19101910
formatMatcher?: string;
1911-
hour12: boolean;
1911+
hour12?: boolean;
19121912
}
19131913

19141914
interface ResolvedDateTimeFormatOptions {

bin/lib.dom.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ declare module Intl {
758758
second?: string;
759759
timeZoneName?: string;
760760
formatMatcher?: string;
761-
hour12: boolean;
761+
hour12?: boolean;
762762
}
763763

764764
interface ResolvedDateTimeFormatOptions {

bin/lib.es6.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4884,7 +4884,7 @@ declare module Intl {
48844884
second?: string;
48854885
timeZoneName?: string;
48864886
formatMatcher?: string;
4887-
hour12: boolean;
4887+
hour12?: boolean;
48884888
}
48894889

48904890
interface ResolvedDateTimeFormatOptions {

bin/lib.webworker.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ declare module Intl {
758758
second?: string;
759759
timeZoneName?: string;
760760
formatMatcher?: string;
761-
hour12: boolean;
761+
hour12?: boolean;
762762
}
763763

764764
interface ResolvedDateTimeFormatOptions {

0 commit comments

Comments
 (0)