diff --git a/lib/util/string-match.spec.ts b/lib/util/string-match.spec.ts index a27a1d29ccc12985f6753ff8bad65888991f682e..0321d4ce5720d65734a10b4608d6c13ff16aec68 100644 --- a/lib/util/string-match.spec.ts +++ b/lib/util/string-match.spec.ts @@ -30,6 +30,10 @@ describe('util/string-match', () => { expect(matchRegexOrGlobList('test', ['test', '!/test3/'])).toBeTrue(); }); + it('returns true case insensitive for glob', () => { + expect(matchRegexOrGlobList('TEST', ['t*'])).toBeTrue(); + }); + it('returns true if matching every negative pattern (regex)', () => { expect( matchRegexOrGlobList('test', ['test', '!/test3/', '!/test4/']), diff --git a/lib/util/string-match.ts b/lib/util/string-match.ts index 8612ba5e33755bb51613aee4f7862004bd07f9bd..241debfbd17d0d3f5191972cd11d50f1cbbf2016 100644 --- a/lib/util/string-match.ts +++ b/lib/util/string-match.ts @@ -14,7 +14,7 @@ export function getRegexOrGlobPredicate(pattern: string): StringMatchPredicate { return regExPredicate; } - const mm = minimatch(pattern, { dot: true }); + const mm = minimatch(pattern, { dot: true, nocase: true }); return (x: string): boolean => mm.match(x); }