Skip to content

Commit 208076a

Browse files
author
Andy Hanson
committed
Merge branch 'master' into signatureHelpTypeArguments
2 parents 8aeffba + 16d7f4c commit 208076a

File tree

646 files changed

+42573
-33868
lines changed

Some content is hidden

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

646 files changed

+42573
-33868
lines changed

.github/ISSUE_TEMPLATE/Feature_request.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ What shortcomings exist with current approaches?
3232
## Checklist
3333

3434
My suggestion meets these guidelines:
35-
[ ] This wouldn't be a breaking change in existing TypeScript / JavaScript code
36-
[ ] This wouldn't change the runtime behavior of existing JavaScript code
37-
[ ] This could be implemented without emitting different JS based on the types of the expressions
38-
[ ] This isn't a runtime feature (e.g. new expression-level syntax)
35+
* [ ] This wouldn't be a breaking change in existing TypeScript / JavaScript code
36+
* [ ] This wouldn't change the runtime behavior of existing JavaScript code
37+
* [ ] This could be implemented without emitting different JS based on the types of the expressions
38+
* [ ] This isn't a runtime feature (e.g. new expression-level syntax)
3939

.github/pull_request_template.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
Thank you for submitting a pull request!
33
44
Here's a checklist you might find useful.
5-
[ ] There is an associated issue that is labeled
5+
* [ ] There is an associated issue that is labeled
66
'Bug' or 'help wanted' or is in the Community milestone
7-
[ ] Code is up-to-date with the `master` branch
8-
[ ] You've successfully run `jake runtests` locally
9-
[ ] You've signed the CLA
10-
[ ] There are new or updated unit tests validating the change
7+
* [ ] Code is up-to-date with the `master` branch
8+
* [ ] You've successfully run `jake runtests` locally
9+
* [ ] You've signed the CLA
10+
* [ ] There are new or updated unit tests validating the change
1111
1212
Refer to CONTRIBUTING.MD for more details.
1313
https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md
1414
-->
1515

1616
Fixes #
17+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules/
2+
.node_modules/
23
built/*
34
tests/cases/rwc/*
45
tests/cases/test262/*

.mailmap

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ Remo H. Jansen <[email protected]>
308308
Sean Barag <[email protected]>
309309
Sharon Rolel <[email protected]>
310310
Stanislav Iliev <[email protected]>
311-
Wenlu Wang <[email protected]> wenlu.wang <[email protected]> kingwl <[email protected]>
311+
Wenlu Wang <[email protected]> wenlu.wang <[email protected]> kingwl <[email protected]> 王文璐 <[email protected]> 王文璐 <[email protected]>
312312
Wilson Hobbs <[email protected]>
313313
Yuval Greenfield <[email protected]>
314314
Daniel <[email protected]> # @nieltg
@@ -321,4 +321,23 @@ AdityaDaflapurkar <[email protected]> # Aditya Daflapurkar
321321
Eric Grube <[email protected]>
322322
Martyn Janes <[email protected]>
323323
Ricardo N Feliciano <[email protected]>
324-
Sergii Bezliudnyi <[email protected]>
324+
Sergii Bezliudnyi <[email protected]>
325+
Adrien Gibrat <[email protected]>
326+
Alex Ryan <[email protected]>
327+
Alexader <[email protected]> Alexander T <[email protected]> # Alexander Tarasyuk
328+
Andrew Faulkner <[email protected]>
329+
Artem Tyurin <[email protected]>
330+
Brandon Slade <[email protected]>
331+
Derek P Sifford <[email protected]>
332+
Dhruv Rajvanshi <[email protected]>
333+
Holger Jeromin <[email protected]>
334+
Jordi Oliveras Rovira <[email protected]>
335+
Joscha Feth <[email protected]> Joscha Feth <[email protected]>
336+
Ken703 <[email protected]> # Bowden Kenny
337+
Kevin Donnelly <[email protected]>
338+
Maarten Sijm <[email protected]>
339+
Paul Koerbitz <[email protected]>
340+
EcoleKeine <[email protected]> # Ecole Keine
341+
342+
rhysd <[email protected]> # @rhysd
343+
Zen <[email protected]> Zzzen <[email protected]> # @Zzzen

.npmignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
built
22
doc
3-
Gulpfile.ts
3+
Gulpfile.js
44
internal
55
jenkins.sh
66
lib/README.md
@@ -23,3 +23,4 @@ test.config
2323
package-lock.json
2424
yarn.lock
2525
.github/
26+
CONTRIBUTING.md

AUTHORS.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ TypeScript is authored by:
66
* Aditya Daflapurkar
77
* Adnan Chowdhury
88
* Adrian Leonhard
9+
* Adrien Gibrat
910
* Ahmad Farid
1011
* Akshar Patel
1112
* Alan Agius
1213
* Alex Chugaev
1314
* Alex Eagle
1415
* Alex Khomchenko
16+
* Alex Ryan
1517
* Alexander Kuvaev
1618
* Alexander Rusakov
19+
* Alexander Tarasyuk
1720
* Ali Sabzevari
1821
* Aliaksandr Radzivanovich
1922
* Aluan Haddad
@@ -22,6 +25,7 @@ TypeScript is authored by:
2225
* Andreas Martin
2326
* Andrej Baran
2427
* Andrew Casey
28+
* Andrew Faulkner
2529
* Andrew Ochsner
2630
* Andrew Stegmaier
2731
* Andrew Z Allen
@@ -34,6 +38,7 @@ TypeScript is authored by:
3438
* Armando Aguirre
3539
* Arnaud Tournier
3640
* Arnav Singh
41+
* Artem Tyurin
3742
* Arthur Ozga
3843
* Asad Saeeduddin
3944
* Avery Morin
@@ -49,6 +54,8 @@ TypeScript is authored by:
4954
* Blake Embrey
5055
* @bootstraponline
5156
* Bowden Kelly
57+
* Bowden Kenny
58+
* Brandon Slade
5259
* Brett Mayen
5360
* Bryan Forbes
5461
* Caitlin Potter
@@ -76,6 +83,8 @@ TypeScript is authored by:
7683
* David Sheldrick
7784
* David Souther
7885
* Denis Nedelyaev
86+
* Derek P Sifford
87+
* Dhruv Rajvanshi
7988
* Dick van den Brink
8089
* Diogo Franco (Kovensky)
8190
* Dirk Bäumer
@@ -84,6 +93,7 @@ TypeScript is authored by:
8493
* Donald Pipowitch
8594
* Doug Ilijev
8695
* @e-cloud
96+
* Ecole Keine
8797
* Elisée Maurer
8898
* Emilio García-Pumarino
8999
* Eric Grube
@@ -118,6 +128,7 @@ TypeScript is authored by:
118128
* Hendrik Liebau
119129
* Henry Mercer
120130
* Herrington Darkholme
131+
* Holger Jeromin
121132
* Homa Wong
122133
* Iain Monro
123134
* @IdeaHunter
@@ -155,6 +166,8 @@ TypeScript is authored by:
155166
* Jonathan Toland
156167
* Jonathan Turner
157168
* Jonathon Smith
169+
* Jordi Oliveras Rovira
170+
* Joscha Feth
158171
* Josh Abernathy
159172
* Josh Goldberg
160173
* Josh Kalderimis
@@ -170,7 +183,9 @@ TypeScript is authored by:
170183
* Keith Mashinter
171184
* Ken Howard
172185
* Kenji Imamula
186+
* Kevin Donnelly
173187
* Kevin Lang
188+
* Khải
174189
* Kitson Kelly
175190
* Klaus Meinhardt
176191
* Kris Zyp
@@ -179,6 +194,7 @@ TypeScript is authored by:
179194
* Lorant Pinter
180195
* Lucien Greathouse
181196
* Lukas Elmer
197+
* Maarten Sijm
182198
* Magnus Hiie
183199
* Magnus Kulke
184200
* Manish Giri
@@ -223,6 +239,7 @@ TypeScript is authored by:
223239
* Oussama Ben Brahim
224240
* Patrick Zhong
225241
* Paul Jolly
242+
* Paul Koerbitz
226243
* Paul van Brenk
227244
* @pcbro
228245
* Pedro Maltez
@@ -240,6 +257,7 @@ TypeScript is authored by:
240257
* Raj Dosanjh
241258
* Reiner Dolp
242259
* Remo H. Jansen
260+
* @rhysd
243261
* Ricardo N Feliciano
244262
* Richard Karmazín
245263
* Richard Knoll
@@ -309,4 +327,5 @@ TypeScript is authored by:
309327
* Yuval Greenfield
310328
* Zeeshan Ahmed
311329
* Zev Spitz
312-
* Zhengbo Li
330+
* Zhengbo Li
331+
* @Zzzen

Gulpfile.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const constEnumCaptureRegexp = /^(\s*)(export )?const enum (\S+) {(\s*)$/gm;
3636
const constEnumReplacement = "$1$2enum $3 {$4";
3737

3838
const cmdLineOptions = minimist(process.argv.slice(2), {
39-
boolean: ["debug", "inspect", "light", "colors", "lint", "soft"],
39+
boolean: ["debug", "inspect", "light", "colors", "lint", "soft", "fix"],
4040
string: ["browser", "tests", "host", "reporter", "stackTraceLimit", "timeout"],
4141
alias: {
4242
"b": "browser",
@@ -47,6 +47,7 @@ const cmdLineOptions = minimist(process.argv.slice(2), {
4747
"r": "reporter",
4848
"c": "colors", "color": "colors",
4949
"w": "workers",
50+
"f": "fix",
5051
},
5152
default: {
5253
soft: false,
@@ -61,6 +62,7 @@ const cmdLineOptions = minimist(process.argv.slice(2), {
6162
light: process.env.light === undefined || process.env.light !== "false",
6263
reporter: process.env.reporter || process.env.r,
6364
lint: process.env.lint || true,
65+
fix: process.env.fix || process.env.f,
6466
workers: process.env.workerCount || os.cpus().length,
6567
}
6668
});
@@ -260,6 +262,7 @@ function getCompilerSettings(base, useBuiltCompiler) {
260262
for (const key in base) {
261263
copy[key] = base[key];
262264
}
265+
copy.strictNullChecks = true;
263266
if (!useDebugMode) {
264267
if (copy.removeComments === undefined) copy.removeComments = true;
265268
}
@@ -1069,7 +1072,7 @@ gulp.task("build-rules", "Compiles tslint rules to js", () => {
10691072
gulp.task("lint", "Runs tslint on the compiler sources. Optional arguments are: --f[iles]=regex", ["build-rules"], () => {
10701073
if (fold.isTravis()) console.log(fold.start("lint"));
10711074
for (const project of ["scripts/tslint/tsconfig.json", "src/tsconfig-base.json"]) {
1072-
const cmd = `node node_modules/tslint/bin/tslint --project ${project} --formatters-dir ./built/local/tslint/formatters --format autolinkableStylish`;
1075+
const cmd = `node node_modules/tslint/bin/tslint --project ${project} --formatters-dir ./built/local/tslint/formatters --format autolinkableStylish${cmdLineOptions.fix ? " --fix" : ""}`;
10731076
console.log("Linting: " + cmd);
10741077
child_process.execSync(cmd, { stdio: [0, 1, 2] });
10751078
}

Jakefile.js

Lines changed: 7 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, opts
251251
else {
252252
options += " --lib es5";
253253
}
254-
options += " --noUnusedLocals --noUnusedParameters";
254+
options += " --noUnusedLocals --noUnusedParameters --strictNullChecks";
255255

256256
var cmd = host + " " + compilerPath + " " + options + " ";
257257
cmd = cmd + sources.join(" ");
@@ -1114,65 +1114,17 @@ task("build-rules-end", [], function () {
11141114
if (fold.isTravis()) console.log(fold.end("build-rules"));
11151115
});
11161116

1117-
var lintTargets = compilerSources
1118-
.concat(harnessSources)
1119-
// Other harness sources
1120-
.concat(["instrumenter.ts"].map(function (f) { return path.join(harnessDirectory, f); }))
1121-
.concat(serverSources)
1122-
.concat(tslintRulesFiles)
1123-
.concat(servicesSources)
1124-
.concat(typingsInstallerSources)
1125-
.concat(cancellationTokenSources)
1126-
.concat(["Gulpfile.ts"])
1127-
.concat([nodeServerInFile, perftscPath, "tests/perfsys.ts", webhostPath])
1128-
.map(function (p) { return path.resolve(p); });
1129-
// keep only unique items
1130-
lintTargets = Array.from(new Set(lintTargets));
1131-
1132-
function sendNextFile(files, child, callback, failures) {
1133-
var file = files.pop();
1134-
if (file) {
1135-
console.log("Linting '" + file + "'.");
1136-
child.send({ kind: "file", name: file });
1137-
}
1138-
else {
1139-
child.send({ kind: "close" });
1140-
callback(failures);
1141-
}
1142-
}
1143-
1144-
function spawnLintWorker(files, callback) {
1145-
var child = child_process.fork("./scripts/parallel-lint");
1146-
var failures = 0;
1147-
child.on("message", function (data) {
1148-
switch (data.kind) {
1149-
case "result":
1150-
if (data.failures > 0) {
1151-
failures += data.failures;
1152-
console.log(data.output);
1153-
}
1154-
sendNextFile(files, child, callback, failures);
1155-
break;
1156-
case "error":
1157-
console.error(data.error);
1158-
failures++;
1159-
sendNextFile(files, child, callback, failures);
1160-
break;
1161-
}
1162-
});
1163-
sendNextFile(files, child, callback, failures);
1164-
}
1165-
11661117
desc("Runs tslint on the compiler sources. Optional arguments are: f[iles]=regex");
11671118
task("lint", ["build-rules"], () => {
11681119
if (fold.isTravis()) console.log(fold.start("lint"));
1169-
function lint(project, cb) {
1170-
const cmd = `node node_modules/tslint/bin/tslint --project ${project} --formatters-dir ./built/local/tslint/formatters --format autolinkableStylish`;
1120+
function lint(project, cb) {
1121+
const fix = process.env.fix || process.env.f;
1122+
const cmd = `node node_modules/tslint/bin/tslint --project ${project} --formatters-dir ./built/local/tslint/formatters --format autolinkableStylish${fix ? " --fix" : ""}`;
11711123
console.log("Linting: " + cmd);
11721124
jake.exec([cmd], cb, /** @type {jake.ExecOptions} */({ interactive: true, windowsVerbatimArguments: true }));
1173-
}
1174-
lint("scripts/tslint/tsconfig.json", () => lint("src/tsconfig-base.json", () => {
1125+
}
1126+
lint("scripts/tslint/tsconfig.json", () => lint("src/tsconfig-base.json", () => {
11751127
if (fold.isTravis()) console.log(fold.end("lint"));
11761128
complete();
1177-
}));
1129+
}));
11781130
});

0 commit comments

Comments
 (0)