Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: update minimatch to 9.0.1 #48094

Merged
merged 1 commit into from
May 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 14 additions & 19 deletions deps/minimatch/index.js
Original file line number Diff line number Diff line change
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.