Skip to content

Commit 571d1f7

Browse files
authored
Fix gulp-typescript to 2.14.1 untill gulpFile.ts is migrated. (#11290)
* Fix gulp-typescript to 2.14.1 untill gulpFile.ts is migrated. * Upgrade gulp-typescript to 3.0
1 parent d1ac8dd commit 571d1f7

File tree

5 files changed

+19
-21
lines changed

5 files changed

+19
-21
lines changed

Gulpfile.ts

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}
2221
import * as insert from "gulp-insert";
2322
import * 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

389388
gulp.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(/declare (namespace|module) ts/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

447446
const 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

460459
const 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

552551
const 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();

src/server/cancellationToken/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"removeComments": true,
66
"preserveConstEnums": true,
77
"pretty": true,
8-
"outDir": "../../../built/local",
98
"module": "commonjs",
109
"sourceMap": true,
1110
"stripInternal": true,

src/server/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"removeComments": true,
66
"preserveConstEnums": true,
77
"pretty": true,
8-
"out": "../../built/local/tsserver.js",
8+
"outFile": "../../built/local/tsserver.js",
99
"sourceMap": true,
1010
"stripInternal": true,
1111
"types": [

src/server/tsconfig.library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"noImplicitAny": true,
44
"removeComments": true,
55
"preserveConstEnums": true,
6-
"out": "../../built/local/tsserverlibrary.js",
6+
"outFile": "../../built/local/tsserverlibrary.js",
77
"sourceMap": true,
88
"stripInternal": true,
99
"declaration": true,

src/server/typingsInstaller/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"removeComments": true,
66
"preserveConstEnums": true,
77
"pretty": true,
8-
"out": "../../built/local/typingsInstaller.js",
8+
"outFile": "../../../built/local/typingsInstaller.js",
99
"sourceMap": true,
1010
"stripInternal": true,
1111
"types": [

0 commit comments

Comments
 (0)