Skip to content

Commit

Permalink
deps: glob@10.3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Apr 2, 2024
1 parent 6853531 commit c54a84a
Show file tree
Hide file tree
Showing 14 changed files with 133 additions and 74 deletions.
6 changes: 6 additions & 0 deletions node_modules/glob/dist/commonjs/ignore.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ class Ignore {
if (!parsed || !globParts) {
throw new Error('invalid pattern object');
}
// strip off leading ./ portions
// https://github.com/isaacs/node-glob/issues/570
while (parsed[0] === '.' && globParts[0] === '.') {
parsed.shift();
globParts.shift();
}
/* c8 ignore stop */
const p = new pattern_js_1.Pattern(parsed, globParts, 0, platform);
const m = new minimatch_1.Minimatch(p.globString(), mmopts);
Expand Down
4 changes: 3 additions & 1 deletion node_modules/glob/dist/commonjs/package.json
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
{"type":"commonjs"}
{
"type": "commonjs"
}
24 changes: 22 additions & 2 deletions node_modules/glob/dist/commonjs/walker.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,26 @@ class GlobUtil {
e = rpc;
}
const needStat = e.isUnknown() || this.opts.stat;
return this.matchCheckTest(needStat ? await e.lstat() : e, ifDir);
const s = needStat ? await e.lstat() : e;
if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {
const target = await s.realpath();
/* c8 ignore start */
if (target && (target.isUnknown() || this.opts.stat)) {
await target.lstat();
}
/* c8 ignore stop */
}
return this.matchCheckTest(s, ifDir);
}
matchCheckTest(e, ifDir) {
return e &&
(this.maxDepth === Infinity || e.depth() <= this.maxDepth) &&
(!ifDir || e.canReaddir()) &&
(!this.opts.nodir || !e.isDirectory()) &&
(!this.opts.nodir ||
!this.opts.follow ||
!e.isSymbolicLink() ||
!e.realpathCached()?.isDirectory()) &&
!this.#ignored(e)
? e
: undefined;
Expand All @@ -118,7 +131,14 @@ class GlobUtil {
e = rpc;
}
const needStat = e.isUnknown() || this.opts.stat;
return this.matchCheckTest(needStat ? e.lstatSync() : e, ifDir);
const s = needStat ? e.lstatSync() : e;
if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {
const target = s.realpathSync();
if (target && (target?.isUnknown() || this.opts.stat)) {
target.lstatSync();
}
}
return this.matchCheckTest(s, ifDir);
}
matchFinish(e, absolute) {
if (this.#ignored(e))
Expand Down
6 changes: 6 additions & 0 deletions node_modules/glob/dist/esm/ignore.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ export class Ignore {
if (!parsed || !globParts) {
throw new Error('invalid pattern object');
}
// strip off leading ./ portions
// https://github.com/isaacs/node-glob/issues/570
while (parsed[0] === '.' && globParts[0] === '.') {
parsed.shift();
globParts.shift();
}
/* c8 ignore stop */
const p = new Pattern(parsed, globParts, 0, platform);
const m = new Minimatch(p.globString(), mmopts);
Expand Down
4 changes: 3 additions & 1 deletion node_modules/glob/dist/esm/package.json
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
{"type":"module"}
{
"type": "module"
}
24 changes: 22 additions & 2 deletions node_modules/glob/dist/esm/walker.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,26 @@ export class GlobUtil {
e = rpc;
}
const needStat = e.isUnknown() || this.opts.stat;
return this.matchCheckTest(needStat ? await e.lstat() : e, ifDir);
const s = needStat ? await e.lstat() : e;
if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {
const target = await s.realpath();
/* c8 ignore start */
if (target && (target.isUnknown() || this.opts.stat)) {
await target.lstat();
}
/* c8 ignore stop */
}
return this.matchCheckTest(s, ifDir);
}
matchCheckTest(e, ifDir) {
return e &&
(this.maxDepth === Infinity || e.depth() <= this.maxDepth) &&
(!ifDir || e.canReaddir()) &&
(!this.opts.nodir || !e.isDirectory()) &&
(!this.opts.nodir ||
!this.opts.follow ||
!e.isSymbolicLink() ||
!e.realpathCached()?.isDirectory()) &&
!this.#ignored(e)
? e
: undefined;
Expand All @@ -115,7 +128,14 @@ export class GlobUtil {
e = rpc;
}
const needStat = e.isUnknown() || this.opts.stat;
return this.matchCheckTest(needStat ? e.lstatSync() : e, ifDir);
const s = needStat ? e.lstatSync() : e;
if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {
const target = s.realpathSync();
if (target && (target?.isUnknown() || this.opts.stat)) {
target.lstatSync();
}
}
return this.matchCheckTest(s, ifDir);
}
matchFinish(e, absolute) {
if (this.#ignored(e))
Expand Down
17 changes: 9 additions & 8 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.3.10",
"version": "10.3.12",
"type": "module",
"tshy": {
"main": true,
Expand Down Expand Up @@ -67,21 +67,22 @@
},
"dependencies": {
"foreground-child": "^3.1.0",
"jackspeak": "^2.3.5",
"jackspeak": "^2.3.6",
"minimatch": "^9.0.1",
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0",
"path-scurry": "^1.10.1"
"minipass": "^7.0.4",
"path-scurry": "^1.10.2"
},
"devDependencies": {
"@types/node": "^20.3.2",
"@types/node": "^20.11.30",
"memfs": "^3.4.13",
"mkdirp": "^3.0.1",
"prettier": "^2.8.3",
"rimraf": "^5.0.1",
"sync-content": "^1.0.2",
"tap": "^18.1.4",
"tshy": "^1.2.2",
"typedoc": "^0.25.1",
"tap": "^18.7.2",
"ts-node": "^10.9.2",
"tshy": "^1.12.0",
"typedoc": "^0.25.12",
"typescript": "^5.2.2"
},
"tap": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,21 @@ const IFMT = 0b1111;
// mask to unset low 4 bits
const IFMT_UNKNOWN = ~IFMT;
// set after successfully calling readdir() and getting entries.
const READDIR_CALLED = 16;
const READDIR_CALLED = 0b0000_0001_0000;
// set after a successful lstat()
const LSTAT_CALLED = 32;
const LSTAT_CALLED = 0b0000_0010_0000;
// set if an entry (or one of its parents) is definitely not a dir
const ENOTDIR = 64;
const ENOTDIR = 0b0000_0100_0000;
// set if an entry (or one of its parents) does not exist
// (can also be set on lstat errors like EACCES or ENAMETOOLONG)
const ENOENT = 128;
const ENOENT = 0b0000_1000_0000;
// cannot have child entries -- also verify &IFMT is either IFDIR or IFLNK
// set if we fail to readlink
const ENOREADLINK = 256;
const ENOREADLINK = 0b0001_0000_0000;
// set if we know realpath() will fail
const ENOREALPATH = 512;
const ENOREALPATH = 0b0010_0000_0000;
const ENOCHILD = ENOTDIR | ENOENT | ENOREALPATH;
const TYPEMASK = 1023;
const TYPEMASK = 0b0011_1111_1111;
const entToType = (s) => s.isFile()
? IFREG
: s.isDirectory()
Expand Down Expand Up @@ -703,7 +703,7 @@ class PathBase {
/* c8 ignore stop */
try {
const read = await this.#fs.promises.readlink(this.fullpath());
const linkTarget = this.parent.resolve(read);
const linkTarget = (await this.parent.realpath())?.resolve(read);
if (linkTarget) {
return (this.#linkTarget = linkTarget);
}
Expand Down Expand Up @@ -732,7 +732,7 @@ class PathBase {
/* c8 ignore stop */
try {
const read = this.#fs.readlinkSync(this.fullpath());
const linkTarget = this.parent.resolve(read);
const linkTarget = (this.parent.realpathSync())?.resolve(read);
if (linkTarget) {
return (this.#linkTarget = linkTarget);
}
Expand All @@ -747,7 +747,9 @@ class PathBase {
this.#type |= READDIR_CALLED;
// mark all remaining provisional children as ENOENT
for (let p = children.provisional; p < children.length; p++) {
children[p].#markENOENT();
const c = children[p];
if (c)
c.#markENOENT();
}
}
#markENOENT() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,21 @@ const IFMT = 0b1111;
// mask to unset low 4 bits
const IFMT_UNKNOWN = ~IFMT;
// set after successfully calling readdir() and getting entries.
const READDIR_CALLED = 16;
const READDIR_CALLED = 0b0000_0001_0000;
// set after a successful lstat()
const LSTAT_CALLED = 32;
const LSTAT_CALLED = 0b0000_0010_0000;
// set if an entry (or one of its parents) is definitely not a dir
const ENOTDIR = 64;
const ENOTDIR = 0b0000_0100_0000;
// set if an entry (or one of its parents) does not exist
// (can also be set on lstat errors like EACCES or ENAMETOOLONG)
const ENOENT = 128;
const ENOENT = 0b0000_1000_0000;
// cannot have child entries -- also verify &IFMT is either IFDIR or IFLNK
// set if we fail to readlink
const ENOREADLINK = 256;
const ENOREADLINK = 0b0001_0000_0000;
// set if we know realpath() will fail
const ENOREALPATH = 512;
const ENOREALPATH = 0b0010_0000_0000;
const ENOCHILD = ENOTDIR | ENOENT | ENOREALPATH;
const TYPEMASK = 1023;
const TYPEMASK = 0b0011_1111_1111;
const entToType = (s) => s.isFile()
? IFREG
: s.isDirectory()
Expand Down Expand Up @@ -675,7 +675,7 @@ export class PathBase {
/* c8 ignore stop */
try {
const read = await this.#fs.promises.readlink(this.fullpath());
const linkTarget = this.parent.resolve(read);
const linkTarget = (await this.parent.realpath())?.resolve(read);
if (linkTarget) {
return (this.#linkTarget = linkTarget);
}
Expand Down Expand Up @@ -704,7 +704,7 @@ export class PathBase {
/* c8 ignore stop */
try {
const read = this.#fs.readlinkSync(this.fullpath());
const linkTarget = this.parent.resolve(read);
const linkTarget = (this.parent.realpathSync())?.resolve(read);
if (linkTarget) {
return (this.#linkTarget = linkTarget);
}
Expand All @@ -719,7 +719,9 @@ export class PathBase {
this.#type |= READDIR_CALLED;
// mark all remaining provisional children as ENOENT
for (let p = children.provisional; p < children.length; p++) {
children[p].#markENOENT();
const c = children[p];
if (c)
c.#markENOENT();
}
}
#markENOENT() {
Expand Down
54 changes: 26 additions & 28 deletions node_modules/path-scurry/package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"name": "path-scurry",
"version": "1.10.1",
"version": "1.10.2",
"description": "walk paths fast and efficiently",
"author": "Isaac Z. Schlueter <i@izs.me> (https://blog.izs.me)",
"main": "./dist/cjs/index.js",
"module": "./dist/mjs/index.js",
"main": "./dist/commonjs/index.js",
"type": "module",
"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/index.d.ts",
"default": "./dist/cjs/index.js"
"types": "./dist/commonjs/index.d.ts",
"default": "./dist/commonjs/index.js"
}
}
},
Expand All @@ -26,12 +27,11 @@
"postversion": "npm publish",
"prepublishOnly": "git push origin --follow-tags",
"preprepare": "rm -rf dist",
"prepare": "tsc -p tsconfig.json && tsc -p tsconfig-esm.json",
"postprepare": "bash ./scripts/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",
"bench": "bash ./scripts/bench.sh"
Expand All @@ -47,28 +47,19 @@
"arrowParens": "avoid",
"endOfLine": "lf"
},
"tap": {
"coverage": false,
"node-arg": [
"--no-warnings",
"--loader",
"ts-node/esm"
],
"ts": false
},
"devDependencies": {
"@nodelib/fs.walk": "^1.2.8",
"@types/node": "^20.1.4",
"@types/tap": "^15.0.7",
"@types/node": "^20.11.30",
"c8": "^7.12.0",
"eslint-config-prettier": "^8.6.0",
"mkdirp": "^3.0.0",
"prettier": "^2.8.3",
"rimraf": "^5.0.1",
"tap": "^16.3.4",
"ts-node": "^10.9.1",
"typedoc": "^0.23.24",
"typescript": "^5.0.4"
"tap": "^18.7.2",
"ts-node": "^10.9.2",
"tshy": "^1.12.0",
"typedoc": "^0.25.12",
"typescript": "^5.4.3"
},
"engines": {
"node": ">=16 || 14 >=14.17"
Expand All @@ -81,7 +72,14 @@
"url": "git+https://github.com/isaacs/path-scurry"
},
"dependencies": {
"lru-cache": "^9.1.1 || ^10.0.0",
"lru-cache": "^10.2.0",
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
}
},
"tshy": {
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
}
},
"types": "./dist/commonjs/index.d.ts"
}
Loading

0 comments on commit c54a84a

Please sign in to comment.