Skip to content

Commit

Permalink
deps: glob@10.3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Oct 2, 2023
1 parent 3ebc474 commit af93130
Show file tree
Hide file tree
Showing 33 changed files with 520 additions and 252 deletions.
4 changes: 0 additions & 4 deletions node_modules/glob/dist/cjs/package.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,12 @@ class Glob {
return set;
}, [[], []]);
this.patterns = matchSet.map((set, i) => {
return new pattern_js_1.Pattern(set, globParts[i], 0, this.platform);
const g = globParts[i];
/* c8 ignore start */
if (!g)
throw new Error('invalid pattern object');
/* c8 ignore stop */
return new pattern_js_1.Pattern(set, g, 0, this.platform);
});
}
async walk() {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ class Ignore {
for (let i = 0; i < mm.set.length; i++) {
const parsed = mm.set[i];
const globParts = mm.globParts[i];
/* c8 ignore start */
if (!parsed || !globParts) {
throw new Error('invalid pattern object');
}
/* c8 ignore stop */
const p = new pattern_js_1.Pattern(parsed, globParts, 0, platform);
const m = new minimatch_1.Minimatch(p.globString(), mmopts);
const children = globParts[globParts.length - 1] === '**';
Expand Down Expand Up @@ -94,7 +99,7 @@ class Ignore {
}
for (const m of this.absoluteChildren) {
if (m.match(fullpath))
true;
return true;
}
return false;
}
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions node_modules/glob/dist/commonjs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type":"commonjs"}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@ class Processor {
while (typeof (p = pattern.pattern()) === 'string' &&
(rest = pattern.rest())) {
const c = t.resolve(p);
// we can be reasonably sure that .. is a readable dir
if (c.isUnknown() && p !== '..')
break;
t = c;
pattern = rest;
changed = true;
Expand All @@ -156,14 +153,10 @@ class Processor {
// more strings for an unknown entry,
// or a pattern starting with magic, mounted on t.
if (typeof p === 'string') {
// must be final entry
if (!rest) {
const ifDir = p === '..' || p === '' || p === '.';
this.matches.add(t.resolve(p), absolute, ifDir);
}
else {
this.subwalks.add(t, pattern);
}
// must not be final entry, otherwise we would have
// concatenated it earlier.
const ifDir = p === '..' || p === '' || p === '.';
this.matches.add(t.resolve(p), absolute, ifDir);
continue;
}
else if (p === minimatch_1.GLOBSTAR) {
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions node_modules/glob/dist/esm/bin.d.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env node
export {};
//# sourceMappingURL=bin.d.mts.map
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
#!/usr/bin/env node
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const foreground_child_1 = require("foreground-child");
const fs_1 = require("fs");
const jackspeak_1 = require("jackspeak");
const package_json_1 = require("../package.json");
const index_js_1 = require("./index.js");
const j = (0, jackspeak_1.jack)({
import { foregroundChild } from 'foreground-child';
import { existsSync } from 'fs';
import { readFile } from 'fs/promises';
import { jack } from 'jackspeak';
import { join } from 'path';
import { fileURLToPath } from 'url';
import { globStream } from './index.js';
/* c8 ignore start */
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')));
/* c8 ignore stop */
const j = jack({
usage: 'glob [options] [<pattern> [<pattern> ...]]',
})
.description(`
Glob v${package_json_1.version}
Glob v${version}
Expand the positional glob expression arguments into any matching file
system paths found.
Expand Down Expand Up @@ -228,9 +231,11 @@ try {
positionals.push(values.default);
const patterns = values.all
? positionals
: positionals.filter(p => !(0, fs_1.existsSync)(p));
const matches = values.all ? [] : positionals.filter(p => (0, fs_1.existsSync)(p));
const stream = (0, index_js_1.globStream)(patterns, {
: positionals.filter(p => !existsSync(p));
const matches = values.all
? []
: positionals.filter(p => existsSync(p)).map(p => join(p));
const stream = globStream(patterns, {
absolute: values.absolute,
cwd: values.cwd,
dot: values.dot,
Expand Down Expand Up @@ -259,12 +264,12 @@ try {
}
else {
stream.on('data', f => matches.push(f));
stream.on('end', () => (0, foreground_child_1.foregroundChild)(cmd, matches, { shell: true }));
stream.on('end', () => foregroundChild(cmd, matches, { shell: true }));
}
}
catch (e) {
console.error(j.usage());
console.error(e instanceof Error ? e.message : String(e));
process.exit(1);
}
//# sourceMappingURL=bin.js.map
//# sourceMappingURL=bin.mjs.map
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,12 @@ export class Glob {
return set;
}, [[], []]);
this.patterns = matchSet.map((set, i) => {
return new Pattern(set, globParts[i], 0, this.platform);
const g = globParts[i];
/* c8 ignore start */
if (!g)
throw new Error('invalid pattern object');
/* c8 ignore stop */
return new Pattern(set, g, 0, this.platform);
});
}
async walk() {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ export class Ignore {
for (let i = 0; i < mm.set.length; i++) {
const parsed = mm.set[i];
const globParts = mm.globParts[i];
/* c8 ignore start */
if (!parsed || !globParts) {
throw new Error('invalid pattern object');
}
/* c8 ignore stop */
const p = new Pattern(parsed, globParts, 0, platform);
const m = new Minimatch(p.globString(), mmopts);
const children = globParts[globParts.length - 1] === '**';
Expand Down Expand Up @@ -91,7 +96,7 @@ export class Ignore {
}
for (const m of this.absoluteChildren) {
if (m.match(fullpath))
true;
return true;
}
return false;
}
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions node_modules/glob/dist/esm/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type":"module"}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,6 @@ export class Processor {
while (typeof (p = pattern.pattern()) === 'string' &&
(rest = pattern.rest())) {
const c = t.resolve(p);
// we can be reasonably sure that .. is a readable dir
if (c.isUnknown() && p !== '..')
break;
t = c;
pattern = rest;
changed = true;
Expand All @@ -150,14 +147,10 @@ export class Processor {
// more strings for an unknown entry,
// or a pattern starting with magic, mounted on t.
if (typeof p === 'string') {
// must be final entry
if (!rest) {
const ifDir = p === '..' || p === '' || p === '.';
this.matches.add(t.resolve(p), absolute, ifDir);
}
else {
this.subwalks.add(t, pattern);
}
// must not be final entry, otherwise we would have
// concatenated it earlier.
const ifDir = p === '..' || p === '' || p === '.';
this.matches.add(t.resolve(p), absolute, ifDir);
continue;
}
else if (p === GLOBSTAR) {
Expand Down
File renamed without changes.
4 changes: 0 additions & 4 deletions node_modules/glob/dist/mjs/package.json

This file was deleted.

69 changes: 34 additions & 35 deletions node_modules/glob/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,57 @@
"author": "Isaac Z. Schlueter <i@izs.me> (https://blog.izs.me/)",
"name": "glob",
"description": "the most correct and second fastest glob implementation in JavaScript",
"version": "10.3.3",
"bin": "./dist/cjs/src/bin.js",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-glob.git"
"version": "10.3.10",
"type": "module",
"tshy": {
"main": true,
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
}
},
"main": "./dist/cjs/src/index.js",
"module": "./dist/mjs/index.js",
"types": "./dist/mjs/index.d.ts",
"bin": "./dist/esm/bin.mjs",
"main": "./dist/commonjs/index.js",
"types": "./dist/commonjs/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./dist/mjs/index.d.ts",
"default": "./dist/mjs/index.js"
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./dist/cjs/src/index.d.ts",
"default": "./dist/cjs/src/index.js"
"types": "./dist/commonjs/index.d.ts",
"default": "./dist/commonjs/index.js"
}
}
},
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-glob.git"
},
"files": [
"dist"
],
"scripts": {
"preversion": "npm test",
"postversion": "npm publish",
"prepublishOnly": "git push origin --follow-tags",
"preprepare": "rm -rf dist",
"prepare": "tsc -p tsconfig.json && tsc -p tsconfig-esm.json && bash fixup.sh",
"prepare": "tshy",
"pretest": "npm run prepare",
"presnap": "npm run prepare",
"test": "c8 tap",
"snap": "c8 tap",
"test": "tap",
"snap": "tap",
"format": "prettier --write . --loglevel warn",
"typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts",
"typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts",
"prepublish": "npm run benchclean",
"profclean": "rm -f v8.log profile.txt",
"test-regen": "npm run profclean && TEST_REGEN=1 node --no-warnings --loader ts-node/esm test/00-setup.ts",
"prebench": "npm run prepare",
"bench": "bash benchmark.sh",
"preprof": "npm run prepare",
"prof": "bash prof.sh",
"benchclean": "node benchclean.js"
"benchclean": "node benchclean.cjs"
},
"prettier": {
"semi": false,
Expand All @@ -60,33 +67,25 @@
},
"dependencies": {
"foreground-child": "^3.1.0",
"jackspeak": "^2.0.3",
"jackspeak": "^2.3.5",
"minimatch": "^9.0.1",
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0",
"path-scurry": "^1.10.1"
},
"devDependencies": {
"@types/node": "^20.3.2",
"@types/tap": "^15.0.7",
"c8": "^7.12.0",
"memfs": "^3.4.13",
"mkdirp": "^2.1.4",
"mkdirp": "^3.0.1",
"prettier": "^2.8.3",
"rimraf": "^4.1.3",
"tap": "^16.3.4",
"ts-node": "^10.9.1",
"typedoc": "^0.23.24",
"typescript": "^4.9.4"
"rimraf": "^5.0.1",
"sync-content": "^1.0.2",
"tap": "^18.1.4",
"tshy": "^1.2.2",
"typedoc": "^0.25.1",
"typescript": "^5.2.2"
},
"tap": {
"before": "test/00-setup.ts",
"coverage": false,
"node-arg": [
"--no-warnings",
"--loader",
"ts-node/esm"
],
"ts": false
"before": "test/00-setup.ts"
},
"license": "ISC",
"funding": {
Expand Down
3 changes: 0 additions & 3 deletions node_modules/jackspeak/dist/cjs/package.json

This file was deleted.

Loading

0 comments on commit af93130

Please sign in to comment.