Skip to content

Commit

Permalink
deps: update minimatch to 9.0.1
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
nodejs-github-bot authored and MoLow committed Jul 6, 2023
1 parent d4572d3 commit 48bd124
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 72 deletions.
33 changes: 14 additions & 19 deletions deps/minimatch/index.js
Expand Up @@ -1405,26 +1405,21 @@ var Minimatch = class {
matchOne(file, pattern, partial = false) {
const options = this.options;
if (this.isWindows) {
const fileUNC = file[0] === "" && file[1] === "" && file[2] === "?" && typeof file[3] === "string" && /^[a-z]:$/i.test(file[3]);
const patternUNC = pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] === "string" && /^[a-z]:$/i.test(pattern[3]);
if (fileUNC && patternUNC) {
const fd = file[3];
const pd = pattern[3];
const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
const patternDrive = typeof pattern[0] === "string" && /^[a-z]:$/i.test(pattern[0]);
const patternUNC = !patternDrive && pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] === "string" && /^[a-z]:$/i.test(pattern[3]);
const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
if (typeof fdi === "number" && typeof pdi === "number") {
const [fd, pd] = [file[fdi], pattern[pdi]];
if (fd.toLowerCase() === pd.toLowerCase()) {
file[3] = pd;
}
} else if (patternUNC && typeof file[0] === "string") {
const pd = pattern[3];
const fd = file[0];
if (pd.toLowerCase() === fd.toLowerCase()) {
pattern[3] = fd;
pattern = pattern.slice(3);
}
} else if (fileUNC && typeof pattern[0] === "string") {
const fd = file[3];
if (fd.toLowerCase() === pattern[0].toLowerCase()) {
pattern[0] = fd;
file = file.slice(3);
pattern[pdi] = fd;
if (pdi > fdi) {
pattern = pattern.slice(pdi);
} else if (fdi > pdi) {
file = file.slice(fdi);
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion deps/minimatch/src/dist/cjs/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 20 additions & 24 deletions deps/minimatch/src/dist/cjs/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion deps/minimatch/src/dist/cjs/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion deps/minimatch/src/dist/mjs/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 20 additions & 24 deletions deps/minimatch/src/dist/mjs/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion deps/minimatch/src/dist/mjs/index.js.map

Large diffs are not rendered by default.

0 comments on commit 48bd124

Please sign in to comment.