Skip to content

Commit 589db58

Browse files
author
Andy Hanson
committed
Merge branch 'master' into include_ordering
2 parents b220831 + 5b075ff commit 589db58

File tree

1,619 files changed

+145141
-120638
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,619 files changed

+145141
-120638
lines changed

.mailmap

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,4 +172,45 @@ zhongsp <[email protected]> # Patrick Zhong
172172
T18970237136 <[email protected]> # @T18970237136
173173
174174
bootstraponline <[email protected]> # @bootstraponline
175-
yortus <[email protected]> # @yortus
175+
yortus <[email protected]> # @yortus
176+
András Parditka <[email protected]>
177+
Anton Khlynovskiy <[email protected]>
178+
Charly POLY <[email protected]>
179+
Cotton Hou <[email protected]>
180+
Ethan Resnick <[email protected]>
181+
Marius Schulz <[email protected]>
182+
Mattias Buelens <[email protected]>
183+
Myles Megyesi <[email protected]>
184+
Tim Lancina <[email protected]>
185+
Aaron Holmes <[email protected]> Aaron Holmes <[email protected]>
186+
Akshar Patel <[email protected]>
187+
Ali Sabzevari <[email protected]>
188+
Aliaksandr Radzivanovich <[email protected]>
189+
BuildTools <[email protected]> # Franklin Tse
190+
ChogyDan <[email protected]> # Daniel Hollocher
191+
Daniel Rosenwasser <[email protected]> Daniel Rosenwasser <[email protected]>
192+
David Kmenta <[email protected]>
193+
E020873 <[email protected]> # Nicolas Henry
194+
Elisée Maurer <[email protected]>
195+
Emilio García-Pumarino <[email protected]> dashaus <[email protected]>
196+
Guilherme Oenning <[email protected]>
197+
Herrington Darkholme <[email protected]>
198+
Ivo Gabe de Wolff <[email protected]>
199+
Joey Wilson <[email protected]>
200+
Jonathon Smith <[email protected]>
201+
Juan Luis Boya García <[email protected]>
202+
Kagami Sascha Rosylight <[email protected]>
203+
Lucien Greathouse <[email protected]>
204+
Martin Vseticka <[email protected]>
205+
Mattias Buelens <[email protected]>
206+
Michael Bromley <[email protected]>
207+
Paul Jolly <[email protected]>
208+
Perry Jiang <[email protected]>
209+
Peter Burns <[email protected]>
210+
Robert Coie <[email protected]>
211+
Thomas Loubiou <[email protected]>
212+
Tim Perry <[email protected]>
213+
Vidar Tonaas Fauske <[email protected]>
214+
Viktor Zozulyak <[email protected]>
215+
rix <[email protected]> # Richard Sentino
216+
rohitverma007 <[email protected]> # Rohit Verma

.npmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
built
22
doc
3+
Gulpfile.ts
34
internal
45
issue_template.md
6+
jenkins.sh
57
lib/README.md
8+
netci.groovy
69
pull_request_template.md
710
scripts
811
src

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ language: node_js
22

33
node_js:
44
- 'stable'
5+
- '6'
56
- '4'
67

78
sudo: false

AUTHORS.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
TypeScript is authored by:
2+
* Aaron Holmes
23
* Abubaker Bashir
34
* Adam Freidin
45
* Adi Dahiya
56
* Ahmad Farid
7+
* Akshar Patel
68
* Alex Eagle
79
* Alexander Kuvaev
810
* Alexander Rusakov
11+
* Ali Sabzevari
12+
* Aliaksandr Radzivanovich
913
* Anatoly Ressin
1014
* Anders Hejlsberg
1115
* Andrej Baran
1216
* Andrew Z Allen
17+
* András Parditka
1318
* Andy Hanson
1419
* Anil Anar
20+
* Anton Khlynovskiy
1521
* Anton Tolmachev
1622
* Arnav Singh
1723
* Arthur Ozga
@@ -27,16 +33,20 @@ TypeScript is authored by:
2733
* Brett Mayen
2834
* Bryan Forbes
2935
* Caitlin Potter
36+
* Charly POLY
3037
* Chris Bubernak
3138
* Christophe Vidal
3239
* Chuck Jazdzewski
3340
* Colby Russell
3441
* Colin Snover
42+
* Cotton Hou
3543
* Cyrus Najmabadi
3644
* Dafrok Zhang
3745
* Dan Corder
3846
* Dan Quirk
47+
* Daniel Hollocher
3948
* Daniel Rosenwasser
49+
* David Kmenta
4050
* David Li
4151
* David Souther
4252
* Denis Nedelyaev
@@ -45,21 +55,26 @@ TypeScript is authored by:
4555
* Dirk Holtwick
4656
* Dom Chen
4757
* Doug Ilijev
58+
* Elisée Maurer
59+
* Emilio García-Pumarino
4860
* Eric Tsang
4961
* Erik Edrosa
62+
* Ethan Resnick
5063
* Ethan Rubio
5164
* Evan Martin
5265
* Evan Sebastian
5366
* Eyas Sharaiha
5467
* Fabian Cook
5568
* @falsandtru
5669
* Frank Wallis
70+
* Franklin Tse
5771
* František Žiacik
5872
* Gabe Moothart
5973
* Gabriel Isenberg
6074
* Gilad Peleg
6175
* Godfrey Chan
6276
* Graeme Wicksted
77+
* Guilherme Oenning
6378
* Guillaume Salles
6479
* Guy Bedford
6580
* Harald Niesche
@@ -78,12 +93,14 @@ TypeScript is authored by:
7893
* Jeffrey Morlan
7994
* Jesse Schalken
8095
* Jiri Tobisek
96+
* Joey Wilson
8197
* Johannes Rieken
8298
* John Vilk
8399
* Jonathan Bond-Caron
84100
* Jonathan Park
85101
* Jonathan Toland
86102
* Jonathan Turner
103+
* Jonathon Smith
87104
* Josh Abernathy
88105
* Josh Kalderimis
89106
* Josh Soref
@@ -102,15 +119,21 @@ TypeScript is authored by:
102119
* Lucien Greathouse
103120
* Lukas Elmer
104121
* Marin Marinov
122+
* Marius Schulz
105123
* Martin Vseticka
106124
* Masahiro Wakame
107125
* Matt McCutchen
126+
* Mattias Buelens
127+
* Mattias Buelens
108128
* Max Deepfield
109129
* Micah Zoltu
110130
* Michael
131+
* Michael Bromley
111132
* Mohamed Hegazy
133+
* Myles Megyesi
112134
* Nathan Shively-Sanders
113135
* Nathan Yee
136+
* Nicolas Henry
114137
* Nima Zahedi
115138
* Noah Chen
116139
* Noj Vek
@@ -119,9 +142,12 @@ TypeScript is authored by:
119142
* Omer Sheikh
120143
* Oskar Segersva¨rd
121144
* Patrick Zhong
145+
* Paul Jolly
122146
* Paul van Brenk
123147
* @pcbro
124148
* Pedro Maltez
149+
* Perry Jiang
150+
* Peter Burns
125151
* Philip Bulley
126152
* Piero Cangianiello
127153
* @piloopin
@@ -130,6 +156,9 @@ TypeScript is authored by:
130156
* Punya Biswal
131157
* Rado Kirov
132158
* Richard Knoll
159+
* Richard Sentino
160+
* Robert Coie
161+
* Rohit Verma
133162
* Ron Buckton
134163
* Rostislav Galimsky
135164
* Rowan Wyborn
@@ -152,7 +181,9 @@ TypeScript is authored by:
152181
* @T18970237136
153182
* Tarik Ozket
154183
* Tetsuharu Ohzeki
184+
* Thomas Loubiou
155185
* Tien Hoanhtien
186+
* Tim Lancina
156187
* Tim Perry
157188
* Tim Viiding-Spader
158189
* Tingan Ho
@@ -161,6 +192,8 @@ TypeScript is authored by:
161192
* Tomas Grubliauskas
162193
* Torben Fitschen
163194
* TruongSinh Tran-Nguyen
195+
* Vidar Tonaas Fauske
196+
* Viktor Zozulyak
164197
* Vilic Vane
165198
* Vladimir Matveev
166199
* Wesley Wigham

Gulpfile.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,10 @@ gulp.task(tsserverLibraryFile, false, [servicesFile], (done) => {
471471
js.pipe(prependCopyright())
472472
.pipe(sourcemaps.write("."))
473473
.pipe(gulp.dest(".")),
474-
dts.pipe(prependCopyright())
474+
dts.pipe(prependCopyright(/*outputCopyright*/true))
475+
.pipe(insert.transform((content) => {
476+
return content + "\r\nexport = ts;\r\nexport as namespace ts;";
477+
}))
475478
.pipe(gulp.dest("."))
476479
]);
477480
});

Jakefile.js

Lines changed: 48 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ var servicesSources = [
151151
"signatureHelp.ts",
152152
"symbolDisplay.ts",
153153
"transpile.ts",
154+
// Formatting
154155
"formatting/formatting.ts",
155156
"formatting/formattingContext.ts",
156157
"formatting/formattingRequestKind.ts",
@@ -166,36 +167,53 @@ var servicesSources = [
166167
"formatting/rulesMap.ts",
167168
"formatting/rulesProvider.ts",
168169
"formatting/smartIndenter.ts",
169-
"formatting/tokenRange.ts"
170+
"formatting/tokenRange.ts",
171+
// CodeFixes
172+
"codeFixProvider.ts",
173+
"codefixes/fixes.ts",
174+
"codefixes/fixExtendsInterfaceBecomesImplements.ts",
175+
"codefixes/fixClassIncorrectlyImplementsInterface.ts",
176+
"codefixes/fixClassDoesntImplementInheritedAbstractMember.ts",
177+
"codefixes/fixClassSuperMustPrecedeThisAccess.ts",
178+
"codefixes/fixConstructorForDerivedNeedSuperCall.ts",
179+
"codefixes/helpers.ts",
180+
"codefixes/importFixes.ts",
181+
"codefixes/unusedIdentifierFixes.ts"
170182
].map(function (f) {
171183
return path.join(servicesDirectory, f);
172184
}));
173185

174-
var serverCoreSources = [
175-
"types.d.ts",
176-
"shared.ts",
177-
"utilities.ts",
178-
"scriptVersionCache.ts",
179-
"typingsCache.ts",
180-
"scriptInfo.ts",
186+
var baseServerCoreSources = [
187+
"builder.ts",
188+
"editorServices.ts",
181189
"lsHost.ts",
182190
"project.ts",
183-
"editorServices.ts",
184191
"protocol.ts",
192+
"scriptInfo.ts",
193+
"scriptVersionCache.ts",
185194
"session.ts",
186-
"server.ts"
195+
"shared.ts",
196+
"types.ts",
197+
"typingsCache.ts",
198+
"utilities.ts",
187199
].map(function (f) {
188200
return path.join(serverDirectory, f);
189201
});
190202

203+
var serverCoreSources = [
204+
"server.ts"
205+
].map(function (f) {
206+
return path.join(serverDirectory, f);
207+
}).concat(baseServerCoreSources);
208+
191209
var cancellationTokenSources = [
192210
"cancellationToken.ts"
193211
].map(function (f) {
194212
return path.join(cancellationTokenDirectory, f);
195213
});
196214

197215
var typingsInstallerSources = [
198-
"../types.d.ts",
216+
"../types.ts",
199217
"../shared.ts",
200218
"typingsInstaller.ts",
201219
"nodeTypingsInstaller.ts"
@@ -204,20 +222,7 @@ var typingsInstallerSources = [
204222
});
205223

206224
var serverSources = serverCoreSources.concat(servicesSources);
207-
208-
var languageServiceLibrarySources = [
209-
"protocol.ts",
210-
"utilities.ts",
211-
"scriptVersionCache.ts",
212-
"scriptInfo.ts",
213-
"lsHost.ts",
214-
"project.ts",
215-
"editorServices.ts",
216-
"session.ts",
217-
218-
].map(function (f) {
219-
return path.join(serverDirectory, f);
220-
}).concat(servicesSources);
225+
var languageServiceLibrarySources = baseServerCoreSources.concat(servicesSources);
221226

222227
var harnessCoreSources = [
223228
"harness.ts",
@@ -250,6 +255,7 @@ var harnessSources = harnessCoreSources.concat([
250255
"convertToBase64.ts",
251256
"transpile.ts",
252257
"reuseProgramStructure.ts",
258+
"textStorage.ts",
253259
"cachingInServerLSHost.ts",
254260
"moduleResolution.ts",
255261
"tsconfigParsing.ts",
@@ -352,19 +358,16 @@ function prependFile(prefixFile, destinationFile) {
352358
// concatenate a list of sourceFiles to a destinationFile
353359
function concatenateFiles(destinationFile, sourceFiles) {
354360
var temp = "temptemp";
355-
// Copy the first file to temp
356-
if (!fs.existsSync(sourceFiles[0])) {
357-
fail(sourceFiles[0] + " does not exist!");
358-
}
359-
jake.cpR(sourceFiles[0], temp, { silent: true });
360361
// append all files in sequence
361-
for (var i = 1; i < sourceFiles.length; i++) {
362+
var text = "";
363+
for (var i = 0; i < sourceFiles.length; i++) {
362364
if (!fs.existsSync(sourceFiles[i])) {
363365
fail(sourceFiles[i] + " does not exist!");
364366
}
365-
fs.appendFileSync(temp, "\n\n");
366-
fs.appendFileSync(temp, fs.readFileSync(sourceFiles[i]));
367+
if (i > 0) { text += "\n\n"; }
368+
text += fs.readFileSync(sourceFiles[i]).toString().replace(/\r?\n/g, "\n");
367369
}
370+
fs.writeFileSync(temp, text);
368371
// Move the file to the final destination
369372
fs.renameSync(temp, destinationFile);
370373
}
@@ -717,7 +720,18 @@ compileFile(
717720
[builtLocalDirectory, copyright, builtLocalCompiler].concat(languageServiceLibrarySources).concat(libraryTargets),
718721
/*prefixes*/[copyright],
719722
/*useBuiltCompiler*/ true,
720-
{ noOutFile: false, generateDeclarations: true });
723+
{ noOutFile: false, generateDeclarations: true, stripInternal: true },
724+
/*callback*/ function () {
725+
prependFile(copyright, tsserverLibraryDefinitionFile);
726+
727+
// Appending exports at the end of the server library
728+
var tsserverLibraryDefinitionFileContents =
729+
fs.readFileSync(tsserverLibraryDefinitionFile).toString() +
730+
"\r\nexport = ts;" +
731+
"\r\nexport as namespace ts;";
732+
733+
fs.writeFileSync(tsserverLibraryDefinitionFile, tsserverLibraryDefinitionFileContents);
734+
});
721735

722736
// Local target to build the language service server library
723737
desc("Builds language service server library");
@@ -1181,7 +1195,6 @@ task("update-sublime", ["local", serverFile], function () {
11811195
var tslintRuleDir = "scripts/tslint";
11821196
var tslintRules = [
11831197
"nextLineRule",
1184-
"preferConstRule",
11851198
"booleanTriviaRule",
11861199
"typeOperatorSpacingRule",
11871200
"noInOperatorRule",

lib/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text eol=lf

0 commit comments

Comments
 (0)