Skip to content

Commit af93130

Browse files
committed
1 parent 3ebc474 commit af93130

33 files changed

+520
-252
lines changed

node_modules/glob/dist/cjs/package.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

node_modules/glob/dist/cjs/src/glob.js renamed to node_modules/glob/dist/commonjs/glob.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,12 @@ class Glob {
162162
return set;
163163
}, [[], []]);
164164
this.patterns = matchSet.map((set, i) => {
165-
return new pattern_js_1.Pattern(set, globParts[i], 0, this.platform);
165+
const g = globParts[i];
166+
/* c8 ignore start */
167+
if (!g)
168+
throw new Error('invalid pattern object');
169+
/* c8 ignore stop */
170+
return new pattern_js_1.Pattern(set, g, 0, this.platform);
166171
});
167172
}
168173
async walk() {

node_modules/glob/dist/cjs/src/ignore.js renamed to node_modules/glob/dist/commonjs/ignore.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ class Ignore {
5353
for (let i = 0; i < mm.set.length; i++) {
5454
const parsed = mm.set[i];
5555
const globParts = mm.globParts[i];
56+
/* c8 ignore start */
57+
if (!parsed || !globParts) {
58+
throw new Error('invalid pattern object');
59+
}
60+
/* c8 ignore stop */
5661
const p = new pattern_js_1.Pattern(parsed, globParts, 0, platform);
5762
const m = new minimatch_1.Minimatch(p.globString(), mmopts);
5863
const children = globParts[globParts.length - 1] === '**';
@@ -94,7 +99,7 @@ class Ignore {
9499
}
95100
for (const m of this.absoluteChildren) {
96101
if (m.match(fullpath))
97-
true;
102+
return true;
98103
}
99104
return false;
100105
}
File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"type":"commonjs"}

node_modules/glob/dist/cjs/src/processor.js renamed to node_modules/glob/dist/commonjs/processor.js

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,6 @@ class Processor {
138138
while (typeof (p = pattern.pattern()) === 'string' &&
139139
(rest = pattern.rest())) {
140140
const c = t.resolve(p);
141-
// we can be reasonably sure that .. is a readable dir
142-
if (c.isUnknown() && p !== '..')
143-
break;
144141
t = c;
145142
pattern = rest;
146143
changed = true;
@@ -156,14 +153,10 @@ class Processor {
156153
// more strings for an unknown entry,
157154
// or a pattern starting with magic, mounted on t.
158155
if (typeof p === 'string') {
159-
// must be final entry
160-
if (!rest) {
161-
const ifDir = p === '..' || p === '' || p === '.';
162-
this.matches.add(t.resolve(p), absolute, ifDir);
163-
}
164-
else {
165-
this.subwalks.add(t, pattern);
166-
}
156+
// must not be final entry, otherwise we would have
157+
// concatenated it earlier.
158+
const ifDir = p === '..' || p === '' || p === '.';
159+
this.matches.add(t.resolve(p), absolute, ifDir);
167160
continue;
168161
}
169162
else if (p === minimatch_1.GLOBSTAR) {
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env node
2+
export {};
3+
//# sourceMappingURL=bin.d.mts.map

0 commit comments

Comments
 (0)