Skip to content

Commit af93130

Browse files
committedOct 2, 2023
deps: glob@10.3.10
1 parent 3ebc474 commit af93130

33 files changed

+520
-252
lines changed
 

‎node_modules/glob/dist/cjs/package.json

-4
This file was deleted.

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

+6-1
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 ‎node_modules/glob/dist/commonjs/ignore.js

+6-1
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
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"type":"commonjs"}

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

+4-11
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) {

‎node_modules/glob/dist/esm/bin.d.mts

+3
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

‎node_modules/glob/dist/cjs/src/bin.js ‎node_modules/glob/dist/esm/bin.mjs

+19-14
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
#!/usr/bin/env node
2-
"use strict";
3-
Object.defineProperty(exports, "__esModule", { value: true });
4-
const foreground_child_1 = require("foreground-child");
5-
const fs_1 = require("fs");
6-
const jackspeak_1 = require("jackspeak");
7-
const package_json_1 = require("../package.json");
8-
const index_js_1 = require("./index.js");
9-
const j = (0, jackspeak_1.jack)({
2+
import { foregroundChild } from 'foreground-child';
3+
import { existsSync } from 'fs';
4+
import { readFile } from 'fs/promises';
5+
import { jack } from 'jackspeak';
6+
import { join } from 'path';
7+
import { fileURLToPath } from 'url';
8+
import { globStream } from './index.js';
9+
/* c8 ignore start */
10+
const { version } = JSON.parse(await readFile(fileURLToPath(new URL('../../package.json', import.meta.url)), 'utf8').catch(() => readFile(fileURLToPath(new URL('../../package.json', import.meta.url)), 'utf8')));
11+
/* c8 ignore stop */
12+
const j = jack({
1013
usage: 'glob [options] [<pattern> [<pattern> ...]]',
1114
})
1215
.description(`
13-
Glob v${package_json_1.version}
16+
Glob v${version}
1417
1518
Expand the positional glob expression arguments into any matching file
1619
system paths found.
@@ -228,9 +231,11 @@ try {
228231
positionals.push(values.default);
229232
const patterns = values.all
230233
? positionals
231-
: positionals.filter(p => !(0, fs_1.existsSync)(p));
232-
const matches = values.all ? [] : positionals.filter(p => (0, fs_1.existsSync)(p));
233-
const stream = (0, index_js_1.globStream)(patterns, {
234+
: positionals.filter(p => !existsSync(p));
235+
const matches = values.all
236+
? []
237+
: positionals.filter(p => existsSync(p)).map(p => join(p));
238+
const stream = globStream(patterns, {
234239
absolute: values.absolute,
235240
cwd: values.cwd,
236241
dot: values.dot,
@@ -259,12 +264,12 @@ try {
259264
}
260265
else {
261266
stream.on('data', f => matches.push(f));
262-
stream.on('end', () => (0, foreground_child_1.foregroundChild)(cmd, matches, { shell: true }));
267+
stream.on('end', () => foregroundChild(cmd, matches, { shell: true }));
263268
}
264269
}
265270
catch (e) {
266271
console.error(j.usage());
267272
console.error(e instanceof Error ? e.message : String(e));
268273
process.exit(1);
269274
}
270-
//# sourceMappingURL=bin.js.map
275+
//# sourceMappingURL=bin.mjs.map

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

+6-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,12 @@ export class Glob {
159159
return set;
160160
}, [[], []]);
161161
this.patterns = matchSet.map((set, i) => {
162-
return new Pattern(set, globParts[i], 0, this.platform);
162+
const g = globParts[i];
163+
/* c8 ignore start */
164+
if (!g)
165+
throw new Error('invalid pattern object');
166+
/* c8 ignore stop */
167+
return new Pattern(set, g, 0, this.platform);
163168
});
164169
}
165170
async walk() {

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

+6-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ export class Ignore {
5050
for (let i = 0; i < mm.set.length; i++) {
5151
const parsed = mm.set[i];
5252
const globParts = mm.globParts[i];
53+
/* c8 ignore start */
54+
if (!parsed || !globParts) {
55+
throw new Error('invalid pattern object');
56+
}
57+
/* c8 ignore stop */
5358
const p = new Pattern(parsed, globParts, 0, platform);
5459
const m = new Minimatch(p.globString(), mmopts);
5560
const children = globParts[globParts.length - 1] === '**';
@@ -91,7 +96,7 @@ export class Ignore {
9196
}
9297
for (const m of this.absoluteChildren) {
9398
if (m.match(fullpath))
94-
true;
99+
return true;
95100
}
96101
return false;
97102
}
File renamed without changes.
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"type":"module"}
File renamed without changes.

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

+4-11
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,6 @@ export class Processor {
132132
while (typeof (p = pattern.pattern()) === 'string' &&
133133
(rest = pattern.rest())) {
134134
const c = t.resolve(p);
135-
// we can be reasonably sure that .. is a readable dir
136-
if (c.isUnknown() && p !== '..')
137-
break;
138135
t = c;
139136
pattern = rest;
140137
changed = true;
@@ -150,14 +147,10 @@ export class Processor {
150147
// more strings for an unknown entry,
151148
// or a pattern starting with magic, mounted on t.
152149
if (typeof p === 'string') {
153-
// must be final entry
154-
if (!rest) {
155-
const ifDir = p === '..' || p === '' || p === '.';
156-
this.matches.add(t.resolve(p), absolute, ifDir);
157-
}
158-
else {
159-
this.subwalks.add(t, pattern);
160-
}
150+
// must not be final entry, otherwise we would have
151+
// concatenated it earlier.
152+
const ifDir = p === '..' || p === '' || p === '.';
153+
this.matches.add(t.resolve(p), absolute, ifDir);
161154
continue;
162155
}
163156
else if (p === GLOBSTAR) {
File renamed without changes.

‎node_modules/glob/dist/mjs/package.json

-4
This file was deleted.

‎node_modules/glob/package.json

+34-35
Original file line numberDiff line numberDiff line change
@@ -2,50 +2,57 @@
22
"author": "Isaac Z. Schlueter <i@izs.me> (https://blog.izs.me/)",
33
"name": "glob",
44
"description": "the most correct and second fastest glob implementation in JavaScript",
5-
"version": "10.3.3",
6-
"bin": "./dist/cjs/src/bin.js",
7-
"repository": {
8-
"type": "git",
9-
"url": "git://github.com/isaacs/node-glob.git"
5+
"version": "10.3.10",
6+
"type": "module",
7+
"tshy": {
8+
"main": true,
9+
"exports": {
10+
"./package.json": "./package.json",
11+
".": "./src/index.ts"
12+
}
1013
},
11-
"main": "./dist/cjs/src/index.js",
12-
"module": "./dist/mjs/index.js",
13-
"types": "./dist/mjs/index.d.ts",
14+
"bin": "./dist/esm/bin.mjs",
15+
"main": "./dist/commonjs/index.js",
16+
"types": "./dist/commonjs/index.d.ts",
1417
"exports": {
18+
"./package.json": "./package.json",
1519
".": {
1620
"import": {
17-
"types": "./dist/mjs/index.d.ts",
18-
"default": "./dist/mjs/index.js"
21+
"types": "./dist/esm/index.d.ts",
22+
"default": "./dist/esm/index.js"
1923
},
2024
"require": {
21-
"types": "./dist/cjs/src/index.d.ts",
22-
"default": "./dist/cjs/src/index.js"
25+
"types": "./dist/commonjs/index.d.ts",
26+
"default": "./dist/commonjs/index.js"
2327
}
2428
}
2529
},
30+
"repository": {
31+
"type": "git",
32+
"url": "git://github.com/isaacs/node-glob.git"
33+
},
2634
"files": [
2735
"dist"
2836
],
2937
"scripts": {
3038
"preversion": "npm test",
3139
"postversion": "npm publish",
3240
"prepublishOnly": "git push origin --follow-tags",
33-
"preprepare": "rm -rf dist",
34-
"prepare": "tsc -p tsconfig.json && tsc -p tsconfig-esm.json && bash fixup.sh",
41+
"prepare": "tshy",
3542
"pretest": "npm run prepare",
3643
"presnap": "npm run prepare",
37-
"test": "c8 tap",
38-
"snap": "c8 tap",
44+
"test": "tap",
45+
"snap": "tap",
3946
"format": "prettier --write . --loglevel warn",
40-
"typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts",
47+
"typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts",
4148
"prepublish": "npm run benchclean",
4249
"profclean": "rm -f v8.log profile.txt",
4350
"test-regen": "npm run profclean && TEST_REGEN=1 node --no-warnings --loader ts-node/esm test/00-setup.ts",
4451
"prebench": "npm run prepare",
4552
"bench": "bash benchmark.sh",
4653
"preprof": "npm run prepare",
4754
"prof": "bash prof.sh",
48-
"benchclean": "node benchclean.js"
55+
"benchclean": "node benchclean.cjs"
4956
},
5057
"prettier": {
5158
"semi": false,
@@ -60,33 +67,25 @@
6067
},
6168
"dependencies": {
6269
"foreground-child": "^3.1.0",
63-
"jackspeak": "^2.0.3",
70+
"jackspeak": "^2.3.5",
6471
"minimatch": "^9.0.1",
6572
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0",
6673
"path-scurry": "^1.10.1"
6774
},
6875
"devDependencies": {
6976
"@types/node": "^20.3.2",
70-
"@types/tap": "^15.0.7",
71-
"c8": "^7.12.0",
7277
"memfs": "^3.4.13",
73-
"mkdirp": "^2.1.4",
78+
"mkdirp": "^3.0.1",
7479
"prettier": "^2.8.3",
75-
"rimraf": "^4.1.3",
76-
"tap": "^16.3.4",
77-
"ts-node": "^10.9.1",
78-
"typedoc": "^0.23.24",
79-
"typescript": "^4.9.4"
80+
"rimraf": "^5.0.1",
81+
"sync-content": "^1.0.2",
82+
"tap": "^18.1.4",
83+
"tshy": "^1.2.2",
84+
"typedoc": "^0.25.1",
85+
"typescript": "^5.2.2"
8086
},
8187
"tap": {
82-
"before": "test/00-setup.ts",
83-
"coverage": false,
84-
"node-arg": [
85-
"--no-warnings",
86-
"--loader",
87-
"ts-node/esm"
88-
],
89-
"ts": false
88+
"before": "test/00-setup.ts"
9089
},
9190
"license": "ISC",
9291
"funding": {

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

-3
This file was deleted.

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

+178-51
Original file line numberDiff line numberDiff line change

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

+1
Original file line numberDiff line numberDiff line change

‎node_modules/jackspeak/dist/cjs/parse-args.js ‎node_modules/jackspeak/dist/commonjs/parse-args.js

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

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

+178-51
Original file line numberDiff line numberDiff line change

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

+1
Original file line numberDiff line numberDiff line change

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

+26
Original file line numberDiff line numberDiff line change

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

-3
This file was deleted.

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

-19
This file was deleted.

‎node_modules/jackspeak/package.json

+26-30
Original file line numberDiff line numberDiff line change

‎package-lock.json

+9-9
Original file line numberDiff line numberDiff line change

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"columnify": "^1.6.0",
7171
"fastest-levenshtein": "^1.0.16",
7272
"fs-minipass": "^3.0.3",
73-
"glob": "^10.3.3",
73+
"glob": "^10.3.10",
7474
"graceful-fs": "^4.2.11",
7575
"hosted-git-info": "^7.0.0",
7676
"ini": "^4.1.1",

0 commit comments

Comments
 (0)
Please sign in to comment.