From c1b0ca76eeb6bb3ac49577919bda913d3084d7e4 Mon Sep 17 00:00:00 2001 From: Josh Dales Date: Thu, 13 Apr 2023 15:02:40 -0400 Subject: [PATCH] Run the build command --- dist/index.js | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/dist/index.js b/dist/index.js index 77ed5bd4..ed026c11 100644 --- a/dist/index.js +++ b/dist/index.js @@ -186,19 +186,7 @@ exports.toChangedFilesMatchConfig = toChangedFilesMatchConfig; function printPattern(matcher) { return (matcher.negate ? '!' : '') + matcher.pattern; } -function isAnyMatch(changedFile, matchers) { - core.debug(` matching patterns against file ${changedFile}`); - for (const matcher of matchers) { - core.debug(` - ${printPattern(matcher)}`); - if (matcher.match(changedFile)) { - core.debug(` ${printPattern(matcher)} matched`); - return true; - } - } - core.debug(` no patterns matched`); - return false; -} -function isAllMatch(changedFile, matchers) { +function isMatch(changedFile, matchers) { core.debug(` matching patterns against file ${changedFile}`); for (const matcher of matchers) { core.debug(` - ${printPattern(matcher)}`); @@ -213,7 +201,7 @@ function isAllMatch(changedFile, matchers) { function checkAnyChangedFiles(changedFiles, globs) { const matchers = globs.map(g => new minimatch_1.Minimatch(g)); for (const changedFile of changedFiles) { - if (isAnyMatch(changedFile, matchers)) { + if (isMatch(changedFile, matchers)) { core.debug(` "any" patterns matched against ${changedFile}`); return true; } @@ -225,7 +213,7 @@ exports.checkAnyChangedFiles = checkAnyChangedFiles; function checkAllChangedFiles(changedFiles, globs) { const matchers = globs.map(g => new minimatch_1.Minimatch(g)); for (const changedFile of changedFiles) { - if (!isAllMatch(changedFile, matchers)) { + if (!isMatch(changedFile, matchers)) { core.debug(` "all" patterns did not match against ${changedFile}`); return false; }