Skip to content

Commit 06c318c

Browse files
committed
Merge branch 'master' into externalExportStar
2 parents 5999a52 + dca368b commit 06c318c

File tree

4,150 files changed

+182511
-108577
lines changed

Some content is hidden

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

4,150 files changed

+182511
-108577
lines changed

.mailmap

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ Alexander Rusakov <[email protected]>
88
Alex Eagle <[email protected]>
99
Anatoly Ressin <[email protected]>
1010
Anders Hejlsberg <[email protected]> unknown <[email protected]> unknown <[email protected]>
11+
about-code <[email protected]> # Andreas Martin
1112
Andrej Baran <[email protected]>
13+
Andrew Ochsner <[email protected]>
1214
Andrew Z Allen <[email protected]>
1315
1416
Anil Anar <[email protected]>
1517
Anton Tolmachev <[email protected]>
18+
Anubha Mathur <[email protected]> anubmat <[email protected]>
1619
Arnavion <[email protected]> # Arnav Singh
1720
Arthur Ozga <[email protected]> Arthur Ozga <[email protected]> Arthur Ozga <[email protected]> Arthur Ozga <[email protected]> Arthur Ozga <[email protected]>
1821
Asad Saeeduddin <[email protected]>
@@ -37,6 +40,7 @@ Dan Corder <[email protected]>
3740
3841
Daniel Rosenwasser <[email protected]> Daniel Rosenwasser <[email protected]> Daniel Rosenwasser <[email protected]> Daniel Rosenwasser <[email protected]> Daniel Rosenwasser <[email protected]>
3942
43+
David Sheldrick <[email protected]>
4044
David Souther <[email protected]>
4145
Denis Nedelyaev <[email protected]>
4246
Dick van den Brink <[email protected]> unknown <[email protected]> unknown <[email protected]>
@@ -52,6 +56,7 @@ Evan Sebastian <[email protected]>
5256
Eyas <[email protected]> # Eyas Sharaiha
5357
Fabian Cook <[email protected]>
5458
falsandtru <[email protected]> # @falsandtru
59+
flowmemo <[email protected]> # @flowmemo
5560
Frank Wallis <[email protected]>
5661
František Žiacik <[email protected]> František Žiacik <[email protected]>
5762
Gabe Moothart <[email protected]>
@@ -62,6 +67,7 @@ Graeme Wicksted <[email protected]>
6267
Guillaume Salles <[email protected]>
6368
Guy Bedford <[email protected]> guybedford <[email protected]>
6469
Harald Niesche <[email protected]>
70+
Homa Wong <[email protected]>
6571
Iain Monro <[email protected]>
6672
Ingvar Stepanyan <[email protected]>
6773
impinball <[email protected]> # Isiah Meadows
@@ -81,6 +87,7 @@ Jonathan Park <[email protected]>
8187
Jonathan Turner <[email protected]> Jonathan Turner <[email protected]>
8288
Jonathan Toland <[email protected]>
8389
Jesse Schalken <[email protected]>
90+
8491
Josh Abernathy <[email protected]> joshaber <[email protected]>
8592
Josh Kalderimis <[email protected]>
8693
Josh Soref <[email protected]>
@@ -95,10 +102,12 @@ Kanchalai Tanglertsampan <[email protected]> Yui T <[email protected]>
95102
Kanchalai Tanglertsampan <[email protected]> Yui <[email protected]>
96103
Kanchalai Tanglertsampan <[email protected]> Yui <[email protected]>
97104
Kanchalai Tanglertsampan <[email protected]> yui T <[email protected]>
105+
Kārlis Gaņģis <[email protected]>
98106
Keith Mashinter <[email protected]> kmashint <[email protected]>
99107
Ken Howard <[email protected]>
100108
Kevin Lang <[email protected]>
101109
kimamula <[email protected]> # Kenji Imamula
110+
Klaus Meinhardt <[email protected]>
102111
Kyle Kelley <[email protected]>
103112
Lorant Pinter <[email protected]>
104113
Lucien Greathouse <[email protected]>
@@ -107,6 +116,7 @@ Martin Vseticka <[email protected]> Martin Všeticka <vseticka.martin@gm
107116
gcnew <[email protected]> # Marin Marinov
108117
vvakame <[email protected]> # Masahiro Wakame
109118
Matt McCutchen <[email protected]>
119+
MANISH-GIRI <[email protected]> # Manish Giri
110120
Max Deepfield <[email protected]>
111121
Micah Zoltu <[email protected]>
112122
@@ -213,4 +223,6 @@ Tim Perry <[email protected]>
213223
Vidar Tonaas Fauske <[email protected]>
214224
Viktor Zozulyak <[email protected]>
215225
rix <[email protected]> # Richard Sentino
216-
rohitverma007 <[email protected]> # Rohit Verma
226+
rohitverma007 <[email protected]> # Rohit Verma
227+
rdosanjh <[email protected]> # Raj Dosanjh
228+
gdh1995 <[email protected]> # Dahan Gong

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ branches:
1717
only:
1818
- master
1919
- release-2.1
20+
- release-2.2
2021

2122
install:
2223
- npm uninstall typescript

AUTHORS.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,16 @@ TypeScript is authored by:
1212
* Aliaksandr Radzivanovich
1313
* Anatoly Ressin
1414
* Anders Hejlsberg
15+
* Andreas Martin
1516
* Andrej Baran
17+
* Andrew Ochsner
1618
* Andrew Z Allen
1719
* András Parditka
1820
* Andy Hanson
1921
* Anil Anar
2022
* Anton Khlynovskiy
2123
* Anton Tolmachev
24+
* Anubha Mathur
2225
* Arnav Singh
2326
* Arthur Ozga
2427
* Asad Saeeduddin
@@ -42,12 +45,14 @@ TypeScript is authored by:
4245
* Cotton Hou
4346
* Cyrus Najmabadi
4447
* Dafrok Zhang
48+
* Dahan Gong
4549
* Dan Corder
4650
* Dan Quirk
4751
* Daniel Hollocher
4852
* Daniel Rosenwasser
4953
* David Kmenta
5054
* David Li
55+
* David Sheldrick
5156
* David Souther
5257
* Denis Nedelyaev
5358
* Dick van den Brink
@@ -66,6 +71,7 @@ TypeScript is authored by:
6671
* Eyas Sharaiha
6772
* Fabian Cook
6873
* @falsandtru
74+
* @flowmemo
6975
* Frank Wallis
7076
* Franklin Tse
7177
* František Žiacik
@@ -79,6 +85,7 @@ TypeScript is authored by:
7985
* Guy Bedford
8086
* Harald Niesche
8187
* Herrington Darkholme
88+
* Homa Wong
8289
* Iain Monro
8390
* Ingvar Stepanyan
8491
* Isiah Meadows
@@ -93,6 +100,7 @@ TypeScript is authored by:
93100
* Jeffrey Morlan
94101
* Jesse Schalken
95102
* Jiri Tobisek
103+
* Joel Day
96104
* Joey Wilson
97105
* Johannes Rieken
98106
* John Vilk
@@ -114,10 +122,13 @@ TypeScript is authored by:
114122
* Ken Howard
115123
* Kenji Imamula
116124
* Kevin Lang
125+
* Klaus Meinhardt
117126
* Kyle Kelley
127+
* Kārlis Gaņģis
118128
* Lorant Pinter
119129
* Lucien Greathouse
120130
* Lukas Elmer
131+
* Manish Giri
121132
* Marin Marinov
122133
* Marius Schulz
123134
* Martin Vseticka
@@ -155,6 +166,7 @@ TypeScript is authored by:
155166
* @progre
156167
* Punya Biswal
157168
* Rado Kirov
169+
* Raj Dosanjh
158170
* Richard Knoll
159171
* Richard Sentino
160172
* Robert Coie

Gulpfile.ts

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const {runTestsInParallel} = mochaParallel;
4141
Error.stackTraceLimit = 1000;
4242

4343
const cmdLineOptions = minimist(process.argv.slice(2), {
44-
boolean: ["debug", "light", "colors", "lint", "soft"],
44+
boolean: ["debug", "inspect", "light", "colors", "lint", "soft"],
4545
string: ["browser", "tests", "host", "reporter", "stackTraceLimit"],
4646
alias: {
4747
d: "debug",
@@ -50,19 +50,22 @@ const cmdLineOptions = minimist(process.argv.slice(2), {
5050
r: "reporter",
5151
color: "colors",
5252
f: "files",
53-
file: "files"
53+
file: "files",
54+
w: "workers",
5455
},
5556
default: {
5657
soft: false,
5758
colors: process.env.colors || process.env.color || true,
5859
debug: process.env.debug || process.env.d,
60+
inspect: process.env.inspect,
5961
host: process.env.TYPESCRIPT_HOST || process.env.host || "node",
6062
browser: process.env.browser || process.env.b || "IE",
6163
tests: process.env.test || process.env.tests || process.env.t,
6264
light: process.env.light || false,
6365
reporter: process.env.reporter || process.env.r,
6466
lint: process.env.lint || true,
6567
files: process.env.f || process.env.file || process.env.files || "",
68+
workers: process.env.workerCount || os.cpus().length,
6669
}
6770
});
6871

@@ -136,6 +139,14 @@ const es2017LibrarySourceMap = es2017LibrarySource.map(function(source) {
136139
return { target: "lib." + source, sources: ["header.d.ts", source] };
137140
});
138141

142+
const esnextLibrarySource = [
143+
"esnext.asynciterable.d.ts"
144+
];
145+
146+
const esnextLibrarySourceMap = esnextLibrarySource.map(function (source) {
147+
return { target: "lib." + source, sources: ["header.d.ts", source] };
148+
});
149+
139150
const hostsLibrarySources = ["dom.generated.d.ts", "webworker.importscripts.d.ts", "scripthost.d.ts"];
140151

141152
const librarySourceMap = [
@@ -150,11 +161,12 @@ const librarySourceMap = [
150161
{ target: "lib.es2015.d.ts", sources: ["header.d.ts", "es2015.d.ts"] },
151162
{ target: "lib.es2016.d.ts", sources: ["header.d.ts", "es2016.d.ts"] },
152163
{ target: "lib.es2017.d.ts", sources: ["header.d.ts", "es2017.d.ts"] },
164+
{ target: "lib.esnext.d.ts", sources: ["header.d.ts", "esnext.d.ts"] },
153165

154166
// JavaScript + all host library
155167
{ target: "lib.d.ts", sources: ["header.d.ts", "es5.d.ts"].concat(hostsLibrarySources) },
156168
{ target: "lib.es6.d.ts", sources: ["header.d.ts", "es5.d.ts"].concat(es2015LibrarySources, hostsLibrarySources, "dom.iterable.d.ts") }
157-
].concat(es2015LibrarySourceMap, es2016LibrarySourceMap, es2017LibrarySourceMap);
169+
].concat(es2015LibrarySourceMap, es2016LibrarySourceMap, es2017LibrarySourceMap, esnextLibrarySourceMap);
158170

159171
const libraryTargets = librarySourceMap.map(function(f) {
160172
return path.join(builtLocalDirectory, f.target);
@@ -242,23 +254,21 @@ function needsUpdate(source: string | string[], dest: string | string[]): boolea
242254
return true;
243255
}
244256

257+
// Doing tsconfig inheritance manually. https://github.com/ivogabe/gulp-typescript/issues/459
258+
const tsconfigBase = JSON.parse(fs.readFileSync("src/tsconfig-base.json", "utf-8")).compilerOptions;
259+
245260
function getCompilerSettings(base: tsc.Settings, useBuiltCompiler?: boolean): tsc.Settings {
246261
const copy: tsc.Settings = {};
247-
copy.noEmitOnError = true;
248-
copy.noImplicitAny = true;
249-
copy.noImplicitThis = true;
250-
copy.pretty = true;
251-
copy.types = [];
262+
for (const key in tsconfigBase) {
263+
copy[key] = tsconfigBase[key];
264+
}
252265
for (const key in base) {
253266
copy[key] = base[key];
254267
}
255268
if (!useDebugMode) {
256269
if (copy.removeComments === undefined) copy.removeComments = true;
257270
copy.newLine = "lf";
258271
}
259-
else {
260-
copy.preserveConstEnums = true;
261-
}
262272
if (useBuiltCompiler === true) {
263273
copy.typescript = require("./built/local/typescript.js");
264274
}
@@ -330,6 +340,7 @@ const builtGeneratedDiagnosticMessagesJSON = path.join(builtLocalDirectory, "dia
330340
// processDiagnosticMessages script
331341
gulp.task(processDiagnosticMessagesJs, false, [], () => {
332342
const settings: tsc.Settings = getCompilerSettings({
343+
target: "es5",
333344
declaration: false,
334345
removeComments: true,
335346
noResolve: false,
@@ -471,7 +482,10 @@ gulp.task(tsserverLibraryFile, false, [servicesFile], (done) => {
471482
js.pipe(prependCopyright())
472483
.pipe(sourcemaps.write("."))
473484
.pipe(gulp.dest(".")),
474-
dts.pipe(prependCopyright())
485+
dts.pipe(prependCopyright(/*outputCopyright*/true))
486+
.pipe(insert.transform((content) => {
487+
return content + "\r\nexport = ts;\r\nexport as namespace ts;";
488+
}))
475489
.pipe(gulp.dest("."))
476490
]);
477491
});
@@ -584,6 +598,7 @@ function runConsoleTests(defaultReporter: string, runInParallel: boolean, done:
584598
cleanTestDirs((err) => {
585599
if (err) { console.error(err); failWithStatus(err, 1); }
586600
const debug = cmdLineOptions["debug"];
601+
const inspect = cmdLineOptions["inspect"];
587602
const tests = cmdLineOptions["tests"];
588603
const light = cmdLineOptions["light"];
589604
const stackTraceLimit = cmdLineOptions["stackTraceLimit"];
@@ -602,7 +617,7 @@ function runConsoleTests(defaultReporter: string, runInParallel: boolean, done:
602617
} while (fs.existsSync(taskConfigsFolder));
603618
fs.mkdirSync(taskConfigsFolder);
604619

605-
workerCount = process.env.workerCount || os.cpus().length;
620+
workerCount = cmdLineOptions["workers"];
606621
}
607622

608623
if (tests || light || taskConfigsFolder) {
@@ -620,7 +635,10 @@ function runConsoleTests(defaultReporter: string, runInParallel: boolean, done:
620635
// default timeout is 2sec which really should be enough, but maybe we just need a small amount longer
621636
if (!runInParallel) {
622637
const args = [];
623-
if (debug) {
638+
if (inspect) {
639+
args.push("--inspect");
640+
}
641+
if (inspect || debug) {
624642
args.push("--debug-brk");
625643
}
626644
args.push("-R", reporter);
@@ -1015,7 +1033,7 @@ gulp.task("lint", "Runs tslint on the compiler sources. Optional arguments are:
10151033
cb();
10161034
}, (cb) => {
10171035
files = files.filter(file => fileMatcher.test(file.path)).sort((filea, fileb) => filea.stat.size - fileb.stat.size);
1018-
const workerCount = (process.env.workerCount && +process.env.workerCount) || os.cpus().length;
1036+
const workerCount = cmdLineOptions["workers"];
10191037
for (let i = 0; i < workerCount; i++) {
10201038
spawnLintWorker(files, finished);
10211039
}

0 commit comments

Comments
 (0)