@lage-run/globby 14.2.0 → 14.2.1
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/CHANGELOG.json +16 -1
- package/CHANGELOG.md +10 -2
- package/lib/index.js +132 -83
- package/package.json +2 -2
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,22 @@
|
|
|
2
2
|
"name": "@lage-run/globby",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Wed, 02
|
|
5
|
+
"date": "Wed, 02 Apr 2025 08:09:42 GMT",
|
|
6
|
+
"version": "14.2.1",
|
|
7
|
+
"tag": "@lage-run/globby_v14.2.1",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "email not defined",
|
|
12
|
+
"package": "@lage-run/globby",
|
|
13
|
+
"commit": "54e957d6b93381285d67ff8c23e134770b7a1512",
|
|
14
|
+
"comment": "Bundle with esbuild ^0.25.0"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Wed, 02 Oct 2024 20:26:19 GMT",
|
|
6
21
|
"version": "14.2.0",
|
|
7
22
|
"tag": "@lage-run/globby_v14.2.0",
|
|
8
23
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
# Change Log - @lage-run/globby
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on Wed, 02
|
|
3
|
+
<!-- This log was last generated on Wed, 02 Apr 2025 08:09:42 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 14.2.1
|
|
8
|
+
|
|
9
|
+
Wed, 02 Apr 2025 08:09:42 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Bundle with esbuild ^0.25.0 (email not defined)
|
|
14
|
+
|
|
7
15
|
## 14.2.0
|
|
8
16
|
|
|
9
|
-
Wed, 02 Oct 2024 20:
|
|
17
|
+
Wed, 02 Oct 2024 20:26:19 GMT
|
|
10
18
|
|
|
11
19
|
### Minor changes
|
|
12
20
|
|
package/lib/index.js
CHANGED
|
@@ -332,9 +332,9 @@ var require_glob_parent = __commonJS({
|
|
|
332
332
|
}
|
|
333
333
|
});
|
|
334
334
|
|
|
335
|
-
// ../../node_modules/braces/lib/utils.js
|
|
335
|
+
// ../../node_modules/micromatch/node_modules/braces/lib/utils.js
|
|
336
336
|
var require_utils = __commonJS({
|
|
337
|
-
"../../node_modules/braces/lib/utils.js"(exports2) {
|
|
337
|
+
"../../node_modules/micromatch/node_modules/braces/lib/utils.js"(exports2) {
|
|
338
338
|
"use strict";
|
|
339
339
|
exports2.isInteger = (num) => {
|
|
340
340
|
if (typeof num === "number") {
|
|
@@ -352,7 +352,7 @@ var require_utils = __commonJS({
|
|
|
352
352
|
return (Number(max) - Number(min)) / Number(step) >= limit;
|
|
353
353
|
};
|
|
354
354
|
exports2.escapeNode = (block, n = 0, type) => {
|
|
355
|
-
|
|
355
|
+
const node = block.nodes[n];
|
|
356
356
|
if (!node) return;
|
|
357
357
|
if (type && node.type === type || node.type === "open" || node.type === "close") {
|
|
358
358
|
if (node.escaped !== true) {
|
|
@@ -397,8 +397,14 @@ var require_utils = __commonJS({
|
|
|
397
397
|
const result = [];
|
|
398
398
|
const flat = (arr) => {
|
|
399
399
|
for (let i = 0; i < arr.length; i++) {
|
|
400
|
-
|
|
401
|
-
Array.isArray(ele)
|
|
400
|
+
const ele = arr[i];
|
|
401
|
+
if (Array.isArray(ele)) {
|
|
402
|
+
flat(ele);
|
|
403
|
+
continue;
|
|
404
|
+
}
|
|
405
|
+
if (ele !== void 0) {
|
|
406
|
+
result.push(ele);
|
|
407
|
+
}
|
|
402
408
|
}
|
|
403
409
|
return result;
|
|
404
410
|
};
|
|
@@ -408,15 +414,15 @@ var require_utils = __commonJS({
|
|
|
408
414
|
}
|
|
409
415
|
});
|
|
410
416
|
|
|
411
|
-
// ../../node_modules/braces/lib/stringify.js
|
|
417
|
+
// ../../node_modules/micromatch/node_modules/braces/lib/stringify.js
|
|
412
418
|
var require_stringify = __commonJS({
|
|
413
|
-
"../../node_modules/braces/lib/stringify.js"(exports2, module2) {
|
|
419
|
+
"../../node_modules/micromatch/node_modules/braces/lib/stringify.js"(exports2, module2) {
|
|
414
420
|
"use strict";
|
|
415
421
|
var utils = require_utils();
|
|
416
422
|
module2.exports = (ast, options = {}) => {
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
423
|
+
const stringify = (node, parent = {}) => {
|
|
424
|
+
const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
|
|
425
|
+
const invalidNode = node.invalid === true && options.escapeInvalid === true;
|
|
420
426
|
let output = "";
|
|
421
427
|
if (node.value) {
|
|
422
428
|
if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {
|
|
@@ -428,7 +434,7 @@ var require_stringify = __commonJS({
|
|
|
428
434
|
return node.value;
|
|
429
435
|
}
|
|
430
436
|
if (node.nodes) {
|
|
431
|
-
for (
|
|
437
|
+
for (const child of node.nodes) {
|
|
432
438
|
output += stringify(child);
|
|
433
439
|
}
|
|
434
440
|
}
|
|
@@ -666,9 +672,9 @@ var require_to_regex_range = __commonJS({
|
|
|
666
672
|
}
|
|
667
673
|
});
|
|
668
674
|
|
|
669
|
-
// ../../node_modules/fill-range/index.js
|
|
675
|
+
// ../../node_modules/micromatch/node_modules/fill-range/index.js
|
|
670
676
|
var require_fill_range = __commonJS({
|
|
671
|
-
"../../node_modules/fill-range/index.js"(exports2, module2) {
|
|
677
|
+
"../../node_modules/micromatch/node_modules/fill-range/index.js"(exports2, module2) {
|
|
672
678
|
"use strict";
|
|
673
679
|
var util = require("util");
|
|
674
680
|
var toRegexRange = require_to_regex_range();
|
|
@@ -714,7 +720,7 @@ var require_fill_range = __commonJS({
|
|
|
714
720
|
while (input.length < maxLength) input = "0" + input;
|
|
715
721
|
return negative ? "-" + input : input;
|
|
716
722
|
};
|
|
717
|
-
var toSequence = (parts, options) => {
|
|
723
|
+
var toSequence = (parts, options, maxLen) => {
|
|
718
724
|
parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
|
|
719
725
|
parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
|
|
720
726
|
let prefix = options.capture ? "" : "?:";
|
|
@@ -722,10 +728,10 @@ var require_fill_range = __commonJS({
|
|
|
722
728
|
let negatives = "";
|
|
723
729
|
let result;
|
|
724
730
|
if (parts.positives.length) {
|
|
725
|
-
positives = parts.positives.join("|");
|
|
731
|
+
positives = parts.positives.map((v) => toMaxLen(String(v), maxLen)).join("|");
|
|
726
732
|
}
|
|
727
733
|
if (parts.negatives.length) {
|
|
728
|
-
negatives = `-(${prefix}${parts.negatives.join("|")})`;
|
|
734
|
+
negatives = `-(${prefix}${parts.negatives.map((v) => toMaxLen(String(v), maxLen)).join("|")})`;
|
|
729
735
|
}
|
|
730
736
|
if (positives && negatives) {
|
|
731
737
|
result = `${positives}|${negatives}`;
|
|
@@ -802,7 +808,7 @@ var require_fill_range = __commonJS({
|
|
|
802
808
|
index++;
|
|
803
809
|
}
|
|
804
810
|
if (options.toRegex === true) {
|
|
805
|
-
return step > 1 ? toSequence(parts, options) : toRegex(range, null, { wrap: false, ...options });
|
|
811
|
+
return step > 1 ? toSequence(parts, options, maxLen) : toRegex(range, null, { wrap: false, ...options });
|
|
806
812
|
}
|
|
807
813
|
return range;
|
|
808
814
|
};
|
|
@@ -860,23 +866,24 @@ var require_fill_range = __commonJS({
|
|
|
860
866
|
}
|
|
861
867
|
});
|
|
862
868
|
|
|
863
|
-
// ../../node_modules/braces/lib/compile.js
|
|
869
|
+
// ../../node_modules/micromatch/node_modules/braces/lib/compile.js
|
|
864
870
|
var require_compile = __commonJS({
|
|
865
|
-
"../../node_modules/braces/lib/compile.js"(exports2, module2) {
|
|
871
|
+
"../../node_modules/micromatch/node_modules/braces/lib/compile.js"(exports2, module2) {
|
|
866
872
|
"use strict";
|
|
867
873
|
var fill = require_fill_range();
|
|
868
874
|
var utils = require_utils();
|
|
869
875
|
var compile = (ast, options = {}) => {
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
876
|
+
const walk = (node, parent = {}) => {
|
|
877
|
+
const invalidBlock = utils.isInvalidBrace(parent);
|
|
878
|
+
const invalidNode = node.invalid === true && options.escapeInvalid === true;
|
|
879
|
+
const invalid = invalidBlock === true || invalidNode === true;
|
|
880
|
+
const prefix = options.escapeInvalid === true ? "\\" : "";
|
|
875
881
|
let output = "";
|
|
876
882
|
if (node.isOpen === true) {
|
|
877
883
|
return prefix + node.value;
|
|
878
884
|
}
|
|
879
885
|
if (node.isClose === true) {
|
|
886
|
+
console.log("node.isClose", prefix, node.value);
|
|
880
887
|
return prefix + node.value;
|
|
881
888
|
}
|
|
882
889
|
if (node.type === "open") {
|
|
@@ -892,14 +899,14 @@ var require_compile = __commonJS({
|
|
|
892
899
|
return node.value;
|
|
893
900
|
}
|
|
894
901
|
if (node.nodes && node.ranges > 0) {
|
|
895
|
-
|
|
896
|
-
|
|
902
|
+
const args = utils.reduce(node.nodes);
|
|
903
|
+
const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true });
|
|
897
904
|
if (range.length !== 0) {
|
|
898
905
|
return args.length > 1 && range.length > 1 ? `(${range})` : range;
|
|
899
906
|
}
|
|
900
907
|
}
|
|
901
908
|
if (node.nodes) {
|
|
902
|
-
for (
|
|
909
|
+
for (const child of node.nodes) {
|
|
903
910
|
output += walk(child, node);
|
|
904
911
|
}
|
|
905
912
|
}
|
|
@@ -911,24 +918,24 @@ var require_compile = __commonJS({
|
|
|
911
918
|
}
|
|
912
919
|
});
|
|
913
920
|
|
|
914
|
-
// ../../node_modules/braces/lib/expand.js
|
|
921
|
+
// ../../node_modules/micromatch/node_modules/braces/lib/expand.js
|
|
915
922
|
var require_expand = __commonJS({
|
|
916
|
-
"../../node_modules/braces/lib/expand.js"(exports2, module2) {
|
|
923
|
+
"../../node_modules/micromatch/node_modules/braces/lib/expand.js"(exports2, module2) {
|
|
917
924
|
"use strict";
|
|
918
925
|
var fill = require_fill_range();
|
|
919
926
|
var stringify = require_stringify();
|
|
920
927
|
var utils = require_utils();
|
|
921
928
|
var append = (queue = "", stash = "", enclose = false) => {
|
|
922
|
-
|
|
929
|
+
const result = [];
|
|
923
930
|
queue = [].concat(queue);
|
|
924
931
|
stash = [].concat(stash);
|
|
925
932
|
if (!stash.length) return queue;
|
|
926
933
|
if (!queue.length) {
|
|
927
934
|
return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash;
|
|
928
935
|
}
|
|
929
|
-
for (
|
|
936
|
+
for (const item of queue) {
|
|
930
937
|
if (Array.isArray(item)) {
|
|
931
|
-
for (
|
|
938
|
+
for (const value of item) {
|
|
932
939
|
result.push(append(value, stash, enclose));
|
|
933
940
|
}
|
|
934
941
|
} else {
|
|
@@ -941,8 +948,8 @@ var require_expand = __commonJS({
|
|
|
941
948
|
return utils.flatten(result);
|
|
942
949
|
};
|
|
943
950
|
var expand = (ast, options = {}) => {
|
|
944
|
-
|
|
945
|
-
|
|
951
|
+
const rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit;
|
|
952
|
+
const walk = (node, parent = {}) => {
|
|
946
953
|
node.queue = [];
|
|
947
954
|
let p = parent;
|
|
948
955
|
let q = parent.queue;
|
|
@@ -959,7 +966,7 @@ var require_expand = __commonJS({
|
|
|
959
966
|
return;
|
|
960
967
|
}
|
|
961
968
|
if (node.nodes && node.ranges > 0) {
|
|
962
|
-
|
|
969
|
+
const args = utils.reduce(node.nodes);
|
|
963
970
|
if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
|
|
964
971
|
throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
|
|
965
972
|
}
|
|
@@ -971,7 +978,7 @@ var require_expand = __commonJS({
|
|
|
971
978
|
node.nodes = [];
|
|
972
979
|
return;
|
|
973
980
|
}
|
|
974
|
-
|
|
981
|
+
const enclose = utils.encloseBrace(node);
|
|
975
982
|
let queue = node.queue;
|
|
976
983
|
let block = node;
|
|
977
984
|
while (block.type !== "brace" && block.type !== "root" && block.parent) {
|
|
@@ -979,7 +986,7 @@ var require_expand = __commonJS({
|
|
|
979
986
|
queue = block.queue;
|
|
980
987
|
}
|
|
981
988
|
for (let i = 0; i < node.nodes.length; i++) {
|
|
982
|
-
|
|
989
|
+
const child = node.nodes[i];
|
|
983
990
|
if (child.type === "comma" && node.type === "brace") {
|
|
984
991
|
if (i === 1) queue.push("");
|
|
985
992
|
queue.push("");
|
|
@@ -1005,12 +1012,12 @@ var require_expand = __commonJS({
|
|
|
1005
1012
|
}
|
|
1006
1013
|
});
|
|
1007
1014
|
|
|
1008
|
-
// ../../node_modules/braces/lib/constants.js
|
|
1015
|
+
// ../../node_modules/micromatch/node_modules/braces/lib/constants.js
|
|
1009
1016
|
var require_constants = __commonJS({
|
|
1010
|
-
"../../node_modules/braces/lib/constants.js"(exports2, module2) {
|
|
1017
|
+
"../../node_modules/micromatch/node_modules/braces/lib/constants.js"(exports2, module2) {
|
|
1011
1018
|
"use strict";
|
|
1012
1019
|
module2.exports = {
|
|
1013
|
-
MAX_LENGTH:
|
|
1020
|
+
MAX_LENGTH: 1e4,
|
|
1014
1021
|
// Digits
|
|
1015
1022
|
CHAR_0: "0",
|
|
1016
1023
|
/* 0 */
|
|
@@ -1106,9 +1113,9 @@ var require_constants = __commonJS({
|
|
|
1106
1113
|
}
|
|
1107
1114
|
});
|
|
1108
1115
|
|
|
1109
|
-
// ../../node_modules/braces/lib/parse.js
|
|
1116
|
+
// ../../node_modules/micromatch/node_modules/braces/lib/parse.js
|
|
1110
1117
|
var require_parse = __commonJS({
|
|
1111
|
-
"../../node_modules/braces/lib/parse.js"(exports2, module2) {
|
|
1118
|
+
"../../node_modules/micromatch/node_modules/braces/lib/parse.js"(exports2, module2) {
|
|
1112
1119
|
"use strict";
|
|
1113
1120
|
var stringify = require_stringify();
|
|
1114
1121
|
var {
|
|
@@ -1144,21 +1151,20 @@ var require_parse = __commonJS({
|
|
|
1144
1151
|
if (typeof input !== "string") {
|
|
1145
1152
|
throw new TypeError("Expected a string");
|
|
1146
1153
|
}
|
|
1147
|
-
|
|
1148
|
-
|
|
1154
|
+
const opts = options || {};
|
|
1155
|
+
const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
|
|
1149
1156
|
if (input.length > max) {
|
|
1150
1157
|
throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
|
|
1151
1158
|
}
|
|
1152
|
-
|
|
1153
|
-
|
|
1159
|
+
const ast = { type: "root", input, nodes: [] };
|
|
1160
|
+
const stack = [ast];
|
|
1154
1161
|
let block = ast;
|
|
1155
1162
|
let prev = ast;
|
|
1156
1163
|
let brackets = 0;
|
|
1157
|
-
|
|
1164
|
+
const length = input.length;
|
|
1158
1165
|
let index = 0;
|
|
1159
1166
|
let depth = 0;
|
|
1160
1167
|
let value;
|
|
1161
|
-
let memo = {};
|
|
1162
1168
|
const advance = () => input[index++];
|
|
1163
1169
|
const push = (node) => {
|
|
1164
1170
|
if (node.type === "text" && prev.type === "dot") {
|
|
@@ -1191,7 +1197,6 @@ var require_parse = __commonJS({
|
|
|
1191
1197
|
}
|
|
1192
1198
|
if (value === CHAR_LEFT_SQUARE_BRACKET) {
|
|
1193
1199
|
brackets++;
|
|
1194
|
-
let closed = true;
|
|
1195
1200
|
let next;
|
|
1196
1201
|
while (index < length && (next = advance())) {
|
|
1197
1202
|
value += next;
|
|
@@ -1230,7 +1235,7 @@ var require_parse = __commonJS({
|
|
|
1230
1235
|
continue;
|
|
1231
1236
|
}
|
|
1232
1237
|
if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
|
|
1233
|
-
|
|
1238
|
+
const open = value;
|
|
1234
1239
|
let next;
|
|
1235
1240
|
if (options.keepQuotes !== true) {
|
|
1236
1241
|
value = "";
|
|
@@ -1251,8 +1256,8 @@ var require_parse = __commonJS({
|
|
|
1251
1256
|
}
|
|
1252
1257
|
if (value === CHAR_LEFT_CURLY_BRACE) {
|
|
1253
1258
|
depth++;
|
|
1254
|
-
|
|
1255
|
-
|
|
1259
|
+
const dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true;
|
|
1260
|
+
const brace = {
|
|
1256
1261
|
type: "brace",
|
|
1257
1262
|
open: true,
|
|
1258
1263
|
close: false,
|
|
@@ -1272,7 +1277,7 @@ var require_parse = __commonJS({
|
|
|
1272
1277
|
push({ type: "text", value });
|
|
1273
1278
|
continue;
|
|
1274
1279
|
}
|
|
1275
|
-
|
|
1280
|
+
const type = "close";
|
|
1276
1281
|
block = stack.pop();
|
|
1277
1282
|
block.close = true;
|
|
1278
1283
|
push({ type, value });
|
|
@@ -1283,7 +1288,7 @@ var require_parse = __commonJS({
|
|
|
1283
1288
|
if (value === CHAR_COMMA && depth > 0) {
|
|
1284
1289
|
if (block.ranges > 0) {
|
|
1285
1290
|
block.ranges = 0;
|
|
1286
|
-
|
|
1291
|
+
const open = block.nodes.shift();
|
|
1287
1292
|
block.nodes = [open, { type: "text", value: stringify(block) }];
|
|
1288
1293
|
}
|
|
1289
1294
|
push({ type: "comma", value });
|
|
@@ -1291,7 +1296,7 @@ var require_parse = __commonJS({
|
|
|
1291
1296
|
continue;
|
|
1292
1297
|
}
|
|
1293
1298
|
if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
|
|
1294
|
-
|
|
1299
|
+
const siblings = block.nodes;
|
|
1295
1300
|
if (depth === 0 || siblings.length === 0) {
|
|
1296
1301
|
push({ type: "text", value });
|
|
1297
1302
|
continue;
|
|
@@ -1312,7 +1317,7 @@ var require_parse = __commonJS({
|
|
|
1312
1317
|
}
|
|
1313
1318
|
if (prev.type === "range") {
|
|
1314
1319
|
siblings.pop();
|
|
1315
|
-
|
|
1320
|
+
const before = siblings[siblings.length - 1];
|
|
1316
1321
|
before.value += prev.value + value;
|
|
1317
1322
|
prev = before;
|
|
1318
1323
|
block.ranges--;
|
|
@@ -1334,8 +1339,8 @@ var require_parse = __commonJS({
|
|
|
1334
1339
|
node.invalid = true;
|
|
1335
1340
|
}
|
|
1336
1341
|
});
|
|
1337
|
-
|
|
1338
|
-
|
|
1342
|
+
const parent = stack[stack.length - 1];
|
|
1343
|
+
const index2 = parent.nodes.indexOf(block);
|
|
1339
1344
|
parent.nodes.splice(index2, 1, ...block.nodes);
|
|
1340
1345
|
}
|
|
1341
1346
|
} while (stack.length > 0);
|
|
@@ -1346,9 +1351,9 @@ var require_parse = __commonJS({
|
|
|
1346
1351
|
}
|
|
1347
1352
|
});
|
|
1348
1353
|
|
|
1349
|
-
// ../../node_modules/braces/index.js
|
|
1354
|
+
// ../../node_modules/micromatch/node_modules/braces/index.js
|
|
1350
1355
|
var require_braces = __commonJS({
|
|
1351
|
-
"../../node_modules/braces/index.js"(exports2, module2) {
|
|
1356
|
+
"../../node_modules/micromatch/node_modules/braces/index.js"(exports2, module2) {
|
|
1352
1357
|
"use strict";
|
|
1353
1358
|
var stringify = require_stringify();
|
|
1354
1359
|
var compile = require_compile();
|
|
@@ -1357,8 +1362,8 @@ var require_braces = __commonJS({
|
|
|
1357
1362
|
var braces = (input, options = {}) => {
|
|
1358
1363
|
let output = [];
|
|
1359
1364
|
if (Array.isArray(input)) {
|
|
1360
|
-
for (
|
|
1361
|
-
|
|
1365
|
+
for (const pattern of input) {
|
|
1366
|
+
const result = braces.create(pattern, options);
|
|
1362
1367
|
if (Array.isArray(result)) {
|
|
1363
1368
|
output.push(...result);
|
|
1364
1369
|
} else {
|
|
@@ -2919,15 +2924,19 @@ var require_picomatch2 = __commonJS({
|
|
|
2919
2924
|
}
|
|
2920
2925
|
});
|
|
2921
2926
|
|
|
2922
|
-
// ../../node_modules/
|
|
2927
|
+
// ../../node_modules/micromatch/index.js
|
|
2923
2928
|
var require_micromatch = __commonJS({
|
|
2924
|
-
"../../node_modules/
|
|
2929
|
+
"../../node_modules/micromatch/index.js"(exports2, module2) {
|
|
2925
2930
|
"use strict";
|
|
2926
2931
|
var util = require("util");
|
|
2927
2932
|
var braces = require_braces();
|
|
2928
2933
|
var picomatch = require_picomatch2();
|
|
2929
2934
|
var utils = require_utils2();
|
|
2930
|
-
var isEmptyString = (
|
|
2935
|
+
var isEmptyString = (v) => v === "" || v === "./";
|
|
2936
|
+
var hasBraces = (v) => {
|
|
2937
|
+
const index = v.indexOf("{");
|
|
2938
|
+
return index > -1 && v.indexOf("}", index) > -1;
|
|
2939
|
+
};
|
|
2931
2940
|
var micromatch = (list, patterns, options) => {
|
|
2932
2941
|
patterns = [].concat(patterns);
|
|
2933
2942
|
list = [].concat(list);
|
|
@@ -3062,7 +3071,7 @@ var require_micromatch = __commonJS({
|
|
|
3062
3071
|
};
|
|
3063
3072
|
micromatch.braces = (pattern, options) => {
|
|
3064
3073
|
if (typeof pattern !== "string") throw new TypeError("Expected a string");
|
|
3065
|
-
if (options && options.nobrace === true ||
|
|
3074
|
+
if (options && options.nobrace === true || !hasBraces(pattern)) {
|
|
3066
3075
|
return [pattern];
|
|
3067
3076
|
}
|
|
3068
3077
|
return braces(pattern, options);
|
|
@@ -3071,6 +3080,7 @@ var require_micromatch = __commonJS({
|
|
|
3071
3080
|
if (typeof pattern !== "string") throw new TypeError("Expected a string");
|
|
3072
3081
|
return micromatch.braces(pattern, { ...options, expand: true });
|
|
3073
3082
|
};
|
|
3083
|
+
micromatch.hasBraces = hasBraces;
|
|
3074
3084
|
module2.exports = micromatch;
|
|
3075
3085
|
}
|
|
3076
3086
|
});
|
|
@@ -3080,7 +3090,7 @@ var require_pattern = __commonJS({
|
|
|
3080
3090
|
"../../node_modules/fast-glob/out/utils/pattern.js"(exports2) {
|
|
3081
3091
|
"use strict";
|
|
3082
3092
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
3083
|
-
exports2.removeDuplicateSlashes = exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0;
|
|
3093
|
+
exports2.isAbsolute = exports2.partitionAbsoluteAndRelative = exports2.removeDuplicateSlashes = exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0;
|
|
3084
3094
|
var path2 = require("path");
|
|
3085
3095
|
var globParent = require_glob_parent();
|
|
3086
3096
|
var micromatch = require_micromatch();
|
|
@@ -3220,6 +3230,23 @@ var require_pattern = __commonJS({
|
|
|
3220
3230
|
return pattern.replace(DOUBLE_SLASH_RE, "/");
|
|
3221
3231
|
}
|
|
3222
3232
|
exports2.removeDuplicateSlashes = removeDuplicateSlashes;
|
|
3233
|
+
function partitionAbsoluteAndRelative(patterns) {
|
|
3234
|
+
const absolute = [];
|
|
3235
|
+
const relative = [];
|
|
3236
|
+
for (const pattern of patterns) {
|
|
3237
|
+
if (isAbsolute(pattern)) {
|
|
3238
|
+
absolute.push(pattern);
|
|
3239
|
+
} else {
|
|
3240
|
+
relative.push(pattern);
|
|
3241
|
+
}
|
|
3242
|
+
}
|
|
3243
|
+
return [absolute, relative];
|
|
3244
|
+
}
|
|
3245
|
+
exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
|
|
3246
|
+
function isAbsolute(pattern) {
|
|
3247
|
+
return path2.isAbsolute(pattern);
|
|
3248
|
+
}
|
|
3249
|
+
exports2.isAbsolute = isAbsolute;
|
|
3223
3250
|
}
|
|
3224
3251
|
});
|
|
3225
3252
|
|
|
@@ -4995,11 +5022,19 @@ var require_entry = __commonJS({
|
|
|
4995
5022
|
this.index = /* @__PURE__ */ new Map();
|
|
4996
5023
|
}
|
|
4997
5024
|
getFilter(positive, negative) {
|
|
4998
|
-
const
|
|
4999
|
-
const
|
|
5000
|
-
|
|
5025
|
+
const [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative);
|
|
5026
|
+
const patterns = {
|
|
5027
|
+
positive: {
|
|
5028
|
+
all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions)
|
|
5029
|
+
},
|
|
5030
|
+
negative: {
|
|
5031
|
+
absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })),
|
|
5032
|
+
relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true }))
|
|
5033
|
+
}
|
|
5034
|
+
};
|
|
5035
|
+
return (entry) => this._filter(entry, patterns);
|
|
5001
5036
|
}
|
|
5002
|
-
_filter(entry,
|
|
5037
|
+
_filter(entry, patterns) {
|
|
5003
5038
|
const filepath = utils.path.removeLeadingDotSegment(entry.path);
|
|
5004
5039
|
if (this._settings.unique && this._isDuplicateEntry(filepath)) {
|
|
5005
5040
|
return false;
|
|
@@ -5007,11 +5042,7 @@ var require_entry = __commonJS({
|
|
|
5007
5042
|
if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
|
|
5008
5043
|
return false;
|
|
5009
5044
|
}
|
|
5010
|
-
|
|
5011
|
-
return false;
|
|
5012
|
-
}
|
|
5013
|
-
const isDirectory2 = entry.dirent.isDirectory();
|
|
5014
|
-
const isMatched = this._isMatchToPatterns(filepath, positiveRe, isDirectory2) && !this._isMatchToPatterns(filepath, negativeRe, isDirectory2);
|
|
5045
|
+
const isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory());
|
|
5015
5046
|
if (this._settings.unique && isMatched) {
|
|
5016
5047
|
this._createIndexRecord(filepath);
|
|
5017
5048
|
}
|
|
@@ -5029,14 +5060,32 @@ var require_entry = __commonJS({
|
|
|
5029
5060
|
_onlyDirectoryFilter(entry) {
|
|
5030
5061
|
return this._settings.onlyDirectories && !entry.dirent.isDirectory();
|
|
5031
5062
|
}
|
|
5032
|
-
|
|
5033
|
-
|
|
5063
|
+
_isMatchToPatternsSet(filepath, patterns, isDirectory2) {
|
|
5064
|
+
const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory2);
|
|
5065
|
+
if (!isMatched) {
|
|
5066
|
+
return false;
|
|
5067
|
+
}
|
|
5068
|
+
const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory2);
|
|
5069
|
+
if (isMatchedByRelativeNegative) {
|
|
5070
|
+
return false;
|
|
5071
|
+
}
|
|
5072
|
+
const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory2);
|
|
5073
|
+
if (isMatchedByAbsoluteNegative) {
|
|
5074
|
+
return false;
|
|
5075
|
+
}
|
|
5076
|
+
return true;
|
|
5077
|
+
}
|
|
5078
|
+
_isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory2) {
|
|
5079
|
+
if (patternsRe.length === 0) {
|
|
5034
5080
|
return false;
|
|
5035
5081
|
}
|
|
5036
|
-
const fullpath = utils.path.makeAbsolute(this._settings.cwd,
|
|
5037
|
-
return
|
|
5082
|
+
const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath);
|
|
5083
|
+
return this._isMatchToPatterns(fullpath, patternsRe, isDirectory2);
|
|
5038
5084
|
}
|
|
5039
5085
|
_isMatchToPatterns(filepath, patternsRe, isDirectory2) {
|
|
5086
|
+
if (patternsRe.length === 0) {
|
|
5087
|
+
return false;
|
|
5088
|
+
}
|
|
5040
5089
|
const isMatched = utils.pattern.matchAny(filepath, patternsRe);
|
|
5041
5090
|
if (!isMatched && isDirectory2) {
|
|
5042
5091
|
return utils.pattern.matchAny(filepath + "/", patternsRe);
|
|
@@ -5837,12 +5886,12 @@ var require_ignore = __commonJS({
|
|
|
5837
5886
|
});
|
|
5838
5887
|
|
|
5839
5888
|
// src/index.mts
|
|
5840
|
-
var
|
|
5841
|
-
__export(
|
|
5889
|
+
var index_exports = {};
|
|
5890
|
+
__export(index_exports, {
|
|
5842
5891
|
glob: () => glob,
|
|
5843
5892
|
globAsync: () => globAsync
|
|
5844
5893
|
});
|
|
5845
|
-
module.exports = __toCommonJS(
|
|
5894
|
+
module.exports = __toCommonJS(index_exports);
|
|
5846
5895
|
|
|
5847
5896
|
// ../../node_modules/globby/index.js
|
|
5848
5897
|
var import_node_process2 = __toESM(require("process"), 1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lage-run/globby",
|
|
3
|
-
"version": "14.2.
|
|
3
|
+
"version": "14.2.1",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"transpile": "esbuild src/index.mts --bundle --platform=node --target=node14 --format=cjs --outfile=lib/index.js",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"dts-bundle-generator": "^9.5.1",
|
|
12
|
-
"esbuild": "^0.
|
|
12
|
+
"esbuild": "^0.25.0",
|
|
13
13
|
"globby": "^14.0.2",
|
|
14
14
|
"typescript": "~5.0.3"
|
|
15
15
|
},
|