Skip to content

Commit

Permalink
Merge branch 'master' into 5453-tuple-type-spread
Browse files Browse the repository at this point in the history
  • Loading branch information
KiaraGrouwstra authored Sep 21, 2017
2 parents 66065d0 + d9951cb commit 22b5361
Show file tree
Hide file tree
Showing 1,039 changed files with 82,289 additions and 19,016 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@ internal/
.idea
yarn.lock
package-lock.json
.parallelperf.json
13 changes: 11 additions & 2 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Andy Hanson <anhans@microsoft.com> Andy <anhans@microsoft.com>
Anil Anar <anilanar@hotmail.com>
Anton Tolmachev <myste@mail.ru>
Anubha Mathur <anubmat@microsoft.com> anubmat <anubmat@microsoft.com>
Armando Aguirre <armando.aguirre@microsoft.com>
Arnaud Tournier <ltearno@gmail.com>
Arnavion <arnavion@gmail.com> # Arnav Singh
Arthur Ozga <aozgaa@umich.edu> Arthur Ozga <t-arthoz@microsoft.com> Arthur Ozga <aozgaa-ms@outlook.com> Arthur Ozga <aozgaa@users.noreply.github.com> Arthur Ozga <arozga@microsoft.com>
Asad Saeeduddin <masaeedu@gmail.com>
Expand All @@ -26,6 +28,7 @@ Bill Ticehurst <billti@hotmail.com> Bill Ticehurst <billti@microsoft.com>
Ben Duffield <jebavarde@gmail.com>
Ben Mosher <me@benmosher.com>
Benjamin Bock <bb@users.noreply.github.com>
Benjamin Lichtman <uniqueiniquity@users.noreply.github.com> uniqueiniquity <blichtman623@gmail.com>
Blake Embrey <hello@blakeembrey.com>
Bowden Kelly <wilkelly@microsoft.com>
Brett Mayen <bmayen@midnightsnacks.net>
Expand Down Expand Up @@ -59,6 +62,7 @@ Evan Sebastian <evanlhoini@gmail.com>
Eyas <eyas.sharaiha@gmail.com> # Eyas Sharaiha
Fabian Cook <faybecook@gmail.com>
falsandtru <falsandtru@users.noreply.github.com> # @falsandtru
Filipe Silva <filipematossilva@gmail.com>
flowmemo <flowmemo@outlook.com> # @flowmemo
Frank Wallis <fwallis@outlook.com>
František Žiacik <fziacik@gratex.com> František Žiacik <ziacik@gmail.com>
Expand Down Expand Up @@ -192,7 +196,7 @@ TruongSinh Tran-Nguyen <i@truongsinh.pro>
vilicvane <i@vilic.info> # Vilic Vane
Vladimir Matveev <vladima@microsoft.com> vladima <vladima@microsoft.com> v2m <desco.by@gmail.com>
Vadi Taslim <vadz77@hotmail.com>
Wesley Wigham <t-weswig@microsoft.com> Wesley Wigham <wwigham@gmail.com>
Wesley Wigham <t-weswig@microsoft.com> Wesley Wigham <wwigham@gmail.com> Wesley Wigham <wewigham@microsoft.com>
York Yao <plantain-00@users.noreply.github.com> york yao <yaoao12306@outlook.com> yaoyao <yaoyao12306@163.com>
Yuichi Nukiyama <oscar.wilde84@hotmail.co.jp> YuichiNukiyama <oscar.wilde84@hotmail.co.jp>
Zev Spitz <shivisi@etrog.net.il>
Expand Down Expand Up @@ -267,4 +271,9 @@ Reiner Dolp <reiner-dolp@users.noreply.github.com>
t_ <t-mrt@users.noreply.github.com> # @t_
TravCav <xurrux@gmail.com> # @TravCav
Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com>
William Orr <will@worrbase.com>
William Orr <will@worrbase.com>
Francois Wouts <f@codonut.com>
Jan Melcher <jan.melcher@aeb.com> Jan Melcher <mail@jan-melcher.de>
Matt Mitchell <mmitche@microsoft.com>
Maxwell Paul Brickner <mbrickn@users.noreply.github.com>
Tycho Grouwstra <tychogrouwstra@gmail.com>
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ Jakefile.js
.gitattributes
.settings/
.travis.yml
.vscode/
.vscode/
test.config
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ matrix:
branches:
only:
- master
- release-2.5

install:
- npm uninstall typescript --no-save
Expand Down
9 changes: 9 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ TypeScript is authored by:
* Anton Khlynovskiy
* Anton Tolmachev
* Anubha Mathur
* Armando Aguirre
* Arnaud Tournier
* Arnav Singh
* Arthur Ozga
* Asad Saeeduddin
Expand All @@ -33,6 +35,7 @@ TypeScript is authored by:
* Ben Duffield
* Ben Mosher
* Benjamin Bock
* Benjamin Lichtman
* Benny Neugebauer
* Bill Ticehurst
* Blaine Bublitz
Expand Down Expand Up @@ -85,7 +88,9 @@ TypeScript is authored by:
* Eyas Sharaiha
* Fabian Cook
* @falsandtru
* Filipe Silva
* @flowmemo
* Francois Wouts
* Frank Wallis
* Franklin Tse
* František Žiacik
Expand All @@ -112,6 +117,7 @@ TypeScript is authored by:
* Jakub Młokosiewicz
* James Henry
* James Whitney
* Jan Melcher
* Jason Freeman
* Jason Jarrett
* Jason Killian
Expand Down Expand Up @@ -162,9 +168,11 @@ TypeScript is authored by:
* Masahiro Wakame
* Matt Bierner
* Matt McCutchen
* Matt Mitchell
* Mattias Buelens
* Mattias Buelens
* Max Deepfield
* Maxwell Paul Brickner
* Micah Zoltu
* Michael
* Michael Bromley
Expand Down Expand Up @@ -243,6 +251,7 @@ TypeScript is authored by:
* Torben Fitschen
* @TravCav
* TruongSinh Tran-Nguyen
* Tycho Grouwstra
* Vadi Taslim
* Vidar Tonaas Fauske
* Viktor Zozulyak
Expand Down
51 changes: 23 additions & 28 deletions Gulpfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ import merge2 = require("merge2");
import * as os from "os";
import fold = require("travis-fold");
const gulp = helpMaker(originalGulp);
const mochaParallel = require("./scripts/mocha-parallel.js");
const {runTestsInParallel} = mochaParallel;

Error.stackTraceLimit = 1000;

Expand Down Expand Up @@ -463,10 +461,11 @@ gulp.task(serverFile, /*help*/ false, [servicesFile, typingsInstallerJs, cancell
.pipe(gulp.dest("src/server"));
});

const typesMapJson = path.join(builtLocalDirectory, "typesMap.json");
const tsserverLibraryFile = path.join(builtLocalDirectory, "tsserverlibrary.js");
const tsserverLibraryDefinitionFile = path.join(builtLocalDirectory, "tsserverlibrary.d.ts");

gulp.task(tsserverLibraryFile, /*help*/ false, [servicesFile], (done) => {
gulp.task(tsserverLibraryFile, /*help*/ false, [servicesFile, typesMapJson], (done) => {
const serverLibraryProject = tsc.createProject("src/server/tsconfig.library.json", getCompilerSettings({}, /*useBuiltCompiler*/ true));
const {js, dts}: { js: NodeJS.ReadableStream, dts: NodeJS.ReadableStream } = serverLibraryProject.src()
.pipe(sourcemaps.init())
Expand All @@ -485,6 +484,15 @@ gulp.task(tsserverLibraryFile, /*help*/ false, [servicesFile], (done) => {
]);
});

gulp.task(typesMapJson, /*help*/ false, [], () => {
return gulp.src("src/server/typesMap.json")
.pipe(insert.transform((contents, file) => {
JSON.parse(contents);
return contents;
}))
.pipe(gulp.dest(builtLocalDirectory));
});

gulp.task("lssl", "Builds language service server library", [tsserverLibraryFile]);
gulp.task("local", "Builds the full compiler and services", [builtLocalCompiler, servicesFile, serverFile, builtGeneratedDiagnosticMessagesJSON, tsserverLibraryFile]);
gulp.task("tsc", "Builds only the compiler", [builtLocalCompiler]);
Expand Down Expand Up @@ -658,26 +666,9 @@ function runConsoleTests(defaultReporter: string, runInParallel: boolean, done:
}
else {
// run task to load all tests and partition them between workers
const args = [];
args.push("-R", "min");
if (colors) {
args.push("--colors");
}
else {
args.push("--no-colors");
}
args.push(run);
setNodeEnvToDevelopment();
runTestsInParallel(taskConfigsFolder, run, { testTimeout, noColors: colors === " --no-colors " }, function(err) {
// last worker clean everything and runs linter in case if there were no errors
del(taskConfigsFolder).then(() => {
if (!err) {
lintThenFinish();
}
else {
finish(err);
}
});
exec(host, [run], lintThenFinish, function(e, status) {
finish(e, status);
});
}
});
Expand All @@ -701,7 +692,7 @@ function runConsoleTests(defaultReporter: string, runInParallel: boolean, done:

function finish(error?: any, errorStatus?: number) {
restoreSavedNodeEnv();
deleteTemporaryProjectOutput().then(() => {
deleteTestConfig().then(deleteTemporaryProjectOutput).then(() => {
if (error !== undefined || errorStatus !== undefined) {
failWithStatus(error, errorStatus);
}
Expand All @@ -710,6 +701,10 @@ function runConsoleTests(defaultReporter: string, runInParallel: boolean, done:
}
});
}

function deleteTestConfig() {
return del("test.config");
}
}

gulp.task("runtests-parallel", "Runs all the tests in parallel using the built run.js file. Optional arguments are: --t[ests]=category1|category2|... --d[ebug]=true.", ["build-rules", "tests"], (done) => {
Expand Down Expand Up @@ -776,7 +771,7 @@ gulp.task("browserify", "Runs browserify on run.js to produce a file suitable fo
const file = new Vinyl({ contents, path: bundlePath });
console.log(`Fixing sourcemaps for ${file.path}`);
// assumes contents is a Buffer, since that's what browserify yields
const maps = convertMap.fromSource(stringContent, /*largeSource*/ true).toObject();
const maps = convertMap.fromSource(stringContent).toObject();
delete maps.sourceRoot;
maps.sources = maps.sources.map(s => path.resolve(s === "_stream_0.js" ? "built/local/_stream_0.js" : s));
// Strip browserify's inline comments away (could probably just let sorcery do this, but then we couldn't fix the paths)
Expand Down Expand Up @@ -826,7 +821,7 @@ function cleanTestDirs(done: (e?: any) => void) {

// used to pass data from jake command line directly to run.js
function writeTestConfigFile(tests: string, light: boolean, taskConfigsFolder?: string, workerCount?: number, stackTraceLimit?: string) {
const testConfigContents = JSON.stringify({ test: tests ? [tests] : undefined, light, workerCount, stackTraceLimit, taskConfigsFolder });
const testConfigContents = JSON.stringify({ test: tests ? [tests] : undefined, light, workerCount, stackTraceLimit, taskConfigsFolder, noColor: !cmdLineOptions["colors"] });
console.log("Running tests with config: " + testConfigContents);
fs.writeFileSync("test.config", testConfigContents);
}
Expand Down Expand Up @@ -968,7 +963,7 @@ const instrumenterPath = path.join(harnessDirectory, "instrumenter.ts");
const instrumenterJsPath = path.join(builtLocalDirectory, "instrumenter.js");
gulp.task(instrumenterJsPath, /*help*/ false, [servicesFile], () => {
const settings: tsc.Settings = getCompilerSettings({
outFile: instrumenterJsPath,
module: "commonjs",
target: "es5",
lib: [
"es6",
Expand All @@ -980,8 +975,8 @@ gulp.task(instrumenterJsPath, /*help*/ false, [servicesFile], () => {
.pipe(newer(instrumenterJsPath))
.pipe(sourcemaps.init())
.pipe(tsc(settings))
.pipe(sourcemaps.write("."))
.pipe(gulp.dest("."));
.pipe(sourcemaps.write(builtLocalDirectory))
.pipe(gulp.dest(builtLocalDirectory));
});

gulp.task("tsc-instrumented", "Builds an instrumented tsc.js", ["local", loggedIOJsPath, instrumenterJsPath, servicesFile], (done) => {
Expand Down
Loading

0 comments on commit 22b5361

Please sign in to comment.