@@ -71,13 +71,14 @@ var compilerSources = [
71
71
"visitor.ts" ,
72
72
"transformers/destructuring.ts" ,
73
73
"transformers/ts.ts" ,
74
- "transformers/module/es6 .ts" ,
74
+ "transformers/module/es2015 .ts" ,
75
75
"transformers/module/system.ts" ,
76
76
"transformers/module/module.ts" ,
77
77
"transformers/jsx.ts" ,
78
- "transformers/es7.ts" ,
78
+ "transformers/es2017.ts" ,
79
+ "transformers/es2016.ts" ,
80
+ "transformers/es2015.ts" ,
79
81
"transformers/generators.ts" ,
80
- "transformers/es6.ts" ,
81
82
"transformer.ts" ,
82
83
"sourcemap.ts" ,
83
84
"comments.ts" ,
@@ -106,13 +107,14 @@ var servicesSources = [
106
107
"visitor.ts" ,
107
108
"transformers/destructuring.ts" ,
108
109
"transformers/ts.ts" ,
109
- "transformers/module/es6 .ts" ,
110
+ "transformers/module/es2015 .ts" ,
110
111
"transformers/module/system.ts" ,
111
112
"transformers/module/module.ts" ,
112
113
"transformers/jsx.ts" ,
113
- "transformers/es7.ts" ,
114
+ "transformers/es2017.ts" ,
115
+ "transformers/es2016.ts" ,
116
+ "transformers/es2015.ts" ,
114
117
"transformers/generators.ts" ,
115
- "transformers/es6.ts" ,
116
118
"transformer.ts" ,
117
119
"sourcemap.ts" ,
118
120
"comments.ts" ,
@@ -176,7 +178,7 @@ var serverCoreSources = [
176
178
"lsHost.ts" ,
177
179
"project.ts" ,
178
180
"editorServices.ts" ,
179
- "protocol.d. ts" ,
181
+ "protocol.ts" ,
180
182
"session.ts" ,
181
183
"server.ts"
182
184
] . map ( function ( f ) {
@@ -200,14 +202,13 @@ var typingsInstallerSources = [
200
202
var serverSources = serverCoreSources . concat ( servicesSources ) ;
201
203
202
204
var languageServiceLibrarySources = [
203
- "protocol.d. ts" ,
205
+ "protocol.ts" ,
204
206
"utilities.ts" ,
205
207
"scriptVersionCache.ts" ,
206
208
"scriptInfo.ts" ,
207
209
"lsHost.ts" ,
208
210
"project.ts" ,
209
211
"editorServices.ts" ,
210
- "protocol.d.ts" ,
211
212
"session.ts" ,
212
213
213
214
] . map ( function ( f ) {
@@ -261,15 +262,14 @@ var harnessSources = harnessCoreSources.concat([
261
262
] . map ( function ( f ) {
262
263
return path . join ( unittestsDirectory , f ) ;
263
264
} ) ) . concat ( [
264
- "protocol.d. ts" ,
265
+ "protocol.ts" ,
265
266
"utilities.ts" ,
266
267
"scriptVersionCache.ts" ,
267
268
"scriptInfo.ts" ,
268
269
"lsHost.ts" ,
269
270
"project.ts" ,
270
271
"typingsCache.ts" ,
271
272
"editorServices.ts" ,
272
- "protocol.d.ts" ,
273
273
"session.ts" ,
274
274
] . map ( function ( f ) {
275
275
return path . join ( serverDirectory , f ) ;
@@ -520,6 +520,40 @@ compileFile(processDiagnosticMessagesJs,
520
520
[ ] ,
521
521
/*useBuiltCompiler*/ false ) ;
522
522
523
+ var buildProtocolTs = path . join ( scriptsDirectory , "buildProtocol.ts" ) ;
524
+ var buildProtocolJs = path . join ( scriptsDirectory , "buildProtocol.js" ) ;
525
+ var buildProtocolDts = path . join ( builtLocalDirectory , "protocol.d.ts" ) ;
526
+ var typescriptServicesDts = path . join ( builtLocalDirectory , "typescriptServices.d.ts" ) ;
527
+
528
+ file ( buildProtocolTs ) ;
529
+
530
+ compileFile ( buildProtocolJs ,
531
+ [ buildProtocolTs ] ,
532
+ [ buildProtocolTs ] ,
533
+ [ ] ,
534
+ /*useBuiltCompiler*/ false ,
535
+ { noOutFile : true } ) ;
536
+
537
+ file ( buildProtocolDts , [ buildProtocolTs , buildProtocolJs , typescriptServicesDts ] , function ( ) {
538
+
539
+ var protocolTs = path . join ( serverDirectory , "protocol.ts" ) ;
540
+
541
+ var cmd = host + " " + buildProtocolJs + " " + protocolTs + " " + typescriptServicesDts + " " + buildProtocolDts ;
542
+ console . log ( cmd ) ;
543
+ var ex = jake . createExec ( [ cmd ] ) ;
544
+ // Add listeners for output and error
545
+ ex . addListener ( "stdout" , function ( output ) {
546
+ process . stdout . write ( output ) ;
547
+ } ) ;
548
+ ex . addListener ( "stderr" , function ( error ) {
549
+ process . stderr . write ( error ) ;
550
+ } ) ;
551
+ ex . addListener ( "cmdEnd" , function ( ) {
552
+ complete ( ) ;
553
+ } ) ;
554
+ ex . run ( ) ;
555
+ } , { async : true } )
556
+
523
557
// The generated diagnostics map; built for the compiler and for the 'generate-diagnostics' task
524
558
file ( diagnosticInfoMapTs , [ processDiagnosticMessagesJs , diagnosticMessagesJson ] , function ( ) {
525
559
var cmd = host + " " + processDiagnosticMessagesJs + " " + diagnosticMessagesJson ;
@@ -657,6 +691,8 @@ compileFile(
657
691
inlineSourceMap : true
658
692
} ) ;
659
693
694
+ file ( typescriptServicesDts , [ servicesFile ] ) ;
695
+
660
696
var cancellationTokenFile = path . join ( builtLocalDirectory , "cancellationToken.js" ) ;
661
697
compileFile ( cancellationTokenFile , cancellationTokenSources , [ builtLocalDirectory ] . concat ( cancellationTokenSources ) , /*prefixes*/ [ copyright ] , /*useBuiltCompiler*/ true , { outDir : builtLocalDirectory , noOutFile : true } ) ;
662
698
@@ -691,7 +727,7 @@ task("build-fold-end", [], function () {
691
727
692
728
// Local target to build the compiler and services
693
729
desc ( "Builds the full compiler and services" ) ;
694
- task ( "local" , [ "build-fold-start" , "generate-diagnostics" , "lib" , tscFile , servicesFile , nodeDefinitionsFile , serverFile , builtGeneratedDiagnosticMessagesJSON , "lssl" , "build-fold-end" ] ) ;
730
+ task ( "local" , [ "build-fold-start" , "generate-diagnostics" , "lib" , tscFile , servicesFile , nodeDefinitionsFile , serverFile , buildProtocolDts , builtGeneratedDiagnosticMessagesJSON , "lssl" , "build-fold-end" ] ) ;
695
731
696
732
// Local target to build only tsc.js
697
733
desc ( "Builds only the compiler" ) ;
@@ -747,7 +783,7 @@ task("generate-spec", [specMd]);
747
783
// Makes a new LKG. This target does not build anything, but errors if not all the outputs are present in the built/local directory
748
784
desc ( "Makes a new LKG out of the built js files" ) ;
749
785
task ( "LKG" , [ "clean" , "release" , "local" ] . concat ( libraryTargets ) , function ( ) {
750
- var expectedFiles = [ tscFile , servicesFile , serverFile , nodePackageFile , nodeDefinitionsFile , standaloneDefinitionsFile , tsserverLibraryFile , tsserverLibraryDefinitionFile , cancellationTokenFile , typingsInstallerFile ] . concat ( libraryTargets ) ;
786
+ var expectedFiles = [ tscFile , servicesFile , serverFile , nodePackageFile , nodeDefinitionsFile , standaloneDefinitionsFile , tsserverLibraryFile , tsserverLibraryDefinitionFile , cancellationTokenFile , typingsInstallerFile , buildProtocolDts ] . concat ( libraryTargets ) ;
751
787
var missingFiles = expectedFiles . filter ( function ( f ) {
752
788
return ! fs . existsSync ( f ) ;
753
789
} ) ;
0 commit comments