@@ -138,6 +138,7 @@ var harnessSources = harnessCoreSources.concat([
138138 "services/documentRegistry.ts" ,
139139 "services/preProcessFile.ts" ,
140140 "services/patternMatcher.ts" ,
141+ "session.ts" ,
141142 "versionCache.ts" ,
142143 "convertToBase64.ts" ,
143144 "transpile.ts"
@@ -313,7 +314,7 @@ var processDiagnosticMessagesTs = path.join(scriptsDirectory, "processDiagnostic
313314var diagnosticMessagesJson = path . join ( compilerDirectory , "diagnosticMessages.json" ) ;
314315var diagnosticInfoMapTs = path . join ( compilerDirectory , "diagnosticInformationMap.generated.ts" ) ;
315316
316- file ( processDiagnosticMessagesTs )
317+ file ( processDiagnosticMessagesTs ) ;
317318
318319// processDiagnosticMessages script
319320compileFile ( processDiagnosticMessagesJs ,
@@ -338,11 +339,49 @@ file(diagnosticInfoMapTs, [processDiagnosticMessagesJs, diagnosticMessagesJson],
338339 complete ( ) ;
339340 } ) ;
340341 ex . run ( ) ;
341- } , { async : true } )
342+ } , { async : true } ) ;
342343
343344desc ( "Generates a diagnostic file in TypeScript based on an input JSON file" ) ;
344- task ( "generate-diagnostics" , [ diagnosticInfoMapTs ] )
345+ task ( "generate-diagnostics" , [ diagnosticInfoMapTs ] ) ;
346+
347+
348+ // Publish nightly
349+ var configureNightlyJs = path . join ( scriptsDirectory , "configureNightly.js" ) ;
350+ var configureNightlyTs = path . join ( scriptsDirectory , "configureNightly.ts" ) ;
351+ var packageJson = "package.json" ;
352+ var programTs = path . join ( compilerDirectory , "program.ts" ) ;
345353
354+ file ( configureNightlyTs ) ;
355+
356+ compileFile ( /*outfile*/ configureNightlyJs ,
357+ /*sources*/ [ configureNightlyTs ] ,
358+ /*prereqs*/ [ configureNightlyTs ] ,
359+ /*prefixes*/ [ ] ,
360+ /*useBuiltCompiler*/ false ,
361+ /*noOutFile*/ false ,
362+ /*generateDeclarations*/ false ,
363+ /*outDir*/ undefined ,
364+ /*preserveConstEnums*/ undefined ,
365+ /*keepComments*/ false ,
366+ /*noResolve*/ false ,
367+ /*stripInternal*/ false ) ;
368+
369+ task ( "setDebugMode" , function ( ) {
370+ useDebugMode = true ;
371+ } ) ;
372+
373+ task ( "configure-nightly" , [ configureNightlyJs ] , function ( ) {
374+ var cmd = "node " + configureNightlyJs + " " + packageJson + " " + programTs ;
375+ console . log ( cmd ) ;
376+ exec ( cmd ) ;
377+ } , { async : true } ) ;
378+
379+ desc ( "Configure, build, test, and publish the nightly release." ) ;
380+ task ( "publish-nightly" , [ "configure-nightly" , "LKG" , "clean" , "setDebugMode" , "runtests" ] , function ( ) {
381+ var cmd = "npm publish --tag next" ;
382+ console . log ( cmd ) ;
383+ exec ( cmd ) ;
384+ } ) ;
346385
347386// Local target to build the compiler and services
348387var tscFile = path . join ( builtLocalDirectory , compilerFilename ) ;
@@ -440,11 +479,11 @@ file(specMd, [word2mdJs, specWord], function () {
440479 child_process . exec ( cmd , function ( ) {
441480 complete ( ) ;
442481 } ) ;
443- } , { async : true } )
482+ } , { async : true } ) ;
444483
445484
446485desc ( "Generates a Markdown version of the Language Specification" ) ;
447- task ( "generate-spec" , [ specMd ] )
486+ task ( "generate-spec" , [ specMd ] ) ;
448487
449488
450489// Makes a new LKG. This target does not build anything, but errors if not all the outputs are present in the built/local directory
@@ -576,7 +615,7 @@ task("runtests", ["tests", builtLocalDirectory], function() {
576615 exec ( cmd , deleteTemporaryProjectOutput ) ;
577616} , { async : true } ) ;
578617
579- desc ( "Generates code coverage data via instanbul" )
618+ desc ( "Generates code coverage data via instanbul" ) ;
580619task ( "generate-code-coverage" , [ "tests" , builtLocalDirectory ] , function ( ) {
581620 var cmd = 'istanbul cover node_modules/mocha/bin/_mocha -- -R min -t ' + testTimeout + ' ' + run ;
582621 console . log ( cmd ) ;
@@ -619,7 +658,7 @@ task("runtests-browser", ["tests", "browserify", builtLocalDirectory], function(
619658function getDiffTool ( ) {
620659 var program = process . env [ 'DIFF' ]
621660 if ( ! program ) {
622- fail ( "Add the 'DIFF' environment variable to the path of the program you want to use." )
661+ fail ( "Add the 'DIFF' environment variable to the path of the program you want to use." ) ;
623662 }
624663 return program ;
625664}
@@ -628,14 +667,14 @@ function getDiffTool() {
628667desc ( "Diffs the compiler baselines using the diff tool specified by the 'DIFF' environment variable" ) ;
629668task ( 'diff' , function ( ) {
630669 var cmd = '"' + getDiffTool ( ) + '" ' + refBaseline + ' ' + localBaseline ;
631- console . log ( cmd )
670+ console . log ( cmd ) ;
632671 exec ( cmd ) ;
633672} , { async : true } ) ;
634673
635674desc ( "Diffs the RWC baselines using the diff tool specified by the 'DIFF' environment variable" ) ;
636675task ( 'diff-rwc' , function ( ) {
637676 var cmd = '"' + getDiffTool ( ) + '" ' + refRwcBaseline + ' ' + localRwcBaseline ;
638- console . log ( cmd )
677+ console . log ( cmd ) ;
639678 exec ( cmd ) ;
640679} , { async : true } ) ;
641680
0 commit comments