Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 48bd124

Browse filesBrowse files
nodejs-github-botMoLow
authored andcommitted
deps: update minimatch to 9.0.1
PR-URL: #48094 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent d4572d3 commit 48bd124
Copy full SHA for 48bd124

File tree

Expand file treeCollapse file tree

8 files changed

+59
-72
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

8 files changed

+59
-72
lines changed
Open diff view settings
Collapse file

‎deps/minimatch/index.js‎

Copy file name to clipboardExpand all lines: deps/minimatch/index.js
+14-19Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,26 +1405,21 @@ var Minimatch = class {
14051405
matchOne(file, pattern, partial = false) {
14061406
const options = this.options;
14071407
if (this.isWindows) {
1408-
const fileUNC = file[0] === "" && file[1] === "" && file[2] === "?" && typeof file[3] === "string" && /^[a-z]:$/i.test(file[3]);
1409-
const patternUNC = pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] === "string" && /^[a-z]:$/i.test(pattern[3]);
1410-
if (fileUNC && patternUNC) {
1411-
const fd = file[3];
1412-
const pd = pattern[3];
1408+
const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
1409+
const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
1410+
const patternDrive = typeof pattern[0] === "string" && /^[a-z]:$/i.test(pattern[0]);
1411+
const patternUNC = !patternDrive && pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] === "string" && /^[a-z]:$/i.test(pattern[3]);
1412+
const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
1413+
const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
1414+
if (typeof fdi === "number" && typeof pdi === "number") {
1415+
const [fd, pd] = [file[fdi], pattern[pdi]];
14131416
if (fd.toLowerCase() === pd.toLowerCase()) {
1414-
file[3] = pd;
1415-
}
1416-
} else if (patternUNC && typeof file[0] === "string") {
1417-
const pd = pattern[3];
1418-
const fd = file[0];
1419-
if (pd.toLowerCase() === fd.toLowerCase()) {
1420-
pattern[3] = fd;
1421-
pattern = pattern.slice(3);
1422-
}
1423-
} else if (fileUNC && typeof pattern[0] === "string") {
1424-
const fd = file[3];
1425-
if (fd.toLowerCase() === pattern[0].toLowerCase()) {
1426-
pattern[0] = fd;
1427-
file = file.slice(3);
1417+
pattern[pdi] = fd;
1418+
if (pdi > fdi) {
1419+
pattern = pattern.slice(pdi);
1420+
} else if (fdi > pdi) {
1421+
file = file.slice(fdi);
1422+
}
14281423
}
14291424
}
14301425
}
Collapse file

‎deps/minimatch/src/dist/cjs/index.d.ts.map‎

Copy file name to clipboardExpand all lines: deps/minimatch/src/dist/cjs/index.d.ts.map
+1-1Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎deps/minimatch/src/dist/cjs/index.js‎

Copy file name to clipboardExpand all lines: deps/minimatch/src/dist/cjs/index.js
+20-24Lines changed: 20 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎deps/minimatch/src/dist/cjs/index.js.map‎

Copy file name to clipboardExpand all lines: deps/minimatch/src/dist/cjs/index.js.map
+1-1Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎deps/minimatch/src/dist/mjs/index.d.ts.map‎

Copy file name to clipboardExpand all lines: deps/minimatch/src/dist/mjs/index.d.ts.map
+1-1Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎deps/minimatch/src/dist/mjs/index.js‎

Copy file name to clipboardExpand all lines: deps/minimatch/src/dist/mjs/index.js
+20-24Lines changed: 20 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎deps/minimatch/src/dist/mjs/index.js.map‎

Copy file name to clipboardExpand all lines: deps/minimatch/src/dist/mjs/index.js.map
+1-1Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.