Skip to content

Commit e7591d7

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update minimatch to 10.0.3
PR-URL: #58712 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent fa5818e commit e7591d7

File tree

7 files changed

+1133
-705
lines changed

7 files changed

+1133
-705
lines changed

deps/minimatch/dist/commonjs/index.js

Lines changed: 2 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deps/minimatch/dist/commonjs/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deps/minimatch/dist/esm/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deps/minimatch/dist/esm/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deps/minimatch/index.js

Lines changed: 112 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -4,110 +4,128 @@ var __commonJS = (cb, mod) => function __require() {
44
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
55
};
66

7-
// node_modules/balanced-match/index.js
8-
var require_balanced_match = __commonJS({
9-
"node_modules/balanced-match/index.js"(exports2, module2) {
7+
// node_modules/@isaacs/balanced-match/dist/commonjs/index.js
8+
var require_commonjs = __commonJS({
9+
"node_modules/@isaacs/balanced-match/dist/commonjs/index.js"(exports2) {
1010
"use strict";
11-
module2.exports = balanced;
12-
function balanced(a, b, str) {
13-
if (a instanceof RegExp) a = maybeMatch(a, str);
14-
if (b instanceof RegExp) b = maybeMatch(b, str);
15-
var r = range(a, b, str);
11+
Object.defineProperty(exports2, "__esModule", { value: true });
12+
exports2.range = exports2.balanced = void 0;
13+
var balanced = (a, b, str) => {
14+
const ma = a instanceof RegExp ? maybeMatch(a, str) : a;
15+
const mb = b instanceof RegExp ? maybeMatch(b, str) : b;
16+
const r = ma !== null && mb != null && (0, exports2.range)(ma, mb, str);
1617
return r && {
1718
start: r[0],
1819
end: r[1],
1920
pre: str.slice(0, r[0]),
20-
body: str.slice(r[0] + a.length, r[1]),
21-
post: str.slice(r[1] + b.length)
21+
body: str.slice(r[0] + ma.length, r[1]),
22+
post: str.slice(r[1] + mb.length)
2223
};
23-
}
24-
function maybeMatch(reg, str) {
25-
var m = str.match(reg);
24+
};
25+
exports2.balanced = balanced;
26+
var maybeMatch = (reg, str) => {
27+
const m = str.match(reg);
2628
return m ? m[0] : null;
27-
}
28-
balanced.range = range;
29-
function range(a, b, str) {
30-
var begs, beg, left, right, result;
31-
var ai = str.indexOf(a);
32-
var bi = str.indexOf(b, ai + 1);
33-
var i = ai;
29+
};
30+
var range = (a, b, str) => {
31+
let begs, beg, left, right = void 0, result;
32+
let ai = str.indexOf(a);
33+
let bi = str.indexOf(b, ai + 1);
34+
let i = ai;
3435
if (ai >= 0 && bi > 0) {
3536
if (a === b) {
3637
return [ai, bi];
3738
}
3839
begs = [];
3940
left = str.length;
4041
while (i >= 0 && !result) {
41-
if (i == ai) {
42+
if (i === ai) {
4243
begs.push(i);
4344
ai = str.indexOf(a, i + 1);
44-
} else if (begs.length == 1) {
45-
result = [begs.pop(), bi];
45+
} else if (begs.length === 1) {
46+
const r = begs.pop();
47+
if (r !== void 0)
48+
result = [r, bi];
4649
} else {
4750
beg = begs.pop();
48-
if (beg < left) {
51+
if (beg !== void 0 && beg < left) {
4952
left = beg;
5053
right = bi;
5154
}
5255
bi = str.indexOf(b, i + 1);
5356
}
5457
i = ai < bi && ai >= 0 ? ai : bi;
5558
}
56-
if (begs.length) {
59+
if (begs.length && right !== void 0) {
5760
result = [left, right];
5861
}
5962
}
6063
return result;
61-
}
64+
};
65+
exports2.range = range;
6266
}
6367
});
6468

65-
// node_modules/brace-expansion/index.js
66-
var require_brace_expansion = __commonJS({
67-
"node_modules/brace-expansion/index.js"(exports2, module2) {
68-
var balanced = require_balanced_match();
69-
module2.exports = expandTop;
69+
// node_modules/@isaacs/brace-expansion/dist/commonjs/index.js
70+
var require_commonjs2 = __commonJS({
71+
"node_modules/@isaacs/brace-expansion/dist/commonjs/index.js"(exports2) {
72+
"use strict";
73+
Object.defineProperty(exports2, "__esModule", { value: true });
74+
exports2.expand = expand;
75+
var balanced_match_1 = require_commonjs();
7076
var escSlash = "\0SLASH" + Math.random() + "\0";
7177
var escOpen = "\0OPEN" + Math.random() + "\0";
7278
var escClose = "\0CLOSE" + Math.random() + "\0";
7379
var escComma = "\0COMMA" + Math.random() + "\0";
7480
var escPeriod = "\0PERIOD" + Math.random() + "\0";
81+
var escSlashPattern = new RegExp(escSlash, "g");
82+
var escOpenPattern = new RegExp(escOpen, "g");
83+
var escClosePattern = new RegExp(escClose, "g");
84+
var escCommaPattern = new RegExp(escComma, "g");
85+
var escPeriodPattern = new RegExp(escPeriod, "g");
86+
var slashPattern = /\\\\/g;
87+
var openPattern = /\\{/g;
88+
var closePattern = /\\}/g;
89+
var commaPattern = /\\,/g;
90+
var periodPattern = /\\./g;
7591
function numeric(str) {
76-
return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
92+
return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
7793
}
7894
function escapeBraces(str) {
79-
return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
95+
return str.replace(slashPattern, escSlash).replace(openPattern, escOpen).replace(closePattern, escClose).replace(commaPattern, escComma).replace(periodPattern, escPeriod);
8096
}
8197
function unescapeBraces(str) {
82-
return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
98+
return str.replace(escSlashPattern, "\\").replace(escOpenPattern, "{").replace(escClosePattern, "}").replace(escCommaPattern, ",").replace(escPeriodPattern, ".");
8399
}
84100
function parseCommaParts(str) {
85-
if (!str)
101+
if (!str) {
86102
return [""];
87-
var parts = [];
88-
var m = balanced("{", "}", str);
89-
if (!m)
103+
}
104+
const parts = [];
105+
const m = (0, balanced_match_1.balanced)("{", "}", str);
106+
if (!m) {
90107
return str.split(",");
91-
var pre = m.pre;
92-
var body = m.body;
93-
var post = m.post;
94-
var p = pre.split(",");
108+
}
109+
const { pre, body, post } = m;
110+
const p = pre.split(",");
95111
p[p.length - 1] += "{" + body + "}";
96-
var postParts = parseCommaParts(post);
112+
const postParts = parseCommaParts(post);
97113
if (post.length) {
114+
;
98115
p[p.length - 1] += postParts.shift();
99116
p.push.apply(p, postParts);
100117
}
101118
parts.push.apply(parts, p);
102119
return parts;
103120
}
104-
function expandTop(str) {
105-
if (!str)
121+
function expand(str) {
122+
if (!str) {
106123
return [];
107-
if (str.substr(0, 2) === "{}") {
108-
str = "\\{\\}" + str.substr(2);
109124
}
110-
return expand(escapeBraces(str), true).map(unescapeBraces);
125+
if (str.slice(0, 2) === "{}") {
126+
str = "\\{\\}" + str.slice(2);
127+
}
128+
return expand_(escapeBraces(str), true).map(unescapeBraces);
111129
}
112130
function embrace(str) {
113131
return "{" + str + "}";
@@ -121,89 +139,91 @@ var require_brace_expansion = __commonJS({
121139
function gte(i, y) {
122140
return i >= y;
123141
}
124-
function expand(str, isTop) {
125-
var expansions = [];
126-
var m = balanced("{", "}", str);
127-
if (!m) return [str];
128-
var pre = m.pre;
129-
var post = m.post.length ? expand(m.post, false) : [""];
142+
function expand_(str, isTop) {
143+
const expansions = [];
144+
const m = (0, balanced_match_1.balanced)("{", "}", str);
145+
if (!m)
146+
return [str];
147+
const pre = m.pre;
148+
const post = m.post.length ? expand_(m.post, false) : [""];
130149
if (/\$$/.test(m.pre)) {
131-
for (var k = 0; k < post.length; k++) {
132-
var expansion = pre + "{" + m.body + "}" + post[k];
150+
for (let k = 0; k < post.length; k++) {
151+
const expansion = pre + "{" + m.body + "}" + post[k];
133152
expansions.push(expansion);
134153
}
135154
} else {
136-
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
137-
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
138-
var isSequence = isNumericSequence || isAlphaSequence;
139-
var isOptions = m.body.indexOf(",") >= 0;
155+
const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
156+
const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
157+
const isSequence = isNumericSequence || isAlphaSequence;
158+
const isOptions = m.body.indexOf(",") >= 0;
140159
if (!isSequence && !isOptions) {
141-
if (m.post.match(/,.*\}/)) {
160+
if (m.post.match(/,(?!,).*\}/)) {
142161
str = m.pre + "{" + m.body + escClose + m.post;
143-
return expand(str);
162+
return expand_(str);
144163
}
145164
return [str];
146165
}
147-
var n;
166+
let n;
148167
if (isSequence) {
149168
n = m.body.split(/\.\./);
150169
} else {
151170
n = parseCommaParts(m.body);
152-
if (n.length === 1) {
153-
n = expand(n[0], false).map(embrace);
171+
if (n.length === 1 && n[0] !== void 0) {
172+
n = expand_(n[0], false).map(embrace);
154173
if (n.length === 1) {
155-
return post.map(function(p) {
156-
return m.pre + n[0] + p;
157-
});
174+
return post.map((p) => m.pre + n[0] + p);
158175
}
159176
}
160177
}
161-
var N;
162-
if (isSequence) {
163-
var x = numeric(n[0]);
164-
var y = numeric(n[1]);
165-
var width = Math.max(n[0].length, n[1].length);
166-
var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
167-
var test = lte;
168-
var reverse = y < x;
178+
let N;
179+
if (isSequence && n[0] !== void 0 && n[1] !== void 0) {
180+
const x = numeric(n[0]);
181+
const y = numeric(n[1]);
182+
const width = Math.max(n[0].length, n[1].length);
183+
let incr = n.length === 3 && n[2] !== void 0 ? Math.abs(numeric(n[2])) : 1;
184+
let test = lte;
185+
const reverse = y < x;
169186
if (reverse) {
170187
incr *= -1;
171188
test = gte;
172189
}
173-
var pad = n.some(isPadded);
190+
const pad = n.some(isPadded);
174191
N = [];
175-
for (var i = x; test(i, y); i += incr) {
176-
var c;
192+
for (let i = x; test(i, y); i += incr) {
193+
let c;
177194
if (isAlphaSequence) {
178195
c = String.fromCharCode(i);
179-
if (c === "\\")
196+
if (c === "\\") {
180197
c = "";
198+
}
181199
} else {
182200
c = String(i);
183201
if (pad) {
184-
var need = width - c.length;
202+
const need = width - c.length;
185203
if (need > 0) {
186-
var z = new Array(need + 1).join("0");
187-
if (i < 0)
204+
const z = new Array(need + 1).join("0");
205+
if (i < 0) {
188206
c = "-" + z + c.slice(1);
189-
else
207+
} else {
190208
c = z + c;
209+
}
191210
}
192211
}
193212
}
194213
N.push(c);
195214
}
196215
} else {
197216
N = [];
198-
for (var j = 0; j < n.length; j++) {
199-
N.push.apply(N, expand(n[j], false));
217+
for (let j = 0; j < n.length; j++) {
218+
N.push.apply(N, expand_(n[j], false));
200219
}
201220
}
202-
for (var j = 0; j < N.length; j++) {
203-
for (var k = 0; k < post.length; k++) {
204-
var expansion = pre + N[j] + post[k];
205-
if (!isTop || isSequence || expansion)
221+
for (let j = 0; j < N.length; j++) {
222+
for (let k = 0; k < post.length; k++) {
223+
const expansion = pre + N[j] + post[k];
224+
if (!isTop || isSequence || expansion) {
206225
expansions.push(expansion);
226+
}
207227
}
208228
}
209229
}
@@ -864,12 +884,9 @@ var require_escape = __commonJS({
864884
});
865885

866886
// dist/commonjs/index.js
867-
var __importDefault = exports && exports.__importDefault || function(mod) {
868-
return mod && mod.__esModule ? mod : { "default": mod };
869-
};
870887
Object.defineProperty(exports, "__esModule", { value: true });
871888
exports.unescape = exports.escape = exports.AST = exports.Minimatch = exports.match = exports.makeRe = exports.braceExpand = exports.defaults = exports.filter = exports.GLOBSTAR = exports.sep = exports.minimatch = void 0;
872-
var brace_expansion_1 = __importDefault(require_brace_expansion());
889+
var brace_expansion_1 = require_commonjs2();
873890
var assert_valid_pattern_js_1 = require_assert_valid_pattern();
874891
var ast_js_1 = require_ast();
875892
var escape_js_1 = require_escape();
@@ -992,7 +1009,7 @@ var braceExpand = (pattern, options = {}) => {
9921009
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
9931010
return [pattern];
9941011
}
995-
return (0, brace_expansion_1.default)(pattern);
1012+
return (0, brace_expansion_1.expand)(pattern);
9961013
};
9971014
exports.braceExpand = braceExpand;
9981015
exports.minimatch.braceExpand = exports.braceExpand;

0 commit comments

Comments
 (0)