Skip to content

Commit 55955fd

Browse files
committed
deps: cacache@17.0.5
1 parent 839b670 commit 55955fd

File tree

109 files changed

+7649
-12
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+7649
-12
lines changed

node_modules/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@
6060
!/buffer
6161
!/builtins
6262
!/cacache
63+
!/cacache/node_modules/
64+
/cacache/node_modules/*
65+
!/cacache/node_modules/glob
66+
!/cacache/node_modules/minimatch
6367
!/chalk
6468
!/chownr
6569
!/ci-info
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict'
22

3-
const { promisify } = require('util')
4-
const glob = promisify(require('glob'))
3+
const glob = require('glob')
54

65
const globify = (pattern) => pattern.split('//').join('/')
76
module.exports = (path, options) => glob(globify(path), options)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
The ISC License
2+
3+
Copyright (c) 2009-2023 Isaac Z. Schlueter and Contributors
4+
5+
Permission to use, copy, modify, and/or distribute this software for any
6+
purpose with or without fee is hereby granted, provided that the above
7+
copyright notice and this permission notice appear in all copies.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15+
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Lines changed: 328 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,328 @@
1+
/// <reference types="node" />
2+
import { Minimatch } from 'minimatch';
3+
import Minipass from 'minipass';
4+
import { FSOption, Path, PathScurry } from 'path-scurry';
5+
import { IgnoreLike } from './ignore.js';
6+
import { Pattern } from './pattern.js';
7+
export type MatchSet = Minimatch['set'];
8+
export type GlobParts = Exclude<Minimatch['globParts'], undefined>;
9+
/**
10+
* A `GlobOptions` object may be provided to any of the exported methods, and
11+
* must be provided to the `Glob` constructor.
12+
*
13+
* All options are optional, boolean, and false by default, unless otherwise
14+
* noted.
15+
*
16+
* All resolved options are added to the Glob object as properties.
17+
*
18+
* If you are running many `glob` operations, you can pass a Glob object as the
19+
* `options` argument to a subsequent operation to share the previously loaded
20+
* cache.
21+
*/
22+
export interface GlobOptions {
23+
/**
24+
* Set to `true` to always receive absolute paths for
25+
* matched files. Set to `false` to always return relative paths.
26+
*
27+
* When this option is not set, absolute paths are returned for patterns
28+
* that are absolute, and otherwise paths are returned that are relative
29+
* to the `cwd` setting.
30+
*
31+
* This does _not_ make an extra system call to get
32+
* the realpath, it only does string path resolution.
33+
*
34+
* Conflicts with {@link withFileTypes}
35+
*/
36+
absolute?: boolean;
37+
/**
38+
* Set to false to enable {@link windowsPathsNoEscape}
39+
*
40+
* @deprecated
41+
*/
42+
allowWindowsEscape?: boolean;
43+
/**
44+
* The current working directory in which to search. Defaults to
45+
* `process.cwd()`.
46+
*
47+
* May be eiher a string path or a `file://` URL object or string.
48+
*/
49+
cwd?: string | URL;
50+
/**
51+
* Include `.dot` files in normal matches and `globstar`
52+
* matches. Note that an explicit dot in a portion of the pattern
53+
* will always match dot files.
54+
*/
55+
dot?: boolean;
56+
/**
57+
* Prepend all relative path strings with `./` (or `.\` on Windows).
58+
*
59+
* Without this option, returned relative paths are "bare", so instead of
60+
* returning `'./foo/bar'`, they are returned as `'foo/bar'`.
61+
*
62+
* Relative patterns starting with `'../'` are not prepended with `./`, even
63+
* if this option is set.
64+
*/
65+
dotRelative?: boolean;
66+
/**
67+
* Follow symlinked directories when expanding `**`
68+
* patterns. This can result in a lot of duplicate references in
69+
* the presence of cyclic links, and make performance quite bad.
70+
*
71+
* By default, a `**` in a pattern will follow 1 symbolic link if
72+
* it is not the first item in the pattern, or none if it is the
73+
* first item in the pattern, following the same behavior as Bash.
74+
*/
75+
follow?: boolean;
76+
/**
77+
* string or string[], or an object with `ignore` and `ignoreChildren`
78+
* methods.
79+
*
80+
* If a string or string[] is provided, then this is treated as a glob
81+
* pattern or array of glob patterns to exclude from matches. To ignore all
82+
* children within a directory, as well as the entry itself, append `'/**'`
83+
* to the ignore pattern.
84+
*
85+
* **Note** `ignore` patterns are _always_ in `dot:true` mode, regardless of
86+
* any other settings.
87+
*
88+
* If an object is provided that has `ignored(path)` and/or
89+
* `childrenIgnored(path)` methods, then these methods will be called to
90+
* determine whether any Path is a match or if its children should be
91+
* traversed, respectively.
92+
*/
93+
ignore?: string | string[] | IgnoreLike;
94+
/**
95+
* Treat brace expansion like `{a,b}` as a "magic" pattern. Has no
96+
* effect if {@link nobrace} is set.
97+
*
98+
* Only has effect on the {@link hasMagic} function.
99+
*/
100+
magicalBraces?: boolean;
101+
/**
102+
* Add a `/` character to directory matches. Note that this requires
103+
* additional stat calls in some cases.
104+
*/
105+
mark?: boolean;
106+
/**
107+
* Perform a basename-only match if the pattern does not contain any slash
108+
* characters. That is, `*.js` would be treated as equivalent to
109+
* `**\/*.js`, matching all js files in all directories.
110+
*/
111+
matchBase?: boolean;
112+
/**
113+
* Limit the directory traversal to a given depth below the cwd.
114+
* Note that this does NOT prevent traversal to sibling folders,
115+
* root patterns, and so on. It only limits the maximum folder depth
116+
* that the walk will descend, relative to the cwd.
117+
*/
118+
maxDepth?: number;
119+
/**
120+
* Do not expand `{a,b}` and `{1..3}` brace sets.
121+
*/
122+
nobrace?: boolean;
123+
/**
124+
* Perform a case-insensitive match. This defaults to `true` on macOS and
125+
* Windows systems, and `false` on all others.
126+
*
127+
* **Note** `nocase` should only be explicitly set when it is
128+
* known that the filesystem's case sensitivity differs from the
129+
* platform default. If set `true` on case-sensitive file
130+
* systems, or `false` on case-insensitive file systems, then the
131+
* walk may return more or less results than expected.
132+
*/
133+
nocase?: boolean;
134+
/**
135+
* Do not match directories, only files. (Note: to match
136+
* _only_ directories, put a `/` at the end of the pattern.)
137+
*/
138+
nodir?: boolean;
139+
/**
140+
* Do not match "extglob" patterns such as `+(a|b)`.
141+
*/
142+
noext?: boolean;
143+
/**
144+
* Do not match `**` against multiple filenames. (Ie, treat it as a normal
145+
* `*` instead.)
146+
*
147+
* Conflicts with {@link matchBase}
148+
*/
149+
noglobstar?: boolean;
150+
/**
151+
* Defaults to value of `process.platform` if available, or `'linux'` if
152+
* not. Setting `platform:'win32'` on non-Windows systems may cause strange
153+
* behavior.
154+
*/
155+
platform?: NodeJS.Platform;
156+
/**
157+
* Set to true to call `fs.realpath` on all of the
158+
* results. In the case of an entry that cannot be resolved, the
159+
* entry is omitted. This incurs a slight performance penalty, of
160+
* course, because of the added system calls.
161+
*/
162+
realpath?: boolean;
163+
/**
164+
*
165+
* A string path resolved against the `cwd` option, which
166+
* is used as the starting point for absolute patterns that start
167+
* with `/`, (but not drive letters or UNC paths on Windows).
168+
*
169+
* Note that this _doesn't_ necessarily limit the walk to the
170+
* `root` directory, and doesn't affect the cwd starting point for
171+
* non-absolute patterns. A pattern containing `..` will still be
172+
* able to traverse out of the root directory, if it is not an
173+
* actual root directory on the filesystem, and any non-absolute
174+
* patterns will be matched in the `cwd`. For example, the
175+
* pattern `/../*` with `{root:'/some/path'}` will return all
176+
* files in `/some`, not all files in `/some/path`. The pattern
177+
* `*` with `{root:'/some/path'}` will return all the entries in
178+
* the cwd, not the entries in `/some/path`.
179+
*
180+
* To start absolute and non-absolute patterns in the same
181+
* path, you can use `{root:''}`. However, be aware that on
182+
* Windows systems, a pattern like `x:/*` or `//host/share/*` will
183+
* _always_ start in the `x:/` or `//host/share` directory,
184+
* regardless of the `root` setting.
185+
*/
186+
root?: string;
187+
/**
188+
* A [PathScurry](http://npm.im/path-scurry) object used
189+
* to traverse the file system. If the `nocase` option is set
190+
* explicitly, then any provided `scurry` object must match this
191+
* setting.
192+
*/
193+
scurry?: PathScurry;
194+
/**
195+
* Call `lstat()` on all entries, whether required or not to determine
196+
* whether it's a valid match. When used with {@link withFileTypes}, this
197+
* means that matches will include data such as modified time, permissions,
198+
* and so on. Note that this will incur a performance cost due to the added
199+
* system calls.
200+
*/
201+
stat?: boolean;
202+
/**
203+
* An AbortSignal which will cancel the Glob walk when
204+
* triggered.
205+
*/
206+
signal?: AbortSignal;
207+
/**
208+
* Use `\\` as a path separator _only_, and
209+
* _never_ as an escape character. If set, all `\\` characters are
210+
* replaced with `/` in the pattern.
211+
*
212+
* Note that this makes it **impossible** to match against paths
213+
* containing literal glob pattern characters, but allows matching
214+
* with patterns constructed using `path.join()` and
215+
* `path.resolve()` on Windows platforms, mimicking the (buggy!)
216+
* behavior of Glob v7 and before on Windows. Please use with
217+
* caution, and be mindful of [the caveat below about Windows
218+
* paths](#windows). (For legacy reasons, this is also set if
219+
* `allowWindowsEscape` is set to the exact value `false`.)
220+
*/
221+
windowsPathsNoEscape?: boolean;
222+
/**
223+
* Return [PathScurry](http://npm.im/path-scurry)
224+
* `Path` objects instead of strings. These are similar to a
225+
* NodeJS `Dirent` object, but with additional methods and
226+
* properties.
227+
*
228+
* Conflicts with {@link absolute}
229+
*/
230+
withFileTypes?: boolean;
231+
/**
232+
* An fs implementation to override some or all of the defaults. See
233+
* http://npm.im/path-scurry for details about what can be overridden.
234+
*/
235+
fs?: FSOption;
236+
}
237+
export type GlobOptionsWithFileTypesTrue = GlobOptions & {
238+
withFileTypes: true;
239+
absolute?: undefined;
240+
};
241+
export type GlobOptionsWithFileTypesFalse = GlobOptions & {
242+
withFileTypes?: false;
243+
};
244+
export type GlobOptionsWithFileTypesUnset = GlobOptions & {
245+
withFileTypes?: undefined;
246+
};
247+
export type Result<Opts> = Opts extends GlobOptionsWithFileTypesTrue ? Path : Opts extends GlobOptionsWithFileTypesFalse ? string : Opts extends GlobOptionsWithFileTypesUnset ? string : string | Path;
248+
export type Results<Opts> = Result<Opts>[];
249+
export type FileTypes<Opts> = Opts extends GlobOptionsWithFileTypesTrue ? true : Opts extends GlobOptionsWithFileTypesFalse ? false : Opts extends GlobOptionsWithFileTypesUnset ? false : boolean;
250+
/**
251+
* An object that can perform glob pattern traversals.
252+
*/
253+
export declare class Glob<Opts extends GlobOptions> implements GlobOptions {
254+
absolute?: boolean;
255+
cwd: string;
256+
root?: string;
257+
dot: boolean;
258+
dotRelative: boolean;
259+
follow: boolean;
260+
ignore?: string | string[] | IgnoreLike;
261+
magicalBraces: boolean;
262+
mark?: boolean;
263+
matchBase: boolean;
264+
maxDepth: number;
265+
nobrace: boolean;
266+
nocase: boolean;
267+
nodir: boolean;
268+
noext: boolean;
269+
noglobstar: boolean;
270+
pattern: string[];
271+
platform: NodeJS.Platform;
272+
realpath: boolean;
273+
scurry: PathScurry;
274+
stat: boolean;
275+
signal?: AbortSignal;
276+
windowsPathsNoEscape: boolean;
277+
withFileTypes: FileTypes<Opts>;
278+
/**
279+
* The options provided to the constructor.
280+
*/
281+
opts: Opts;
282+
/**
283+
* An array of parsed immutable {@link Pattern} objects.
284+
*/
285+
patterns: Pattern[];
286+
/**
287+
* All options are stored as properties on the `Glob` object.
288+
*
289+
* See {@link GlobOptions} for full options descriptions.
290+
*
291+
* Note that a previous `Glob` object can be passed as the
292+
* `GlobOptions` to another `Glob` instantiation to re-use settings
293+
* and caches with a new pattern.
294+
*
295+
* Traversal functions can be called multiple times to run the walk
296+
* again.
297+
*/
298+
constructor(pattern: string | string[], opts: Opts);
299+
/**
300+
* Returns a Promise that resolves to the results array.
301+
*/
302+
walk(): Promise<Results<Opts>>;
303+
/**
304+
* synchronous {@link Glob.walk}
305+
*/
306+
walkSync(): Results<Opts>;
307+
/**
308+
* Stream results asynchronously.
309+
*/
310+
stream(): Minipass<Result<Opts>, Result<Opts>>;
311+
/**
312+
* Stream results synchronously.
313+
*/
314+
streamSync(): Minipass<Result<Opts>, Result<Opts>>;
315+
/**
316+
* Default sync iteration function. Returns a Generator that
317+
* iterates over the results.
318+
*/
319+
iterateSync(): Generator<Result<Opts>, void, void>;
320+
[Symbol.iterator](): Generator<Result<Opts>, void, void>;
321+
/**
322+
* Default async iteration function. Returns an AsyncGenerator that
323+
* iterates over the results.
324+
*/
325+
iterate(): AsyncGenerator<Result<Opts>, void, void>;
326+
[Symbol.asyncIterator](): AsyncGenerator<Result<Opts>, void, void>;
327+
}
328+
//# sourceMappingURL=glob.d.ts.map
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../src/glob.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,WAAW,CAAA;AACvD,OAAO,QAAQ,MAAM,UAAU,CAAA;AAC/B,OAAO,EACL,QAAQ,EACR,IAAI,EACJ,UAAU,EAIX,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAGtC,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC,CAAA;AACvC,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC,CAAA;AAWlE;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAE5B;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;IAElB;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAA;IAEb;;;;;;;;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