Skip to content

Commit 5e0070c

Browse files
committed
1 parent 26cf235 commit 5e0070c

File tree

8 files changed

+60
-164
lines changed

8 files changed

+60
-164
lines changed
Lines changed: 2 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,4 @@
11
{
2-
"author": "Isaac Z. Schlueter <[email protected]> (http://blog.izs.me/)",
3-
"name": "glob",
4-
"description": "the most correct and second fastest glob implementation in JavaScript",
5-
"version": "10.2.4",
6-
"bin": "./dist/cjs/src/bin.js",
7-
"repository": {
8-
"type": "git",
9-
"url": "git://github.com/isaacs/node-glob.git"
10-
},
11-
"main": "./dist/cjs/src/index.js",
12-
"module": "./dist/mjs/index.js",
13-
"types": "./dist/mjs/index.d.ts",
14-
"exports": {
15-
".": {
16-
"import": {
17-
"types": "./dist/mjs/index.d.ts",
18-
"default": "./dist/mjs/index.js"
19-
},
20-
"require": {
21-
"types": "./dist/cjs/src/index.d.ts",
22-
"default": "./dist/cjs/src/index.js"
23-
}
24-
}
25-
},
26-
"files": [
27-
"dist"
28-
],
29-
"scripts": {
30-
"preversion": "npm test",
31-
"postversion": "npm publish",
32-
"prepublishOnly": "git push origin --follow-tags",
33-
"preprepare": "rm -rf dist",
34-
"prepare": "tsc -p tsconfig.json && tsc -p tsconfig-esm.json",
35-
"postprepare": "bash fixup.sh",
36-
"pretest": "npm run prepare",
37-
"presnap": "npm run prepare",
38-
"test": "c8 tap",
39-
"snap": "c8 tap",
40-
"format": "prettier --write . --loglevel warn",
41-
"typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts",
42-
"prepublish": "npm run benchclean",
43-
"profclean": "rm -f v8.log profile.txt",
44-
"test-regen": "npm run profclean && TEST_REGEN=1 node --no-warnings --loader ts-node/esm test/00-setup.ts",
45-
"prebench": "npm run prepare",
46-
"bench": "bash benchmark.sh",
47-
"preprof": "npm run prepare",
48-
"prof": "bash prof.sh",
49-
"benchclean": "node benchclean.js"
50-
},
51-
"prettier": {
52-
"semi": false,
53-
"printWidth": 75,
54-
"tabWidth": 2,
55-
"useTabs": false,
56-
"singleQuote": true,
57-
"jsxSingleQuote": false,
58-
"bracketSameLine": true,
59-
"arrowParens": "avoid",
60-
"endOfLine": "lf"
61-
},
62-
"dependencies": {
63-
"foreground-child": "^3.1.0",
64-
"jackspeak": "^2.0.3",
65-
"minimatch": "^9.0.0",
66-
"minipass": "^5.0.0 || ^6.0.0",
67-
"path-scurry": "^1.7.0"
68-
},
69-
"devDependencies": {
70-
"@types/node": "^18.11.18",
71-
"@types/tap": "^15.0.7",
72-
"c8": "^7.12.0",
73-
"memfs": "^3.4.13",
74-
"mkdirp": "^2.1.4",
75-
"prettier": "^2.8.3",
76-
"rimraf": "^4.1.3",
77-
"tap": "^16.3.4",
78-
"ts-node": "^10.9.1",
79-
"typedoc": "^0.23.24",
80-
"typescript": "^4.9.4"
81-
},
82-
"tap": {
83-
"before": "test/00-setup.ts",
84-
"coverage": false,
85-
"node-arg": [
86-
"--no-warnings",
87-
"--loader",
88-
"ts-node/esm"
89-
],
90-
"ts": false
91-
},
92-
"license": "ISC",
93-
"funding": {
94-
"url": "https://github.com/sponsors/isaacs"
95-
},
96-
"engines": {
97-
"node": ">=16 || 14 >=14.17"
98-
}
2+
"version": "10.2.7",
3+
"type": "commonjs"
994
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"version": "10.2.3",
2+
"version": "10.2.7",
33
"type": "module"
44
}

node_modules/glob/package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"author": "Isaac Z. Schlueter <[email protected]> (http://blog.izs.me/)",
2+
"author": "Isaac Z. Schlueter <[email protected]> (https://blog.izs.me/)",
33
"name": "glob",
44
"description": "the most correct and second fastest glob implementation in JavaScript",
5-
"version": "10.2.4",
5+
"version": "10.2.7",
66
"bin": "./dist/cjs/src/bin.js",
77
"repository": {
88
"type": "git",
@@ -31,8 +31,7 @@
3131
"postversion": "npm publish",
3232
"prepublishOnly": "git push origin --follow-tags",
3333
"preprepare": "rm -rf dist",
34-
"prepare": "tsc -p tsconfig.json && tsc -p tsconfig-esm.json",
35-
"postprepare": "bash fixup.sh",
34+
"prepare": "tsc -p tsconfig.json && tsc -p tsconfig-esm.json && bash fixup.sh",
3635
"pretest": "npm run prepare",
3736
"presnap": "npm run prepare",
3837
"test": "c8 tap",
@@ -62,12 +61,12 @@
6261
"dependencies": {
6362
"foreground-child": "^3.1.0",
6463
"jackspeak": "^2.0.3",
65-
"minimatch": "^9.0.0",
66-
"minipass": "^5.0.0 || ^6.0.0",
64+
"minimatch": "^9.0.1",
65+
"minipass": "^5.0.0 || ^6.0.2",
6766
"path-scurry": "^1.7.0"
6867
},
6968
"devDependencies": {
70-
"@types/node": "^18.11.18",
69+
"@types/node": "^20.2.1",
7170
"@types/tap": "^15.0.7",
7271
"c8": "^7.12.0",
7372
"memfs": "^3.4.13",

node_modules/minimatch/dist/cjs/index.js

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -608,39 +608,35 @@ class Minimatch {
608608
// the parts match.
609609
matchOne(file, pattern, partial = false) {
610610
const options = this.options;
611-
// a UNC pattern like //?/c:/* can match a path like c:/x
612-
// and vice versa
611+
// UNC paths like //?/X:/... can match X:/... and vice versa
612+
// Drive letters in absolute drive or unc paths are always compared
613+
// case-insensitively.
613614
if (this.isWindows) {
614-
const fileUNC = file[0] === '' &&
615+
const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0]);
616+
const fileUNC = !fileDrive &&
617+
file[0] === '' &&
615618
file[1] === '' &&
616619
file[2] === '?' &&
617-
typeof file[3] === 'string' &&
618620
/^[a-z]:$/i.test(file[3]);
619-
const patternUNC = pattern[0] === '' &&
621+
const patternDrive = typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0]);
622+
const patternUNC = !patternDrive &&
623+
pattern[0] === '' &&
620624
pattern[1] === '' &&
621625
pattern[2] === '?' &&
622626
typeof pattern[3] === 'string' &&
623627
/^[a-z]:$/i.test(pattern[3]);
624-
if (fileUNC && patternUNC) {
625-
const fd = file[3];
626-
const pd = pattern[3];
628+
const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined;
629+
const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined;
630+
if (typeof fdi === 'number' && typeof pdi === 'number') {
631+
const [fd, pd] = [file[fdi], pattern[pdi]];
627632
if (fd.toLowerCase() === pd.toLowerCase()) {
628-
file[3] = pd;
629-
}
630-
}
631-
else if (patternUNC && typeof file[0] === 'string') {
632-
const pd = pattern[3];
633-
const fd = file[0];
634-
if (pd.toLowerCase() === fd.toLowerCase()) {
635-
pattern[3] = fd;
636-
pattern = pattern.slice(3);
637-
}
638-
}
639-
else if (fileUNC && typeof pattern[0] === 'string') {
640-
const fd = file[3];
641-
if (fd.toLowerCase() === pattern[0].toLowerCase()) {
642-
pattern[0] = fd;
643-
file = file.slice(3);
633+
pattern[pdi] = fd;
634+
if (pdi > fdi) {
635+
pattern = pattern.slice(pdi);
636+
}
637+
else if (fdi > pdi) {
638+
file = file.slice(fdi);
639+
}
644640
}
645641
}
646642
}

node_modules/minimatch/dist/mjs/index.js

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -596,39 +596,35 @@ export class Minimatch {
596596
// the parts match.
597597
matchOne(file, pattern, partial = false) {
598598
const options = this.options;
599-
// a UNC pattern like //?/c:/* can match a path like c:/x
600-
// and vice versa
599+
// UNC paths like //?/X:/... can match X:/... and vice versa
600+
// Drive letters in absolute drive or unc paths are always compared
601+
// case-insensitively.
601602
if (this.isWindows) {
602-
const fileUNC = file[0] === '' &&
603+
const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0]);
604+
const fileUNC = !fileDrive &&
605+
file[0] === '' &&
603606
file[1] === '' &&
604607
file[2] === '?' &&
605-
typeof file[3] === 'string' &&
606608
/^[a-z]:$/i.test(file[3]);
607-
const patternUNC = pattern[0] === '' &&
609+
const patternDrive = typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0]);
610+
const patternUNC = !patternDrive &&
611+
pattern[0] === '' &&
608612
pattern[1] === '' &&
609613
pattern[2] === '?' &&
610614
typeof pattern[3] === 'string' &&
611615
/^[a-z]:$/i.test(pattern[3]);
612-
if (fileUNC && patternUNC) {
613-
const fd = file[3];
614-
const pd = pattern[3];
616+
const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined;
617+
const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined;
618+
if (typeof fdi === 'number' && typeof pdi === 'number') {
619+
const [fd, pd] = [file[fdi], pattern[pdi]];
615620
if (fd.toLowerCase() === pd.toLowerCase()) {
616-
file[3] = pd;
617-
}
618-
}
619-
else if (patternUNC && typeof file[0] === 'string') {
620-
const pd = pattern[3];
621-
const fd = file[0];
622-
if (pd.toLowerCase() === fd.toLowerCase()) {
623-
pattern[3] = fd;
624-
pattern = pattern.slice(3);
625-
}
626-
}
627-
else if (fileUNC && typeof pattern[0] === 'string') {
628-
const fd = file[3];
629-
if (fd.toLowerCase() === pattern[0].toLowerCase()) {
630-
pattern[0] = fd;
631-
file = file.slice(3);
621+
pattern[pdi] = fd;
622+
if (pdi > fdi) {
623+
pattern = pattern.slice(pdi);
624+
}
625+
else if (fdi > pdi) {
626+
file = file.slice(fdi);
627+
}
632628
}
633629
}
634630
}

node_modules/minimatch/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"author": "Isaac Z. Schlueter <[email protected]> (http://blog.izs.me)",
33
"name": "minimatch",
44
"description": "a glob matcher in javascript",
5-
"version": "9.0.0",
5+
"version": "9.0.1",
66
"repository": {
77
"type": "git",
88
"url": "git://github.com/isaacs/minimatch.git"

package-lock.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
"columnify": "^1.6.0",
101101
"fastest-levenshtein": "^1.0.16",
102102
"fs-minipass": "^3.0.2",
103-
"glob": "^10.2.4",
103+
"glob": "^10.2.7",
104104
"graceful-fs": "^4.2.11",
105105
"hosted-git-info": "^6.1.1",
106106
"ini": "^4.1.0",
@@ -5909,15 +5909,15 @@
59095909
"dev": true
59105910
},
59115911
"node_modules/glob": {
5912-
"version": "10.2.4",
5913-
"resolved": "https://registry.npmjs.org/glob/-/glob-10.2.4.tgz",
5914-
"integrity": "sha512-fDboBse/sl1oXSLhIp0FcCJgzW9KmhC/q8ULTKC82zc+DL3TL7FNb8qlt5qqXN53MsKEUSIcb+7DLmEygOE5Yw==",
5912+
"version": "10.2.7",
5913+
"resolved": "https://registry.npmjs.org/glob/-/glob-10.2.7.tgz",
5914+
"integrity": "sha512-jTKehsravOJo8IJxUGfZILnkvVJM/MOfHRs8QcXolVef2zNI9Tqyy5+SeuOAZd3upViEZQLyFpQhYiHLrMUNmA==",
59155915
"inBundle": true,
59165916
"dependencies": {
59175917
"foreground-child": "^3.1.0",
59185918
"jackspeak": "^2.0.3",
5919-
"minimatch": "^9.0.0",
5920-
"minipass": "^5.0.0 || ^6.0.0",
5919+
"minimatch": "^9.0.1",
5920+
"minipass": "^5.0.0 || ^6.0.2",
59215921
"path-scurry": "^1.7.0"
59225922
},
59235923
"bin": {
@@ -8909,9 +8909,9 @@
89098909
}
89108910
},
89118911
"node_modules/minimatch": {
8912-
"version": "9.0.0",
8913-
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.0.tgz",
8914-
"integrity": "sha512-0jJj8AvgKqWN05mrwuqi8QYKx1WmYSUoKSxu5Qhs9prezTz10sxAHGNZe9J9cqIJzta8DWsleh2KaVaLl6Ru2w==",
8912+
"version": "9.0.1",
8913+
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.1.tgz",
8914+
"integrity": "sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==",
89158915
"inBundle": true,
89168916
"dependencies": {
89178917
"brace-expansion": "^2.0.1"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"columnify": "^1.6.0",
6868
"fastest-levenshtein": "^1.0.16",
6969
"fs-minipass": "^3.0.2",
70-
"glob": "^10.2.4",
70+
"glob": "^10.2.7",
7171
"graceful-fs": "^4.2.11",
7272
"hosted-git-info": "^6.1.1",
7373
"ini": "^4.1.0",

0 commit comments

Comments
 (0)