diff --git a/package-lock.json b/package-lock.json index 98fd1d17..1a30b542 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "minimatch", - "version": "7.0.0", + "version": "7.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "minimatch", - "version": "7.0.0", + "version": "7.0.1", "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" diff --git a/package.json b/package.json index 2d55c4cb..b6478272 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Isaac Z. Schlueter (http://blog.izs.me)", "name": "minimatch", "description": "a glob matcher in javascript", - "version": "7.0.0", + "version": "7.0.1", "repository": { "type": "git", "url": "git://github.com/isaacs/minimatch.git" diff --git a/src/index.ts b/src/index.ts index 8ef5711c..564c54c0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -558,7 +558,7 @@ export class Minimatch { } else if ( a[ai] === '*' && b[bi] && - !b[bi].startsWith('.') && + (this.options.dot || !b[bi].startsWith('.')) && b[bi] !== '**' ) { if (which === 'b') return false @@ -763,6 +763,9 @@ export class Minimatch { // non-magic patterns just have to match exactly // patterns with magic have been turned into regexps. let hit: boolean + while (f === '.' && fi < fl - 1) { + f = file[++fi] + } if (typeof p === 'string') { hit = f === p this.debug('string match', p, f, hit)