From c695729eb13edc47787e108b6bd5c4ceaee8d450 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 10 Sep 2019 14:50:49 +0200 Subject: [PATCH] remove gulp-tsb hack, fixes #80629 --- build/lib/util.js | 2 +- build/lib/util.ts | 2 +- build/lib/watch/index.js | 14 +------------- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/build/lib/util.js b/build/lib/util.js index be2670261d752..6acb7ab574fe4 100644 --- a/build/lib/util.js +++ b/build/lib/util.js @@ -121,7 +121,7 @@ function loadSourcemaps() { return; } if (!f.contents) { - cb(new Error('empty file')); + cb(undefined, f); return; } const contents = f.contents.toString('utf8'); diff --git a/build/lib/util.ts b/build/lib/util.ts index 578271e6648a8..6a82295ae2620 100644 --- a/build/lib/util.ts +++ b/build/lib/util.ts @@ -165,7 +165,7 @@ export function loadSourcemaps(): NodeJS.ReadWriteStream { } if (!f.contents) { - cb(new Error('empty file')); + cb(undefined, f); return; } diff --git a/build/lib/watch/index.js b/build/lib/watch/index.js index 0a4af2a798f86..a9ab5972977fe 100644 --- a/build/lib/watch/index.js +++ b/build/lib/watch/index.js @@ -5,17 +5,6 @@ const es = require('event-stream'); -/** Ugly hack for gulp-tsb */ -function handleDeletions() { - return es.mapSync(f => { - if (/\.ts$/.test(f.relative) && !f.contents) { - f.contents = Buffer.from(''); - f.stat = { mtime: new Date() }; - } - - return f; - }); -} let watch = undefined; @@ -24,6 +13,5 @@ if (!watch) { } module.exports = function () { - return watch.apply(null, arguments) - .pipe(handleDeletions()); + return watch.apply(null, arguments); };