From 0180dd5e4be6e99535709b7c6778a586d0c25704 Mon Sep 17 00:00:00 2001 From: Anthony Dresser Date: Tue, 19 Nov 2019 22:57:10 +0000 Subject: [PATCH 1/3] add filter to git hook --- build/gulpfile.hygiene.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.hygiene.js b/build/gulpfile.hygiene.js index a8bb8898c90..773e1dbd075 100644 --- a/build/gulpfile.hygiene.js +++ b/build/gulpfile.hygiene.js @@ -457,7 +457,7 @@ if (require.main === module) { console.log('Reading git index versions...'); createGitIndexVinyls(some) - .then(vinyls => new Promise((c, e) => hygiene(es.readArray(vinyls)) + .then(vinyls => new Promise((c, e) => hygiene(es.readArray(vinyls).pipe(filter(all))) .on('end', () => c()) .on('error', e))) .catch(err => { From 1fccc8dc1c07eaa3c1744d05a6238c10c819d0a2 Mon Sep 17 00:00:00 2001 From: Anthony Dresser Date: Thu, 28 Nov 2019 19:57:41 +0000 Subject: [PATCH 2/3] update filtering to filter everything coming into the hygiene task --- build/gulpfile.hygiene.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build/gulpfile.hygiene.js b/build/gulpfile.hygiene.js index 773e1dbd075..c0b26785e7e 100644 --- a/build/gulpfile.hygiene.js +++ b/build/gulpfile.hygiene.js @@ -327,7 +327,12 @@ function hygiene(some) { let input; if (Array.isArray(some) || typeof some === 'string' || !some) { - input = vfs.src(some || all, { base: '.', follow: true, allowEmpty: true }); + const options = { base: '.', follow: true, allowEmpty: true }; + if (some) { + input = vfs.src(some, options).pipe(filter(all)) // split this up to not unnecessarily filter all a second time + } else { + input = vfs.src(all, options); + } } else { input = some; } @@ -457,7 +462,7 @@ if (require.main === module) { console.log('Reading git index versions...'); createGitIndexVinyls(some) - .then(vinyls => new Promise((c, e) => hygiene(es.readArray(vinyls).pipe(filter(all))) + .then(vinyls => new Promise((c, e) => hygiene(es.readArray(vinyls)) .on('end', () => c()) .on('error', e))) .catch(err => { From 37c4838f969387db2e3490b1a33cb36bd72e180b Mon Sep 17 00:00:00 2001 From: Anthony Dresser Date: Thu, 28 Nov 2019 20:16:27 +0000 Subject: [PATCH 3/3] fix missing semicolon --- build/gulpfile.hygiene.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.hygiene.js b/build/gulpfile.hygiene.js index c0b26785e7e..afde823d0b6 100644 --- a/build/gulpfile.hygiene.js +++ b/build/gulpfile.hygiene.js @@ -329,7 +329,7 @@ function hygiene(some) { if (Array.isArray(some) || typeof some === 'string' || !some) { const options = { base: '.', follow: true, allowEmpty: true }; if (some) { - input = vfs.src(some, options).pipe(filter(all)) // split this up to not unnecessarily filter all a second time + input = vfs.src(some, options).pipe(filter(all)); // split this up to not unnecessarily filter all a second time } else { input = vfs.src(all, options); }