chore(deps): update dependency glob to v11.1.0
All checks were successful
Lint / pre-commit Linting (push) Successful in 1m23s
All checks were successful
Lint / pre-commit Linting (push) Successful in 1m23s
This commit is contained in:
21
node_modules/minimatch/dist/esm/index.js
generated
vendored
21
node_modules/minimatch/dist/esm/index.js
generated
vendored
@@ -631,7 +631,7 @@ export class Minimatch {
|
||||
}
|
||||
}
|
||||
// resolve and reduce . and .. portions in the file as well.
|
||||
// dont' need to do the second phase, because it's only one string[]
|
||||
// don't need to do the second phase, because it's only one string[]
|
||||
const { optimizationLevel = 1 } = this.options;
|
||||
if (optimizationLevel >= 2) {
|
||||
file = this.levelTwoFileOptimize(file);
|
||||
@@ -884,14 +884,25 @@ export class Minimatch {
|
||||
}
|
||||
}
|
||||
else if (next === undefined) {
|
||||
pp[i - 1] = prev + '(?:\\/|' + twoStar + ')?';
|
||||
pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + ')?';
|
||||
}
|
||||
else if (next !== GLOBSTAR) {
|
||||
pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + '\\/)' + next;
|
||||
pp[i + 1] = GLOBSTAR;
|
||||
}
|
||||
});
|
||||
return pp.filter(p => p !== GLOBSTAR).join('/');
|
||||
const filtered = pp.filter(p => p !== GLOBSTAR);
|
||||
// For partial matches, we need to make the pattern match
|
||||
// any prefix of the full path. We do this by generating
|
||||
// alternative patterns that match progressively longer prefixes.
|
||||
if (this.partial && filtered.length >= 1) {
|
||||
const prefixes = [];
|
||||
for (let i = 1; i <= filtered.length; i++) {
|
||||
prefixes.push(filtered.slice(0, i).join('/'));
|
||||
}
|
||||
return '(?:' + prefixes.join('|') + ')';
|
||||
}
|
||||
return filtered.join('/');
|
||||
})
|
||||
.join('|');
|
||||
// need to wrap in parens if we had more than one thing with |,
|
||||
@@ -900,6 +911,10 @@ export class Minimatch {
|
||||
// must match entire pattern
|
||||
// ending in a * or ** will make it less strict.
|
||||
re = '^' + open + re + close + '$';
|
||||
// In partial mode, '/' should always match as it's a valid prefix for any pattern
|
||||
if (this.partial) {
|
||||
re = '^(?:\\/|' + open + re.slice(1, -1) + close + ')$';
|
||||
}
|
||||
// can match anything, as long as it's not this.
|
||||
if (this.negate)
|
||||
re = '^(?!' + re + ').+$';
|
||||
|
||||
Reference in New Issue
Block a user