This commit is contained in:
2025-04-17 19:16:42 +02:00
parent 94a90edabd
commit ab2db755ef
88 changed files with 8427 additions and 10994 deletions

12
node_modules/picomatch/lib/parse.js generated vendored
View File

@@ -71,10 +71,9 @@ const parse = (input, options) => {
const tokens = [bos];
const capture = opts.capture ? '' : '?:';
const win32 = utils.isWindows(options);
// create constants based on platform, for windows or posix
const PLATFORM_CHARS = constants.globChars(win32);
const PLATFORM_CHARS = constants.globChars(opts.windows);
const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
const {
@@ -210,8 +209,8 @@ const parse = (input, options) => {
if (tok.value || tok.output) append(tok);
if (prev && prev.type === 'text' && tok.type === 'text') {
prev.output = (prev.output || prev.value) + tok.value;
prev.value += tok.value;
prev.output = (prev.output || '') + tok.value;
return;
}
@@ -699,10 +698,6 @@ const parse = (input, options) => {
const next = peek();
let output = value;
if (next === '<' && !utils.supportsLookbehinds()) {
throw new Error('Node.js v10 or higher is required for regex lookbehinds');
}
if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) {
output = `\\${value}`;
}
@@ -1010,7 +1005,6 @@ parse.fastpaths = (input, options) => {
}
input = REPLACEMENTS[input] || input;
const win32 = utils.isWindows(options);
// create constants based on platform, for windows or posix
const {
@@ -1023,7 +1017,7 @@ parse.fastpaths = (input, options) => {
NO_DOTS_SLASH,
STAR,
START_ANCHOR
} = constants.globChars(win32);
} = constants.globChars(opts.windows);
const nodot = opts.dot ? NO_DOTS : NO_DOT;
const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;