Skip to content

Commit 18b42a4

Browse files
committedMay 29, 2024
deps: glob@10.4.1
1 parent 5c6759d commit 18b42a4

25 files changed

+695
-412
lines changed
 

‎node_modules/glob/dist/commonjs/glob.js

+23-19
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
Object.defineProperty(exports, "__esModule", { value: true });
33
exports.Glob = void 0;
44
const minimatch_1 = require("minimatch");
5-
const path_scurry_1 = require("path-scurry");
65
const node_url_1 = require("node:url");
6+
const path_scurry_1 = require("path-scurry");
77
const pattern_js_1 = require("./pattern.js");
88
const walker_js_1 = require("./walker.js");
99
// if no process global, just call it linux.
1010
// so we default to case-sensitive, / separators
11-
const defaultPlatform = typeof process === 'object' &&
11+
const defaultPlatform = (typeof process === 'object' &&
1212
process &&
13-
typeof process.platform === 'string'
14-
? process.platform
13+
typeof process.platform === 'string') ?
14+
process.platform
1515
: 'linux';
1616
/**
1717
* An object that can perform glob pattern traversals.
@@ -41,6 +41,7 @@ class Glob {
4141
signal;
4242
windowsPathsNoEscape;
4343
withFileTypes;
44+
includeChildMatches;
4445
/**
4546
* The options provided to the constructor.
4647
*/
@@ -86,6 +87,7 @@ class Glob {
8687
this.noext = !!opts.noext;
8788
this.realpath = !!opts.realpath;
8889
this.absolute = opts.absolute;
90+
this.includeChildMatches = opts.includeChildMatches !== false;
8991
this.noglobstar = !!opts.noglobstar;
9092
this.matchBase = !!opts.matchBase;
9193
this.maxDepth =
@@ -100,7 +102,8 @@ class Glob {
100102
}
101103
this.windowsPathsNoEscape =
102104
!!opts.windowsPathsNoEscape ||
103-
opts.allowWindowsEscape === false;
105+
opts.allowWindowsEscape ===
106+
false;
104107
if (this.windowsPathsNoEscape) {
105108
pattern = pattern.map(p => p.replace(/\\/g, '/'));
106109
}
@@ -121,12 +124,9 @@ class Glob {
121124
}
122125
}
123126
else {
124-
const Scurry = opts.platform === 'win32'
125-
? path_scurry_1.PathScurryWin32
126-
: opts.platform === 'darwin'
127-
? path_scurry_1.PathScurryDarwin
128-
: opts.platform
129-
? path_scurry_1.PathScurryPosix
127+
const Scurry = opts.platform === 'win32' ? path_scurry_1.PathScurryWin32
128+
: opts.platform === 'darwin' ? path_scurry_1.PathScurryDarwin
129+
: opts.platform ? path_scurry_1.PathScurryPosix
130130
: path_scurry_1.PathScurry;
131131
this.scurry = new Scurry(this.cwd, {
132132
nocase: opts.nocase,
@@ -178,44 +178,48 @@ class Glob {
178178
return [
179179
...(await new walker_js_1.GlobWalker(this.patterns, this.scurry.cwd, {
180180
...this.opts,
181-
maxDepth: this.maxDepth !== Infinity
182-
? this.maxDepth + this.scurry.cwd.depth()
181+
maxDepth: this.maxDepth !== Infinity ?
182+
this.maxDepth + this.scurry.cwd.depth()
183183
: Infinity,
184184
platform: this.platform,
185185
nocase: this.nocase,
186+
includeChildMatches: this.includeChildMatches,
186187
}).walk()),
187188
];
188189
}
189190
walkSync() {
190191
return [
191192
...new walker_js_1.GlobWalker(this.patterns, this.scurry.cwd, {
192193
...this.opts,
193-
maxDepth: this.maxDepth !== Infinity
194-
? this.maxDepth + this.scurry.cwd.depth()
194+
maxDepth: this.maxDepth !== Infinity ?
195+
this.maxDepth + this.scurry.cwd.depth()
195196
: Infinity,
196197
platform: this.platform,
197198
nocase: this.nocase,
199+
includeChildMatches: this.includeChildMatches,
198200
}).walkSync(),
199201
];
200202
}
201203
stream() {
202204
return new walker_js_1.GlobStream(this.patterns, this.scurry.cwd, {
203205
...this.opts,
204-
maxDepth: this.maxDepth !== Infinity
205-
? this.maxDepth + this.scurry.cwd.depth()
206+
maxDepth: this.maxDepth !== Infinity ?
207+
this.maxDepth + this.scurry.cwd.depth()
206208
: Infinity,
207209
platform: this.platform,
208210
nocase: this.nocase,
211+
includeChildMatches: this.includeChildMatches,
209212
}).stream();
210213
}
211214
streamSync() {
212215
return new walker_js_1.GlobStream(this.patterns, this.scurry.cwd, {
213216
...this.opts,
214-
maxDepth: this.maxDepth !== Infinity
215-
? this.maxDepth + this.scurry.cwd.depth()
217+
maxDepth: this.maxDepth !== Infinity ?
218+
this.maxDepth + this.scurry.cwd.depth()
216219
: Infinity,
217220
platform: this.platform,
218221
nocase: this.nocase,
222+
includeChildMatches: this.includeChildMatches,
219223
}).streamSync();
220224
}
221225
/**

‎node_modules/glob/dist/commonjs/ignore.js

+37-32
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
77
exports.Ignore = void 0;
88
const minimatch_1 = require("minimatch");
99
const pattern_js_1 = require("./pattern.js");
10-
const defaultPlatform = typeof process === 'object' &&
10+
const defaultPlatform = (typeof process === 'object' &&
1111
process &&
12-
typeof process.platform === 'string'
13-
? process.platform
12+
typeof process.platform === 'string') ?
13+
process.platform
1414
: 'linux';
1515
/**
1616
* Class used to process ignored patterns
@@ -20,12 +20,15 @@ class Ignore {
2020
relativeChildren;
2121
absolute;
2222
absoluteChildren;
23+
platform;
24+
mmopts;
2325
constructor(ignored, { nobrace, nocase, noext, noglobstar, platform = defaultPlatform, }) {
2426
this.relative = [];
2527
this.absolute = [];
2628
this.relativeChildren = [];
2729
this.absoluteChildren = [];
28-
const mmopts = {
30+
this.platform = platform;
31+
this.mmopts = {
2932
dot: true,
3033
nobrace,
3134
nocase,
@@ -36,6 +39,10 @@ class Ignore {
3639
nocomment: true,
3740
nonegate: true,
3841
};
42+
for (const ign of ignored)
43+
this.add(ign);
44+
}
45+
add(ign) {
3946
// this is a little weird, but it gives us a clean set of optimized
4047
// minimatch matchers, without getting tripped up if one of them
4148
// ends in /** inside a brace section, and it's only inefficient at
@@ -48,36 +55,34 @@ class Ignore {
4855
// for absolute-ness.
4956
// Yet another way, Minimatch could take an array of glob strings, and
5057
// a cwd option, and do the right thing.
51-
for (const ign of ignored) {
52-
const mm = new minimatch_1.Minimatch(ign, mmopts);
53-
for (let i = 0; i < mm.set.length; i++) {
54-
const parsed = mm.set[i];
55-
const globParts = mm.globParts[i];
56-
/* c8 ignore start */
57-
if (!parsed || !globParts) {
58-
throw new Error('invalid pattern object');
59-
}
60-
// strip off leading ./ portions
61-
// https://github.com/isaacs/node-glob/issues/570
62-
while (parsed[0] === '.' && globParts[0] === '.') {
63-
parsed.shift();
64-
globParts.shift();
65-
}
66-
/* c8 ignore stop */
67-
const p = new pattern_js_1.Pattern(parsed, globParts, 0, platform);
68-
const m = new minimatch_1.Minimatch(p.globString(), mmopts);
69-
const children = globParts[globParts.length - 1] === '**';
70-
const absolute = p.isAbsolute();
58+
const mm = new minimatch_1.Minimatch(ign, this.mmopts);
59+
for (let i = 0; i < mm.set.length; i++) {
60+
const parsed = mm.set[i];
61+
const globParts = mm.globParts[i];
62+
/* c8 ignore start */
63+
if (!parsed || !globParts) {
64+
throw new Error('invalid pattern object');
65+
}
66+
// strip off leading ./ portions
67+
// https://github.com/isaacs/node-glob/issues/570
68+
while (parsed[0] === '.' && globParts[0] === '.') {
69+
parsed.shift();
70+
globParts.shift();
71+
}
72+
/* c8 ignore stop */
73+
const p = new pattern_js_1.Pattern(parsed, globParts, 0, this.platform);
74+
const m = new minimatch_1.Minimatch(p.globString(), this.mmopts);
75+
const children = globParts[globParts.length - 1] === '**';
76+
const absolute = p.isAbsolute();
77+
if (absolute)
78+
this.absolute.push(m);
79+
else
80+
this.relative.push(m);
81+
if (children) {
7182
if (absolute)
72-
this.absolute.push(m);
83+
this.absoluteChildren.push(m);
7384
else
74-
this.relative.push(m);
75-
if (children) {
76-
if (absolute)
77-
this.absoluteChildren.push(m);
78-
else
79-
this.relativeChildren.push(m);
80-
}
85+
this.relativeChildren.push(m);
8186
}
8287
}
8388
}

‎node_modules/glob/dist/commonjs/index.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
"use strict";
22
Object.defineProperty(exports, "__esModule", { value: true });
3-
exports.glob = exports.hasMagic = exports.Glob = exports.unescape = exports.escape = exports.sync = exports.iterate = exports.iterateSync = exports.stream = exports.streamSync = exports.globIterate = exports.globIterateSync = exports.globSync = exports.globStream = exports.globStreamSync = void 0;
3+
exports.glob = exports.sync = exports.iterate = exports.iterateSync = exports.stream = exports.streamSync = exports.globIterate = exports.globIterateSync = exports.globSync = exports.globStream = exports.globStreamSync = exports.Ignore = exports.hasMagic = exports.Glob = exports.unescape = exports.escape = void 0;
44
const minimatch_1 = require("minimatch");
55
const glob_js_1 = require("./glob.js");
66
const has_magic_js_1 = require("./has-magic.js");
7+
var minimatch_2 = require("minimatch");
8+
Object.defineProperty(exports, "escape", { enumerable: true, get: function () { return minimatch_2.escape; } });
9+
Object.defineProperty(exports, "unescape", { enumerable: true, get: function () { return minimatch_2.unescape; } });
10+
var glob_js_2 = require("./glob.js");
11+
Object.defineProperty(exports, "Glob", { enumerable: true, get: function () { return glob_js_2.Glob; } });
12+
var has_magic_js_2 = require("./has-magic.js");
13+
Object.defineProperty(exports, "hasMagic", { enumerable: true, get: function () { return has_magic_js_2.hasMagic; } });
14+
var ignore_js_1 = require("./ignore.js");
15+
Object.defineProperty(exports, "Ignore", { enumerable: true, get: function () { return ignore_js_1.Ignore; } });
716
function globStreamSync(pattern, options = {}) {
817
return new glob_js_1.Glob(pattern, options).streamSync();
918
}
@@ -38,15 +47,6 @@ exports.sync = Object.assign(globSync, {
3847
stream: globStreamSync,
3948
iterate: globIterateSync,
4049
});
41-
/* c8 ignore start */
42-
var minimatch_2 = require("minimatch");
43-
Object.defineProperty(exports, "escape", { enumerable: true, get: function () { return minimatch_2.escape; } });
44-
Object.defineProperty(exports, "unescape", { enumerable: true, get: function () { return minimatch_2.unescape; } });
45-
var glob_js_2 = require("./glob.js");
46-
Object.defineProperty(exports, "Glob", { enumerable: true, get: function () { return glob_js_2.Glob; } });
47-
var has_magic_js_2 = require("./has-magic.js");
48-
Object.defineProperty(exports, "hasMagic", { enumerable: true, get: function () { return has_magic_js_2.hasMagic; } });
49-
/* c8 ignore stop */
5050
exports.glob = Object.assign(glob_, {
5151
glob: glob_,
5252
globSync,

‎node_modules/glob/dist/commonjs/pattern.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ class Pattern {
110110
globString() {
111111
return (this.#globString =
112112
this.#globString ||
113-
(this.#index === 0
114-
? this.isAbsolute()
115-
? this.#globList[0] + this.#globList.slice(1).join('/')
113+
(this.#index === 0 ?
114+
this.isAbsolute() ?
115+
this.#globList[0] + this.#globList.slice(1).join('/')
116116
: this.#globList.join('/')
117117
: this.#globList.slice(this.#index).join('/')));
118118
}
@@ -141,8 +141,8 @@ class Pattern {
141141
*/
142142
isUNC() {
143143
const pl = this.#patternList;
144-
return this.#isUNC !== undefined
145-
? this.#isUNC
144+
return this.#isUNC !== undefined ?
145+
this.#isUNC
146146
: (this.#isUNC =
147147
this.#platform === 'win32' &&
148148
this.#index === 0 &&
@@ -163,8 +163,8 @@ class Pattern {
163163
*/
164164
isDrive() {
165165
const pl = this.#patternList;
166-
return this.#isDrive !== undefined
167-
? this.#isDrive
166+
return this.#isDrive !== undefined ?
167+
this.#isDrive
168168
: (this.#isDrive =
169169
this.#platform === 'win32' &&
170170
this.#index === 0 &&
@@ -180,8 +180,8 @@ class Pattern {
180180
*/
181181
isAbsolute() {
182182
const pl = this.#patternList;
183-
return this.#isAbsolute !== undefined
184-
? this.#isAbsolute
183+
return this.#isAbsolute !== undefined ?
184+
this.#isAbsolute
185185
: (this.#isAbsolute =
186186
(pl[0] === '' && pl.length > 1) ||
187187
this.isDrive() ||
@@ -192,8 +192,8 @@ class Pattern {
192192
*/
193193
root() {
194194
const p = this.#patternList[0];
195-
return typeof p === 'string' && this.isAbsolute() && this.#index === 0
196-
? p
195+
return (typeof p === 'string' && this.isAbsolute() && this.#index === 0) ?
196+
p
197197
: '';
198198
}
199199
/**

‎node_modules/glob/dist/commonjs/processor.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,8 @@ class Processor {
103103
this.opts = opts;
104104
this.follow = !!opts.follow;
105105
this.dot = !!opts.dot;
106-
this.hasWalkedCache = hasWalkedCache
107-
? hasWalkedCache.copy()
108-
: new HasWalkedCache();
106+
this.hasWalkedCache =
107+
hasWalkedCache ? hasWalkedCache.copy() : new HasWalkedCache();
109108
}
110109
processPatterns(target, patterns) {
111110
this.patterns = patterns;
@@ -118,8 +117,8 @@ class Processor {
118117
const absolute = pattern.isAbsolute() && this.opts.absolute !== false;
119118
// start absolute patterns at root
120119
if (root) {
121-
t = t.resolve(root === '/' && this.opts.root !== undefined
122-
? this.opts.root
120+
t = t.resolve(root === '/' && this.opts.root !== undefined ?
121+
this.opts.root
123122
: root);
124123
const rest = pattern.rest();
125124
if (!rest) {

‎node_modules/glob/dist/commonjs/walker.js

+22-13
Original file line numberDiff line numberDiff line change

‎node_modules/glob/dist/esm/bin.mjs

+5-7
Original file line numberDiff line numberDiff line change

‎node_modules/glob/dist/esm/glob.js

+23-19
Original file line numberDiff line numberDiff line change

‎node_modules/glob/dist/esm/ignore.js

+37-32
Original file line numberDiff line numberDiff line change

‎node_modules/glob/dist/esm/index.js

+4-5
Original file line numberDiff line numberDiff line change

‎node_modules/glob/dist/esm/pattern.js

+11-11
Original file line numberDiff line numberDiff line change

‎node_modules/glob/dist/esm/processor.js

+4-5
Original file line numberDiff line numberDiff line change

‎node_modules/glob/dist/esm/walker.js

+22-13
Original file line numberDiff line numberDiff line change

‎node_modules/glob/package.json

+12-13
Original file line numberDiff line numberDiff line change

‎node_modules/jackspeak/dist/commonjs/index.js

+204-92
Large diffs are not rendered by default.

‎node_modules/jackspeak/dist/commonjs/package.json

+3-1
Original file line numberDiff line numberDiff line change

‎node_modules/jackspeak/dist/esm/index.js

+204-92
Large diffs are not rendered by default.

‎node_modules/jackspeak/dist/esm/package.json

+3-1
Original file line numberDiff line numberDiff line change

‎node_modules/jackspeak/dist/esm/parse-args.js

+2-2
Original file line numberDiff line numberDiff line change

‎node_modules/jackspeak/package.json

+5-4
Original file line numberDiff line numberDiff line change

‎node_modules/minipass/dist/commonjs/package.json

+3-1
Original file line numberDiff line numberDiff line change

‎node_modules/minipass/dist/esm/package.json

+3-1
Original file line numberDiff line numberDiff line change

‎node_modules/minipass/package.json

+5-5
Original file line numberDiff line numberDiff line change

‎package-lock.json

+37-17
Original file line numberDiff line numberDiff line change

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"cli-columns": "^4.0.0",
7070
"fastest-levenshtein": "^1.0.16",
7171
"fs-minipass": "^3.0.3",
72-
"glob": "^10.3.15",
72+
"glob": "^10.4.1",
7373
"graceful-fs": "^4.2.11",
7474
"hosted-git-info": "^7.0.2",
7575
"ini": "^4.1.3",

0 commit comments

Comments
 (0)
Please sign in to comment.