Skip to content

Commit

Permalink
deps: glob@10.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Aug 30, 2023
1 parent 4c9eb17 commit ede7f5e
Show file tree
Hide file tree
Showing 16 changed files with 124 additions and 43 deletions.
2 changes: 1 addition & 1 deletion node_modules/glob/dist/cjs/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "10.2.7",
"version": "10.3.3",
"type": "commonjs"
}
16 changes: 13 additions & 3 deletions node_modules/glob/dist/cjs/src/bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
const foreground_child_1 = require("foreground-child");
const fs_1 = require("fs");
const jackspeak_1 = require("jackspeak");
const index_js_1 = require("./index.js");
const package_json_1 = require("../package.json");
const index_js_1 = require("./index.js");
const j = (0, jackspeak_1.jack)({
usage: 'glob [options] [<pattern> [<pattern> ...]]'
usage: 'glob [options] [<pattern> [<pattern> ...]]',
})
.description(`
Glob v${package_json_1.version}
Expand All @@ -22,6 +22,14 @@ const j = (0, jackspeak_1.jack)({
description: `Run the command provided, passing the glob expression
matches as arguments.`,
},
})
.opt({
default: {
short: 'p',
hint: 'pattern',
description: `If no positional arguments are provided, glob will use
this pattern`,
},
})
.flag({
all: {
Expand Down Expand Up @@ -214,8 +222,10 @@ try {
console.log(j.usage());
process.exit(0);
}
if (positionals.length === 0)
if (positionals.length === 0 && !values.default)
throw 'No patterns provided';
if (positionals.length === 0 && values.default)
positionals.push(values.default);
const patterns = values.all
? positionals
: positionals.filter(p => !(0, fs_1.existsSync)(p));
Expand Down
4 changes: 4 additions & 0 deletions node_modules/glob/dist/cjs/src/glob.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ class Glob {
* again.
*/
constructor(pattern, opts) {
/* c8 ignore start */
if (!opts)
throw new TypeError('glob options required');
/* c8 ignore stop */
this.withFileTypes = !!opts.withFileTypes;
this.signal = opts.signal;
this.follow = !!opts.follow;
Expand Down
4 changes: 4 additions & 0 deletions node_modules/glob/dist/mjs/glob.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ export class Glob {
* again.
*/
constructor(pattern, opts) {
/* c8 ignore start */
if (!opts)
throw new TypeError('glob options required');
/* c8 ignore stop */
this.withFileTypes = !!opts.withFileTypes;
this.signal = opts.signal;
this.follow = !!opts.follow;
Expand Down
2 changes: 1 addition & 1 deletion node_modules/glob/dist/mjs/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "10.2.7",
"version": "10.3.3",
"type": "module"
}
8 changes: 4 additions & 4 deletions node_modules/glob/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"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.2.7",
"version": "10.3.3",
"bin": "./dist/cjs/src/bin.js",
"repository": {
"type": "git",
Expand Down Expand Up @@ -62,11 +62,11 @@
"foreground-child": "^3.1.0",
"jackspeak": "^2.0.3",
"minimatch": "^9.0.1",
"minipass": "^5.0.0 || ^6.0.2",
"path-scurry": "^1.7.0"
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0",
"path-scurry": "^1.10.1"
},
"devDependencies": {
"@types/node": "^20.2.1",
"@types/node": "^20.3.2",
"@types/tap": "^15.0.7",
"c8": "^7.12.0",
"memfs": "^3.4.13",
Expand Down
23 changes: 23 additions & 0 deletions node_modules/path-scurry/dist/cjs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,29 @@ class PathBase {
isUnknown() {
return (this.#type & IFMT) === UNKNOWN;
}
isType(type) {
return this[`is${type}`]();
}
getType() {
return this.isUnknown()
? 'Unknown'
: this.isDirectory()
? 'Directory'
: this.isFile()
? 'File'
: this.isSymbolicLink()
? 'SymbolicLink'
: this.isFIFO()
? 'FIFO'
: this.isCharacterDevice()
? 'CharacterDevice'
: this.isBlockDevice()
? 'BlockDevice'
: /* c8 ignore start */ this.isSocket()
? 'Socket'
: 'Unknown';
/* c8 ignore stop */
}
/**
* Is the Path a regular file?
*/
Expand Down
23 changes: 23 additions & 0 deletions node_modules/path-scurry/dist/mjs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,29 @@ export class PathBase {
isUnknown() {
return (this.#type & IFMT) === UNKNOWN;
}
isType(type) {
return this[`is${type}`]();
}
getType() {
return this.isUnknown()
? 'Unknown'
: this.isDirectory()
? 'Directory'
: this.isFile()
? 'File'
: this.isSymbolicLink()
? 'SymbolicLink'
: this.isFIFO()
? 'FIFO'
: this.isCharacterDevice()
? 'CharacterDevice'
: this.isBlockDevice()
? 'BlockDevice'
: /* c8 ignore start */ this.isSocket()
? 'Socket'
: 'Unknown';
/* c8 ignore stop */
}
/**
* Is the Path a regular file?
*/
Expand Down
13 changes: 11 additions & 2 deletions node_modules/path-scurry/node_modules/lru-cache/dist/cjs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,15 @@ class LRUCache {
if (v !== oldVal) {
if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {
oldVal.__abortController.abort(new Error('replaced'));
const { __staleWhileFetching: s } = oldVal;
if (s !== undefined && !noDisposeOnSet) {
if (this.#hasDispose) {
this.#dispose?.(s, k, 'set');
}
if (this.#hasDisposeAfter) {
this.#disposed?.push([s, k, 'set']);
}
}
}
else if (!noDisposeOnSet) {
if (this.#hasDispose) {
Expand Down Expand Up @@ -1090,15 +1099,15 @@ class LRUCache {
const pcall = (res, rej) => {
const fmp = this.#fetchMethod?.(k, v, fetchOpts);
if (fmp && fmp instanceof Promise) {
fmp.then(v => res(v), rej);
fmp.then(v => res(v === undefined ? undefined : v), rej);
}
// ignored, we go until we finish, regardless.
// defer check until we are actually aborting,
// so fetchMethod can override.
ac.signal.addEventListener('abort', () => {
if (!options.ignoreFetchAbort ||
options.allowStaleOnFetchAbort) {
res();
res(undefined);
// when it eventually resolves, update the cache.
if (options.allowStaleOnFetchAbort) {
res = v => cb(v, true);
Expand Down
Loading

0 comments on commit ede7f5e

Please sign in to comment.