Merge pull request #2447 from github/dependabot/npm_and_yarn/npm_and_yarn-07a849e1ae

Bump micromatch from 4.0.7 to 4.0.8 in the npm_and_yarn group
This commit is contained in:
dependabot[bot] 2024-08-23 16:00:06 -07:00 committed by GitHub
parent 715faf450a
commit a895f2e1b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 124 additions and 108 deletions

11
node_modules/micromatch/index.js generated vendored
View file

@ -4,7 +4,12 @@ const util = require('util');
const braces = require('braces');
const picomatch = require('picomatch');
const utils = require('picomatch/lib/utils');
const isEmptyString = val => val === '' || val === './';
const isEmptyString = v => v === '' || v === './';
const hasBraces = v => {
const index = v.indexOf('{');
return index > -1 && v.indexOf('}', index) > -1;
};
/**
* Returns an array of strings that match one or more glob patterns.
@ -445,7 +450,7 @@ micromatch.parse = (patterns, options) => {
micromatch.braces = (pattern, options) => {
if (typeof pattern !== 'string') throw new TypeError('Expected a string');
if ((options && options.nobrace === true) || !/\{.*\}/.test(pattern)) {
if ((options && options.nobrace === true) || !hasBraces(pattern)) {
return [pattern];
}
return braces(pattern, options);
@ -464,4 +469,6 @@ micromatch.braceExpand = (pattern, options) => {
* Expose micromatch
*/
// exposed for tests
micromatch.hasBraces = hasBraces;
module.exports = micromatch;