@@ -131,7 +131,12 @@ const localize = task({
131131 dependencies : [ generateDiagnostics ] ,
132132 run : async ( ) => {
133133 if ( needsUpdate ( diagnosticMessagesGeneratedJson , generatedLCGFile ) ) {
134- await exec ( process . execPath , [ "scripts/generateLocalizedDiagnosticMessages.mjs" , "src/loc/lcl" , "built/local" , diagnosticMessagesGeneratedJson ] , { ignoreExitCode : true } ) ;
134+ await exec ( process . execPath , [
135+ "scripts/generateLocalizedDiagnosticMessages.mjs" ,
136+ "src/loc/lcl" ,
137+ "built/local" ,
138+ diagnosticMessagesGeneratedJson ,
139+ ] , { ignoreExitCode : true } ) ;
135140 }
136141 } ,
137142} ) ;
@@ -312,7 +317,10 @@ function entrypointBuildTask(options) {
312317 const outDir = path . dirname ( options . output ) ;
313318 await fs . promises . mkdir ( outDir , { recursive : true } ) ;
314319 const moduleSpecifier = path . relative ( outDir , options . builtEntrypoint ) ;
315- await fs . promises . writeFile ( options . output , `module.exports = require("./${ moduleSpecifier . replace ( / [ \\ / ] / g, "/" ) } ")` ) ;
320+ await fs . promises . writeFile (
321+ options . output ,
322+ `module.exports = require("./${ moduleSpecifier . replace ( / [ \\ / ] / g, "/" ) } ")` ,
323+ ) ;
316324 } ,
317325 } ) ;
318326
@@ -336,13 +344,19 @@ function entrypointBuildTask(options) {
336344 const watch = task ( {
337345 name : `watch-${ options . name } ` ,
338346 hiddenFromTaskList : true , // This is best effort.
339- dependencies : ( options . buildDeps ?? [ ] ) . concat ( options . mainDeps ?? [ ] ) . concat ( cmdLineOptions . bundle ? [ ] : [ shim ] ) ,
347+ dependencies : ( options . buildDeps ?? [ ] ) . concat ( options . mainDeps ?? [ ] ) . concat (
348+ cmdLineOptions . bundle ? [ ] : [ shim ] ,
349+ ) ,
340350 run : ( ) => {
341351 // These watch functions return promises that resolve once watch mode has started,
342352 // allowing them to operate as regular tasks, while creating unresolved promises
343353 // in the background that keep the process running after all tasks have exited.
344354 if ( ! printedWatchWarning ) {
345- console . error ( chalk . yellowBright ( "Warning: watch mode is incomplete and may not work as expected. Use at your own risk." ) ) ;
355+ console . error (
356+ chalk . yellowBright (
357+ "Warning: watch mode is incomplete and may not work as expected. Use at your own risk." ,
358+ ) ,
359+ ) ;
346360 printedWatchWarning = true ;
347361 }
348362
@@ -386,7 +400,12 @@ export const dtsServices = task({
386400 description : "Bundles typescript.d.ts" ,
387401 dependencies : [ buildServices ] ,
388402 run : async ( ) => {
389- if ( needsUpdate ( "./built/local/typescript/tsconfig.tsbuildinfo" , [ "./built/local/typescript.d.ts" , "./built/local/typescript.internal.d.ts" ] ) ) {
403+ if (
404+ needsUpdate ( "./built/local/typescript/tsconfig.tsbuildinfo" , [
405+ "./built/local/typescript.d.ts" ,
406+ "./built/local/typescript.internal.d.ts" ,
407+ ] )
408+ ) {
390409 await runDtsBundler ( "./built/local/typescript/typescript.d.ts" , "./built/local/typescript.d.ts" ) ;
391410 }
392411 } ,
@@ -460,7 +479,10 @@ export const dtsLssl = task({
460479 dependencies : [ dtsServices ] ,
461480 run : async ( ) => {
462481 await fs . promises . writeFile ( "./built/local/tsserverlibrary.d.ts" , await fileContentsWithCopyright ( lsslDts ) ) ;
463- await fs . promises . writeFile ( "./built/local/tsserverlibrary.internal.d.ts" , await fileContentsWithCopyright ( lsslDtsInternal ) ) ;
482+ await fs . promises . writeFile (
483+ "./built/local/tsserverlibrary.internal.d.ts" ,
484+ await fileContentsWithCopyright ( lsslDtsInternal ) ,
485+ ) ;
464486 } ,
465487} ) ;
466488
@@ -595,7 +617,13 @@ export const watchOtherOutputs = task({
595617 name : "watch-other-outputs" ,
596618 description : "Builds miscelaneous scripts and documents distributed with the LKG" ,
597619 hiddenFromTaskList : true ,
598- dependencies : [ watchCancellationToken , watchTypingsInstaller , watchWatchGuard , generateTypesMap , copyBuiltLocalDiagnosticMessages ] ,
620+ dependencies : [
621+ watchCancellationToken ,
622+ watchTypingsInstaller ,
623+ watchWatchGuard ,
624+ generateTypesMap ,
625+ copyBuiltLocalDiagnosticMessages ,
626+ ] ,
599627} ) ;
600628
601629export const local = task ( {
@@ -673,7 +701,10 @@ export const runTestsAndWatch = task({
673701 if ( ! token . signaled ) {
674702 running = true ;
675703 try {
676- await runConsoleTests ( testRunner , "mocha-fivemat-progress-reporter" , /*runInParallel*/ false , { token, watching : true } ) ;
704+ await runConsoleTests ( testRunner , "mocha-fivemat-progress-reporter" , /*runInParallel*/ false , {
705+ token,
706+ watching : true ,
707+ } ) ;
677708 }
678709 catch {
679710 // ignore
@@ -828,7 +859,10 @@ export const updateSublime = task({
828859 dependencies : [ tsserver ] ,
829860 run : async ( ) => {
830861 for ( const file of [ "built/local/tsserver.js" , "built/local/tsserver.js.map" ] ) {
831- await fs . promises . copyFile ( file , path . resolve ( "../TypeScript-Sublime-Plugin/tsserver/" , path . basename ( file ) ) ) ;
862+ await fs . promises . copyFile (
863+ file ,
864+ path . resolve ( "../TypeScript-Sublime-Plugin/tsserver/" , path . basename ( file ) ) ,
865+ ) ;
832866 }
833867 } ,
834868} ) ;
@@ -857,7 +891,10 @@ export const produceLKG = task({
857891 . concat ( localizationTargets )
858892 . filter ( f => ! fs . existsSync ( f ) ) ;
859893 if ( missingFiles . length > 0 ) {
860- throw new Error ( "Cannot replace the LKG unless all built targets are present in directory 'built/local/'. The following files are missing:\n" + missingFiles . join ( "\n" ) ) ;
894+ throw new Error (
895+ "Cannot replace the LKG unless all built targets are present in directory 'built/local/'. The following files are missing:\n"
896+ + missingFiles . join ( "\n" ) ,
897+ ) ;
861898 }
862899
863900 await exec ( process . execPath , [ "scripts/produceLKG.mjs" ] ) ;
@@ -885,19 +922,37 @@ export const clean = task({
885922export const configureNightly = task ( {
886923 name : "configure-nightly" ,
887924 description : "Runs scripts/configurePrerelease.mjs to prepare a build for nightly publishing" ,
888- run : ( ) => exec ( process . execPath , [ "scripts/configurePrerelease.mjs" , "dev" , "package.json" , "src/compiler/corePublic.ts" ] ) ,
925+ run : ( ) =>
926+ exec ( process . execPath , [
927+ "scripts/configurePrerelease.mjs" ,
928+ "dev" ,
929+ "package.json" ,
930+ "src/compiler/corePublic.ts" ,
931+ ] ) ,
889932} ) ;
890933
891934export const configureInsiders = task ( {
892935 name : "configure-insiders" ,
893936 description : "Runs scripts/configurePrerelease.mjs to prepare a build for insiders publishing" ,
894- run : ( ) => exec ( process . execPath , [ "scripts/configurePrerelease.mjs" , "insiders" , "package.json" , "src/compiler/corePublic.ts" ] ) ,
937+ run : ( ) =>
938+ exec ( process . execPath , [
939+ "scripts/configurePrerelease.mjs" ,
940+ "insiders" ,
941+ "package.json" ,
942+ "src/compiler/corePublic.ts" ,
943+ ] ) ,
895944} ) ;
896945
897946export const configureExperimental = task ( {
898947 name : "configure-experimental" ,
899948 description : "Runs scripts/configurePrerelease.mjs to prepare a build for experimental publishing" ,
900- run : ( ) => exec ( process . execPath , [ "scripts/configurePrerelease.mjs" , "experimental" , "package.json" , "src/compiler/corePublic.ts" ] ) ,
949+ run : ( ) =>
950+ exec ( process . execPath , [
951+ "scripts/configurePrerelease.mjs" ,
952+ "experimental" ,
953+ "package.json" ,
954+ "src/compiler/corePublic.ts" ,
955+ ] ) ,
901956} ) ;
902957
903958export const help = task ( {
0 commit comments