Skip to content

Commit 06c318c

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

4,150 files changed

Lines changed: 182511 additions & 108577 deletions

File tree

Some content is hidden

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

.mailmap

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ Alexander Rusakov <a_s_rusakov@mail.ru>
88
Alex Eagle <alexeagle@google.com>
99
Anatoly Ressin <anatoly.ressin@icloud.com>
1010
Anders Hejlsberg <andersh@microsoft.com> unknown <andersh@AndersX1.NOE.Nokia.com> unknown <andersh@andersh-yoga.redmond.corp.microsoft.com>
11+
about-code <about-code@users.noreply.github.com> # Andreas Martin
1112
Andrej Baran <andrej.baran@gmail.com>
13+
Andrew Ochsner <andrew.ochsner@wipro.com>
1214
Andrew Z Allen <me@andrewzallen.com>
1315
Andy Hanson <anhans@microsoft.com> Andy <anhans@microsoft.com>
1416
Anil Anar <anilanar@hotmail.com>
1517
Anton Tolmachev <myste@mail.ru>
18+
Anubha Mathur <anubmat@microsoft.com> anubmat <anubmat@microsoft.com>
1619
Arnavion <arnavion@gmail.com> # Arnav Singh
1720
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>
1821
Asad Saeeduddin <masaeedu@gmail.com>
@@ -37,6 +40,7 @@ Dan Corder <dev@dancorder.com>
3740
Dan Quirk <danquirk@microsoft.com> Dan Quirk <danquirk@users.noreply.github.com> nknown <danquirk@DANQUIRK1.redmond.corp.microsoft.com>
3841
Daniel Rosenwasser <drosen@microsoft.com> Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com> Daniel Rosenwasser <DanielRosenwasser@gmail.com> Daniel Rosenwasser <Daniel.Rosenwasser@microsoft.com> Daniel Rosenwasser <DanielRosenwasser@microsoft.com>
3942
David Li <jiawei.davidli@gmail.com>
43+
David Sheldrick <david@futurice.com>
4044
David Souther <davidsouther@gmail.com>
4145
Denis Nedelyaev <denvned@gmail.com>
4246
Dick van den Brink <d_vandenbrink@outlook.com> unknown <d_vandenbrink@outlook.com> unknown <d_vandenbrink@live.com>
@@ -52,6 +56,7 @@ Evan Sebastian <evanlhoini@gmail.com>
5256
Eyas <eyas.sharaiha@gmail.com> # Eyas Sharaiha
5357
Fabian Cook <faybecook@gmail.com>
5458
falsandtru <falsandtru@users.noreply.github.com> # @falsandtru
59+
flowmemo <flowmemo@outlook.com> # @flowmemo
5560
Frank Wallis <fwallis@outlook.com>
5661
František Žiacik <fziacik@gratex.com> František Žiacik <ziacik@gmail.com>
5762
Gabe Moothart <gmoothart@gmail.com>
@@ -62,6 +67,7 @@ Graeme Wicksted <graeme.wicksted@gmail.com>
6267
Guillaume Salles <guillaume.salles@me.com>
6368
Guy Bedford <guybedford@gmail.com> guybedford <guybedford@gmail.com>
6469
Harald Niesche <harald@niesche.de>
70+
Homa Wong <homawong@gmail.com>
6571
Iain Monro <iain.monro@softwire.com>
6672
Ingvar Stepanyan <me@rreverser.com>
6773
impinball <impinball@gmail.com> # Isiah Meadows
@@ -81,6 +87,7 @@ Jonathan Park <jpark@daptiv.com>
8187
Jonathan Turner <jont@microsoft.com> Jonathan Turner <probata@hotmail.com>
8288
Jonathan Toland <toland@dnalot.com>
8389
Jesse Schalken <me@jesseschalken.com>
90+
Joel Day <joelday@gmail.com>
8491
Josh Abernathy <joshaber@gmail.com> joshaber <joshaber@gmail.com>
8592
Josh Kalderimis <josh.kalderimis@gmail.com>
8693
Josh Soref <jsoref@users.noreply.github.com>
@@ -95,10 +102,12 @@ Kanchalai Tanglertsampan <yuisu@microsoft.com> Yui T <yuisu@microsoft.com>
95102
Kanchalai Tanglertsampan <yuisu@microsoft.com> Yui <yuit@users.noreply.github.com>
96103
Kanchalai Tanglertsampan <yuisu@microsoft.com> Yui <yuisu@microsoft.com>
97104
Kanchalai Tanglertsampan <yuisu@microsoft.com> yui T <yuisu@microsoft.com>
105+
Kārlis Gaņģis <Knagis@users.noreply.github.com>
98106
Keith Mashinter <kmashint@yahoo.com> kmashint <kmashint@yahoo.com>
99107
Ken Howard <ken@simplicatedweb.com>
100108
Kevin Lang <klang2012@gmail.com>
101109
kimamula <kenji.imamula@gmail.com> # Kenji Imamula
110+
Klaus Meinhardt <klaus.meinhardt1@gmail.com>
102111
Kyle Kelley <rgbkrk@gmail.com>
103112
Lorant Pinter <lorant.pinter@prezi.com>
104113
Lucien Greathouse <me@lpghatguy.com>
@@ -107,6 +116,7 @@ Martin Vseticka <vseticka.martin@gmail.com> Martin Všeticka <vseticka.martin@gm
107116
gcnew <gcnew@abv.bg> # Marin Marinov
108117
vvakame <vvakame+dev@gmail.com> # Masahiro Wakame
109118
Matt McCutchen <rmccutch@mit.edu>
119+
MANISH-GIRI <manish.giri.me@gmail.com> # Manish Giri
110120
Max Deepfield <maxdeepfield@absolutefreakout.com>
111121
Micah Zoltu <micah@zoltu.net>
112122
Michael <maykelchiche@gmail.com>
@@ -213,4 +223,6 @@ Tim Perry <tim.perry@softwire.com>
213223
Vidar Tonaas Fauske <vidartf@gmail.com>
214224
Viktor Zozulyak <zozulyakviktor@gmail.com>
215225
rix <rix@rixs-MacBook-Pro.local> # Richard Sentino
216-
rohitverma007 <rohitverma@live.ca> # Rohit Verma
226+
rohitverma007 <rohitverma@live.ca> # Rohit Verma
227+
rdosanjh <me@rajdeep.io> # Raj Dosanjh
228+
gdh1995 <gdh1995@qq.com> # 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)