@@ -29,7 +29,7 @@ const needsUpdate = require("./scripts/build/needsUpdate");
2929const getDiffTool = require ( "./scripts/build/getDiffTool" ) ;
3030const baselineAccept = require ( "./scripts/build/baselineAccept" ) ;
3131const cmdLineOptions = require ( "./scripts/build/options" ) ;
32- const { execAsync } = require ( "./scripts/build/exec" ) ;
32+ const exec = require ( "./scripts/build/exec" ) ;
3333const { runConsoleTests, cleanTestDirs, writeTestConfigFile, refBaseline, localBaseline, refRwcBaseline, localRwcBaseline } = require ( "./scripts/build/tests" ) ;
3434
3535Error . stackTraceLimit = 1000 ;
@@ -67,14 +67,14 @@ gulp.task(
6767 "configure-nightly" ,
6868 "Runs scripts/configurePrerelease.ts to prepare a build for nightly publishing" ,
6969 [ configurePrereleaseJs ] ,
70- ( ) => execAsync ( host , [ configurePrereleaseJs , "dev" , "package.json" , "src/compiler/core.ts" ] ) ) ;
70+ ( ) => exec ( host , [ configurePrereleaseJs , "dev" , "package.json" , "src/compiler/core.ts" ] ) ) ;
7171
7272gulp . task (
7373 "publish-nightly" ,
7474 "Runs `npm publish --tag next` to create a new nightly build on npm" ,
7575 [ "LKG" ] ,
7676 ( ) => runSequence ( "clean" , "useDebugMode" , "runtests-parallel" ,
77- ( ) => execAsync ( "npm" , [ "publish" , "--tag" , "next" ] ) ) ) ;
77+ ( ) => exec ( "npm" , [ "publish" , "--tag" , "next" ] ) ) ) ;
7878
7979const importDefinitelyTypedTestsProject = "scripts/importDefinitelyTypedTests/tsconfig.json" ;
8080const importDefinitelyTypedTestsJs = "scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.js" ;
@@ -85,7 +85,7 @@ gulp.task(
8585 "importDefinitelyTypedTests" ,
8686 "Runs scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.ts to copy DT's tests to the TS-internal RWC tests" ,
8787 [ importDefinitelyTypedTestsJs ] ,
88- ( ) => execAsync ( host , [ importDefinitelyTypedTestsJs , "./" , "../DefinitelyTyped" ] ) ) ;
88+ ( ) => exec ( host , [ importDefinitelyTypedTestsJs , "./" , "../DefinitelyTyped" ] ) ) ;
8989
9090gulp . task (
9191 "lib" ,
@@ -98,7 +98,7 @@ const diagnosticMessagesJson = "src/compiler/diagnosticMessages.json";
9898const diagnosticMessagesGeneratedJson = "src/compiler/diagnosticMessages.generated.json" ;
9999gulp . task ( diagnosticInformationMapTs , /*help*/ false , [ processDiagnosticMessagesJs ] , ( ) => {
100100 if ( needsUpdate ( diagnosticMessagesJson , [ diagnosticMessagesGeneratedJson , diagnosticInformationMapTs ] ) ) {
101- return execAsync ( host , [ processDiagnosticMessagesJs , diagnosticMessagesJson ] ) ;
101+ return exec ( host , [ processDiagnosticMessagesJs , diagnosticMessagesJson ] ) ;
102102 }
103103} ) ;
104104gulp . task ( "clean:" + diagnosticInformationMapTs , /*help*/ false , ( ) => del ( [ diagnosticInformationMapTs , diagnosticMessagesGeneratedJson ] ) ) ;
@@ -134,7 +134,7 @@ const localizationTargets = ["cs", "de", "es", "fr", "it", "ja", "ko", "pl", "pt
134134
135135gulp . task ( generatedLCGFile , /*help*/ false , [ generateLocalizedDiagnosticMessagesJs , diagnosticInformationMapTs ] , ( done ) => {
136136 if ( needsUpdate ( diagnosticMessagesGeneratedJson , generatedLCGFile ) ) {
137- return execAsync ( host , [ generateLocalizedDiagnosticMessagesJs , "src/loc/lcl" , "built/local" , diagnosticMessagesGeneratedJson ] , { ignoreExitCode : true } ) ;
137+ return exec ( host , [ generateLocalizedDiagnosticMessagesJs , "src/loc/lcl" , "built/local" , diagnosticMessagesGeneratedJson ] , { ignoreExitCode : true } ) ;
138138 }
139139} ) ;
140140
@@ -242,7 +242,7 @@ gulp.task(
242242// Generate Markdown spec
243243const specMd = "doc/spec.md" ;
244244gulp . task ( specMd , /*help*/ false , [ word2mdJs ] , ( ) =>
245- execAsync ( "cscript" , [ "//nologo" , word2mdJs , path . resolve ( specMd ) , path . resolve ( "doc/TypeScript Language Specification.docx" ) ] ) ) ;
245+ exec ( "cscript" , [ "//nologo" , word2mdJs , path . resolve ( specMd ) , path . resolve ( "doc/TypeScript Language Specification.docx" ) ] ) ) ;
246246
247247gulp . task (
248248 "generate-spec" ,
@@ -273,7 +273,7 @@ gulp.task(
273273 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" ) ) ;
274274 }
275275 const sizeBefore = getDirSize ( "lib" ) ;
276- return execAsync ( host , [ produceLKGJs ] ) . then ( ( ) => {
276+ return exec ( host , [ produceLKGJs ] ) . then ( ( ) => {
277277 const sizeAfter = getDirSize ( "lib" ) ;
278278 if ( sizeAfter > ( sizeBefore * 1.10 ) ) {
279279 throw new Error ( "The lib folder increased by 10% or more. This likely indicates a bug." ) ;
@@ -409,25 +409,25 @@ gulp.task(
409409 if ( tests ) {
410410 args . push ( JSON . stringify ( tests ) ) ;
411411 }
412- return execAsync ( "node" , args ) ;
412+ return exec ( "node" , args ) ;
413413 } ) ) ;
414414
415415gulp . task (
416416 "generate-code-coverage" ,
417417 "Generates code coverage data via istanbul" ,
418418 [ "tests" ] ,
419- ( ) => execAsync ( "istanbul" , [ "cover" , "node_modules/mocha/bin/_mocha" , "--" , "-R" , "min" , "-t" , "" + cmdLineOptions . testTimeout , runJs ] ) ) ;
419+ ( ) => exec ( "istanbul" , [ "cover" , "node_modules/mocha/bin/_mocha" , "--" , "-R" , "min" , "-t" , "" + cmdLineOptions . testTimeout , runJs ] ) ) ;
420420
421421
422422gulp . task (
423423 "diff" ,
424424 "Diffs the compiler baselines using the diff tool specified by the 'DIFF' environment variable" ,
425- ( ) => execAsync ( getDiffTool ( ) , [ refBaseline , localBaseline ] , { ignoreExitCode : true } ) ) ;
425+ ( ) => exec ( getDiffTool ( ) , [ refBaseline , localBaseline ] , { ignoreExitCode : true } ) ) ;
426426
427427gulp . task (
428428 "diff-rwc" ,
429429 "Diffs the RWC baselines using the diff tool specified by the 'DIFF' environment variable" ,
430- ( ) => execAsync ( getDiffTool ( ) , [ refRwcBaseline , localRwcBaseline ] , { ignoreExitCode : true } ) ) ;
430+ ( ) => exec ( getDiffTool ( ) , [ refRwcBaseline , localRwcBaseline ] , { ignoreExitCode : true } ) ) ;
431431
432432gulp . task (
433433 "baseline-accept" ,
@@ -470,7 +470,7 @@ const loggedIOTs = "src/harness/loggedIO.ts";
470470const loggedIOJs = "built/local/loggedIO.js" ;
471471gulp . task ( loggedIOJs , /*help*/ false , [ ] , ( done ) => {
472472 return mkdirp ( "built/local/temp" )
473- . then ( ( ) => execAsync ( host , [ "lib/tsc.js" , "--types" , "--target es5" , "--lib es5" , "--outdir" , "built/local/temp" , loggedIOTs ] ) )
473+ . then ( ( ) => exec ( host , [ "lib/tsc.js" , "--types" , "--target es5" , "--lib es5" , "--outdir" , "built/local/temp" , loggedIOTs ] ) )
474474 . then ( ( ) => { fs . renameSync ( path . join ( "built/local/temp" , "/harness/loggedIO.js" ) , loggedIOJs ) ; } )
475475 . then ( ( ) => del ( "built/local/temp" ) ) ;
476476} ) ;
@@ -484,7 +484,7 @@ gulp.task(
484484 "tsc-instrumented" ,
485485 "Builds an instrumented tsc.js - run with --test=[testname]" ,
486486 [ "local" , loggedIOJs , instrumenterJs , typescriptServicesJs ] ,
487- ( ) => execAsync ( host , [ instrumenterJs , "record" , cmdLineOptions . tests || "iocapture" , "built/local" ] ) ) ;
487+ ( ) => exec ( host , [ instrumenterJs , "record" , cmdLineOptions . tests || "iocapture" , "built/local" ] ) ) ;
488488
489489gulp . task (
490490 "update-sublime" ,
0 commit comments