@@ -71,13 +71,14 @@ var compilerSources = [
7171 "visitor.ts" ,
7272 "transformers/destructuring.ts" ,
7373 "transformers/ts.ts" ,
74- "transformers/module/es6 .ts" ,
74+ "transformers/module/es2015 .ts" ,
7575 "transformers/module/system.ts" ,
7676 "transformers/module/module.ts" ,
7777 "transformers/jsx.ts" ,
78- "transformers/es7.ts" ,
78+ "transformers/es2017.ts" ,
79+ "transformers/es2016.ts" ,
80+ "transformers/es2015.ts" ,
7981 "transformers/generators.ts" ,
80- "transformers/es6.ts" ,
8182 "transformer.ts" ,
8283 "sourcemap.ts" ,
8384 "comments.ts" ,
@@ -106,13 +107,14 @@ var servicesSources = [
106107 "visitor.ts" ,
107108 "transformers/destructuring.ts" ,
108109 "transformers/ts.ts" ,
109- "transformers/module/es6 .ts" ,
110+ "transformers/module/es2015 .ts" ,
110111 "transformers/module/system.ts" ,
111112 "transformers/module/module.ts" ,
112113 "transformers/jsx.ts" ,
113- "transformers/es7.ts" ,
114+ "transformers/es2017.ts" ,
115+ "transformers/es2016.ts" ,
116+ "transformers/es2015.ts" ,
114117 "transformers/generators.ts" ,
115- "transformers/es6.ts" ,
116118 "transformer.ts" ,
117119 "sourcemap.ts" ,
118120 "comments.ts" ,
@@ -176,7 +178,7 @@ var serverCoreSources = [
176178 "lsHost.ts" ,
177179 "project.ts" ,
178180 "editorServices.ts" ,
179- "protocol.d. ts" ,
181+ "protocol.ts" ,
180182 "session.ts" ,
181183 "server.ts"
182184] . map ( function ( f ) {
@@ -200,14 +202,13 @@ var typingsInstallerSources = [
200202var serverSources = serverCoreSources . concat ( servicesSources ) ;
201203
202204var languageServiceLibrarySources = [
203- "protocol.d. ts" ,
205+ "protocol.ts" ,
204206 "utilities.ts" ,
205207 "scriptVersionCache.ts" ,
206208 "scriptInfo.ts" ,
207209 "lsHost.ts" ,
208210 "project.ts" ,
209211 "editorServices.ts" ,
210- "protocol.d.ts" ,
211212 "session.ts" ,
212213
213214] . map ( function ( f ) {
@@ -261,15 +262,14 @@ var harnessSources = harnessCoreSources.concat([
261262] . map ( function ( f ) {
262263 return path . join ( unittestsDirectory , f ) ;
263264} ) ) . concat ( [
264- "protocol.d. ts" ,
265+ "protocol.ts" ,
265266 "utilities.ts" ,
266267 "scriptVersionCache.ts" ,
267268 "scriptInfo.ts" ,
268269 "lsHost.ts" ,
269270 "project.ts" ,
270271 "typingsCache.ts" ,
271272 "editorServices.ts" ,
272- "protocol.d.ts" ,
273273 "session.ts" ,
274274] . map ( function ( f ) {
275275 return path . join ( serverDirectory , f ) ;
@@ -520,6 +520,40 @@ compileFile(processDiagnosticMessagesJs,
520520 [ ] ,
521521 /*useBuiltCompiler*/ false ) ;
522522
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+
523557// The generated diagnostics map; built for the compiler and for the 'generate-diagnostics' task
524558file ( diagnosticInfoMapTs , [ processDiagnosticMessagesJs , diagnosticMessagesJson ] , function ( ) {
525559 var cmd = host + " " + processDiagnosticMessagesJs + " " + diagnosticMessagesJson ;
@@ -657,6 +691,8 @@ compileFile(
657691 inlineSourceMap : true
658692 } ) ;
659693
694+ file ( typescriptServicesDts , [ servicesFile ] ) ;
695+
660696var cancellationTokenFile = path . join ( builtLocalDirectory , "cancellationToken.js" ) ;
661697compileFile ( cancellationTokenFile , cancellationTokenSources , [ builtLocalDirectory ] . concat ( cancellationTokenSources ) , /*prefixes*/ [ copyright ] , /*useBuiltCompiler*/ true , { outDir : builtLocalDirectory , noOutFile : true } ) ;
662698
@@ -691,7 +727,7 @@ task("build-fold-end", [], function () {
691727
692728// Local target to build the compiler and services
693729desc ( "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" ] ) ;
695731
696732// Local target to build only tsc.js
697733desc ( "Builds only the compiler" ) ;
@@ -747,7 +783,7 @@ task("generate-spec", [specMd]);
747783// Makes a new LKG. This target does not build anything, but errors if not all the outputs are present in the built/local directory
748784desc ( "Makes a new LKG out of the built js files" ) ;
749785task ( "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 ) ;
751787 var missingFiles = expectedFiles . filter ( function ( f ) {
752788 return ! fs . existsSync ( f ) ;
753789 } ) ;
0 commit comments