minimatch
Advanced tools
Comparing version 7.1.0 to 7.1.1
@@ -379,5 +379,7 @@ "use strict"; | ||
} | ||
if (parts[0] === '.') { | ||
if (parts[0] === '.' && | ||
parts.length === 2 && | ||
(parts[1] === '.' || parts[1] === '')) { | ||
didSomething = true; | ||
parts.shift(); | ||
parts.pop(); | ||
} | ||
@@ -461,5 +463,7 @@ } | ||
} | ||
if (parts[0] === '.') { | ||
if (parts[0] === '.' && | ||
parts.length === 2 && | ||
(parts[1] === '.' || parts[1] === '')) { | ||
didSomething = true; | ||
parts.shift(); | ||
parts.pop(); | ||
} | ||
@@ -473,3 +477,5 @@ } | ||
didSomething = true; | ||
parts.splice(dd - 1, 2); | ||
const needDot = dd === 1 && parts[dd + 1] === '**'; | ||
const splin = needDot ? ['.'] : []; | ||
parts.splice(dd - 1, 2, ...splin); | ||
if (parts.length === 0) | ||
@@ -476,0 +482,0 @@ parts.push(''); |
@@ -367,5 +367,7 @@ export const minimatch = (p, pattern, options = {}) => { | ||
} | ||
if (parts[0] === '.') { | ||
if (parts[0] === '.' && | ||
parts.length === 2 && | ||
(parts[1] === '.' || parts[1] === '')) { | ||
didSomething = true; | ||
parts.shift(); | ||
parts.pop(); | ||
} | ||
@@ -449,5 +451,7 @@ } | ||
} | ||
if (parts[0] === '.') { | ||
if (parts[0] === '.' && | ||
parts.length === 2 && | ||
(parts[1] === '.' || parts[1] === '')) { | ||
didSomething = true; | ||
parts.shift(); | ||
parts.pop(); | ||
} | ||
@@ -461,3 +465,5 @@ } | ||
didSomething = true; | ||
parts.splice(dd - 1, 2); | ||
const needDot = dd === 1 && parts[dd + 1] === '**'; | ||
const splin = needDot ? ['.'] : []; | ||
parts.splice(dd - 1, 2, ...splin); | ||
if (parts.length === 0) | ||
@@ -464,0 +470,0 @@ parts.push(''); |
@@ -5,3 +5,3 @@ { | ||
"description": "a glob matcher in javascript", | ||
"version": "7.1.0", | ||
"version": "7.1.1", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
214386
2808