Skip to content

Commit 22b5361

Browse files
Merge branch 'master' into 5453-tuple-type-spread
2 parents 66065d0 + d9951cb commit 22b5361

File tree

1,039 files changed

+82289
-19016
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,039 files changed

+82289
-19016
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,4 @@ internal/
5959
.idea
6060
yarn.lock
6161
package-lock.json
62+
.parallelperf.json

.mailmap

+11-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Andy Hanson <[email protected]> Andy <[email protected]>
1717
Anil Anar <[email protected]>
1818
Anton Tolmachev <[email protected]>
1919
Anubha Mathur <[email protected]> anubmat <[email protected]>
20+
Armando Aguirre <[email protected]>
21+
Arnaud Tournier <[email protected]>
2022
Arnavion <[email protected]> # Arnav Singh
2123
Arthur Ozga <[email protected]> Arthur Ozga <[email protected]> Arthur Ozga <[email protected]> Arthur Ozga <[email protected]> Arthur Ozga <[email protected]>
2224
Asad Saeeduddin <[email protected]>
@@ -26,6 +28,7 @@ Bill Ticehurst <[email protected]> Bill Ticehurst <[email protected]>
2628
Ben Duffield <[email protected]>
2729
Ben Mosher <[email protected]>
2830
Benjamin Bock <[email protected]>
31+
Benjamin Lichtman <[email protected]> uniqueiniquity <[email protected]>
2932
Blake Embrey <[email protected]>
3033
Bowden Kelly <[email protected]>
3134
Brett Mayen <[email protected]>
@@ -59,6 +62,7 @@ Evan Sebastian <[email protected]>
5962
Eyas <[email protected]> # Eyas Sharaiha
6063
Fabian Cook <[email protected]>
6164
falsandtru <[email protected]> # @falsandtru
65+
Filipe Silva <[email protected]>
6266
flowmemo <[email protected]> # @flowmemo
6367
Frank Wallis <[email protected]>
6468
František Žiacik <[email protected]> František Žiacik <[email protected]>
@@ -192,7 +196,7 @@ TruongSinh Tran-Nguyen <[email protected]>
192196
vilicvane <[email protected]> # Vilic Vane
193197
Vladimir Matveev <[email protected]> vladima <[email protected]> v2m <[email protected]>
194198
Vadi Taslim <[email protected]>
195-
Wesley Wigham <[email protected]> Wesley Wigham <[email protected]>
199+
Wesley Wigham <[email protected]> Wesley Wigham <[email protected]> Wesley Wigham <[email protected]>
196200
197201
Yuichi Nukiyama <[email protected]> YuichiNukiyama <[email protected]>
198202
Zev Spitz <[email protected]>
@@ -267,4 +271,9 @@ Reiner Dolp <[email protected]>
267271
268272
TravCav <[email protected]> # @TravCav
269273
Vladimir Kurchatkin <[email protected]>
270-
William Orr <[email protected]>
274+
William Orr <[email protected]>
275+
Francois Wouts <[email protected]>
276+
Jan Melcher <[email protected]> Jan Melcher <[email protected]>
277+
Matt Mitchell <[email protected]>
278+
Maxwell Paul Brickner <[email protected]>
279+
Tycho Grouwstra <[email protected]>

.npmignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ Jakefile.js
1616
.gitattributes
1717
.settings/
1818
.travis.yml
19-
.vscode/
19+
.vscode/
20+
test.config

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ matrix:
1616
branches:
1717
only:
1818
- master
19+
- release-2.5
1920

2021
install:
2122
- npm uninstall typescript --no-save

AUTHORS.md

+9
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ TypeScript is authored by:
2525
* Anton Khlynovskiy
2626
* Anton Tolmachev
2727
* Anubha Mathur
28+
* Armando Aguirre
29+
* Arnaud Tournier
2830
* Arnav Singh
2931
* Arthur Ozga
3032
* Asad Saeeduddin
@@ -33,6 +35,7 @@ TypeScript is authored by:
3335
* Ben Duffield
3436
* Ben Mosher
3537
* Benjamin Bock
38+
* Benjamin Lichtman
3639
* Benny Neugebauer
3740
* Bill Ticehurst
3841
* Blaine Bublitz
@@ -85,7 +88,9 @@ TypeScript is authored by:
8588
* Eyas Sharaiha
8689
* Fabian Cook
8790
* @falsandtru
91+
* Filipe Silva
8892
* @flowmemo
93+
* Francois Wouts
8994
* Frank Wallis
9095
* Franklin Tse
9196
* František Žiacik
@@ -112,6 +117,7 @@ TypeScript is authored by:
112117
* Jakub Młokosiewicz
113118
* James Henry
114119
* James Whitney
120+
* Jan Melcher
115121
* Jason Freeman
116122
* Jason Jarrett
117123
* Jason Killian
@@ -162,9 +168,11 @@ TypeScript is authored by:
162168
* Masahiro Wakame
163169
* Matt Bierner
164170
* Matt McCutchen
171+
* Matt Mitchell
165172
* Mattias Buelens
166173
* Mattias Buelens
167174
* Max Deepfield
175+
* Maxwell Paul Brickner
168176
* Micah Zoltu
169177
* Michael
170178
* Michael Bromley
@@ -243,6 +251,7 @@ TypeScript is authored by:
243251
* Torben Fitschen
244252
* @TravCav
245253
* TruongSinh Tran-Nguyen
254+
* Tycho Grouwstra
246255
* Vadi Taslim
247256
* Vidar Tonaas Fauske
248257
* Viktor Zozulyak

Gulpfile.ts

+23-28
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ import merge2 = require("merge2");
3131
import * as os from "os";
3232
import fold = require("travis-fold");
3333
const gulp = helpMaker(originalGulp);
34-
const mochaParallel = require("./scripts/mocha-parallel.js");
35-
const {runTestsInParallel} = mochaParallel;
3634

3735
Error.stackTraceLimit = 1000;
3836

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

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

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

487+
gulp.task(typesMapJson, /*help*/ false, [], () => {
488+
return gulp.src("src/server/typesMap.json")
489+
.pipe(insert.transform((contents, file) => {
490+
JSON.parse(contents);
491+
return contents;
492+
}))
493+
.pipe(gulp.dest(builtLocalDirectory));
494+
});
495+
488496
gulp.task("lssl", "Builds language service server library", [tsserverLibraryFile]);
489497
gulp.task("local", "Builds the full compiler and services", [builtLocalCompiler, servicesFile, serverFile, builtGeneratedDiagnosticMessagesJSON, tsserverLibraryFile]);
490498
gulp.task("tsc", "Builds only the compiler", [builtLocalCompiler]);
@@ -658,26 +666,9 @@ function runConsoleTests(defaultReporter: string, runInParallel: boolean, done:
658666
}
659667
else {
660668
// run task to load all tests and partition them between workers
661-
const args = [];
662-
args.push("-R", "min");
663-
if (colors) {
664-
args.push("--colors");
665-
}
666-
else {
667-
args.push("--no-colors");
668-
}
669-
args.push(run);
670669
setNodeEnvToDevelopment();
671-
runTestsInParallel(taskConfigsFolder, run, { testTimeout, noColors: colors === " --no-colors " }, function(err) {
672-
// last worker clean everything and runs linter in case if there were no errors
673-
del(taskConfigsFolder).then(() => {
674-
if (!err) {
675-
lintThenFinish();
676-
}
677-
else {
678-
finish(err);
679-
}
680-
});
670+
exec(host, [run], lintThenFinish, function(e, status) {
671+
finish(e, status);
681672
});
682673
}
683674
});
@@ -701,7 +692,7 @@ function runConsoleTests(defaultReporter: string, runInParallel: boolean, done:
701692

702693
function finish(error?: any, errorStatus?: number) {
703694
restoreSavedNodeEnv();
704-
deleteTemporaryProjectOutput().then(() => {
695+
deleteTestConfig().then(deleteTemporaryProjectOutput).then(() => {
705696
if (error !== undefined || errorStatus !== undefined) {
706697
failWithStatus(error, errorStatus);
707698
}
@@ -710,6 +701,10 @@ function runConsoleTests(defaultReporter: string, runInParallel: boolean, done:
710701
}
711702
});
712703
}
704+
705+
function deleteTestConfig() {
706+
return del("test.config");
707+
}
713708
}
714709

715710
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) => {
@@ -776,7 +771,7 @@ gulp.task("browserify", "Runs browserify on run.js to produce a file suitable fo
776771
const file = new Vinyl({ contents, path: bundlePath });
777772
console.log(`Fixing sourcemaps for ${file.path}`);
778773
// assumes contents is a Buffer, since that's what browserify yields
779-
const maps = convertMap.fromSource(stringContent, /*largeSource*/ true).toObject();
774+
const maps = convertMap.fromSource(stringContent).toObject();
780775
delete maps.sourceRoot;
781776
maps.sources = maps.sources.map(s => path.resolve(s === "_stream_0.js" ? "built/local/_stream_0.js" : s));
782777
// Strip browserify's inline comments away (could probably just let sorcery do this, but then we couldn't fix the paths)
@@ -826,7 +821,7 @@ function cleanTestDirs(done: (e?: any) => void) {
826821

827822
// used to pass data from jake command line directly to run.js
828823
function writeTestConfigFile(tests: string, light: boolean, taskConfigsFolder?: string, workerCount?: number, stackTraceLimit?: string) {
829-
const testConfigContents = JSON.stringify({ test: tests ? [tests] : undefined, light, workerCount, stackTraceLimit, taskConfigsFolder });
824+
const testConfigContents = JSON.stringify({ test: tests ? [tests] : undefined, light, workerCount, stackTraceLimit, taskConfigsFolder, noColor: !cmdLineOptions["colors"] });
830825
console.log("Running tests with config: " + testConfigContents);
831826
fs.writeFileSync("test.config", testConfigContents);
832827
}
@@ -968,7 +963,7 @@ const instrumenterPath = path.join(harnessDirectory, "instrumenter.ts");
968963
const instrumenterJsPath = path.join(builtLocalDirectory, "instrumenter.js");
969964
gulp.task(instrumenterJsPath, /*help*/ false, [servicesFile], () => {
970965
const settings: tsc.Settings = getCompilerSettings({
971-
outFile: instrumenterJsPath,
966+
module: "commonjs",
972967
target: "es5",
973968
lib: [
974969
"es6",
@@ -980,8 +975,8 @@ gulp.task(instrumenterJsPath, /*help*/ false, [servicesFile], () => {
980975
.pipe(newer(instrumenterJsPath))
981976
.pipe(sourcemaps.init())
982977
.pipe(tsc(settings))
983-
.pipe(sourcemaps.write("."))
984-
.pipe(gulp.dest("."));
978+
.pipe(sourcemaps.write(builtLocalDirectory))
979+
.pipe(gulp.dest(builtLocalDirectory));
985980
});
986981

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

0 commit comments

Comments
 (0)