From 12559766726b088e5d854a2397d0f57b92f16756 Mon Sep 17 00:00:00 2001 From: Emily Marigold Klassen Date: Fri, 21 Jun 2019 13:51:03 -0700 Subject: [PATCH] Fix vinyl-fs "Invalid glob argument" error Fixes the following error ``` Error: Invalid glob argument: at Object.src (/Users/emilyklassen/Code/mcs-repos/monorepo/node_modules/vinyl-fs/lib/src/index.js:20:11) ``` --- lib/project.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/project.ts b/lib/project.ts index a9674a51..6d039394 100644 --- a/lib/project.ts +++ b/lib/project.ts @@ -132,6 +132,11 @@ function src(this: Project) { console.log(error.messageText); } + if (fileNames.length === 0) { + // Empty stream required as vinyl-fs@3 no longer supports "allowEmpty" + return new stream.Readable({objectMode: true, read() { this.push(null) }}) + } + if (base === undefined) base = utils.getCommonBasePathOfArray( fileNames.filter(file => file.substr(-5) !== ".d.ts") .map(file => path.dirname(file)));