Bump micromatch from 4.0.5 to 4.0.7 in the npm group (#2310)
* Bump micromatch from 4.0.5 to 4.0.7 in the npm group Bumps the npm group with 1 update: [micromatch](https://github.com/micromatch/micromatch). Updates `micromatch` from 4.0.5 to 4.0.7 - [Release notes](https://github.com/micromatch/micromatch/releases) - [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md) - [Commits](https://github.com/micromatch/micromatch/compare/4.0.5...4.0.7) --- updated-dependencies: - dependency-name: micromatch dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm ... Signed-off-by: dependabot[bot] <support@github.com> * Update checked-in dependencies --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
8c4bc43ead
commit
7927df07e2
18 changed files with 329 additions and 491 deletions
30
node_modules/braces/lib/parse.js
generated
vendored
30
node_modules/braces/lib/parse.js
generated
vendored
|
|
@ -33,22 +33,21 @@ const parse = (input, options = {}) => {
|
|||
throw new TypeError('Expected a string');
|
||||
}
|
||||
|
||||
let opts = options || {};
|
||||
let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
|
||||
const opts = options || {};
|
||||
const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
|
||||
if (input.length > max) {
|
||||
throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
|
||||
}
|
||||
|
||||
let ast = { type: 'root', input, nodes: [] };
|
||||
let stack = [ast];
|
||||
const ast = { type: 'root', input, nodes: [] };
|
||||
const stack = [ast];
|
||||
let block = ast;
|
||||
let prev = ast;
|
||||
let brackets = 0;
|
||||
let length = input.length;
|
||||
const length = input.length;
|
||||
let index = 0;
|
||||
let depth = 0;
|
||||
let value;
|
||||
let memo = {};
|
||||
|
||||
/**
|
||||
* Helpers
|
||||
|
|
@ -111,7 +110,6 @@ const parse = (input, options = {}) => {
|
|||
if (value === CHAR_LEFT_SQUARE_BRACKET) {
|
||||
brackets++;
|
||||
|
||||
let closed = true;
|
||||
let next;
|
||||
|
||||
while (index < length && (next = advance())) {
|
||||
|
|
@ -167,7 +165,7 @@ const parse = (input, options = {}) => {
|
|||
*/
|
||||
|
||||
if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
|
||||
let open = value;
|
||||
const open = value;
|
||||
let next;
|
||||
|
||||
if (options.keepQuotes !== true) {
|
||||
|
|
@ -199,8 +197,8 @@ const parse = (input, options = {}) => {
|
|||
if (value === CHAR_LEFT_CURLY_BRACE) {
|
||||
depth++;
|
||||
|
||||
let dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true;
|
||||
let brace = {
|
||||
const dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true;
|
||||
const brace = {
|
||||
type: 'brace',
|
||||
open: true,
|
||||
close: false,
|
||||
|
|
@ -227,7 +225,7 @@ const parse = (input, options = {}) => {
|
|||
continue;
|
||||
}
|
||||
|
||||
let type = 'close';
|
||||
const type = 'close';
|
||||
block = stack.pop();
|
||||
block.close = true;
|
||||
|
||||
|
|
@ -245,7 +243,7 @@ const parse = (input, options = {}) => {
|
|||
if (value === CHAR_COMMA && depth > 0) {
|
||||
if (block.ranges > 0) {
|
||||
block.ranges = 0;
|
||||
let open = block.nodes.shift();
|
||||
const open = block.nodes.shift();
|
||||
block.nodes = [open, { type: 'text', value: stringify(block) }];
|
||||
}
|
||||
|
||||
|
|
@ -259,7 +257,7 @@ const parse = (input, options = {}) => {
|
|||
*/
|
||||
|
||||
if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
|
||||
let siblings = block.nodes;
|
||||
const siblings = block.nodes;
|
||||
|
||||
if (depth === 0 || siblings.length === 0) {
|
||||
push({ type: 'text', value });
|
||||
|
|
@ -286,7 +284,7 @@ const parse = (input, options = {}) => {
|
|||
if (prev.type === 'range') {
|
||||
siblings.pop();
|
||||
|
||||
let before = siblings[siblings.length - 1];
|
||||
const before = siblings[siblings.length - 1];
|
||||
before.value += prev.value + value;
|
||||
prev = before;
|
||||
block.ranges--;
|
||||
|
|
@ -319,8 +317,8 @@ const parse = (input, options = {}) => {
|
|||
});
|
||||
|
||||
// get the location of the block on parent.nodes (block's siblings)
|
||||
let parent = stack[stack.length - 1];
|
||||
let index = parent.nodes.indexOf(block);
|
||||
const parent = stack[stack.length - 1];
|
||||
const index = parent.nodes.indexOf(block);
|
||||
// replace the (invalid) block with it's nodes
|
||||
parent.nodes.splice(index, 1, ...block.nodes);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue