@parcel/utils 2.0.0-nightly.1452 → 2.0.0-nightly.1468
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +20 -9
- package/lib/index.js.map +1 -1
- package/package.json +7 -7
package/lib/index.js
CHANGED
|
@@ -1119,7 +1119,18 @@ var $9kveb = parcelRequire("9kveb");
|
|
|
1119
1119
|
let extglobStar = star;
|
|
1120
1120
|
if (token.inner && token.inner.length > 1 && token.inner.includes("/")) extglobStar = globstar(opts);
|
|
1121
1121
|
if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) output = token.close = `)$))${extglobStar}`;
|
|
1122
|
-
if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest))
|
|
1122
|
+
if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
|
|
1123
|
+
// Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis.
|
|
1124
|
+
// In this case, we need to parse the string and use it in the output of the original pattern.
|
|
1125
|
+
// Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`.
|
|
1126
|
+
//
|
|
1127
|
+
// Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`.
|
|
1128
|
+
const expression = $8b2f0c2eaecf2312$var$parse(rest, {
|
|
1129
|
+
...options,
|
|
1130
|
+
fastpaths: false
|
|
1131
|
+
}).output;
|
|
1132
|
+
output = token.close = `)${expression})${extglobStar})`;
|
|
1133
|
+
}
|
|
1123
1134
|
if (token.prev.type === "bos") state.negatedExtglob = true;
|
|
1124
1135
|
}
|
|
1125
1136
|
push({
|
|
@@ -31136,11 +31147,11 @@ const $69e4bed225e2da9c$var$isEmptyString = (val)=>val === "" || val === "./";
|
|
|
31136
31147
|
if (options.onResult) options.onResult(state);
|
|
31137
31148
|
items.push(state.output);
|
|
31138
31149
|
};
|
|
31139
|
-
let matches = $69e4bed225e2da9c$var$micromatch(list, patterns, {
|
|
31150
|
+
let matches = new Set($69e4bed225e2da9c$var$micromatch(list, patterns, {
|
|
31140
31151
|
...options,
|
|
31141
31152
|
onResult: onResult
|
|
31142
|
-
});
|
|
31143
|
-
for (let item of items)if (!matches.
|
|
31153
|
+
}));
|
|
31154
|
+
for (let item of items)if (!matches.has(item)) result.add(item);
|
|
31144
31155
|
return [
|
|
31145
31156
|
...result
|
|
31146
31157
|
];
|
|
@@ -31344,7 +31355,7 @@ const $69e4bed225e2da9c$var$isEmptyString = (val)=>val === "" || val === "./";
|
|
|
31344
31355
|
*
|
|
31345
31356
|
* ```js
|
|
31346
31357
|
* const mm = require('micromatch');
|
|
31347
|
-
* const state = mm(pattern[, options]);
|
|
31358
|
+
* const state = mm.parse(pattern[, options]);
|
|
31348
31359
|
* ```
|
|
31349
31360
|
* @param {String} `glob`
|
|
31350
31361
|
* @param {Object} `options`
|
|
@@ -33435,11 +33446,11 @@ const $3f4e287414e2d74a$var$isEmptyString = (val)=>val === "" || val === "./";
|
|
|
33435
33446
|
if (options.onResult) options.onResult(state);
|
|
33436
33447
|
items.push(state.output);
|
|
33437
33448
|
};
|
|
33438
|
-
let matches = $3f4e287414e2d74a$var$micromatch(list, patterns, {
|
|
33449
|
+
let matches = new Set($3f4e287414e2d74a$var$micromatch(list, patterns, {
|
|
33439
33450
|
...options,
|
|
33440
33451
|
onResult: onResult
|
|
33441
|
-
});
|
|
33442
|
-
for (let item of items)if (!matches.
|
|
33452
|
+
}));
|
|
33453
|
+
for (let item of items)if (!matches.has(item)) result.add(item);
|
|
33443
33454
|
return [
|
|
33444
33455
|
...result
|
|
33445
33456
|
];
|
|
@@ -33643,7 +33654,7 @@ const $3f4e287414e2d74a$var$isEmptyString = (val)=>val === "" || val === "./";
|
|
|
33643
33654
|
*
|
|
33644
33655
|
* ```js
|
|
33645
33656
|
* const mm = require('micromatch');
|
|
33646
|
-
* const state = mm(pattern[, options]);
|
|
33657
|
+
* const state = mm.parse(pattern[, options]);
|
|
33647
33658
|
* ```
|
|
33648
33659
|
* @param {String} `glob`
|
|
33649
33660
|
* @param {Object} `options`
|