@@ -17,7 +17,6 @@ declare module "gulp-typescript" {
1717 stripInternal ?: boolean ;
1818 types ?: string [ ] ;
1919 }
20- interface CompileStream extends NodeJS . ReadWriteStream { } // Either gulp or gulp-typescript has some odd typings which don't reflect reality, making this required
2120}
2221import * as insert from "gulp-insert" ;
2322import * as sourcemaps from "gulp-sourcemaps" ;
@@ -380,18 +379,18 @@ gulp.task(builtLocalCompiler, false, [servicesFile], () => {
380379 return localCompilerProject . src ( )
381380 . pipe ( newer ( builtLocalCompiler ) )
382381 . pipe ( sourcemaps . init ( ) )
383- . pipe ( tsc ( localCompilerProject ) )
382+ . pipe ( localCompilerProject ( ) )
384383 . pipe ( prependCopyright ( ) )
385384 . pipe ( sourcemaps . write ( "." ) )
386- . pipe ( gulp . dest ( builtLocalDirectory ) ) ;
385+ . pipe ( gulp . dest ( "." ) ) ;
387386} ) ;
388387
389388gulp . task ( servicesFile , false , [ "lib" , "generate-diagnostics" ] , ( ) => {
390389 const servicesProject = tsc . createProject ( "src/services/tsconfig.json" , getCompilerSettings ( { removeComments : false } , /*useBuiltCompiler*/ false ) ) ;
391390 const { js, dts} = servicesProject . src ( )
392391 . pipe ( newer ( servicesFile ) )
393392 . pipe ( sourcemaps . init ( ) )
394- . pipe ( tsc ( servicesProject ) ) ;
393+ . pipe ( servicesProject ( ) ) ;
395394 const completedJs = js . pipe ( prependCopyright ( ) )
396395 . pipe ( sourcemaps . write ( "." ) ) ;
397396 const completedDts = dts . pipe ( prependCopyright ( /*outputCopyright*/ true ) )
@@ -409,13 +408,13 @@ gulp.task(servicesFile, false, ["lib", "generate-diagnostics"], () => {
409408 file . path = nodeDefinitionsFile ;
410409 return content + "\r\nexport = ts;" ;
411410 } ) )
412- . pipe ( gulp . dest ( builtLocalDirectory ) ) ,
411+ . pipe ( gulp . dest ( "." ) ) ,
413412 completedDts . pipe ( clone ( ) )
414413 . pipe ( insert . transform ( ( content , file ) => {
415414 file . path = nodeStandaloneDefinitionsFile ;
416415 return content . replace ( / d e c l a r e ( n a m e s p a c e | m o d u l e ) t s / g, 'declare module "typescript"' ) ;
417416 } ) )
418- ] ) . pipe ( gulp . dest ( builtLocalDirectory ) ) ;
417+ ] ) . pipe ( gulp . dest ( "." ) ) ;
419418} ) ;
420419
421420// cancellationToken.js
@@ -425,7 +424,7 @@ gulp.task(cancellationTokenJs, false, [servicesFile], () => {
425424 return cancellationTokenProject . src ( )
426425 . pipe ( newer ( cancellationTokenJs ) )
427426 . pipe ( sourcemaps . init ( ) )
428- . pipe ( tsc ( cancellationTokenProject ) )
427+ . pipe ( cancellationTokenProject ( ) )
429428 . pipe ( prependCopyright ( ) )
430429 . pipe ( sourcemaps . write ( "." ) )
431430 . pipe ( gulp . dest ( builtLocalDirectory ) ) ;
@@ -438,10 +437,10 @@ gulp.task(typingsInstallerJs, false, [servicesFile], () => {
438437 return cancellationTokenProject . src ( )
439438 . pipe ( newer ( typingsInstallerJs ) )
440439 . pipe ( sourcemaps . init ( ) )
441- . pipe ( tsc ( cancellationTokenProject ) )
440+ . pipe ( cancellationTokenProject ( ) )
442441 . pipe ( prependCopyright ( ) )
443442 . pipe ( sourcemaps . write ( "." ) )
444- . pipe ( gulp . dest ( builtLocalDirectory ) ) ;
443+ . pipe ( gulp . dest ( "." ) ) ;
445444} ) ;
446445
447446const serverFile = path . join ( builtLocalDirectory , "tsserver.js" ) ;
@@ -451,10 +450,10 @@ gulp.task(serverFile, false, [servicesFile, typingsInstallerJs, cancellationToke
451450 return serverProject . src ( )
452451 . pipe ( newer ( serverFile ) )
453452 . pipe ( sourcemaps . init ( ) )
454- . pipe ( tsc ( serverProject ) )
453+ . pipe ( serverProject ( ) )
455454 . pipe ( prependCopyright ( ) )
456455 . pipe ( sourcemaps . write ( "." ) )
457- . pipe ( gulp . dest ( builtLocalDirectory ) ) ;
456+ . pipe ( gulp . dest ( "." ) ) ;
458457} ) ;
459458
460459const tsserverLibraryFile = path . join ( builtLocalDirectory , "tsserverlibrary.js" ) ;
@@ -465,14 +464,14 @@ gulp.task(tsserverLibraryFile, false, [servicesFile], (done) => {
465464 const { js, dts} : { js : NodeJS . ReadableStream , dts : NodeJS . ReadableStream } = serverLibraryProject . src ( )
466465 . pipe ( sourcemaps . init ( ) )
467466 . pipe ( newer ( tsserverLibraryFile ) )
468- . pipe ( tsc ( serverLibraryProject ) ) ;
467+ . pipe ( serverLibraryProject ( ) ) ;
469468
470469 return merge2 ( [
471470 js . pipe ( prependCopyright ( ) )
472471 . pipe ( sourcemaps . write ( "." ) )
473- . pipe ( gulp . dest ( builtLocalDirectory ) ) ,
472+ . pipe ( gulp . dest ( "." ) ) ,
474473 dts . pipe ( prependCopyright ( ) )
475- . pipe ( gulp . dest ( builtLocalDirectory ) )
474+ . pipe ( gulp . dest ( "." ) )
476475 ] ) ;
477476} ) ;
478477
@@ -544,9 +543,9 @@ gulp.task(run, false, [servicesFile], () => {
544543 return testProject . src ( )
545544 . pipe ( newer ( run ) )
546545 . pipe ( sourcemaps . init ( ) )
547- . pipe ( tsc ( testProject ) )
546+ . pipe ( testProject ( ) )
548547 . pipe ( sourcemaps . write ( "." , { includeContent : false , sourceRoot : "../../" } ) )
549- . pipe ( gulp . dest ( builtLocalDirectory ) ) ;
548+ . pipe ( gulp . dest ( "." ) ) ;
550549} ) ;
551550
552551const internalTests = "internal/" ;
@@ -730,7 +729,7 @@ gulp.task("browserify", "Runs browserify on run.js to produce a file suitable fo
730729 return testProject . src ( )
731730 . pipe ( newer ( "built/local/bundle.js" ) )
732731 . pipe ( sourcemaps . init ( ) )
733- . pipe ( tsc ( testProject ) )
732+ . pipe ( testProject )
734733 . pipe ( through2 . obj ( ( file , enc , next ) => {
735734 const originalMap = file . sourceMap ;
736735 const prebundledContent = file . contents . toString ( ) ;
0 commit comments