chore(deps): update dependency glob to v11.1.0
All checks were successful
Lint / pre-commit Linting (push) Successful in 1m23s

This commit is contained in:
2025-12-21 13:05:54 +00:00
parent 25e4ba9f71
commit 274a8109e6
98 changed files with 2176 additions and 3010 deletions

15
node_modules/glob/LICENSE generated vendored
View File

@@ -1,15 +0,0 @@
The ISC License
Copyright (c) 2009-2023 Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

63
node_modules/glob/LICENSE.md generated vendored Normal file
View File

@@ -0,0 +1,63 @@
All packages under `src/` are licensed according to the terms in
their respective `LICENSE` or `LICENSE.md` files.
The remainder of this project is licensed under the Blue Oak
Model License, as follows:
-----
# Blue Oak Model License
Version 1.0.0
## Purpose
This license gives everyone as much permission to work with
this software as possible, while protecting contributors
from liability.
## Acceptance
In order to receive this license, you must agree to its
rules. The rules of this license are both obligations
under that agreement and conditions to your license.
You must not do anything with this software that triggers
a rule that you cannot or will not follow.
## Copyright
Each contributor licenses you to do everything with this
software that would otherwise infringe that contributor's
copyright in it.
## Notices
You must ensure that everyone who gets a copy of
any part of this software from you, with or without
changes, also gets the text of this license or a link to
<https://blueoakcouncil.org/license/1.0.0>.
## Excuse
If anyone notifies you in writing that you have not
complied with [Notices](#notices), you can keep your
license by taking all practical steps to comply within 30
days after the notice. If you do not do so, your license
ends immediately.
## Patent
Each contributor licenses you to do everything with this
software that would otherwise infringe any patent claims
they can license or become able to license.
## Reliability
No contributor can revoke this license.
## No Liability
***As far as the law allows, this software comes as is,
without any warranty or condition, and no contributor
will be liable to anyone for any damages related to this
software or this license, under any kind of legal claim.***

221
node_modules/glob/README.md generated vendored
View File

@@ -3,10 +3,12 @@
Match files using the patterns the shell uses.
The most correct and second fastest glob implementation in
JavaScript. (See **Comparison to Other JavaScript Glob
Implementations** at the bottom of this readme.)
JavaScript. (See [**Comparison to Other JavaScript Glob
Implementations**](#comparisons-to-other-fnmatchglob-implementations)
at the bottom of this readme.)
![a fun cartoon logo made of glob characters](https://github.com/isaacs/node-glob/raw/main/logo/glob.png)
![a fun cartoon logo made of glob
characters](https://github.com/isaacs/node-glob/raw/main/logo/glob.png)
## Usage
@@ -16,8 +18,9 @@ Install with npm
npm i glob
```
**Note** the npm package name is _not_ `node-glob` that's a
different thing that was abandoned years ago. Just `glob`.
> [!NOTE]
> The npm package name is _not_ `node-glob` that's a
> different thing that was abandoned years ago. Just `glob`.
```js
// load using import
@@ -69,8 +72,9 @@ for (const file of g2) {
}
// you can also pass withFileTypes: true to get Path objects
// these are like a Dirent, but with some more added powers
// check out http://npm.im/path-scurry for more info on their API
// these are like a fs.Dirent, but with some more added powers
// check out https://isaacs.github.io/path-scurry/classes/PathBase.html
// for more info on their API
const g3 = new Glob('**/baz/**', { withFileTypes: true })
g3.stream().on('data', path => {
console.log(
@@ -135,13 +139,14 @@ const newFiles = await glob('**', {
})
```
**Note** Glob patterns should always use `/` as a path separator,
even on Windows systems, as `\` is used to escape glob
characters. If you wish to use `\` as a path separator _instead
of_ using it as an escape character on Windows platforms, you may
set `windowsPathsNoEscape:true` in the options. In this mode,
special glob characters cannot be escaped, making it impossible
to match a literal `*` `?` and so on in filenames.
> [!NOTE]
> Glob patterns should always use `/` as a path separator,
> even on Windows systems, as `\` is used to escape glob
> characters. If you wish to use `\` as a path separator _instead
> of_ using it as an escape character on Windows platforms, you may
> set `windowsPathsNoEscape:true` in the options. In this mode,
> special glob characters cannot be escaped, making it impossible
> to match a literal `*` `?` and so on in filenames.
## Command Line Interface
@@ -187,7 +192,7 @@ paths found.
-x --posix Always resolve to posix style paths, using '/' as the
directory separator, even on Windows. Drive letter
absolute matches on Windows will be expanded to their
full resolved UNC maths, eg instead of 'C:\foo\bar', it
full resolved UNC paths, eg instead of 'C:\foo\bar', it
will expand to '//?/C:/foo/bar'.
-f --follow Follow symlinked directories when expanding '**'
@@ -362,16 +367,17 @@ Options object is required.
See full options descriptions below.
Note that a previous `Glob` object can be passed as the
`GlobOptions` to another `Glob` instantiation to re-use settings
and caches with a new pattern.
> [!NOTE]
> A previous `Glob` object can be passed as the
> `GlobOptions` to another `Glob` instantiation to re-use settings
> and caches with a new pattern.
Traversal functions can be called multiple times to run the walk
again.
### `g.stream()`
Stream results asynchronously,
Stream results asynchronously.
### `g.streamSync()`
@@ -429,35 +435,37 @@ share the previously loaded cache.
is used as the starting point for absolute patterns that start
with `/`, (but not drive letters or UNC paths on Windows).
Note that this _doesn't_ necessarily limit the walk to the
`root` directory, and doesn't affect the cwd starting point for
non-absolute patterns. A pattern containing `..` will still be
able to traverse out of the root directory, if it is not an
actual root directory on the filesystem, and any non-absolute
patterns will be matched in the `cwd`. For example, the
pattern `/../*` with `{root:'/some/path'}` will return all
files in `/some`, not all files in `/some/path`. The pattern
`*` with `{root:'/some/path'}` will return all the entries in
the cwd, not the entries in `/some/path`.
To start absolute and non-absolute patterns in the same path,
you can use `{root:''}`. However, be aware that on Windows
systems, a pattern like `x:/*` or `//host/share/*` will
_always_ start in the `x:/` or `//host/share` directory,
regardless of the `root` setting.
To start absolute and non-absolute patterns in the same
path, you can use `{root:''}`. However, be aware that on
Windows systems, a pattern like `x:/*` or `//host/share/*` will
_always_ start in the `x:/` or `//host/share` directory,
regardless of the `root` setting.
> [!NOTE] This _doesn't_ necessarily limit the walk to the
> `root` directory, and doesn't affect the cwd starting point
> for non-absolute patterns. A pattern containing `..` will
> still be able to traverse out of the root directory, if it
> is not an actual root directory on the filesystem, and any
> non-absolute patterns will be matched in the `cwd`. For
> example, the pattern `/../*` with `{root:'/some/path'}`
> will return all files in `/some`, not all files in
> `/some/path`. The pattern `*` with `{root:'/some/path'}`
> will return all the entries in the cwd, not the entries in
> `/some/path`.
- `windowsPathsNoEscape` Use `\\` as a path separator _only_, and
_never_ as an escape character. If set, all `\\` characters are
replaced with `/` in the pattern.
Note that this makes it **impossible** to match against paths
containing literal glob pattern characters, but allows matching
with patterns constructed using `path.join()` and
`path.resolve()` on Windows platforms, mimicking the (buggy!)
behavior of Glob v7 and before on Windows. Please use with
caution, and be mindful of [the caveat below about Windows
paths](#windows). (For legacy reasons, this is also set if
`allowWindowsEscape` is set to the exact value `false`.)
> [!NOTE]
> This makes it **impossible** to match against paths
> containing literal glob pattern characters, but allows matching
> with patterns constructed using `path.join()` and
> `path.resolve()` on Windows platforms, mimicking the (buggy!)
> behavior of Glob v7 and before on Windows. Please use with
> caution, and be mindful of [the caveat below about Windows
> paths](#windows). (For legacy reasons, this is also set if
> `allowWindowsEscape` is set to the exact value `false`.)
- `dot` Include `.dot` files in normal matches and `globstar`
matches. Note that an explicit dot in a portion of the pattern
@@ -492,11 +500,12 @@ share the previously loaded cache.
- `nocase` Perform a case-insensitive match. This defaults to
`true` on macOS and Windows systems, and `false` on all others.
**Note** `nocase` should only be explicitly set when it is
known that the filesystem's case sensitivity differs from the
platform default. If set `true` on case-sensitive file
systems, or `false` on case-insensitive file systems, then the
walk may return more or less results than expected.
> [!NOTE]
> `nocase` should only be explicitly set when it is
> known that the filesystem's case sensitivity differs from the
> platform default. If set `true` on case-sensitive file
> systems, or `false` on case-insensitive file systems, then the
> walk may return more or less results than expected.
- `maxDepth` Specify a number to limit the depth of the directory
traversal to this many levels below the `cwd`.
@@ -509,8 +518,9 @@ share the previously loaded cache.
- `nodir` Do not match directories, only files. (Note: to match
_only_ directories, put a `/` at the end of the pattern.)
Note: when `follow` and `nodir` are both set, then symbolic
links to directories are also omitted.
> [!NOTE]
> When `follow` and `nodir` are both set, then symbolic
> links to directories are also omitted.
- `stat` Call `lstat()` on all entries, whether required or not
to determine whether it's a valid match. When used with
@@ -521,19 +531,30 @@ share the previously loaded cache.
- `ignore` string or string[], or an object with `ignored` and
`childrenIgnored` methods.
If a string or string[] is provided, then this is treated as a
glob pattern or array of glob patterns to exclude from matches.
To ignore all children within a directory, as well as the entry
itself, append `'/**'` to the ignore pattern.
**Note** `ignore` patterns are _always_ in `dot:true` mode,
regardless of any other settings.
If a string or string[] is provided, then this is treated as
a glob pattern or array of glob patterns to exclude from
matches. To ignore all children within a directory, as well
as the entry itself, append `'/**'` to the ignore pattern.
If an object is provided that has `ignored(path)` and/or
`childrenIgnored(path)` methods, then these methods will be
called to determine whether any Path is a match or if its
called todetermine whether any Path is a match or if its
children should be traversed, respectively.
The `path` argument to the methods will be a
[`path-scurry`](https://isaacs.github.io/path-scurry/index.html)
[`Path`](https://isaacs.github.io/path-scurry/classes/PathBase)
object, which extends
[`fs.Dirent`](https://nodejs.org/docs/latest/api/fs.html#class-fsdirent)
with additional useful methods like
[`.fullpath()`](https://isaacs.github.io/path-scurry/classes/PathBase.html#fullpath),
[`.relative()`](https://isaacs.github.io/path-scurry/classes/PathBase.html#relative),
and more.
> [!NOTE]
> `ignore` patterns are _always_ in `dot:true` mode,
> regardless of any other settings.
- `follow` Follow symlinked directories when expanding `**`
patterns. This can result in a lot of duplicate references in
the presence of cyclic links, and make performance quite bad.
@@ -542,8 +563,9 @@ share the previously loaded cache.
it is not the first item in the pattern, or none if it is the
first item in the pattern, following the same behavior as Bash.
Note: when `follow` and `nodir` are both set, then symbolic
links to directories are also omitted.
> [!NOTE]
> When `follow` and `nodir` are both set, then symbolic
> links to directories are also omitted.
- `realpath` Set to true to call `fs.realpath` on all of the
results. In the case of an entry that cannot be resolved, the
@@ -564,20 +586,21 @@ share the previously loaded cache.
`absolute` may not be used along with `withFileTypes`.
- `posix` Set to true to use `/` as the path separator in
returned results. On posix systems, this has no effect. On
returned results. On POSIX systems, this has no effect. On
Windows systems, this will return `/` delimited path results,
and absolute paths will be returned in their full resolved UNC
path form, eg insted of `'C:\\foo\\bar'`, it will return
and absolute paths will be returned in their fully resolved UNC
path form, e.g. instead of `'C:\\foo\\bar'`, it will return
`//?/C:/foo/bar`.
- `platform` Defaults to value of `process.platform` if
- `platform` Defaults to the value of `process.platform` if
available, or `'linux'` if not. Setting `platform:'win32'` on
non-Windows systems may cause strange behavior.
- `withFileTypes` Return [PathScurry](http://npm.im/path-scurry)
`Path` objects instead of strings. These are similar to a
NodeJS `Dirent` object, but with additional methods and
properties.
- `withFileTypes` Return
[`path-scurry`](http://npm.im/path-scurry)
[`Path`](https://isaacs.github.io/path-scurry/classes/PathBase.html)
objects instead of strings. These are similar to a NodeJS
`fs.Dirent` object, but with additional methods and properties.
`withFileTypes` may not be used along with `absolute`.
@@ -585,13 +608,15 @@ share the previously loaded cache.
triggered.
- `fs` An override object to pass in custom filesystem methods.
See [PathScurry docs](http://npm.im/path-scurry) for what can
be overridden.
See [`path-scurry`
docs](https://isaacs.github.io/path-scurry/interfaces/FSOption.html)
for what can be overridden.
- `scurry` A [PathScurry](http://npm.im/path-scurry) object used
to traverse the file system. If the `nocase` option is set
explicitly, then any provided `scurry` object must match this
setting.
- `scurry` A
[`PathScurry`](https://isaacs.github.io/path-scurry/classes/PathScurryBase.html)
object used to traverse the file system. If the `nocase` option
is set explicitly, then any provided `scurry` object must match
this setting.
- `includeChildMatches` boolean, default `true`. Do not match any
children of any matches. For example, the pattern `**\/foo`
@@ -606,13 +631,6 @@ share the previously loaded cache.
`false`, and a custom `Ignore` is provided that does not have
an `add()` method, then it will throw an error.
**Caveat** It _only_ ignores matches that would be a descendant
of a previous match, and only if that descendant is matched
_after_ the ancestor is encountered. Since the file system walk
happens in indeterminate order, it's possible that a match will
already be added before its ancestor, if multiple or braced
patterns are used.
For example:
```js
@@ -638,6 +656,15 @@ share the previously loaded cache.
one another's file system descendants, or if the occasional
included child entry will not cause problems.
> [!NOTE]
> It _only_ ignores matches that would be a descendant
> of a previous match, and only if that descendant is matched
> _after_ the ancestor is encountered. Since the file system walk
> happens in indeterminate order, it's possible that a match will
> already be added before its ancestor, if multiple or braced
> patterns are used.
## Glob Primer
Much more information about glob pattern expansion can be found
@@ -737,11 +764,12 @@ bsdglob and bash 5, where `**` only has special significance if
it is the only thing in a path part. That is, `a/**/b` will match
`a/x/y/b`, but `a/**b` will not.
Note that symlinked directories are not traversed as part of a
`**`, though their contents may match against subsequent portions
of the pattern. This prevents infinite loops and duplicates and
the like. You can force glob to traverse symlinks with `**` by
setting `{follow:true}` in the options.
> [!NOTE]
> Symlinked directories are not traversed as part of a
> `**`, though their contents may match against subsequent portions
> of the pattern. This prevents infinite loops and duplicates and
> the like. You can force glob to traverse symlinks with `**` by
> setting `{follow:true}` in the options.
There is no equivalent of the `nonull` option. A pattern that
does not find any matches simply resolves to nothing. (An empty
@@ -754,8 +782,8 @@ expanded **first** into the set of `+(a|b)` and `+(a|c)`, and
those patterns are checked for validity. Since those two are
valid, matching proceeds.
The character class patterns `[:class:]` (posix standard named
classes) style class patterns are supported and unicode-aware,
The character class patterns `[:class:]` (POSIX standard named
classes) style class patterns are supported and Unicode-aware,
but `[=c=]` (locale-specific character collation weight), and
`[.symbol.]` (collating symbol), are not.
@@ -779,13 +807,13 @@ To specify things that should not match, use the `ignore` option.
**Please only use forward-slashes in glob expressions.**
Though windows uses either `/` or `\` as its path separator, only
Though Windows uses either `/` or `\` as its path separator, only
`/` characters are used by this glob implementation. You must use
forward-slashes **only** in glob expressions. Back-slashes will
always be interpreted as escape characters, not path separators.
Results from absolute patterns such as `/foo/*` are mounted onto
the root setting using `path.join`. On windows, this will by
the root setting using `path.join`. On Windows, this will by
default result in `/foo/*` matching `C:\foo\bar.txt`.
To automatically coerce all `\` characters to `/` in pattern
@@ -795,7 +823,7 @@ characters**, you may set the `windowsPathsNoEscape` option to
### Windows, CWDs, Drive Letters, and UNC Paths
On posix systems, when a pattern starts with `/`, any `cwd`
On POSIX systems, when a pattern starts with `/`, any `cwd`
option is ignored, and the traversal starts at `/`, plus any
non-magic path portions specified in the pattern.
@@ -955,10 +983,11 @@ performing a glob pattern expansion as faithfully as possible to
the behavior of Bash and other sh-like shells, with as much speed
as possible.
Note that prior versions of `node-glob` are _not_ on this list.
Former versions of this module are far too slow for any cases
where performance matters at all, and were designed with APIs
that are extremely dated by current JavaScript standards.
> [!NOTE]
> Prior versions of `node-glob` are _not_ on this list.
> Former versions of this module are far too slow for any cases
> where performance matters at all, and were designed with APIs
> that are extremely dated by current JavaScript standards.
---
@@ -970,9 +999,9 @@ course.</small>
### Benchmark Results
First number is time, smaller is better.
The first number is time, smaller is better.
Second number is the count of results returned.
The second number is the count of results returned.
```
--- pattern: '**' ---

View File

@@ -1 +1 @@
{"version":3,"file":"has-magic.d.ts","sourceRoot":"","sources":["../../src/has-magic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,YACV,MAAM,GAAG,MAAM,EAAE,YACjB,WAAW,KACnB,OAQF,CAAA"}
{"version":3,"file":"has-magic.d.ts","sourceRoot":"","sources":["../../src/has-magic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,GACnB,SAAS,MAAM,GAAG,MAAM,EAAE,EAC1B,UAAS,WAAgB,KACxB,OAQF,CAAA"}

View File

@@ -91,7 +91,7 @@ export declare const glob: typeof glob_ & {
iterateSync: typeof globIterateSync;
Glob: typeof Glob;
hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean;
escape: (s: string, { windowsPathsNoEscape, }?: Pick<import("minimatch").MinimatchOptions, "windowsPathsNoEscape">) => string;
unescape: (s: string, { windowsPathsNoEscape, }?: Pick<import("minimatch").MinimatchOptions, "windowsPathsNoEscape">) => string;
escape: (s: string, { windowsPathsNoEscape, magicalBraces, }?: Pick<import("minimatch").MinimatchOptions, "windowsPathsNoEscape" | "magicalBraces">) => string;
unescape: (s: string, { windowsPathsNoEscape, magicalBraces, }?: Pick<import("minimatch").MinimatchOptions, "windowsPathsNoEscape" | "magicalBraces">) => string;
};
//# sourceMappingURL=index.d.ts.map

138
node_modules/glob/dist/esm/bin.mjs generated vendored
View File

@@ -3,7 +3,7 @@ import { foregroundChild } from 'foreground-child';
import { existsSync } from 'fs';
import { jack } from 'jackspeak';
import { loadPackageJson } from 'package-json-from-dist';
import { join } from 'path';
import { basename, join } from 'path';
import { globStream } from './index.js';
const { version } = loadPackageJson(import.meta.url, '../package.json');
const j = jack({
@@ -30,6 +30,50 @@ const j = jack({
description: `If no positional arguments are provided, glob will use
this pattern`,
},
})
.flag({
shell: {
default: false,
description: `Interpret the command as a shell command by passing it
to the shell, with all matched filesystem paths appended,
**even if this cannot be done safely**.
This is **not** unsafe (and usually unnecessary) when using
the known Unix shells sh, bash, zsh, and fish, as these can
all be executed in such a way as to pass positional
arguments safely.
**Note**: THIS IS UNSAFE IF THE FILE PATHS ARE UNTRUSTED,
because a path like \`'some/path/\\$\\(cmd)'\` will be
executed by the shell.
If you do have positional arguments that you wish to pass to
the command ahead of the glob pattern matches, use the
\`--cmd-arg\`/\`-g\` option instead.
The next major release of glob will fully remove the ability
to use this option unsafely.`,
},
})
.optList({
'cmd-arg': {
short: 'g',
hint: 'arg',
default: [],
description: `Pass the provided values to the supplied command, ahead of
the glob matches.
For example, the command:
glob -c echo -g"hello" -g"world" *.txt
might output:
hello world a.txt b.txt
This is a safer (and future-proof) alternative than putting
positional arguments in the \`-c\`/\`--cmd\` option.`,
},
})
.flag({
all: {
@@ -74,7 +118,7 @@ const j = jack({
description: `Always resolve to posix style paths, using '/' as the
directory separator, even on Windows. Drive letter
absolute matches on Windows will be expanded to their
full resolved UNC maths, eg instead of 'C:\\foo\\bar',
full resolved UNC paths, eg instead of 'C:\\foo\\bar',
it will expand to '//?/C:/foo/bar'.
`,
},
@@ -220,52 +264,78 @@ const j = jack({
});
try {
const { positionals, values } = j.parse();
if (values.version) {
const { cmd, shell, all, default: def, version: showVersion, help, absolute, cwd, dot, 'dot-relative': dotRelative, follow, ignore, 'match-base': matchBase, 'max-depth': maxDepth, mark, nobrace, nocase, nodir, noext, noglobstar, platform, realpath, root, stat, debug, posix, 'cmd-arg': cmdArg, } = values;
if (showVersion) {
console.log(version);
process.exit(0);
}
if (values.help) {
if (help) {
console.log(j.usage());
process.exit(0);
}
if (positionals.length === 0 && !values.default)
//const { shell, help } = values
if (positionals.length === 0 && !def)
throw 'No patterns provided';
if (positionals.length === 0 && values.default)
positionals.push(values.default);
const patterns = values.all ? positionals : positionals.filter(p => !existsSync(p));
const matches = values.all ?
[]
: positionals.filter(p => existsSync(p)).map(p => join(p));
if (positionals.length === 0 && def)
positionals.push(def);
const patterns = all ? positionals : positionals.filter(p => !existsSync(p));
const matches = all ? [] : positionals.filter(p => existsSync(p)).map(p => join(p));
const stream = globStream(patterns, {
absolute: values.absolute,
cwd: values.cwd,
dot: values.dot,
dotRelative: values['dot-relative'],
follow: values.follow,
ignore: values.ignore,
mark: values.mark,
matchBase: values['match-base'],
maxDepth: values['max-depth'],
nobrace: values.nobrace,
nocase: values.nocase,
nodir: values.nodir,
noext: values.noext,
noglobstar: values.noglobstar,
platform: values.platform,
realpath: values.realpath,
root: values.root,
stat: values.stat,
debug: values.debug,
posix: values.posix,
absolute,
cwd,
dot,
dotRelative,
follow,
ignore,
mark,
matchBase,
maxDepth,
nobrace,
nocase,
nodir,
noext,
noglobstar,
platform: platform,
realpath,
root,
stat,
debug,
posix,
});
const cmd = values.cmd;
if (!cmd) {
matches.forEach(m => console.log(m));
stream.on('data', f => console.log(f));
}
else {
stream.on('data', f => matches.push(f));
stream.on('end', () => foregroundChild(cmd, matches, { shell: true }));
cmdArg.push(...matches);
stream.on('data', f => cmdArg.push(f));
// Attempt to support commands that contain spaces and otherwise require
// shell interpretation, but do NOT shell-interpret the arguments, to avoid
// injections via filenames. This affordance can only be done on known Unix
// shells, unfortunately.
//
// 'bash', ['-c', cmd + ' "$@"', 'bash', ...matches]
// 'zsh', ['-c', cmd + ' "$@"', 'zsh', ...matches]
// 'fish', ['-c', cmd + ' "$argv"', ...matches]
const { SHELL = 'unknown' } = process.env;
const shellBase = basename(SHELL);
const knownShells = ['sh', 'ksh', 'zsh', 'bash', 'fish'];
if ((shell || /[ "']/.test(cmd)) &&
knownShells.includes(shellBase)) {
const cmdWithArgs = `${cmd} "\$${shellBase === 'fish' ? 'argv' : '@'}"`;
if (shellBase !== 'fish') {
cmdArg.unshift(SHELL);
}
cmdArg.unshift('-c', cmdWithArgs);
stream.on('end', () => foregroundChild(SHELL, cmdArg));
}
else {
if (shell) {
process.emitWarning('The --shell option is unsafe, and will be removed. To pass ' +
'positional arguments to the subprocess, use -g/--cmd-arg instead.', 'DeprecationWarning', 'GLOB_SHELL');
}
stream.on('end', () => foregroundChild(cmd, cmdArg, { shell }));
}
}
}
catch (e) {

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
{"version":3,"file":"has-magic.d.ts","sourceRoot":"","sources":["../../src/has-magic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,YACV,MAAM,GAAG,MAAM,EAAE,YACjB,WAAW,KACnB,OAQF,CAAA"}
{"version":3,"file":"has-magic.d.ts","sourceRoot":"","sources":["../../src/has-magic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,GACnB,SAAS,MAAM,GAAG,MAAM,EAAE,EAC1B,UAAS,WAAgB,KACxB,OAQF,CAAA"}

View File

@@ -91,7 +91,7 @@ export declare const glob: typeof glob_ & {
iterateSync: typeof globIterateSync;
Glob: typeof Glob;
hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean;
escape: (s: string, { windowsPathsNoEscape, }?: Pick<import("minimatch").MinimatchOptions, "windowsPathsNoEscape">) => string;
unescape: (s: string, { windowsPathsNoEscape, }?: Pick<import("minimatch").MinimatchOptions, "windowsPathsNoEscape">) => string;
escape: (s: string, { windowsPathsNoEscape, magicalBraces, }?: Pick<import("minimatch").MinimatchOptions, "windowsPathsNoEscape" | "magicalBraces">) => string;
unescape: (s: string, { windowsPathsNoEscape, magicalBraces, }?: Pick<import("minimatch").MinimatchOptions, "windowsPathsNoEscape" | "magicalBraces">) => string;
};
//# sourceMappingURL=index.d.ts.map

22
node_modules/glob/package.json generated vendored
View File

@@ -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": "11.0.3",
"version": "11.1.0",
"type": "module",
"tshy": {
"main": true,
@@ -29,7 +29,7 @@
},
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-glob.git"
"url": "git@github.com:isaacs/node-glob.git"
},
"files": [
"dist"
@@ -68,25 +68,25 @@
"dependencies": {
"foreground-child": "^3.3.1",
"jackspeak": "^4.1.1",
"minimatch": "^10.0.3",
"minimatch": "^10.1.1",
"minipass": "^7.1.2",
"package-json-from-dist": "^1.0.0",
"path-scurry": "^2.0.0"
},
"devDependencies": {
"@types/node": "^24.0.1",
"memfs": "^4.17.2",
"@types/node": "^24.10.0",
"memfs": "^4.50.0",
"mkdirp": "^3.0.1",
"prettier": "^3.5.3",
"rimraf": "^6.0.1",
"tap": "^21.1.0",
"tshy": "^3.0.2",
"typedoc": "^0.28.5"
"prettier": "^3.6.2",
"rimraf": "^6.1.0",
"tap": "^21.1.3",
"tshy": "^3.0.3",
"typedoc": "^0.28.14"
},
"tap": {
"before": "test/00-setup.ts"
},
"license": "ISC",
"license": "BlueOak-1.0.0",
"funding": {
"url": "https://github.com/sponsors/isaacs"
},