@@ -17,7 +17,6 @@ declare module "gulp-typescript" {
17
17
stripInternal ?: boolean ;
18
18
types ?: string [ ] ;
19
19
}
20
- interface CompileStream extends NodeJS . ReadWriteStream { } // Either gulp or gulp-typescript has some odd typings which don't reflect reality, making this required
21
20
}
22
21
import * as insert from "gulp-insert" ;
23
22
import * as sourcemaps from "gulp-sourcemaps" ;
@@ -380,18 +379,18 @@ gulp.task(builtLocalCompiler, false, [servicesFile], () => {
380
379
return localCompilerProject . src ( )
381
380
. pipe ( newer ( builtLocalCompiler ) )
382
381
. pipe ( sourcemaps . init ( ) )
383
- . pipe ( tsc ( localCompilerProject ) )
382
+ . pipe ( localCompilerProject ( ) )
384
383
. pipe ( prependCopyright ( ) )
385
384
. pipe ( sourcemaps . write ( "." ) )
386
- . pipe ( gulp . dest ( builtLocalDirectory ) ) ;
385
+ . pipe ( gulp . dest ( "." ) ) ;
387
386
} ) ;
388
387
389
388
gulp . task ( servicesFile , false , [ "lib" , "generate-diagnostics" ] , ( ) => {
390
389
const servicesProject = tsc . createProject ( "src/services/tsconfig.json" , getCompilerSettings ( { removeComments : false } , /*useBuiltCompiler*/ false ) ) ;
391
390
const { js, dts} = servicesProject . src ( )
392
391
. pipe ( newer ( servicesFile ) )
393
392
. pipe ( sourcemaps . init ( ) )
394
- . pipe ( tsc ( servicesProject ) ) ;
393
+ . pipe ( servicesProject ( ) ) ;
395
394
const completedJs = js . pipe ( prependCopyright ( ) )
396
395
. pipe ( sourcemaps . write ( "." ) ) ;
397
396
const completedDts = dts . pipe ( prependCopyright ( /*outputCopyright*/ true ) )
@@ -409,13 +408,13 @@ gulp.task(servicesFile, false, ["lib", "generate-diagnostics"], () => {
409
408
file . path = nodeDefinitionsFile ;
410
409
return content + "\r\nexport = ts;" ;
411
410
} ) )
412
- . pipe ( gulp . dest ( builtLocalDirectory ) ) ,
411
+ . pipe ( gulp . dest ( "." ) ) ,
413
412
completedDts . pipe ( clone ( ) )
414
413
. pipe ( insert . transform ( ( content , file ) => {
415
414
file . path = nodeStandaloneDefinitionsFile ;
416
415
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"' ) ;
417
416
} ) )
418
- ] ) . pipe ( gulp . dest ( builtLocalDirectory ) ) ;
417
+ ] ) . pipe ( gulp . dest ( "." ) ) ;
419
418
} ) ;
420
419
421
420
// cancellationToken.js
@@ -425,7 +424,7 @@ gulp.task(cancellationTokenJs, false, [servicesFile], () => {
425
424
return cancellationTokenProject . src ( )
426
425
. pipe ( newer ( cancellationTokenJs ) )
427
426
. pipe ( sourcemaps . init ( ) )
428
- . pipe ( tsc ( cancellationTokenProject ) )
427
+ . pipe ( cancellationTokenProject ( ) )
429
428
. pipe ( prependCopyright ( ) )
430
429
. pipe ( sourcemaps . write ( "." ) )
431
430
. pipe ( gulp . dest ( builtLocalDirectory ) ) ;
@@ -438,10 +437,10 @@ gulp.task(typingsInstallerJs, false, [servicesFile], () => {
438
437
return cancellationTokenProject . src ( )
439
438
. pipe ( newer ( typingsInstallerJs ) )
440
439
. pipe ( sourcemaps . init ( ) )
441
- . pipe ( tsc ( cancellationTokenProject ) )
440
+ . pipe ( cancellationTokenProject ( ) )
442
441
. pipe ( prependCopyright ( ) )
443
442
. pipe ( sourcemaps . write ( "." ) )
444
- . pipe ( gulp . dest ( builtLocalDirectory ) ) ;
443
+ . pipe ( gulp . dest ( "." ) ) ;
445
444
} ) ;
446
445
447
446
const serverFile = path . join ( builtLocalDirectory , "tsserver.js" ) ;
@@ -451,10 +450,10 @@ gulp.task(serverFile, false, [servicesFile, typingsInstallerJs, cancellationToke
451
450
return serverProject . src ( )
452
451
. pipe ( newer ( serverFile ) )
453
452
. pipe ( sourcemaps . init ( ) )
454
- . pipe ( tsc ( serverProject ) )
453
+ . pipe ( serverProject ( ) )
455
454
. pipe ( prependCopyright ( ) )
456
455
. pipe ( sourcemaps . write ( "." ) )
457
- . pipe ( gulp . dest ( builtLocalDirectory ) ) ;
456
+ . pipe ( gulp . dest ( "." ) ) ;
458
457
} ) ;
459
458
460
459
const tsserverLibraryFile = path . join ( builtLocalDirectory , "tsserverlibrary.js" ) ;
@@ -465,14 +464,14 @@ gulp.task(tsserverLibraryFile, false, [servicesFile], (done) => {
465
464
const { js, dts} : { js : NodeJS . ReadableStream , dts : NodeJS . ReadableStream } = serverLibraryProject . src ( )
466
465
. pipe ( sourcemaps . init ( ) )
467
466
. pipe ( newer ( tsserverLibraryFile ) )
468
- . pipe ( tsc ( serverLibraryProject ) ) ;
467
+ . pipe ( serverLibraryProject ( ) ) ;
469
468
470
469
return merge2 ( [
471
470
js . pipe ( prependCopyright ( ) )
472
471
. pipe ( sourcemaps . write ( "." ) )
473
- . pipe ( gulp . dest ( builtLocalDirectory ) ) ,
472
+ . pipe ( gulp . dest ( "." ) ) ,
474
473
dts . pipe ( prependCopyright ( ) )
475
- . pipe ( gulp . dest ( builtLocalDirectory ) )
474
+ . pipe ( gulp . dest ( "." ) )
476
475
] ) ;
477
476
} ) ;
478
477
@@ -544,9 +543,9 @@ gulp.task(run, false, [servicesFile], () => {
544
543
return testProject . src ( )
545
544
. pipe ( newer ( run ) )
546
545
. pipe ( sourcemaps . init ( ) )
547
- . pipe ( tsc ( testProject ) )
546
+ . pipe ( testProject ( ) )
548
547
. pipe ( sourcemaps . write ( "." , { includeContent : false , sourceRoot : "../../" } ) )
549
- . pipe ( gulp . dest ( builtLocalDirectory ) ) ;
548
+ . pipe ( gulp . dest ( "." ) ) ;
550
549
} ) ;
551
550
552
551
const internalTests = "internal/" ;
@@ -730,7 +729,7 @@ gulp.task("browserify", "Runs browserify on run.js to produce a file suitable fo
730
729
return testProject . src ( )
731
730
. pipe ( newer ( "built/local/bundle.js" ) )
732
731
. pipe ( sourcemaps . init ( ) )
733
- . pipe ( tsc ( testProject ) )
732
+ . pipe ( testProject )
734
733
. pipe ( through2 . obj ( ( file , enc , next ) => {
735
734
const originalMap = file . sourceMap ;
736
735
const prebundledContent = file . contents . toString ( ) ;
0 commit comments