diff --git a/.github/.github/FUNDING.yml b/.github/.github/FUNDING.yml
deleted file mode 100644
index 20d8c03a..00000000
--- a/.github/.github/FUNDING.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-# These are supported funding model platforms
-
-github: [isaacs]
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 00000000..a2cd6998
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,40 @@
+name: CI
+
+on: [push, pull_request]
+
+jobs:
+ build:
+ strategy:
+ matrix:
+ node-version: [16.x, 18.x, 19.x]
+ platform:
+ - os: ubuntu-latest
+ shell: bash
+ - os: macos-latest
+ shell: bash
+ - os: windows-latest
+ shell: bash
+ - os: windows-latest
+ shell: powershell
+ fail-fast: false
+
+ runs-on: ${{ matrix.platform.os }}
+ defaults:
+ run:
+ shell: ${{ matrix.platform.shell }}
+
+ steps:
+ - name: Checkout Repository
+ uses: actions/checkout@v3
+
+ - name: Use Nodejs ${{ matrix.node-version }}
+ uses: actions/setup-node@v3
+ with:
+ node-version: ${{ matrix.node-version }}
+ cache: npm
+
+ - name: Install dependencies
+ run: npm ci
+
+ - name: Run Tests
+ run: npm test -- -c -t0 --statements=80 --branches=80 --functions=80 --lines=80
diff --git a/.github/workflows/commit-if-modified.sh b/.github/workflows/commit-if-modified.sh
new file mode 100644
index 00000000..e951d3fb
--- /dev/null
+++ b/.github/workflows/commit-if-modified.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+git config --global user.email "$1"
+shift
+git config --global user.name "$1"
+shift
+message="$1"
+shift
+if [ $(git status --porcelain "$@" | egrep '^ M' | wc -l) -gt 0 ]; then
+ git add "$@"
+ git commit -m "$message"
+ git push || git pull --rebase
+ git push
+fi
diff --git a/.github/workflows/copyright-year.sh b/.github/workflows/copyright-year.sh
new file mode 100644
index 00000000..92fdbe5f
--- /dev/null
+++ b/.github/workflows/copyright-year.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+dir=${1:-$PWD}
+dates=($(git log --date=format:%Y --pretty=format:'%ad' --reverse | sort | uniq))
+if [ "${#dates[@]}" -eq 1 ]; then
+ datestr="${dates}"
+else
+ datestr="${dates}-${dates[${#dates[@]}-1]}"
+fi
+
+stripDate='s/^((.*)Copyright\b(.*?))((?:,\s*)?(([0-9]{4}\s*-\s*[0-9]{4})|(([0-9]{4},\s*)*[0-9]{4})))(?:,)?\s*(.*)\n$/$1$9\n/g'
+addDate='s/^.*Copyright(?:\s*\(c\))? /Copyright \(c\) '$datestr' /g'
+for l in $dir/LICENSE*; do
+ perl -pi -e "$stripDate" $l
+ perl -pi -e "$addDate" $l
+done
diff --git a/.github/workflows/isaacs-makework.yml b/.github/workflows/isaacs-makework.yml
new file mode 100644
index 00000000..7f0a44a3
--- /dev/null
+++ b/.github/workflows/isaacs-makework.yml
@@ -0,0 +1,38 @@
+name: "various tidying up tasks to silence nagging"
+
+on:
+ push:
+ branches:
+ - main
+ workflow_dispatch:
+
+jobs:
+ makework:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+ - name: Use Node.js
+ uses: actions/setup-node@v3
+ with:
+ node-version: 16.x
+ cache: npm
+ - name: put repo in package.json
+ run: node .github/workflows/package-json-repo.js
+ - name: check in package.json if modified
+ run: |
+ bash -x .github/workflows/commit-if-modified.sh \
+ "package-json-repo-bot@example.com" \
+ "package.json Repo Bot" \
+ "chore: add repo to package.json" \
+ package.json package-lock.json
+ - name: put all dates in license copyright line
+ run: bash .github/workflows/copyright-year.sh
+ - name: check in licenses if modified
+ run: |
+ bash .github/workflows/commit-if-modified.sh \
+ "license-year-bot@example.com" \
+ "License Year Bot" \
+ "chore: add copyright year to license" \
+ LICENSE*
diff --git a/.github/workflows/package-json-repo.js b/.github/workflows/package-json-repo.js
new file mode 100644
index 00000000..b28151b6
--- /dev/null
+++ b/.github/workflows/package-json-repo.js
@@ -0,0 +1,16 @@
+#!/usr/bin/env node
+
+const pf = require.resolve(`${process.cwd()}/package.json`)
+const pj = require(pf)
+
+if (!pj.repository && process.env.GITHUB_REPOSITORY) {
+ const fs = require('fs')
+ const server = process.env.GITHUB_SERVER_URL || 'https://github.com'
+ const repo = `${server}/${process.env.GITHUB_REPOSITORY}`
+ pj.repository = repo
+ const json = fs.readFileSync(pf, 'utf8')
+ const match = json.match(/^\s*\{[\r\n]+([ \t]*)"/)
+ const indent = match[1]
+ const output = JSON.stringify(pj, null, indent || 2) + '\n'
+ fs.writeFileSync(pf, output)
+}
diff --git a/.github/workflows/typedoc.yml b/.github/workflows/typedoc.yml
new file mode 100644
index 00000000..f4fe23d6
--- /dev/null
+++ b/.github/workflows/typedoc.yml
@@ -0,0 +1,51 @@
+# Simple workflow for deploying static content to GitHub Pages
+name: Deploy static content to Pages
+
+on:
+ # Runs on pushes targeting the default branch
+ push:
+ branches: ["main"]
+
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch:
+
+# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
+permissions:
+ contents: read
+ pages: write
+ id-token: write
+
+# Allow one concurrent deployment
+concurrency:
+ group: "pages"
+ cancel-in-progress: true
+
+jobs:
+ # Single deploy job since we're just deploying
+ deploy:
+ environment:
+ name: github-pages
+ url: ${{ steps.deployment.outputs.page_url }}
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ - name: Use Nodejs ${{ matrix.node-version }}
+ uses: actions/setup-node@v3
+ with:
+ node-version: 18.x
+ cache: npm
+ - name: Install dependencies
+ run: npm ci
+ - name: Generate typedocs
+ run: npm run typedoc
+
+ - name: Setup Pages
+ uses: actions/configure-pages@v3
+ - name: Upload artifact
+ uses: actions/upload-pages-artifact@v1
+ with:
+ path: './docs'
+ - name: Deploy to GitHub Pages
+ id: deployment
+ uses: actions/deploy-pages@v1
diff --git a/.gitignore b/.gitignore
index bcafea68..1d5bc735 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,13 @@
.*.swp
-node_modules/*
-v8.log
-profile.txt
-nyc_output/
-.nyc_output/
-coverage/
+/old
+/*.tap
+/dist
+/node_modules
+/v8.log
+/profile.txt
+/nyc_output
+/.nyc_output
+/coverage
+/test/fixtures
+/bench-working-dir
+/scripts/fixture
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 00000000..fb94be32
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,11 @@
+/node_modules
+/example
+/.github
+/dist
+.env
+/tap-snapshots
+/.nyc_output
+/coverage
+/benchmark
+/scripts/fixture
+/test/fixture
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 82f89217..00000000
--- a/.travis.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-language: node_js
-
-node_js:
- - node
- - 12
- - 10
- - 8
-
-cache:
- directories:
- - $HOME/.npm
-
-notifications:
- email: false
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index eb90985c..85e4a81b 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,12 +1,8 @@
-Please consider signing [the neveragain.tech pledge](http://neveragain.tech/)
-
-## Contributing
-
Any change to behavior (including bugfixes) must come with a test.
Patches that fail tests or reduce performance will be rejected.
-```
+```sh
# to run tests
npm test
diff --git a/LICENSE b/LICENSE
index 42ca266d..ec7df933 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
The ISC License
-Copyright (c) Isaac Z. Schlueter and Contributors
+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
@@ -13,9 +13,3 @@ 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.
-
-## Glob Logo
-
-Glob's logo created by Tanya Brassie , licensed
-under a Creative Commons Attribution-ShareAlike 4.0 International License
-https://creativecommons.org/licenses/by-sa/4.0/
diff --git a/README.md b/README.md
index 0916a482..bc7fabc4 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,12 @@
# Glob
-Match files using the patterns the shell uses, like stars and stuff.
+Match files using the patterns the shell uses.
-[](https://travis-ci.org/isaacs/node-glob/) [](https://ci.appveyor.com/project/isaacs/node-glob) [](https://coveralls.io/github/isaacs/node-glob?branch=master)
+The most correct and second fastest glob implementation in
+JavaScript. (See **Comparison to Other JavaScript Glob
+Implementations** at the bottom of this readme.)
-This is a glob implementation in JavaScript. It uses the `minimatch`
-library to do its matching.
-
-
+
## Usage
@@ -17,302 +16,583 @@ Install with npm
npm i glob
```
-```javascript
-var glob = require("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
+import { glob, globSync, globStream, globStreamSync, Glob } from 'glob'
+// or using commonjs, that's fine, too
+const {
+ glob,
+ globSync,
+ globStream,
+ globStreamSync,
+ Glob,
+} = require('glob')
+
+// or default export is fine too, just returns the glob function
+// with all the aliases attached.
+import glob from 'glob'
+// or using commonjs
+const glob = require('glob')
+
+// the main glob() and globSync() resolve/return array of filenames
+
+// all js files, but don't look in node_modules
+const jsfiles = await glob('**/*.js', { ignore: 'node_modules/**' })
+
+// pass in a signal to cancel the glob walk
+const stopAfter100ms = await glob('**/*.css', {
+ signal: AbortSignal.timeout(100),
+})
+
+// multiple patterns supported as well
+const images = await glob(['css/*.{png,jpeg}', 'public/*.{png,jpeg}'])
+
+// but of course you can do that with the glob pattern also
+// the sync function is the same, just returns a string[] instead
+// of Promise
+const imagesAlt = globSync('{css,public}/*.{png,jpeg}')
+
+// you can also stream them, this is a Minipass stream
+const filesStream = globStream(['**/*.dat', 'logs/**/*.log'])
+
+// construct a Glob object if you wanna do it that way, which
+// allows for much faster walks if you have to look in the same
+// folder multiple times.
+const g = new Glob('**/foo')
+// glob objects are async iterators, can also do globIterate() or
+// g.iterate(), same deal
+for await (const file of g) {
+ console.log('found a foo file:', file)
+}
+// pass a glob as the glob options to reuse its settings and caches
+const g2 = new Glob('**/bar', g)
+// sync iteration works as well
+for (const file of g2) {
+ console.log('found a bar file:', file)
+}
+
+// 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
+const g3 = new Glob('**/baz/**', { withFileTypes: true })
+g3.stream().on('data', path => {
+ console.log(
+ 'got a path object',
+ path.fullpath(),
+ path.isDirectory(),
+ path.readdirSync().map(e => e.name)
+ )
+})
+
+// if you use stat:true and withFileTypes, you can sort results
+// by things like modified time, filter by permission mode, etc.
+// All Stats fields will be avialable in that case. Slightly
+// slower, though.
+// For example:
+const results = await glob('**', { stat: true, withFileTypes: true })
+
+const timeSortedFiles = results
+ .sort((a, b) => a.mtimeMS - b.mtimeMS)
+ .map(path => path.fullpath())
+
+const groupReadableFiles = results
+ .filter(path => path.mode & 0o040)
+ .map(path => path.fullpath())
+
+// custom ignores can be done like this, for example by saying
+// you'll ignore all markdown files, and all folders named 'docs'
+const customIgnoreResults = await glob('**', {
+ ignore: {
+ ignored: (p) => /\.md$/.test(p.name),
+ childrenIgnored: (p) => p.isNamed('docs'),
+ },
+})
+
+// another fun use case, only return files with the same name as
+// their parent folder, plus either `.ts` or `.js`
+const folderNamedModules = await glob('**/*.{ts,js}', {
+ ignore: {
+ ignored: (p) => {
+ const pp = p.parent
+ return !(p.isNamed(pp.name + '.ts') || p.isNamed(pp.name + '.js'))
+ }
+ }
+})
-// options is optional
-glob("**/*.js", options, function (er, files) {
- // files is an array of filenames.
- // If the `nonull` option is set, and nothing
- // was found, then files is ["**/*.js"]
- // er is an error object or null.
+// find all files edited in the last hour, to do this, we ignore
+// all of them that are more than an hour old
+const newFiles = await glob('**', {
+ // need stat so we have mtime
+ stat: true,
+ // only want the files, not the dirs
+ nodir: true,
+ ignore: {
+ ignored: (p) => {
+ return (new Date() - p.mtime) > (60 * 60 * 1000)
+ },
+ // could add similar childrenIgnored here as well, but
+ // directory mtime is inconsistent across platforms, so
+ // probably better not to, unless you know the system
+ // tracks this reliably.
+ }
})
```
-## Glob Primer
+**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.
-"Globs" are the patterns you type when you do stuff like `ls *.js` on
-the command line, or put `build/*` in a `.gitignore` file.
-
-Before parsing the path part patterns, braced sections are expanded
-into a set. Braced sections start with `{` and end with `}`, with any
-number of comma-delimited sections within. Braced sections may contain
-slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`.
-
-The following characters have special magic meaning when used in a
-path portion:
-
-* `*` Matches 0 or more characters in a single path portion
-* `?` Matches 1 character
-* `[...]` Matches a range of characters, similar to a RegExp range.
- If the first character of the range is `!` or `^` then it matches
- any character not in the range.
-* `!(pattern|pattern|pattern)` Matches anything that does not match
- any of the patterns provided.
-* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the
- patterns provided.
-* `+(pattern|pattern|pattern)` Matches one or more occurrences of the
- patterns provided.
-* `*(a|b|c)` Matches zero or more occurrences of the patterns provided
-* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns
- provided
-* `**` If a "globstar" is alone in a path portion, then it matches
- zero or more directories and subdirectories searching for matches.
- It does not crawl symlinked directories.
+## `glob(pattern: string | string[], options?: GlobOptions) => Promise`
-### Dots
+Perform an asynchronous glob search for the pattern(s) specified.
+Returns
+[Path](https://isaacs.github.io/path-scurry/classes/PathBase)
+objects if the `withFileTypes` option is set to `true`. See below
+for full options field desciptions.
-If a file or directory path portion has a `.` as the first character,
-then it will not match any glob pattern unless that pattern's
-corresponding path part also has a `.` as its first character.
+## `globSync(pattern: string | string[], options?: GlobOptions) => string[] | Path[]`
-For example, the pattern `a/.*/c` would match the file at `a/.b/c`.
-However the pattern `a/*/c` would not, because `*` does not start with
-a dot character.
+Synchronous form of `glob()`.
-You can make glob treat dots as normal characters by setting
-`dot:true` in the options.
+Alias: `glob.sync()`
-### Basename Matching
+## `globIterate(pattern: string | string[], options?: GlobOptions) => AsyncGenerator`
-If you set `matchBase:true` in the options, and the pattern has no
-slashes in it, then it will seek for any file anywhere in the tree
-with a matching basename. For example, `*.js` would match
-`test/simple/basic.js`.
+Return an async iterator for walking glob pattern matches.
-### Empty Sets
+Alias: `glob.iterate()`
-If no matching files are found, then an empty array is returned. This
-differs from the shell, where the pattern itself is returned. For
-example:
+## `globIterateSync(pattern: string | string[], options?: GlobOptions) => Generator`
- $ echo a*s*d*f
- a*s*d*f
+Return a sync iterator for walking glob pattern matches.
-To get the bash-style behavior, set the `nonull:true` in the options.
+Alias: `glob.iterate.sync()`, `glob.sync.iterate()`
-### See Also:
+## `globStream(pattern: string | string[], options?: GlobOptions) => Minipass`
-* `man sh`
-* `man bash` (Search for "Pattern Matching")
-* `man 3 fnmatch`
-* `man 5 gitignore`
-* [minimatch documentation](https://github.com/isaacs/minimatch)
+Return a stream that emits all the strings or `Path` objects and
+then emits `end` when completed.
-## glob.hasMagic(pattern, [options])
+Alias: `glob.stream()`
-Returns `true` if there are any special characters in the pattern, and
-`false` otherwise.
+## `globStreamSync(pattern: string | string[], options?: GlobOptions) => Minipass`
-Note that the options affect the results. If `noext:true` is set in
-the options object, then `+(a|b)` will not be considered a magic
-pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}`
-then that is considered magical, unless `nobrace:true` is set in the
-options.
+Syncronous form of `globStream()`. Will read all the matches as
+fast as you consume them, even all in a single tick if you
+consume them immediately, but will still respond to backpressure
+if they're not consumed immediately.
-## glob(pattern, [options], cb)
+Alias: `glob.stream.sync()`, `glob.sync.stream()`
-* `pattern` `{String}` Pattern to be matched
-* `options` `{Object}`
-* `cb` `{Function}`
- * `err` `{Error | null}`
- * `matches` `{Array}` filenames found matching the pattern
+## `hasMagic(pattern: string | string[], options?: GlobOptions) => boolean`
-Perform an asynchronous glob search.
+Returns `true` if the provided pattern contains any "magic" glob
+characters, given the options provided.
-## glob.sync(pattern, [options])
+Brace expansion is not considered "magic" unless the
+`magicalBraces` option is set, as brace expansion just turns one
+string into an array of strings. So a pattern like `'x{a,b}y'`
+would return `false`, because `'xay'` and `'xby'` both do not
+contain any magic glob characters, and it's treated the same as
+if you had called it on `['xay', 'xby']`. When
+`magicalBraces:true` is in the options, brace expansion _is_
+treated as a pattern having magic.
-* `pattern` `{String}` Pattern to be matched
-* `options` `{Object}`
-* return: `{Array}` filenames found matching the pattern
+## `escape(pattern: string, options?: GlobOptions) => string`
-Perform a synchronous glob search.
+Escape all magic characters in a glob pattern, so that it will
+only ever match literal strings
-## Class: glob.Glob
+If the `windowsPathsNoEscape` option is used, then characters are
+escaped by wrapping in `[]`, because a magic character wrapped in
+a character class can only be satisfied by that exact character.
-Create a Glob object by instantiating the `glob.Glob` class.
+Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot
+be escaped or unescaped.
-```javascript
-var Glob = require("glob").Glob
-var mg = new Glob(pattern, options, cb)
-```
+## `unescape(pattern: string, options?: GlobOptions) => string`
+
+Un-escape a glob string that may contain some escaped characters.
+
+If the `windowsPathsNoEscape` option is used, then square-brace
+escapes are removed, but not backslash escapes. For example, it
+will turn the string `'[*]'` into `*`, but it will not turn
+`'\\*'` into `'*'`, because `\` is a path separator in
+`windowsPathsNoEscape` mode.
-It's an EventEmitter, and starts walking the filesystem to find matches
-immediately.
+When `windowsPathsNoEscape` is not set, then both brace escapes
+and backslash escapes are removed.
-### new glob.Glob(pattern, [options], [cb])
+Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot
+be escaped or unescaped.
-* `pattern` `{String}` pattern to search for
-* `options` `{Object}`
-* `cb` `{Function}` Called when an error occurs, or matches are found
- * `err` `{Error | null}`
- * `matches` `{Array}` filenames found matching the pattern
+## Class `Glob`
-Note that if the `sync` flag is set in the options, then matches will
-be immediately available on the `g.found` member.
+An object that can perform glob pattern traversals.
+
+### `const g = new Glob(pattern: string | string[], options: GlobOptions)`
+
+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.
+
+Traversal functions can be called multiple times to run the walk
+again.
+
+### `g.stream()`
+
+Stream results asynchronously,
+
+### `g.streamSync()`
+
+Stream results synchronously.
+
+### `g.iterate()`
+
+Default async iteration function. Returns an AsyncGenerator that
+iterates over the results.
+
+### `g.iterateSync()`
+
+Default sync iteration function. Returns a Generator that
+iterates over the results.
+
+### `g.walk()`
+
+Returns a Promise that resolves to the results array.
+
+### `g.walkSync()`
+
+Returns a results array.
### Properties
-* `minimatch` The minimatch object that the glob uses.
-* `options` The options object passed in.
-* `aborted` Boolean which is set to true when calling `abort()`. There
- is no way at this time to continue a glob search after aborting, but
- you can re-use the statCache to avoid having to duplicate syscalls.
-* `cache` Convenience object. Each field has the following possible
- values:
- * `false` - Path does not exist
- * `true` - Path exists
- * `'FILE'` - Path exists, and is not a directory
- * `'DIR'` - Path exists, and is a directory
- * `[file, entries, ...]` - Path exists, is a directory, and the
- array value is the results of `fs.readdir`
-* `statCache` Cache of `fs.stat` results, to prevent statting the same
- path multiple times.
-* `symlinks` A record of which paths are symbolic links, which is
- relevant in resolving `**` patterns.
-* `realpathCache` An optional object which is passed to `fs.realpath`
- to minimize unnecessary syscalls. It is stored on the instantiated
- Glob object, and may be re-used.
-
-### Events
-
-* `end` When the matching is finished, this is emitted with all the
- matches found. If the `nonull` option is set, and no match was found,
- then the `matches` list contains the original pattern. The matches
- are sorted, unless the `nosort` flag is set.
-* `match` Every time a match is found, this is emitted with the specific
- thing that matched. It is not deduplicated or resolved to a realpath.
-* `error` Emitted when an unexpected error is encountered, or whenever
- any fs error occurs if `options.strict` is set.
-* `abort` When `abort()` is called, this event is raised.
-
-### Methods
-
-* `pause` Temporarily stop the search
-* `resume` Resume the search
-* `abort` Stop the search forever
-
-### Options
-
-All the options that can be passed to Minimatch can also be passed to
-Glob to change pattern matching behavior. Also, some have been added,
-or have glob-specific ramifications.
-
-All options are false by default, unless otherwise noted.
-
-All options are added to the Glob object, as well.
-
-If you are running many `glob` operations, you can pass a Glob object
-as the `options` argument to a subsequent operation to shortcut some
-`stat` and `readdir` calls. At the very least, you may pass in shared
-`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that
-parallel glob operations will be sped up by sharing information about
-the filesystem.
-
-* `cwd` The current working directory in which to search. Defaults
- to `process.cwd()`.
-* `root` The place where patterns starting with `/` will be mounted
- onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix
- systems, and `C:\` or some such on Windows.)
-* `dot` Include `.dot` files in normal matches and `globstar` matches.
- Note that an explicit dot in a portion of the pattern will always
- match dot files.
-* `nomount` By default, a pattern starting with a forward-slash will be
- "mounted" onto the root setting, so that a valid filesystem path is
- returned. Set this flag to disable that behavior.
-* `mark` Add a `/` character to directory matches. Note that this
+All options are stored as properties on the `Glob` object.
+
+- `opts` The options provided to the constructor.
+- `patterns` An array of parsed immutable `Pattern` objects.
+
+## Options
+
+Exported as `GlobOptions` TypeScript interface. A `GlobOptions`
+object may be provided to any of the exported methods, and must
+be provided to the `Glob` constructor.
+
+All options are optional, boolean, and false by default, unless
+otherwise noted.
+
+All resolved options are added to the Glob object as properties.
+
+If you are running many `glob` operations, you can pass a Glob
+object as the `options` argument to a subsequent operation to
+share the previously loaded cache.
+
+- `cwd` String path or `file://` string or URL object. The
+ current working directory in which to search. Defaults to
+ `process.cwd()`. See also: "Windows, CWDs, Drive Letters, and
+ UNC Paths", below.
+
+ This option may be eiher a string path or a `file://` URL
+ object or string.
+
+- `root` A string path resolved against the `cwd` option, which
+ 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.
+
+- `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`.)
+
+- `dot` Include `.dot` files in normal matches and `globstar`
+ matches. Note that an explicit dot in a portion of the pattern
+ will always match dot files.
+
+- `magicalBraces` Treat brace expansion like `{a,b}` as a "magic"
+ pattern. Has no effect if {@link nobrace} is set.
+
+ Only has effect on the {@link hasMagic} function, no effect on
+ glob pattern matching itself.
+
+- `dotRelative` Prepend all relative path strings with `./` (or
+ `.\` on Windows).
+
+ Without this option, returned relative paths are "bare", so
+ instead of returning `'./foo/bar'`, they are returned as
+ `'foo/bar'`.
+
+ Relative patterns starting with `'../'` are not prepended with
+ `./`, even if this option is set.
+
+- `mark` Add a `/` character to directory matches. Note that this
requires additional stat calls.
-* `nosort` Don't sort the results.
-* `stat` Set to true to stat *all* results. This reduces performance
- somewhat, and is completely unnecessary, unless `readdir` is presumed
- to be an untrustworthy indicator of file existence.
-* `silent` When an unusual error is encountered when attempting to
- read a directory, a warning will be printed to stderr. Set the
- `silent` option to true to suppress these warnings.
-* `strict` When an unusual error is encountered when attempting to
- read a directory, the process will just continue on in search of
- other matches. Set the `strict` option to raise an error in these
- cases.
-* `cache` See `cache` property above. Pass in a previously generated
- cache object to save some fs calls.
-* `statCache` A cache of results of filesystem information, to prevent
- unnecessary stat calls. While it should not normally be necessary
- to set this, you may pass the statCache from one glob() call to the
- options object of another, if you know that the filesystem will not
- change between calls. (See "Race Conditions" below.)
-* `symlinks` A cache of known symbolic links. You may pass in a
- previously generated `symlinks` object to save `lstat` calls when
- resolving `**` matches.
-* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead.
-* `nounique` In some cases, brace-expanded patterns can result in the
- same file showing up multiple times in the result set. By default,
- this implementation prevents duplicates in the result set. Set this
- flag to disable that behavior.
-* `nonull` Set to never return an empty set, instead returning a set
- containing the pattern itself. This is the default in glob(3).
-* `debug` Set to enable debug logging in minimatch and glob.
-* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets.
-* `noglobstar` Do not match `**` against multiple filenames. (Ie,
+
+- `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets.
+
+- `noglobstar` Do not match `**` against multiple filenames. (Ie,
treat it as a normal `*` instead.)
-* `noext` Do not match `+(a|b)` "extglob" patterns.
-* `nocase` Perform a case-insensitive match. Note: on
- case-insensitive filesystems, non-magic patterns will match by
- default, since `stat` and `readdir` will not raise errors.
-* `matchBase` Perform a basename-only match if the pattern does not
- contain any slash characters. That is, `*.js` would be treated as
- equivalent to `**/*.js`, matching all js files in all directories.
-* `nodir` Do not match directories, only files. (Note: to match
- *only* directories, simply put a `/` at the end of the pattern.)
-* `ignore` Add a pattern or an array of glob patterns to exclude matches.
- Note: `ignore` patterns are *always* in `dot:true` mode, regardless
- of any other settings.
-* `follow` Follow symlinked directories when expanding `**` patterns.
- Note that this can result in a lot of duplicate references in the
- presence of cyclic links.
-* `realpath` Set to true to call `fs.realpath` on all of the results.
- In the case of a symlink that cannot be resolved, the full absolute
- path to the matched entry is returned (though it will usually be a
- broken symlink)
-* `absolute` Set to true to always receive absolute paths for matched
- files. Unlike `realpath`, this also affects the values returned in
- the `match` event.
+
+- `noext` Do not match "extglob" patterns such as `+(a|b)`.
+
+- `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.
+
+- `maxDepth` Specify a number to limit the depth of the directory
+ traversal to this many levels below the `cwd`.
+
+- `matchBase` Perform a basename-only match if the pattern does
+ not contain any slash characters. That is, `*.js` would be
+ treated as equivalent to `**/*.js`, matching all js files in
+ all directories.
+
+- `nodir` Do not match directories, only files. (Note: to match
+ _only_ directories, put a `/` at the end of the pattern.)
+
+- `stat` Call `lstat()` on all entries, whether required or not
+ to determine whether it's a valid match. When used with
+ `withFileTypes`, this means that matches will include data such
+ as modified time, permissions, and so on. Note that this will
+ incur a performance cost due to the added system calls.
+
+- `ignore` string or string[], or an object with `ignore` and
+ `ignoreChildren` 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 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
+ children should be traversed, respectively.
+
+- `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.
+
+ By default, a `**` in a pattern will follow 1 symbolic link if
+ 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.
+
+- `realpath` Set to true to call `fs.realpath` on all of the
+ results. In the case of an entry that cannot be resolved, the
+ entry is omitted. This incurs a slight performance penalty, of
+ course, because of the added system calls.
+
+- `absolute` Set to true to always receive absolute paths for
+ matched files. Set to `false` to always receive relative paths
+ for matched files.
+
+ By default, when this option is not set, absolute paths are
+ returned for patterns that are absolute, and otherwise paths
+ are returned that are relative to the `cwd` setting.
+
+ This does _not_ make an extra system call to get the realpath,
+ it only does string path resolution.
+
+ `absolute` may not be used along with `withFileTypes`.
+
+- `platform` Defaults to 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` may not be used along with `absolute`.
+
+- `signal` An AbortSignal which will cancel the Glob walk when
+ triggered.
+
+- `fs` An override object to pass in custom filesystem methods.
+ See [PathScurry docs](http://npm.im/path-scurry) 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.
+
+## Glob Primer
+
+Much more information about glob pattern expansion can be found
+by running `man bash` and searching for `Pattern Matching`.
+
+"Globs" are the patterns you type when you do stuff like `ls
+*.js` on the command line, or put `build/*` in a `.gitignore`
+file.
+
+Before parsing the path part patterns, braced sections are
+expanded into a set. Braced sections start with `{` and end with
+`}`, with 2 or more comma-delimited sections within. Braced
+sections may contain slash characters, so `a{/b/c,bcd}` would
+expand into `a/b/c` and `abcd`.
+
+The following characters have special magic meaning when used in
+a path portion. With the exception of `**`, none of these match
+path separators (ie, `/` on all platforms, and `\` on Windows).
+
+- `*` Matches 0 or more characters in a single path portion.
+ When alone in a path portion, it must match at least 1
+ character. If `dot:true` is not specified, then `*` will not
+ match against a `.` character at the start of a path portion.
+- `?` Matches 1 character. If `dot:true` is not specified, then
+ `?` will not match against a `.` character at the start of a
+ path portion.
+- `[...]` Matches a range of characters, similar to a RegExp
+ range. If the first character of the range is `!` or `^` then
+ it matches any character not in the range. If the first
+ character is `]`, then it will be considered the same as `\]`,
+ rather than the end of the character class.
+- `!(pattern|pattern|pattern)` Matches anything that does not
+ match any of the patterns provided. May _not_ contain `/`
+ characters. Similar to `*`, if alone in a path portion, then
+ the path portion must have at least one character.
+- `?(pattern|pattern|pattern)` Matches zero or one occurrence of
+ the patterns provided. May _not_ contain `/` characters.
+- `+(pattern|pattern|pattern)` Matches one or more occurrences of
+ the patterns provided. May _not_ contain `/` characters.
+- `*(a|b|c)` Matches zero or more occurrences of the patterns
+ provided. May _not_ contain `/` characters.
+- `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns
+ provided. May _not_ contain `/` characters.
+- `**` If a "globstar" is alone in a path portion, then it
+ matches zero or more directories and subdirectories searching
+ for matches. It does not crawl symlinked directories, unless
+ `{follow:true}` is passed in the options object. A pattern
+ like `a/b/**` will only match `a/b` if it is a directory.
+ Follows 1 symbolic link if not the first item in the pattern,
+ or 0 if it is the first item, unless `follow:true` is set, in
+ which case it follows all symbolic links.
+
+`[:class:]` patterns are supported by this implementation, but
+`[=c=]` and `[.symbol.]` style class patterns are not.
+
+### Dots
+
+If a file or directory path portion has a `.` as the first
+character, then it will not match any glob pattern unless that
+pattern's corresponding path part also has a `.` as its first
+character.
+
+For example, the pattern `a/.*/c` would match the file at
+`a/.b/c`. However the pattern `a/*/c` would not, because `*` does
+not start with a dot character.
+
+You can make glob treat dots as normal characters by setting
+`dot:true` in the options.
+
+### Basename Matching
+
+If you set `matchBase:true` in the options, and the pattern has
+no slashes in it, then it will seek for any file anywhere in the
+tree with a matching basename. For example, `*.js` would match
+`test/simple/basic.js`.
+
+### Empty Sets
+
+If no matching files are found, then an empty array is returned.
+This differs from the shell, where the pattern itself is
+returned. For example:
+
+```sh
+$ echo a*s*d*f
+a*s*d*f
+```
## Comparisons to other fnmatch/glob implementations
-While strict compliance with the existing standards is a worthwhile
-goal, some discrepancies exist between node-glob and other
-implementations, and are intentional.
-
-The double-star character `**` is supported by default, unless the
-`noglobstar` flag is set. This is supported in the manner of bsdglob
-and bash 4.3, 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 crawled as part of a `**`,
-though their contents may match against subsequent portions of the
-pattern. This prevents infinite loops and duplicates and the like.
-
-If an escaped pattern has no matches, and the `nonull` flag is set,
-then glob returns the pattern as-provided, rather than
-interpreting the character escapes. For example,
-`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
-`"*a?"`. This is akin to setting the `nullglob` option in bash, except
-that it does not resolve escaped pattern characters.
-
-If brace expansion is not disabled, then it is performed before any
-other interpretation of the glob pattern. Thus, a pattern like
-`+(a|{b),c)}`, which would not be valid in bash or zsh, is 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.
+While strict compliance with the existing standards is a
+worthwhile goal, some discrepancies exist between node-glob and
+other implementations, and are intentional.
+
+The double-star character `**` is supported by default, unless
+the `noglobstar` flag is set. This is supported in the manner of
+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.
+
+There is no equivalent of the `nonull` option. A pattern that
+does not find any matches simply resolves to nothing. (An empty
+array, immediately ended stream, etc.)
+
+If brace expansion is not disabled, then it is performed before
+any other interpretation of the glob pattern. Thus, a pattern
+like `+(a|{b),c)}`, which would not be valid in bash or zsh, is
+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,
+but `[=c=]` (locale-specific character collation weight), and
+`[.symbol.]` (collating symbol), are not.
+
+### Repeated Slashes
+
+Unlike Bash and zsh, repeated `/` are always coalesced into a
+single path separator.
### Comments and Negation
-Previously, this module let you mark a pattern as a "comment" if it
-started with a `#` character, or a "negated" pattern if it started
-with a `!` character.
+Previously, this module let you mark a pattern as a "comment" if
+it started with a `#` character, or a "negated" pattern if it
+started with a `!` character.
-These options were deprecated in version 5, and removed in version 6.
+These options were deprecated in version 5, and removed in
+version 6.
To specify things that should not match, use the `ignore` option.
@@ -320,56 +600,487 @@ 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 `/`
-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.
+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
+default result in `/foo/*` matching `C:\foo\bar.txt`.
+
+To automatically coerce all `\` characters to `/` in pattern
+strings, **thus making it impossible to escape literal glob
+characters**, you may set the `windowsPathsNoEscape` option to
+`true`.
+
+### Windows, CWDs, Drive Letters, and UNC Paths
+
+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.
-Results from absolute patterns such as `/foo/*` are mounted onto the
-root setting using `path.join`. On windows, this will by default result
-in `/foo/*` matching `C:\foo\bar.txt`.
+On Windows systems, the behavior is similar, but the concept of
+an "absolute path" is somewhat more involved.
+
+#### UNC Paths
+
+A UNC path may be used as the start of a pattern on Windows
+platforms. For example, a pattern like: `//?/x:/*` will return
+all file entries in the root of the `x:` drive. A pattern like
+`//ComputerName/Share/*` will return all files in the associated
+share.
+
+UNC path roots are always compared case insensitively.
+
+#### Drive Letters
+
+A pattern starting with a drive letter, like `c:/*`, will search
+in that drive, regardless of any `cwd` option provided.
+
+If the pattern starts with `/`, and is not a UNC path, and there
+is an explicit `cwd` option set with a drive letter, then the
+drive letter in the `cwd` is used as the root of the directory
+traversal.
+
+For example, `glob('/tmp', { cwd: 'c:/any/thing' })` will return
+`['c:/tmp']` as the result.
+
+If an explicit `cwd` option is not provided, and the pattern
+starts with `/`, then the traversal will run on the root of the
+drive provided as the `cwd` option. (That is, it is the result of
+`path.resolve('/')`.)
## Race Conditions
-Glob searching, by its very nature, is susceptible to race conditions,
-since it relies on directory walking and such.
+Glob searching, by its very nature, is susceptible to race
+conditions, since it relies on directory walking.
-As a result, it is possible that a file that exists when glob looks for
-it may have been deleted or modified by the time it returns the result.
+As a result, it is possible that a file that exists when glob
+looks for it may have been deleted or modified by the time it
+returns the result.
-As part of its internal implementation, this program caches all stat
-and readdir calls that it makes, in order to cut down on system
-overhead. However, this also makes it even more susceptible to races,
-especially if the cache or statCache objects are reused between glob
-calls.
+By design, this implementation caches all readdir calls that it
+makes, in order to cut down on system overhead. However, this
+also makes it even more susceptible to races, especially if the
+cache object is reused between glob calls.
Users are thus advised not to use a glob result as a guarantee of
-filesystem state in the face of rapid changes. For the vast majority
-of operations, this is never a problem.
+filesystem state in the face of rapid changes. For the vast
+majority of operations, this is never a problem.
+
+### See Also:
+
+- `man sh`
+- `man bash` [Pattern
+ Matching](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html)
+- `man 3 fnmatch`
+- `man 5 gitignore`
+- [minimatch documentation](https://github.com/isaacs/minimatch)
## Glob Logo
-Glob's logo was created by [Tanya Brassie](http://tanyabrassie.com/). Logo files can be found [here](https://github.com/isaacs/node-glob/tree/master/logo).
-The logo is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/).
+Glob's logo was created by [Tanya
+Brassie](http://tanyabrassie.com/). Logo files can be found
+[here](https://github.com/isaacs/node-glob/tree/master/logo).
+
+The logo is licensed under a [Creative Commons
+Attribution-ShareAlike 4.0 International
+License](https://creativecommons.org/licenses/by-sa/4.0/).
## Contributing
-Any change to behavior (including bugfixes) must come with a test.
+Any change to behavior (including bugfixes) must come with a
+test.
Patches that fail tests or reduce performance will be rejected.
-```
+```sh
# to run tests
npm test
# to re-generate test fixtures
npm run test-regen
-# to benchmark against bash/zsh
+# run the benchmarks
npm run bench
# to profile javascript
npm run prof
```
-
+## Comparison to Other JavaScript Glob Implementations
+
+**tl;dr**
+
+- If you want glob matching that is as faithful as possible to
+ Bash pattern expansion semantics, and as fast as possible
+ within that constraint, _use this module_.
+- If you are reasonably sure that the patterns you will encounter
+ are relatively simple, and want the absolutely fastest glob
+ matcher out there, _use [fast-glob](http://npm.im/fast-glob)_.
+- If you are reasonably sure that the patterns you will encounter
+ are relatively simple, and want the convenience of
+ automatically respecting `.gitignore` files, _use
+ [globby](http://npm.im/globby)_.
+
+There are some other glob matcher libraries on npm, but these
+three are (in my opinion, as of 2023) the best.
+
+---
+
+**full explanation**
+
+Every library reflects a set of opinions and priorities in the
+trade-offs it makes. Other than this library, I can personally
+recommend both [globby](http://npm.im/globby) and
+[fast-glob](http://npm.im/fast-glob), though they differ in their
+benefits and drawbacks.
+
+Both have very nice APIs and are reasonably fast.
+
+`fast-glob` is, as far as I am aware, the fastest glob
+implementation in JavaScript today. However, there are many
+cases where the choices that `fast-glob` makes in pursuit of
+speed mean that its results differ from the results returned by
+Bash and other sh-like shells, which may be surprising.
+
+In my testing, `fast-glob` is around 10-20% faster than this
+module when walking over 200k files nested 4 directories
+deep[1](#fn-webscale). However, there are some inconsistencies
+with Bash matching behavior that this module does not suffer
+from:
+
+- `**` only matches files, not directories
+- `..` path portions are not handled unless they appear at the
+ start of the pattern
+- `./!()` will not match any files that _start_ with
+ ``, even if they do not match ``. For
+ example, `!(9).txt` will not match `9999.txt`.
+- Some brace patterns in the middle of a pattern will result in
+ failing to find certain matches.
+- Extglob patterns are allowed to contain `/` characters.
+
+Globby exhibits all of the same pattern semantics as fast-glob,
+(as it is a wrapper around fast-glob) and is slightly slower than
+node-glob (by about 10-20% in the benchmark test set, or in other
+words, anywhere from 20-50% slower than fast-glob). However, it
+adds some API conveniences that may be worth the costs.
+
+- Support for `.gitignore` and other ignore files.
+- Support for negated globs (ie, patterns starting with `!`
+ rather than using a separate `ignore` option).
+
+The priority of this module is "correctness" in the sense of
+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.
+
+---
+
+[1]: In the cases where this module
+returns results and `fast-glob` doesn't, it's even faster, of
+course.
+
+
+
+### Benchmark Results
+
+First number is time, smaller is better.
+
+Second number is the count of results returned.
+
+```
+--- pattern: '**' ---
+~~ sync ~~
+node fast-glob sync 0m0.598s 200364
+node globby sync 0m0.765s 200364
+node current globSync mjs 0m0.683s 222656
+node current glob syncStream 0m0.649s 222656
+~~ async ~~
+node fast-glob async 0m0.350s 200364
+node globby async 0m0.509s 200364
+node current glob async mjs 0m0.463s 222656
+node current glob stream 0m0.411s 222656
+
+--- pattern: '**/..' ---
+~~ sync ~~
+node fast-glob sync 0m0.486s 0
+node globby sync 0m0.769s 200364
+node current globSync mjs 0m0.564s 2242
+node current glob syncStream 0m0.583s 2242
+~~ async ~~
+node fast-glob async 0m0.283s 0
+node globby async 0m0.512s 200364
+node current glob async mjs 0m0.299s 2242
+node current glob stream 0m0.312s 2242
+
+--- pattern: './**/0/**/0/**/0/**/0/**/*.txt' ---
+~~ sync ~~
+node fast-glob sync 0m0.490s 10
+node globby sync 0m0.517s 10
+node current globSync mjs 0m0.540s 10
+node current glob syncStream 0m0.550s 10
+~~ async ~~
+node fast-glob async 0m0.290s 10
+node globby async 0m0.296s 10
+node current glob async mjs 0m0.278s 10
+node current glob stream 0m0.302s 10
+
+--- pattern: './**/[01]/**/[12]/**/[23]/**/[45]/**/*.txt' ---
+~~ sync ~~
+node fast-glob sync 0m0.500s 160
+node globby sync 0m0.528s 160
+node current globSync mjs 0m0.556s 160
+node current glob syncStream 0m0.573s 160
+~~ async ~~
+node fast-glob async 0m0.283s 160
+node globby async 0m0.301s 160
+node current glob async mjs 0m0.306s 160
+node current glob stream 0m0.322s 160
+
+--- pattern: './**/0/**/0/**/*.txt' ---
+~~ sync ~~
+node fast-glob sync 0m0.502s 5230
+node globby sync 0m0.527s 5230
+node current globSync mjs 0m0.544s 5230
+node current glob syncStream 0m0.557s 5230
+~~ async ~~
+node fast-glob async 0m0.285s 5230
+node globby async 0m0.305s 5230
+node current glob async mjs 0m0.304s 5230
+node current glob stream 0m0.310s 5230
+
+--- pattern: '**/*.txt' ---
+~~ sync ~~
+node fast-glob sync 0m0.580s 200023
+node globby sync 0m0.771s 200023
+node current globSync mjs 0m0.685s 200023
+node current glob syncStream 0m0.649s 200023
+~~ async ~~
+node fast-glob async 0m0.349s 200023
+node globby async 0m0.509s 200023
+node current glob async mjs 0m0.427s 200023
+node current glob stream 0m0.388s 200023
+
+--- pattern: '{**/*.txt,**/?/**/*.txt,**/?/**/?/**/*.txt,**/?/**/?/**/?/**/*.txt,**/?/**/?/**/?/**/?/**/*.txt}' ---
+~~ sync ~~
+node fast-glob sync 0m0.589s 200023
+node globby sync 0m0.771s 200023
+node current globSync mjs 0m0.716s 200023
+node current glob syncStream 0m0.684s 200023
+~~ async ~~
+node fast-glob async 0m0.351s 200023
+node globby async 0m0.518s 200023
+node current glob async mjs 0m0.462s 200023
+node current glob stream 0m0.468s 200023
+
+--- pattern: '**/5555/0000/*.txt' ---
+~~ sync ~~
+node fast-glob sync 0m0.496s 1000
+node globby sync 0m0.519s 1000
+node current globSync mjs 0m0.539s 1000
+node current glob syncStream 0m0.567s 1000
+~~ async ~~
+node fast-glob async 0m0.285s 1000
+node globby async 0m0.299s 1000
+node current glob async mjs 0m0.305s 1000
+node current glob stream 0m0.301s 1000
+
+--- pattern: './**/0/**/../[01]/**/0/../**/0/*.txt' ---
+~~ sync ~~
+node fast-glob sync 0m0.484s 0
+node globby sync 0m0.507s 0
+node current globSync mjs 0m0.577s 4880
+node current glob syncStream 0m0.586s 4880
+~~ async ~~
+node fast-glob async 0m0.280s 0
+node globby async 0m0.298s 0
+node current glob async mjs 0m0.327s 4880
+node current glob stream 0m0.324s 4880
+
+--- pattern: '**/????/????/????/????/*.txt' ---
+~~ sync ~~
+node fast-glob sync 0m0.547s 100000
+node globby sync 0m0.673s 100000
+node current globSync mjs 0m0.626s 100000
+node current glob syncStream 0m0.618s 100000
+~~ async ~~
+node fast-glob async 0m0.315s 100000
+node globby async 0m0.414s 100000
+node current glob async mjs 0m0.366s 100000
+node current glob stream 0m0.345s 100000
+
+--- pattern: './{**/?{/**/?{/**/?{/**/?,,,,},,,,},,,,},,,}/**/*.txt' ---
+~~ sync ~~
+node fast-glob sync 0m0.588s 100000
+node globby sync 0m0.670s 100000
+node current globSync mjs 0m0.717s 200023
+node current glob syncStream 0m0.687s 200023
+~~ async ~~
+node fast-glob async 0m0.343s 100000
+node globby async 0m0.418s 100000
+node current glob async mjs 0m0.519s 200023
+node current glob stream 0m0.451s 200023
+
+--- pattern: '**/!(0|9).txt' ---
+~~ sync ~~
+node fast-glob sync 0m0.573s 160023
+node globby sync 0m0.731s 160023
+node current globSync mjs 0m0.680s 180023
+node current glob syncStream 0m0.659s 180023
+~~ async ~~
+node fast-glob async 0m0.345s 160023
+node globby async 0m0.476s 160023
+node current glob async mjs 0m0.427s 180023
+node current glob stream 0m0.388s 180023
+
+--- pattern: './{*/**/../{*/**/../{*/**/../{*/**/../{*/**,,,,},,,,},,,,},,,,},,,,}/*.txt' ---
+~~ sync ~~
+node fast-glob sync 0m0.483s 0
+node globby sync 0m0.512s 0
+node current globSync mjs 0m0.811s 200023
+node current glob syncStream 0m0.773s 200023
+~~ async ~~
+node fast-glob async 0m0.280s 0
+node globby async 0m0.299s 0
+node current glob async mjs 0m0.617s 200023
+node current glob stream 0m0.568s 200023
+
+--- pattern: './*/**/../*/**/../*/**/../*/**/../*/**/../*/**/../*/**/../*/**/*.txt' ---
+~~ sync ~~
+node fast-glob sync 0m0.485s 0
+node globby sync 0m0.507s 0
+node current globSync mjs 0m0.759s 200023
+node current glob syncStream 0m0.740s 200023
+~~ async ~~
+node fast-glob async 0m0.281s 0
+node globby async 0m0.297s 0
+node current glob async mjs 0m0.544s 200023
+node current glob stream 0m0.464s 200023
+
+--- pattern: './*/**/../*/**/../*/**/../*/**/../*/**/*.txt' ---
+~~ sync ~~
+node fast-glob sync 0m0.486s 0
+node globby sync 0m0.513s 0
+node current globSync mjs 0m0.734s 200023
+node current glob syncStream 0m0.696s 200023
+~~ async ~~
+node fast-glob async 0m0.286s 0
+node globby async 0m0.296s 0
+node current glob async mjs 0m0.506s 200023
+node current glob stream 0m0.483s 200023
+
+--- pattern: './0/**/../1/**/../2/**/../3/**/../4/**/../5/**/../6/**/../7/**/*.txt' ---
+~~ sync ~~
+node fast-glob sync 0m0.060s 0
+node globby sync 0m0.074s 0
+node current globSync mjs 0m0.067s 0
+node current glob syncStream 0m0.066s 0
+~~ async ~~
+node fast-glob async 0m0.060s 0
+node globby async 0m0.075s 0
+node current glob async mjs 0m0.066s 0
+node current glob stream 0m0.067s 0
+
+--- pattern: './**/?/**/?/**/?/**/?/**/*.txt' ---
+~~ sync ~~
+node fast-glob sync 0m0.568s 100000
+node globby sync 0m0.651s 100000
+node current globSync mjs 0m0.619s 100000
+node current glob syncStream 0m0.617s 100000
+~~ async ~~
+node fast-glob async 0m0.332s 100000
+node globby async 0m0.409s 100000
+node current glob async mjs 0m0.372s 100000
+node current glob stream 0m0.351s 100000
+
+--- pattern: '**/*/**/*/**/*/**/*/**' ---
+~~ sync ~~
+node fast-glob sync 0m0.603s 200113
+node globby sync 0m0.798s 200113
+node current globSync mjs 0m0.730s 222137
+node current glob syncStream 0m0.693s 222137
+~~ async ~~
+node fast-glob async 0m0.356s 200113
+node globby async 0m0.525s 200113
+node current glob async mjs 0m0.508s 222137
+node current glob stream 0m0.455s 222137
+
+--- pattern: './**/*/**/*/**/*/**/*/**/*.txt' ---
+~~ sync ~~
+node fast-glob sync 0m0.622s 200000
+node globby sync 0m0.792s 200000
+node current globSync mjs 0m0.722s 200000
+node current glob syncStream 0m0.695s 200000
+~~ async ~~
+node fast-glob async 0m0.369s 200000
+node globby async 0m0.527s 200000
+node current glob async mjs 0m0.502s 200000
+node current glob stream 0m0.481s 200000
+
+--- pattern: '**/*.txt' ---
+~~ sync ~~
+node fast-glob sync 0m0.588s 200023
+node globby sync 0m0.771s 200023
+node current globSync mjs 0m0.684s 200023
+node current glob syncStream 0m0.658s 200023
+~~ async ~~
+node fast-glob async 0m0.352s 200023
+node globby async 0m0.516s 200023
+node current glob async mjs 0m0.432s 200023
+node current glob stream 0m0.384s 200023
+
+--- pattern: './**/**/**/**/**/**/**/**/*.txt' ---
+~~ sync ~~
+node fast-glob sync 0m0.589s 200023
+node globby sync 0m0.766s 200023
+node current globSync mjs 0m0.682s 200023
+node current glob syncStream 0m0.652s 200023
+~~ async ~~
+node fast-glob async 0m0.352s 200023
+node globby async 0m0.523s 200023
+node current glob async mjs 0m0.436s 200023
+node current glob stream 0m0.380s 200023
+
+--- pattern: '**/*/*.txt' ---
+~~ sync ~~
+node fast-glob sync 0m0.592s 200023
+node globby sync 0m0.776s 200023
+node current globSync mjs 0m0.691s 200023
+node current glob syncStream 0m0.659s 200023
+~~ async ~~
+node fast-glob async 0m0.357s 200023
+node globby async 0m0.513s 200023
+node current glob async mjs 0m0.471s 200023
+node current glob stream 0m0.424s 200023
+
+--- pattern: '**/*/**/*.txt' ---
+~~ sync ~~
+node fast-glob sync 0m0.585s 200023
+node globby sync 0m0.766s 200023
+node current globSync mjs 0m0.694s 200023
+node current glob syncStream 0m0.664s 200023
+~~ async ~~
+node fast-glob async 0m0.350s 200023
+node globby async 0m0.514s 200023
+node current glob async mjs 0m0.472s 200023
+node current glob stream 0m0.424s 200023
+
+--- pattern: '**/[0-9]/**/*.txt' ---
+~~ sync ~~
+node fast-glob sync 0m0.544s 100000
+node globby sync 0m0.636s 100000
+node current globSync mjs 0m0.626s 100000
+node current glob syncStream 0m0.621s 100000
+~~ async ~~
+node fast-glob async 0m0.322s 100000
+node globby async 0m0.404s 100000
+node current glob async mjs 0m0.360s 100000
+node current glob stream 0m0.352s 100000
+```
diff --git a/benchclean.js b/benchclean.js
index de90d8a7..d768826a 100644
--- a/benchclean.js
+++ b/benchclean.js
@@ -1,6 +1,3 @@
var rimraf = require('rimraf')
-var bf = (process.env.TMPDIR || '/tmp') + '/benchmark-fixture'
-rimraf('{' + [bf, 'v8.log', 'profile.txt'].join(',') + '}', function (er) {
- if (er)
- throw er
-})
+var bf = './bench-working-dir/fixture'
+rimraf.sync(bf)
diff --git a/benchmark.sh b/benchmark.sh
index df31b8b2..111ac4e4 100644
--- a/benchmark.sh
+++ b/benchmark.sh
@@ -1,57 +1,180 @@
#!/bin/bash
export CDPATH=
+set -e
+
+. patterns.sh
-tmp=${TMPDIR:-/tmp}
bash make-benchmark-fixture.sh
wd=$PWD
-cd $tmp/benchmark-fixture
-set -e
+mkdir -p "$wd/bench-working-dir/fixture"
+cd "$wd/bench-working-dir"
+cat > "$wd/bench-working-dir/package.json" </dev/null; npm i --silent)
fi
-echo
-if type zsh; then
- echo Zsh timing:
- time zsh -c 'echo **/*.txt | wc -w'
-fi
+tt () {
+ time "$@"
+}
-echo
-
-echo Node statSync and readdirSync timing:
-time node -e '
- var fs=require("fs");
- var count = 0;
- function walk (path) {
- if (path.slice(-4) === ".txt") count++;
- var stat = fs.statSync(path);
- if (stat.isDirectory()) {
- fs.readdirSync(path).forEach(function(entry) {
- walk(path + "/" + entry);
- })
- }
- }
- walk(".");
- console.log(count)'
-echo
-
-echo Node glob.sync timing:
-time node -e '
- var glob=require(process.argv[1]);
- console.log(glob.sync("**/*.txt").length);' "$wd"
-echo
-
-echo Node glob async timing:
-time node -e '
- var glob=require(process.argv[1]);
- glob("**/*.txt", function (er, files) {
- console.log(files.length)
- })' "$wd"
-echo
-
-echo Node glob with --prof
-cd $wd
-bash prof.sh
+t () {
+ rm -f stderr stdout
+ tt "$@" 2>stderr >stdout || (cat stderr >&2 ; exit 1 )
+ echo $(cat stderr | grep real | awk -F $'\t' '{ print $2 }' || true)' '\
+ $(cat stdout)
+ # rm -f stderr stdout
+}
+
+# warm up the fs cache so we don't get a spurious slow first result
+bash -c 'for i in **; do :; done'
+
+
+for p in "${patterns[@]}"; do
+ echo
+ echo "--- pattern: '$p' ---"
+
+ # if [[ "`bash --version`" =~ version\ 4 ]] || [[ "`bash --version`" =~ version\ 5 ]]; then
+ # echo -n $'bash \t'
+ # t bash -c 'shopt -s globstar; echo '"$p"' | wc -w'
+ # fi
+
+ # if type zsh &>/dev/null; then
+ # echo -n $'zsh \t'
+ # t zsh -c 'echo '"$p"' | wc -w'
+ # fi
+
+ # echo -n $'node glob v7 sync \t'
+ # t node -e '
+ # var glob=require(process.argv[1])
+ # console.log(glob.sync(process.argv[2]).length)
+ # ' "$wd/bench-working-dir/node_modules/glob7" "$p"
+
+ # echo -n $'node glob v7 async \t'
+ # t node -e '
+ # var glob=require(process.argv[1])
+ # glob(process.argv[2], (er, files) => {
+ # console.log(files.length)
+ # })' "$wd/bench-working-dir/node_modules/glob7" "$p"
+
+ echo '~~ sync ~~'
+
+ echo -n $'node fast-glob sync \t'
+ cat > "$wd"/bench-working-dir/fast-glob-sync.cjs < "$wd"/bench-working-dir/globby-sync.mjs < "$wd/bench-working-dir/sync.cjs" < "$wd/bench-working-dir/async.cjs" < console.log(files.length))
+#CJS
+# t node "$wd/bench-working-dir/async.cjs" "$p"
+
+# echo -n $'node glob v8 sync \t'
+# cat > "$wd/bench-working-dir/glob-8-sync.cjs" < "$wd/bench-working-dir/sync.mjs" < "$wd/bench-working-dir/stream-sync.mjs" < c++)
+ .on('end', () => console.log(c))
+MJS
+ t node "$wd/bench-working-dir/stream-sync.mjs" "$p"
+
+ echo '~~ async ~~'
+
+ echo -n $'node fast-glob async \t'
+ cat > "$wd"/bench-working-dir/fast-glob-async.cjs < console.log(r.length))
+CJS
+ t node "$wd/bench-working-dir/fast-glob-async.cjs" "$p"
+
+ echo -n $'node globby async \t'
+ cat > "$wd"/bench-working-dir/globby-async.mjs < {
+ console.log(files.length)
+ })
+MJS
+ t node "$wd/bench-working-dir/globby-async.mjs" "$p"
+
+# echo -n $'node glob v8 async \t'
+# cat > "$wd/bench-working-dir/glob-8-async.cjs" <
+# console.log(results.length)
+# )
+# CJS
+# t node "$wd/bench-working-dir/glob-8-async.cjs" "$p"
+
+ echo -n $'node current glob async mjs \t'
+ cat > "$wd/bench-working-dir/async.mjs" < console.log(files.length))
+MJS
+ t node "$wd/bench-working-dir/async.mjs" "$p"
+
+ echo -n $'node current glob stream \t'
+ cat > "$wd/bench-working-dir/stream.mjs" < c++)
+ .on('end', () => console.log(c))
+MJS
+ t node "$wd/bench-working-dir/stream.mjs" "$p"
+
+ # echo -n $'node current glob sync cjs -e \t'
+ # t node -e '
+ # console.log(require(process.argv[1]).sync(process.argv[2]).length)
+ # ' "$wd/dist/cjs/index-cjs.js" "$p"
+
+ # echo -n $'node current glob async cjs -e\t'
+ # t node -e '
+ # require(process.argv[1])(process.argv[2]).then((files) => console.log(files.length))
+ # ' "$wd/dist/cjs/index-cjs.js" "$p"
+
+done
diff --git a/changelog.md b/changelog.md
index 41636771..cbe304af 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,3 +1,152 @@
+# changeglob
+
+## 9.3.3
+
+- Upgraded minimatch to v8, adding support for any degree of
+ nested extglob patterns.
+
+## 9.3
+
+- Add aliases for methods. `glob.sync`, `glob.stream`,
+ `glob.stream.sync`, etc.
+
+## 9.2
+
+- Support using a custom fs object, which is passed to PathScurry
+- add maxDepth option
+- add stat option
+- add custom Ignore support
+
+## 9.1
+
+- Bring back the `root` option, albeit with slightly different
+ semantics than in v8 and before.
+- Support `{ absolute:false }` option to explicitly always return
+ relative paths. An unset `absolute` setting will still return
+ absolute or relative paths based on whether the pattern is
+ absolute.
+- Add `magicalBraces` option to treat brace expansion as "magic"
+ in the `hasMagic` function.
+- Add `dotRelative` option
+- Add `escape()` and `unescape()` methods
+
+## 9.0
+
+This is a full rewrite, with significant API and algorithm
+changes.
+
+### High-Level Feature and API Surface Changes
+
+- Only support node 16 and higher.
+- Promise API instead of callbacks.
+- Exported function names have changed, as have the methods on
+ the Glob class. See API documentation for details.
+- Accept pattern as string or array of strings.
+- Hybrid module distribution.
+- Full TypeScript support.
+- Exported `Glob` class is no longer an event emitter.
+- Exported `Glob` class has `walk()`, `walkSync()`, `stream()`,
+ `streamSync()`, `iterate()`, `iterateSync()` methods, and is
+ both an async and sync Generator.
+- First class support for UNC paths and drive letters on Windows.
+ Note that _glob patterns_ must still use `/` as a path
+ separator, unless the `windowsPathsNoEscape` option is set, in
+ which case glob patterns cannot be escaped with `\`.
+- Paths are returned in the canonical formatting for the platform
+ in question.
+- The `hasMagic` method will return false for patterns that only
+ contain brace expansion, but no other "magic" glob characters.
+- Patterns ending in `/` will still be restricted to matching
+ directories, but will not have a `/` appended in the results.
+ In general, results will be in their default relative or
+ absolute forms, without any extraneous `/` and `.` characters,
+ unlike shell matches. (The `mark` option may still be used to
+ _always_ mark directory matches with a trailing `/` or `\`.)
+- An options argument is required for the `Glob` class
+ constructor. `{}` may be provided to accept all default
+ options.
+
+### Options Changes
+
+- Removed `root` option and mounting behavior.
+- Removed `stat` option. It's slow and pointless. (Could bring
+ back easily if there's demand, but items are already statted in
+ cases where it's relevant, such as `nodir:true` or
+ `mark:true`.)
+- Simplified `cwd` behavior so it is far less magical, and relies
+ less on platform-specific absolute path representations.
+- `cwd` can be a File URL or a string path.
+- More efficient handling for absolute patterns. (That is,
+ patterns that start with `/` on any platform, or start with a
+ drive letter or UNC path on Windows.)
+- Removed `silent` and `strict` options. Any readdir errors are
+ simply treated as "the directory could not be read", and it is
+ treated as a normal file entry instead, like shells do.
+- Removed `fs` option. This module only operates on the real
+ filesystem. (Could bring back if there's demand for it, but
+ it'd be an update to PathScurry, not Glob.)
+- `nonull:true` is no longer supported.
+- `withFileTypes:true` option added, to get `Path` objects.
+ These are a bit like a Dirent, but can do a lot more. See
+
+- `nounique:true` is no longer supported. Result sets are always
+ unique.
+- `nosort:true` is no longer supported. Result sets are never
+ sorted.
+- When the `nocase` option is used, the assumption is that it
+ reflects the case sensitivity of the _filesystem itself_.
+ Using case-insensitive matching on a case-sensitive filesystem,
+ or vice versa, may thus result in more or fewer matches than
+ expected. In general, it should only be used when the
+ filesystem is known to differ from the platform default.
+- `realpath:true` no longer implies `absolute:true`. The
+ relative path to the realpath will be emitted when `absolute`
+ is not set.
+- `realpath:true` will cause invalid symbolic links to be
+ omitted, rather than matching the link itself.
+
+### Performance and Algorithm Changes
+
+- Massive performance improvements.
+- Removed nearly all stat calls, in favor of using
+ `withFileTypes:true` with `fs.readdir()`.
+- Replaced most of the caching with a
+ [PathScurry](http://npm.im/path-scurry) based implementation.
+- More correct handling of `**` vs `./**`, following Bash
+ semantics, where a `**` is followed one time only if it is not
+ the first item in the pattern.
+
+## 8.1
+
+- Add `windowsPathsNoEscape` option
+
+## 8.0
+
+- Only support node v12 and higher
+- `\` is now **only** used as an escape character, and never as a
+ path separator in glob patterns, so that Windows users have a
+ way to match against filenames containing literal glob pattern
+ characters.
+- Glob pattern paths **must** use forward-slashes as path
+ separators, since `\` is an escape character to match literal
+ glob pattern characters.
+- (8.0.2) `cwd` and `root` will always be automatically coerced
+ to use `/` as path separators on Windows, as they cannot
+ contain glob patterns anyway, and are often supplied by
+ `path.resolve()` and other methods that will use `\` path
+ separators by default.
+
+## 7.2
+
+- Add fs option to allow passing virtual filesystem
+
+## 7.1
+
+- Ignore stat errors that are not `ENOENT` to work around Windows issues.
+- Support using root and absolute options together
+- Bring back lumpy space princess
+- force 'en' locale in string sorting
+
## 7.0
- Raise error if `options.cwd` is specified, and not a directory
diff --git a/common.js b/common.js
deleted file mode 100644
index 66651bb3..00000000
--- a/common.js
+++ /dev/null
@@ -1,240 +0,0 @@
-exports.alphasort = alphasort
-exports.alphasorti = alphasorti
-exports.setopts = setopts
-exports.ownProp = ownProp
-exports.makeAbs = makeAbs
-exports.finish = finish
-exports.mark = mark
-exports.isIgnored = isIgnored
-exports.childrenIgnored = childrenIgnored
-
-function ownProp (obj, field) {
- return Object.prototype.hasOwnProperty.call(obj, field)
-}
-
-var path = require("path")
-var minimatch = require("minimatch")
-var isAbsolute = require("path-is-absolute")
-var Minimatch = minimatch.Minimatch
-
-function alphasorti (a, b) {
- return a.toLowerCase().localeCompare(b.toLowerCase())
-}
-
-function alphasort (a, b) {
- return a.localeCompare(b)
-}
-
-function setupIgnores (self, options) {
- self.ignore = options.ignore || []
-
- if (!Array.isArray(self.ignore))
- self.ignore = [self.ignore]
-
- if (self.ignore.length) {
- self.ignore = self.ignore.map(ignoreMap)
- }
-}
-
-// ignore patterns are always in dot:true mode.
-function ignoreMap (pattern) {
- var gmatcher = null
- if (pattern.slice(-3) === '/**') {
- var gpattern = pattern.replace(/(\/\*\*)+$/, '')
- gmatcher = new Minimatch(gpattern, { dot: true })
- }
-
- return {
- matcher: new Minimatch(pattern, { dot: true }),
- gmatcher: gmatcher
- }
-}
-
-function setopts (self, pattern, options) {
- if (!options)
- options = {}
-
- // base-matching: just use globstar for that.
- if (options.matchBase && -1 === pattern.indexOf("/")) {
- if (options.noglobstar) {
- throw new Error("base matching requires globstar")
- }
- pattern = "**/" + pattern
- }
-
- self.silent = !!options.silent
- self.pattern = pattern
- self.strict = options.strict !== false
- self.realpath = !!options.realpath
- self.realpathCache = options.realpathCache || Object.create(null)
- self.follow = !!options.follow
- self.dot = !!options.dot
- self.mark = !!options.mark
- self.nodir = !!options.nodir
- if (self.nodir)
- self.mark = true
- self.sync = !!options.sync
- self.nounique = !!options.nounique
- self.nonull = !!options.nonull
- self.nosort = !!options.nosort
- self.nocase = !!options.nocase
- self.stat = !!options.stat
- self.noprocess = !!options.noprocess
- self.absolute = !!options.absolute
-
- self.maxLength = options.maxLength || Infinity
- self.cache = options.cache || Object.create(null)
- self.statCache = options.statCache || Object.create(null)
- self.symlinks = options.symlinks || Object.create(null)
-
- setupIgnores(self, options)
-
- self.changedCwd = false
- var cwd = process.cwd()
- if (!ownProp(options, "cwd"))
- self.cwd = cwd
- else {
- self.cwd = path.resolve(options.cwd)
- self.changedCwd = self.cwd !== cwd
- }
-
- self.root = options.root || path.resolve(self.cwd, "/")
- self.root = path.resolve(self.root)
- if (process.platform === "win32")
- self.root = self.root.replace(/\\/g, "/")
-
- // TODO: is an absolute `cwd` supposed to be resolved against `root`?
- // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test')
- self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd)
- if (process.platform === "win32")
- self.cwdAbs = self.cwdAbs.replace(/\\/g, "/")
- self.nomount = !!options.nomount
-
- // disable comments and negation in Minimatch.
- // Note that they are not supported in Glob itself anyway.
- options.nonegate = true
- options.nocomment = true
-
- self.minimatch = new Minimatch(pattern, options)
- self.options = self.minimatch.options
-}
-
-function finish (self) {
- var nou = self.nounique
- var all = nou ? [] : Object.create(null)
-
- for (var i = 0, l = self.matches.length; i < l; i ++) {
- var matches = self.matches[i]
- if (!matches || Object.keys(matches).length === 0) {
- if (self.nonull) {
- // do like the shell, and spit out the literal glob
- var literal = self.minimatch.globSet[i]
- if (nou)
- all.push(literal)
- else
- all[literal] = true
- }
- } else {
- // had matches
- var m = Object.keys(matches)
- if (nou)
- all.push.apply(all, m)
- else
- m.forEach(function (m) {
- all[m] = true
- })
- }
- }
-
- if (!nou)
- all = Object.keys(all)
-
- if (!self.nosort)
- all = all.sort(self.nocase ? alphasorti : alphasort)
-
- // at *some* point we statted all of these
- if (self.mark) {
- for (var i = 0; i < all.length; i++) {
- all[i] = self._mark(all[i])
- }
- if (self.nodir) {
- all = all.filter(function (e) {
- var notDir = !(/\/$/.test(e))
- var c = self.cache[e] || self.cache[makeAbs(self, e)]
- if (notDir && c)
- notDir = c !== 'DIR' && !Array.isArray(c)
- return notDir
- })
- }
- }
-
- if (self.ignore.length)
- all = all.filter(function(m) {
- return !isIgnored(self, m)
- })
-
- self.found = all
-}
-
-function mark (self, p) {
- var abs = makeAbs(self, p)
- var c = self.cache[abs]
- var m = p
- if (c) {
- var isDir = c === 'DIR' || Array.isArray(c)
- var slash = p.slice(-1) === '/'
-
- if (isDir && !slash)
- m += '/'
- else if (!isDir && slash)
- m = m.slice(0, -1)
-
- if (m !== p) {
- var mabs = makeAbs(self, m)
- self.statCache[mabs] = self.statCache[abs]
- self.cache[mabs] = self.cache[abs]
- }
- }
-
- return m
-}
-
-// lotta situps...
-function makeAbs (self, f) {
- var abs = f
- if (f.charAt(0) === '/') {
- abs = path.join(self.root, f)
- } else if (isAbsolute(f) || f === '') {
- abs = f
- } else if (self.changedCwd) {
- abs = path.resolve(self.cwd, f)
- } else {
- abs = path.resolve(f)
- }
-
- if (process.platform === 'win32')
- abs = abs.replace(/\\/g, '/')
-
- return abs
-}
-
-
-// Return true, if pattern ends with globstar '**', for the accompanying parent directory.
-// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents
-function isIgnored (self, path) {
- if (!self.ignore.length)
- return false
-
- return self.ignore.some(function(item) {
- return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path))
- })
-}
-
-function childrenIgnored (self, path) {
- if (!self.ignore.length)
- return false
-
- return self.ignore.some(function(item) {
- return !!(item.gmatcher && item.gmatcher.match(path))
- })
-}
diff --git a/examples/g.js b/examples/g.js
index be122df0..c8537166 100644
--- a/examples/g.js
+++ b/examples/g.js
@@ -1,9 +1,12 @@
-var Glob = require("../").Glob
+var Glob = require('../').Glob
-var pattern = "test/a/**/[cg]/../[cg]"
+var pattern = 'test/a/**/[cg]/../[cg]'
console.log(pattern)
-var mg = new Glob(pattern, {mark: true, sync:true}, function (er, matches) {
- console.log("matches", matches)
+var mg = new Glob(pattern, { mark: true, sync: true }, function (
+ er,
+ matches
+) {
+ console.log('matches', matches)
})
-console.log("after")
+console.log('after')
diff --git a/examples/usr-local.js b/examples/usr-local.js
index 327a425e..1e99c6d1 100644
--- a/examples/usr-local.js
+++ b/examples/usr-local.js
@@ -1,9 +1,9 @@
-var Glob = require("../").Glob
+var Glob = require('../').Glob
-var pattern = "{./*/*,/*,/usr/local/*}"
+var pattern = '{./*/*,/*,/usr/local/*}'
console.log(pattern)
-var mg = new Glob(pattern, {mark: true}, function (er, matches) {
- console.log("matches", matches)
+var mg = new Glob(pattern, { mark: true }, function (er, matches) {
+ console.log('matches', matches)
})
-console.log("after")
+console.log('after')
diff --git a/fixup.sh b/fixup.sh
new file mode 100644
index 00000000..dba4325c
--- /dev/null
+++ b/fixup.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+
+cat >dist/cjs/package.json <dist/mjs/package.json < 1)
- return true
-
- for (var j = 0; j < set[0].length; j++) {
- if (typeof set[0][j] !== 'string')
- return true
- }
-
- return false
-}
-
-glob.Glob = Glob
-inherits(Glob, EE)
-function Glob (pattern, options, cb) {
- if (typeof options === 'function') {
- cb = options
- options = null
- }
-
- if (options && options.sync) {
- if (cb)
- throw new TypeError('callback provided to sync glob')
- return new GlobSync(pattern, options)
- }
-
- if (!(this instanceof Glob))
- return new Glob(pattern, options, cb)
-
- setopts(this, pattern, options)
- this._didRealPath = false
-
- // process each pattern in the minimatch set
- var n = this.minimatch.set.length
-
- // The matches are stored as {: true,...} so that
- // duplicates are automagically pruned.
- // Later, we do an Object.keys() on these.
- // Keep them as a list so we can fill in when nonull is set.
- this.matches = new Array(n)
-
- if (typeof cb === 'function') {
- cb = once(cb)
- this.on('error', cb)
- this.on('end', function (matches) {
- cb(null, matches)
- })
- }
-
- var self = this
- this._processing = 0
-
- this._emitQueue = []
- this._processQueue = []
- this.paused = false
-
- if (this.noprocess)
- return this
-
- if (n === 0)
- return done()
-
- var sync = true
- for (var i = 0; i < n; i ++) {
- this._process(this.minimatch.set[i], i, false, done)
- }
- sync = false
-
- function done () {
- --self._processing
- if (self._processing <= 0) {
- if (sync) {
- process.nextTick(function () {
- self._finish()
- })
- } else {
- self._finish()
- }
- }
- }
-}
-
-Glob.prototype._finish = function () {
- assert(this instanceof Glob)
- if (this.aborted)
- return
-
- if (this.realpath && !this._didRealpath)
- return this._realpath()
-
- common.finish(this)
- this.emit('end', this.found)
-}
-
-Glob.prototype._realpath = function () {
- if (this._didRealpath)
- return
-
- this._didRealpath = true
-
- var n = this.matches.length
- if (n === 0)
- return this._finish()
-
- var self = this
- for (var i = 0; i < this.matches.length; i++)
- this._realpathSet(i, next)
-
- function next () {
- if (--n === 0)
- self._finish()
- }
-}
-
-Glob.prototype._realpathSet = function (index, cb) {
- var matchset = this.matches[index]
- if (!matchset)
- return cb()
-
- var found = Object.keys(matchset)
- var self = this
- var n = found.length
-
- if (n === 0)
- return cb()
-
- var set = this.matches[index] = Object.create(null)
- found.forEach(function (p, i) {
- // If there's a problem with the stat, then it means that
- // one or more of the links in the realpath couldn't be
- // resolved. just return the abs value in that case.
- p = self._makeAbs(p)
- rp.realpath(p, self.realpathCache, function (er, real) {
- if (!er)
- set[real] = true
- else if (er.syscall === 'stat')
- set[p] = true
- else
- self.emit('error', er) // srsly wtf right here
-
- if (--n === 0) {
- self.matches[index] = set
- cb()
- }
- })
- })
-}
-
-Glob.prototype._mark = function (p) {
- return common.mark(this, p)
-}
-
-Glob.prototype._makeAbs = function (f) {
- return common.makeAbs(this, f)
-}
-
-Glob.prototype.abort = function () {
- this.aborted = true
- this.emit('abort')
-}
-
-Glob.prototype.pause = function () {
- if (!this.paused) {
- this.paused = true
- this.emit('pause')
- }
-}
-
-Glob.prototype.resume = function () {
- if (this.paused) {
- this.emit('resume')
- this.paused = false
- if (this._emitQueue.length) {
- var eq = this._emitQueue.slice(0)
- this._emitQueue.length = 0
- for (var i = 0; i < eq.length; i ++) {
- var e = eq[i]
- this._emitMatch(e[0], e[1])
- }
- }
- if (this._processQueue.length) {
- var pq = this._processQueue.slice(0)
- this._processQueue.length = 0
- for (var i = 0; i < pq.length; i ++) {
- var p = pq[i]
- this._processing--
- this._process(p[0], p[1], p[2], p[3])
- }
- }
- }
-}
-
-Glob.prototype._process = function (pattern, index, inGlobStar, cb) {
- assert(this instanceof Glob)
- assert(typeof cb === 'function')
-
- if (this.aborted)
- return
-
- this._processing++
- if (this.paused) {
- this._processQueue.push([pattern, index, inGlobStar, cb])
- return
- }
-
- //console.error('PROCESS %d', this._processing, pattern)
-
- // Get the first [n] parts of pattern that are all strings.
- var n = 0
- while (typeof pattern[n] === 'string') {
- n ++
- }
- // now n is the index of the first one that is *not* a string.
-
- // see if there's anything else
- var prefix
- switch (n) {
- // if not, then this is rather simple
- case pattern.length:
- this._processSimple(pattern.join('/'), index, cb)
- return
-
- case 0:
- // pattern *starts* with some non-trivial item.
- // going to readdir(cwd), but not include the prefix in matches.
- prefix = null
- break
-
- default:
- // pattern has some string bits in the front.
- // whatever it starts with, whether that's 'absolute' like /foo/bar,
- // or 'relative' like '../baz'
- prefix = pattern.slice(0, n).join('/')
- break
- }
-
- var remain = pattern.slice(n)
-
- // get the list of entries.
- var read
- if (prefix === null)
- read = '.'
- else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
- if (!prefix || !isAbsolute(prefix))
- prefix = '/' + prefix
- read = prefix
- } else
- read = prefix
-
- var abs = this._makeAbs(read)
-
- //if ignored, skip _processing
- if (childrenIgnored(this, read))
- return cb()
-
- var isGlobStar = remain[0] === minimatch.GLOBSTAR
- if (isGlobStar)
- this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb)
- else
- this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb)
-}
-
-Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) {
- var self = this
- this._readdir(abs, inGlobStar, function (er, entries) {
- return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb)
- })
-}
-
-Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
-
- // if the abs isn't a dir, then nothing can match!
- if (!entries)
- return cb()
-
- // It will only match dot entries if it starts with a dot, or if
- // dot is set. Stuff like @(.foo|.bar) isn't allowed.
- var pn = remain[0]
- var negate = !!this.minimatch.negate
- var rawGlob = pn._glob
- var dotOk = this.dot || rawGlob.charAt(0) === '.'
-
- var matchedEntries = []
- for (var i = 0; i < entries.length; i++) {
- var e = entries[i]
- if (e.charAt(0) !== '.' || dotOk) {
- var m
- if (negate && !prefix) {
- m = !e.match(pn)
- } else {
- m = e.match(pn)
- }
- if (m)
- matchedEntries.push(e)
- }
- }
-
- //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries)
-
- var len = matchedEntries.length
- // If there are no matched entries, then nothing matches.
- if (len === 0)
- return cb()
-
- // if this is the last remaining pattern bit, then no need for
- // an additional stat *unless* the user has specified mark or
- // stat explicitly. We know they exist, since readdir returned
- // them.
-
- if (remain.length === 1 && !this.mark && !this.stat) {
- if (!this.matches[index])
- this.matches[index] = Object.create(null)
-
- for (var i = 0; i < len; i ++) {
- var e = matchedEntries[i]
- if (prefix) {
- if (prefix !== '/')
- e = prefix + '/' + e
- else
- e = prefix + e
- }
-
- if (e.charAt(0) === '/' && !this.nomount) {
- e = path.join(this.root, e)
- }
- this._emitMatch(index, e)
- }
- // This was the last one, and no stats were needed
- return cb()
- }
-
- // now test all matched entries as stand-ins for that part
- // of the pattern.
- remain.shift()
- for (var i = 0; i < len; i ++) {
- var e = matchedEntries[i]
- var newPattern
- if (prefix) {
- if (prefix !== '/')
- e = prefix + '/' + e
- else
- e = prefix + e
- }
- this._process([e].concat(remain), index, inGlobStar, cb)
- }
- cb()
-}
-
-Glob.prototype._emitMatch = function (index, e) {
- if (this.aborted)
- return
-
- if (isIgnored(this, e))
- return
-
- if (this.paused) {
- this._emitQueue.push([index, e])
- return
- }
-
- var abs = isAbsolute(e) ? e : this._makeAbs(e)
-
- if (this.mark)
- e = this._mark(e)
-
- if (this.absolute)
- e = abs
-
- if (this.matches[index][e])
- return
-
- if (this.nodir) {
- var c = this.cache[abs]
- if (c === 'DIR' || Array.isArray(c))
- return
- }
-
- this.matches[index][e] = true
-
- var st = this.statCache[abs]
- if (st)
- this.emit('stat', e, st)
-
- this.emit('match', e)
-}
-
-Glob.prototype._readdirInGlobStar = function (abs, cb) {
- if (this.aborted)
- return
-
- // follow all symlinked directories forever
- // just proceed as if this is a non-globstar situation
- if (this.follow)
- return this._readdir(abs, false, cb)
-
- var lstatkey = 'lstat\0' + abs
- var self = this
- var lstatcb = inflight(lstatkey, lstatcb_)
-
- if (lstatcb)
- fs.lstat(abs, lstatcb)
-
- function lstatcb_ (er, lstat) {
- if (er && er.code === 'ENOENT')
- return cb()
-
- var isSym = lstat && lstat.isSymbolicLink()
- self.symlinks[abs] = isSym
-
- // If it's not a symlink or a dir, then it's definitely a regular file.
- // don't bother doing a readdir in that case.
- if (!isSym && lstat && !lstat.isDirectory()) {
- self.cache[abs] = 'FILE'
- cb()
- } else
- self._readdir(abs, false, cb)
- }
-}
-
-Glob.prototype._readdir = function (abs, inGlobStar, cb) {
- if (this.aborted)
- return
-
- cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb)
- if (!cb)
- return
-
- //console.error('RD %j %j', +inGlobStar, abs)
- if (inGlobStar && !ownProp(this.symlinks, abs))
- return this._readdirInGlobStar(abs, cb)
-
- if (ownProp(this.cache, abs)) {
- var c = this.cache[abs]
- if (!c || c === 'FILE')
- return cb()
-
- if (Array.isArray(c))
- return cb(null, c)
- }
-
- var self = this
- fs.readdir(abs, readdirCb(this, abs, cb))
-}
-
-function readdirCb (self, abs, cb) {
- return function (er, entries) {
- if (er)
- self._readdirError(abs, er, cb)
- else
- self._readdirEntries(abs, entries, cb)
- }
-}
-
-Glob.prototype._readdirEntries = function (abs, entries, cb) {
- if (this.aborted)
- return
-
- // if we haven't asked to stat everything, then just
- // assume that everything in there exists, so we can avoid
- // having to stat it a second time.
- if (!this.mark && !this.stat) {
- for (var i = 0; i < entries.length; i ++) {
- var e = entries[i]
- if (abs === '/')
- e = abs + e
- else
- e = abs + '/' + e
- this.cache[e] = true
- }
- }
-
- this.cache[abs] = entries
- return cb(null, entries)
-}
-
-Glob.prototype._readdirError = function (f, er, cb) {
- if (this.aborted)
- return
-
- // handle errors, and cache the information
- switch (er.code) {
- case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205
- case 'ENOTDIR': // totally normal. means it *does* exist.
- var abs = this._makeAbs(f)
- this.cache[abs] = 'FILE'
- if (abs === this.cwdAbs) {
- var error = new Error(er.code + ' invalid cwd ' + this.cwd)
- error.path = this.cwd
- error.code = er.code
- this.emit('error', error)
- this.abort()
- }
- break
-
- case 'ENOENT': // not terribly unusual
- case 'ELOOP':
- case 'ENAMETOOLONG':
- case 'UNKNOWN':
- this.cache[this._makeAbs(f)] = false
- break
-
- default: // some unusual error. Treat as failure.
- this.cache[this._makeAbs(f)] = false
- if (this.strict) {
- this.emit('error', er)
- // If the error is handled, then we abort
- // if not, we threw out of here
- this.abort()
- }
- if (!this.silent)
- console.error('glob error', er)
- break
- }
-
- return cb()
-}
-
-Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) {
- var self = this
- this._readdir(abs, inGlobStar, function (er, entries) {
- self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb)
- })
-}
-
-
-Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
- //console.error('pgs2', prefix, remain[0], entries)
-
- // no entries means not a dir, so it can never have matches
- // foo.txt/** doesn't match foo.txt
- if (!entries)
- return cb()
-
- // test without the globstar, and with every child both below
- // and replacing the globstar.
- var remainWithoutGlobStar = remain.slice(1)
- var gspref = prefix ? [ prefix ] : []
- var noGlobStar = gspref.concat(remainWithoutGlobStar)
-
- // the noGlobStar pattern exits the inGlobStar state
- this._process(noGlobStar, index, false, cb)
-
- var isSym = this.symlinks[abs]
- var len = entries.length
-
- // If it's a symlink, and we're in a globstar, then stop
- if (isSym && inGlobStar)
- return cb()
-
- for (var i = 0; i < len; i++) {
- var e = entries[i]
- if (e.charAt(0) === '.' && !this.dot)
- continue
-
- // these two cases enter the inGlobStar state
- var instead = gspref.concat(entries[i], remainWithoutGlobStar)
- this._process(instead, index, true, cb)
-
- var below = gspref.concat(entries[i], remain)
- this._process(below, index, true, cb)
- }
-
- cb()
-}
-
-Glob.prototype._processSimple = function (prefix, index, cb) {
- // XXX review this. Shouldn't it be doing the mounting etc
- // before doing stat? kinda weird?
- var self = this
- this._stat(prefix, function (er, exists) {
- self._processSimple2(prefix, index, er, exists, cb)
- })
-}
-Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) {
-
- //console.error('ps2', prefix, exists)
-
- if (!this.matches[index])
- this.matches[index] = Object.create(null)
-
- // If it doesn't exist, then just mark the lack of results
- if (!exists)
- return cb()
-
- if (prefix && isAbsolute(prefix) && !this.nomount) {
- var trail = /[\/\\]$/.test(prefix)
- if (prefix.charAt(0) === '/') {
- prefix = path.join(this.root, prefix)
- } else {
- prefix = path.resolve(this.root, prefix)
- if (trail)
- prefix += '/'
- }
- }
-
- if (process.platform === 'win32')
- prefix = prefix.replace(/\\/g, '/')
-
- // Mark this as a match
- this._emitMatch(index, prefix)
- cb()
-}
-
-// Returns either 'DIR', 'FILE', or false
-Glob.prototype._stat = function (f, cb) {
- var abs = this._makeAbs(f)
- var needDir = f.slice(-1) === '/'
-
- if (f.length > this.maxLength)
- return cb()
-
- if (!this.stat && ownProp(this.cache, abs)) {
- var c = this.cache[abs]
-
- if (Array.isArray(c))
- c = 'DIR'
-
- // It exists, but maybe not how we need it
- if (!needDir || c === 'DIR')
- return cb(null, c)
-
- if (needDir && c === 'FILE')
- return cb()
-
- // otherwise we have to stat, because maybe c=true
- // if we know it exists, but not what it is.
- }
-
- var exists
- var stat = this.statCache[abs]
- if (stat !== undefined) {
- if (stat === false)
- return cb(null, stat)
- else {
- var type = stat.isDirectory() ? 'DIR' : 'FILE'
- if (needDir && type === 'FILE')
- return cb()
- else
- return cb(null, type, stat)
- }
- }
-
- var self = this
- var statcb = inflight('stat\0' + abs, lstatcb_)
- if (statcb)
- fs.lstat(abs, statcb)
-
- function lstatcb_ (er, lstat) {
- if (lstat && lstat.isSymbolicLink()) {
- // If it's a symlink, then treat it as the target, unless
- // the target does not exist, then treat it as a file.
- return fs.stat(abs, function (er, stat) {
- if (er)
- self._stat2(f, abs, null, lstat, cb)
- else
- self._stat2(f, abs, er, stat, cb)
- })
- } else {
- self._stat2(f, abs, er, lstat, cb)
- }
- }
-}
-
-Glob.prototype._stat2 = function (f, abs, er, stat, cb) {
- if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {
- this.statCache[abs] = false
- return cb()
- }
-
- var needDir = f.slice(-1) === '/'
- this.statCache[abs] = stat
-
- if (abs.slice(-1) === '/' && stat && !stat.isDirectory())
- return cb(null, false, stat)
-
- var c = true
- if (stat)
- c = stat.isDirectory() ? 'DIR' : 'FILE'
- this.cache[abs] = this.cache[abs] || c
-
- if (needDir && c === 'FILE')
- return cb()
-
- return cb(null, c, stat)
-}
diff --git a/make-benchmark-fixture.sh b/make-benchmark-fixture.sh
index 2f394fab..d7bb6903 100644
--- a/make-benchmark-fixture.sh
+++ b/make-benchmark-fixture.sh
@@ -1,14 +1,29 @@
#!/bin/bash
-tmp=${TMPDIR:-/tmp}
+wd=$PWD
+mkdir -p "$wd/bench-working-dir/fixture"
+tmp="$wd/bench-working-dir/fixture"
export CDPATH=
set -e
-if ! [ -d $tmp/benchmark-fixture ]; then
+if ! [ -d "$tmp/0" ]; then
echo Making benchmark fixtures
- mkdir $tmp/benchmark-fixture
- cd $tmp/benchmark-fixture
+ mkdir -p "$tmp"
+ cd "$tmp"
dirnames=`echo {0..9}/{0..9}/{0..9}/{0..9}` # 10000 dirs
filenames=`echo {0..9}/{0..9}/{0..9}/{0..9}/{0..9}.txt`
echo $dirnames | xargs mkdir -p
echo $filenames | xargs touch
+ # add 10k more that are not single chars
+ for i in {0..9}; do
+ for j in {0..9}; do
+ for k in {0..9}; do
+ for l in {0..9}; do
+ mkdir -p "$i$i$i$i/$j$j$j$j/$k$k$k$k/$l$l$l$l"
+ for m in {0..9}; do
+ touch "$i$i$i$i/$j$j$j$j/$k$k$k$k/$l$l$l$l/$m$m$m$m.txt"
+ done
+ done
+ done
+ done
+ done
fi
diff --git a/package-lock.json b/package-lock.json
index 64c08b26..48bfc806 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,3618 +1,5196 @@
{
"name": "glob",
- "version": "7.1.6",
- "lockfileVersion": 1,
+ "version": "9.3.4",
+ "lockfileVersion": 3,
"requires": true,
- "dependencies": {
- "ajv": {
- "version": "5.5.2",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
- "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
- "dev": true,
- "requires": {
- "co": "^4.6.0",
- "fast-deep-equal": "^1.0.0",
- "fast-json-stable-stringify": "^2.0.0",
- "json-schema-traverse": "^0.3.0"
+ "packages": {
+ "": {
+ "name": "glob",
+ "version": "9.3.4",
+ "license": "ISC",
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "minimatch": "^8.0.2",
+ "minipass": "^4.2.4",
+ "path-scurry": "^1.6.1"
+ },
+ "devDependencies": {
+ "@types/node": "^18.11.18",
+ "@types/tap": "^15.0.7",
+ "c8": "^7.12.0",
+ "memfs": "^3.4.13",
+ "mkdirp": "^2.1.4",
+ "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"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
}
},
- "ansi-regex": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
- "dev": true
- },
- "argparse": {
- "version": "1.0.10",
- "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
- "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+ "node_modules/@ampproject/remapping": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz",
+ "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==",
"dev": true,
- "requires": {
- "sprintf-js": "~1.0.2"
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.1.0",
+ "@jridgewell/trace-mapping": "^0.3.9"
+ },
+ "engines": {
+ "node": ">=6.0.0"
}
},
- "asn1": {
- "version": "0.2.4",
- "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
- "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
+ "node_modules/@babel/code-frame": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz",
+ "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==",
"dev": true,
- "requires": {
- "safer-buffer": "~2.1.0"
+ "dependencies": {
+ "@babel/highlight": "^7.18.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
}
},
- "assert-plus": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
- "dev": true
- },
- "asynckit": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
- "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
- "dev": true
- },
- "aws-sign2": {
- "version": "0.7.0",
- "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
- "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=",
- "dev": true
- },
- "aws4": {
- "version": "1.8.0",
- "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz",
- "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==",
- "dev": true
- },
- "balanced-match": {
- "version": "0.4.2",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz",
- "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg="
- },
- "bcrypt-pbkdf": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
- "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
+ "node_modules/@babel/compat-data": {
+ "version": "7.21.0",
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.21.0.tgz",
+ "integrity": "sha512-gMuZsmsgxk/ENC3O/fRw5QY8A9/uxQbbCEypnLIiYYc/qVJtEV7ouxC3EllIIwNzMqAQee5tanFabWsUOutS7g==",
"dev": true,
- "optional": true,
- "requires": {
- "tweetnacl": "^0.14.3"
+ "engines": {
+ "node": ">=6.9.0"
}
},
- "bind-obj-methods": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/bind-obj-methods/-/bind-obj-methods-2.0.0.tgz",
- "integrity": "sha512-3/qRXczDi2Cdbz6jE+W3IflJOutRVica8frpBn14de1mBOkzDo+6tY33kNhvkw54Kn3PzRRD2VnGbGPcTAk4sw==",
- "dev": true
+ "node_modules/@babel/core": {
+ "version": "7.21.3",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.21.3.tgz",
+ "integrity": "sha512-qIJONzoa/qiHghnm0l1n4i/6IIziDpzqc36FBs4pzMhDUraHqponwJLiAKm1hGLP3OSB/TVNz6rMwVGpwxxySw==",
+ "dev": true,
+ "dependencies": {
+ "@ampproject/remapping": "^2.2.0",
+ "@babel/code-frame": "^7.18.6",
+ "@babel/generator": "^7.21.3",
+ "@babel/helper-compilation-targets": "^7.20.7",
+ "@babel/helper-module-transforms": "^7.21.2",
+ "@babel/helpers": "^7.21.0",
+ "@babel/parser": "^7.21.3",
+ "@babel/template": "^7.20.7",
+ "@babel/traverse": "^7.21.3",
+ "@babel/types": "^7.21.3",
+ "convert-source-map": "^1.7.0",
+ "debug": "^4.1.0",
+ "gensync": "^1.0.0-beta.2",
+ "json5": "^2.2.2",
+ "semver": "^6.3.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/babel"
+ }
},
- "bluebird": {
- "version": "3.5.1",
- "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz",
- "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==",
- "dev": true
+ "node_modules/@babel/generator": {
+ "version": "7.21.3",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.3.tgz",
+ "integrity": "sha512-QS3iR1GYC/YGUnW7IdggFeN5c1poPUurnGttOV/bZgPGV+izC/D8HnD6DLwod0fsatNyVn1G3EVWMYIF0nHbeA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.21.3",
+ "@jridgewell/gen-mapping": "^0.3.2",
+ "@jridgewell/trace-mapping": "^0.3.17",
+ "jsesc": "^2.5.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
},
- "brace-expansion": {
- "version": "1.1.7",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz",
- "integrity": "sha1-Pv/DxQ4ABTH7cg6v+A8K6O8jz1k=",
- "requires": {
- "balanced-match": "^0.4.1",
- "concat-map": "0.0.1"
+ "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz",
+ "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/set-array": "^1.0.1",
+ "@jridgewell/sourcemap-codec": "^1.4.10",
+ "@jridgewell/trace-mapping": "^0.3.9"
+ },
+ "engines": {
+ "node": ">=6.0.0"
}
},
- "buffer-from": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
- "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
- "dev": true
+ "node_modules/@babel/helper-compilation-targets": {
+ "version": "7.20.7",
+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz",
+ "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/compat-data": "^7.20.5",
+ "@babel/helper-validator-option": "^7.18.6",
+ "browserslist": "^4.21.3",
+ "lru-cache": "^5.1.1",
+ "semver": "^6.3.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
},
- "byline": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/byline/-/byline-2.0.3.tgz",
- "integrity": "sha1-gRskuHScHN0dJrWbd/zBnT4Nhsk=",
- "dev": true
+ "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
+ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
+ "dev": true,
+ "dependencies": {
+ "yallist": "^3.0.2"
+ }
},
- "caseless": {
- "version": "0.12.0",
- "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
- "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
- "dev": true
+ "node_modules/@babel/helper-environment-visitor": {
+ "version": "7.18.9",
+ "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz",
+ "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.9.0"
+ }
},
- "clean-yaml-object": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz",
- "integrity": "sha1-Y/sRDcLOGoTcIfbZM0h20BCui2g=",
- "dev": true
+ "node_modules/@babel/helper-function-name": {
+ "version": "7.21.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz",
+ "integrity": "sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/template": "^7.20.7",
+ "@babel/types": "^7.21.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
},
- "co": {
- "version": "4.6.0",
- "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
- "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
- "dev": true
+ "node_modules/@babel/helper-hoist-variables": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz",
+ "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.18.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
},
- "color-support": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
- "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",
- "dev": true
+ "node_modules/@babel/helper-module-imports": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz",
+ "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.18.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
},
- "combined-stream": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz",
- "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=",
+ "node_modules/@babel/helper-module-transforms": {
+ "version": "7.21.2",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz",
+ "integrity": "sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ==",
"dev": true,
- "requires": {
- "delayed-stream": "~1.0.0"
+ "dependencies": {
+ "@babel/helper-environment-visitor": "^7.18.9",
+ "@babel/helper-module-imports": "^7.18.6",
+ "@babel/helper-simple-access": "^7.20.2",
+ "@babel/helper-split-export-declaration": "^7.18.6",
+ "@babel/helper-validator-identifier": "^7.19.1",
+ "@babel/template": "^7.20.7",
+ "@babel/traverse": "^7.21.2",
+ "@babel/types": "^7.21.2"
+ },
+ "engines": {
+ "node": ">=6.9.0"
}
},
- "concat-map": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
+ "node_modules/@babel/helper-simple-access": {
+ "version": "7.20.2",
+ "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz",
+ "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.20.2"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
},
- "core-util-is": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
- "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
- "dev": true
+ "node_modules/@babel/helper-split-export-declaration": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz",
+ "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.18.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
},
- "coveralls": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.0.2.tgz",
- "integrity": "sha512-Tv0LKe/MkBOilH2v7WBiTBdudg2ChfGbdXafc/s330djpF3zKOmuehTeRwjXWc7pzfj9FrDUTA7tEx6Div8NFw==",
- "dev": true,
- "requires": {
- "growl": "~> 1.10.0",
- "js-yaml": "^3.11.0",
- "lcov-parse": "^0.0.10",
- "log-driver": "^1.2.7",
- "minimist": "^1.2.0",
- "request": "^2.85.0"
- },
- "dependencies": {
- "minimist": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
- "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
- "dev": true
- }
+ "node_modules/@babel/helper-string-parser": {
+ "version": "7.19.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz",
+ "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.9.0"
}
},
- "cross-spawn": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz",
- "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=",
+ "node_modules/@babel/helper-validator-identifier": {
+ "version": "7.19.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz",
+ "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==",
"dev": true,
- "requires": {
- "lru-cache": "^4.0.1",
- "which": "^1.2.9"
+ "engines": {
+ "node": ">=6.9.0"
}
},
- "dashdash": {
- "version": "1.14.1",
- "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
- "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
+ "node_modules/@babel/helper-validator-option": {
+ "version": "7.21.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz",
+ "integrity": "sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==",
"dev": true,
- "requires": {
- "assert-plus": "^1.0.0"
+ "engines": {
+ "node": ">=6.9.0"
}
},
- "debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "node_modules/@babel/helpers": {
+ "version": "7.21.0",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.21.0.tgz",
+ "integrity": "sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA==",
"dev": true,
- "requires": {
- "ms": "2.0.0"
+ "dependencies": {
+ "@babel/template": "^7.20.7",
+ "@babel/traverse": "^7.21.0",
+ "@babel/types": "^7.21.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
}
},
- "delayed-stream": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
- "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
- "dev": true
+ "node_modules/@babel/highlight": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz",
+ "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-validator-identifier": "^7.18.6",
+ "chalk": "^2.0.0",
+ "js-tokens": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
},
- "diff": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz",
- "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8=",
- "dev": true
+ "node_modules/@babel/parser": {
+ "version": "7.21.3",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.3.tgz",
+ "integrity": "sha512-lobG0d7aOfQRXh8AyklEAgZGvA4FShxo6xQbUrrT/cNBPUdIDojlokwJsQyCC/eKia7ifqM0yP+2DRZ4WKw2RQ==",
+ "dev": true,
+ "bin": {
+ "parser": "bin/babel-parser.js"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
},
- "ecc-jsbn": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
- "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
+ "node_modules/@babel/template": {
+ "version": "7.20.7",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz",
+ "integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==",
"dev": true,
- "optional": true,
- "requires": {
- "jsbn": "~0.1.0",
- "safer-buffer": "^2.1.0"
+ "dependencies": {
+ "@babel/code-frame": "^7.18.6",
+ "@babel/parser": "^7.20.7",
+ "@babel/types": "^7.20.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
}
},
- "escape-string-regexp": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
- "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
- "dev": true
+ "node_modules/@babel/traverse": {
+ "version": "7.21.3",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.21.3.tgz",
+ "integrity": "sha512-XLyopNeaTancVitYZe2MlUEvgKb6YVVPXzofHgqHijCImG33b/uTurMS488ht/Hbsb2XK3U2BnSTxKVNGV3nGQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/code-frame": "^7.18.6",
+ "@babel/generator": "^7.21.3",
+ "@babel/helper-environment-visitor": "^7.18.9",
+ "@babel/helper-function-name": "^7.21.0",
+ "@babel/helper-hoist-variables": "^7.18.6",
+ "@babel/helper-split-export-declaration": "^7.18.6",
+ "@babel/parser": "^7.21.3",
+ "@babel/types": "^7.21.3",
+ "debug": "^4.1.0",
+ "globals": "^11.1.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
},
- "esprima": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
- "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
- "dev": true
+ "node_modules/@babel/types": {
+ "version": "7.21.3",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.3.tgz",
+ "integrity": "sha512-sBGdETxC+/M4o/zKC0sl6sjWv62WFR/uzxrJ6uYyMLZOUlPnwzw0tKgVHOXxaAd5l2g8pEDM5RZ495GPQI77kg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-string-parser": "^7.19.4",
+ "@babel/helper-validator-identifier": "^7.19.1",
+ "to-fast-properties": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
},
- "events-to-array": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/events-to-array/-/events-to-array-1.1.2.tgz",
- "integrity": "sha1-LUH1Y+H+QA7Uli/hpNXGp1Od9/Y=",
+ "node_modules/@bcoe/v8-coverage": {
+ "version": "0.2.3",
+ "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz",
+ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==",
"dev": true
},
- "extend": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
- "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
- "dev": true
+ "node_modules/@cspotcode/source-map-support": {
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
+ "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/trace-mapping": "0.3.9"
+ },
+ "engines": {
+ "node": ">=12"
+ }
},
- "extsprintf": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
- "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
- "dev": true
+ "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": {
+ "version": "0.3.9",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
+ "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/resolve-uri": "^3.0.3",
+ "@jridgewell/sourcemap-codec": "^1.4.10"
+ }
},
- "fast-deep-equal": {
+ "node_modules/@istanbuljs/load-nyc-config": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
- "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=",
- "dev": true
- },
- "fast-json-stable-stringify": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
- "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=",
- "dev": true
- },
- "foreground-child": {
- "version": "1.5.6",
- "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz",
- "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=",
+ "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",
+ "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==",
"dev": true,
- "requires": {
- "cross-spawn": "^4",
- "signal-exit": "^3.0.0"
+ "dependencies": {
+ "camelcase": "^5.3.1",
+ "find-up": "^4.1.0",
+ "get-package-type": "^0.1.0",
+ "js-yaml": "^3.13.1",
+ "resolve-from": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=8"
}
},
- "forever-agent": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
- "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
- "dev": true
- },
- "form-data": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz",
- "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=",
+ "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
"dev": true,
- "requires": {
- "asynckit": "^0.4.0",
- "combined-stream": "1.0.6",
- "mime-types": "^2.1.12"
+ "dependencies": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
}
},
- "fs-exists-cached": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs-exists-cached/-/fs-exists-cached-1.0.0.tgz",
- "integrity": "sha1-zyVVTKBQ3EmuZla0HeQiWJidy84=",
- "dev": true
- },
- "fs.realpath": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
- },
- "function-loop": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/function-loop/-/function-loop-1.0.1.tgz",
- "integrity": "sha1-gHa7MF6OajzO7ikgdl8zDRkPNAw=",
- "dev": true
- },
- "getpass": {
- "version": "0.1.7",
- "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
- "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
+ "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
"dev": true,
- "requires": {
- "assert-plus": "^1.0.0"
+ "dependencies": {
+ "p-locate": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=8"
}
},
- "glob": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz",
- "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=",
+ "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+ "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
"dev": true,
- "requires": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.0.2",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
+ "dependencies": {
+ "p-try": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "graceful-fs": {
- "version": "4.1.11",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
- "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
- "dev": true
- },
- "growl": {
- "version": "1.10.5",
- "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz",
- "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==",
- "dev": true
- },
- "har-schema": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
- "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=",
- "dev": true
- },
- "har-validator": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.0.tgz",
- "integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==",
+ "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
"dev": true,
- "requires": {
- "ajv": "^5.3.0",
- "har-schema": "^2.0.0"
+ "dependencies": {
+ "p-limit": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=8"
}
},
- "http-signature": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
- "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
+ "node_modules/@istanbuljs/schema": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz",
+ "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==",
"dev": true,
- "requires": {
- "assert-plus": "^1.0.0",
- "jsprim": "^1.2.2",
- "sshpk": "^1.7.0"
+ "engines": {
+ "node": ">=8"
}
},
- "imurmurhash": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
- "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
- "dev": true
+ "node_modules/@jridgewell/gen-mapping": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz",
+ "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/set-array": "^1.0.0",
+ "@jridgewell/sourcemap-codec": "^1.4.10"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
},
- "inflight": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
- "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
- "requires": {
- "once": "^1.3.0",
- "wrappy": "1"
+ "node_modules/@jridgewell/resolve-uri": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz",
+ "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.0.0"
}
},
- "inherits": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
- "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
+ "node_modules/@jridgewell/set-array": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz",
+ "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.0.0"
+ }
},
- "is-typedarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
- "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
+ "node_modules/@jridgewell/sourcemap-codec": {
+ "version": "1.4.14",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz",
+ "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==",
"dev": true
},
- "isarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+ "node_modules/@jridgewell/trace-mapping": {
+ "version": "0.3.17",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz",
+ "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==",
"dev": true,
- "optional": true
+ "dependencies": {
+ "@jridgewell/resolve-uri": "3.1.0",
+ "@jridgewell/sourcemap-codec": "1.4.14"
+ }
},
- "isexe": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
- "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
+ "node_modules/@tsconfig/node10": {
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
+ "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==",
"dev": true
},
- "isstream": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
- "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
+ "node_modules/@tsconfig/node12": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
+ "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
"dev": true
},
- "js-yaml": {
- "version": "3.12.0",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz",
- "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==",
- "dev": true,
- "requires": {
- "argparse": "^1.0.7",
- "esprima": "^4.0.0"
- }
- },
- "jsbn": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
- "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
- "dev": true,
- "optional": true
+ "node_modules/@tsconfig/node14": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
+ "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
+ "dev": true
},
- "json-schema": {
- "version": "0.2.3",
- "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
- "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
+ "node_modules/@tsconfig/node16": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz",
+ "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==",
"dev": true
},
- "json-schema-traverse": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
- "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=",
+ "node_modules/@types/istanbul-lib-coverage": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz",
+ "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==",
"dev": true
},
- "json-stringify-safe": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
- "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
+ "node_modules/@types/node": {
+ "version": "18.15.5",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.5.tgz",
+ "integrity": "sha512-Ark2WDjjZO7GmvsyFFf81MXuGTA/d6oP38anyxWOL6EREyBKAxKoFHwBhaZxCfLRLpO8JgVXwqOwSwa7jRcjew==",
"dev": true
},
- "jsprim": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
- "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
+ "node_modules/@types/tap": {
+ "version": "15.0.8",
+ "resolved": "https://registry.npmjs.org/@types/tap/-/tap-15.0.8.tgz",
+ "integrity": "sha512-ZfeoiZlLIaFi4t6wccwbTEicrHREkP0bOq8dZVi/nWvG5F8O7LlS2cSUZBiOW/D4cgWS/p2uhM3lJoyzFAl80w==",
"dev": true,
- "requires": {
- "assert-plus": "1.0.0",
- "extsprintf": "1.3.0",
- "json-schema": "0.2.3",
- "verror": "1.10.0"
+ "dependencies": {
+ "@types/node": "*"
}
},
- "lcov-parse": {
- "version": "0.0.10",
- "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz",
- "integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=",
- "dev": true
- },
- "log-driver": {
- "version": "1.2.7",
- "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz",
- "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==",
- "dev": true
- },
- "lru-cache": {
- "version": "4.1.3",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz",
- "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==",
+ "node_modules/acorn": {
+ "version": "8.8.2",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz",
+ "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==",
"dev": true,
- "requires": {
- "pseudomap": "^1.0.2",
- "yallist": "^2.1.2"
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
}
},
- "mime-db": {
- "version": "1.36.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.36.0.tgz",
- "integrity": "sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw==",
- "dev": true
+ "node_modules/acorn-walk": {
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
+ "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.4.0"
+ }
},
- "mime-types": {
- "version": "2.1.20",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.20.tgz",
- "integrity": "sha512-HrkrPaP9vGuWbLK1B1FfgAkbqNjIuy4eHlIYnFi7kamZyLLrGlo2mpcx0bBmNpKqBtYtAfGbodDddIgddSJC2A==",
+ "node_modules/aggregate-error": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz",
+ "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==",
"dev": true,
- "requires": {
- "mime-db": "~1.36.0"
+ "dependencies": {
+ "clean-stack": "^2.0.0",
+ "indent-string": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
}
},
- "minimatch": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
- "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
- "requires": {
- "brace-expansion": "^1.1.7"
+ "node_modules/ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
}
},
- "minimist": {
- "version": "0.0.8",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
- "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
+ "node_modules/ansi-sequence-parser": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.0.tgz",
+ "integrity": "sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ==",
"dev": true
},
- "minipass": {
- "version": "2.3.4",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.4.tgz",
- "integrity": "sha512-mlouk1OHlaUE8Odt1drMtG1bAJA4ZA6B/ehysgV0LUIrDHdKgo1KorZq3pK0b/7Z7LJIQ12MNM6aC+Tn6lUZ5w==",
+ "node_modules/ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
- "requires": {
- "safe-buffer": "^5.1.2",
- "yallist": "^3.0.0"
- },
"dependencies": {
- "yallist": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz",
- "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=",
- "dev": true
- }
+ "color-convert": "^1.9.0"
+ },
+ "engines": {
+ "node": ">=4"
}
},
- "mkdirp": {
- "version": "0.5.1",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
- "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
+ "node_modules/anymatch": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
+ "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
"dev": true,
- "requires": {
- "minimist": "0.0.8"
+ "dependencies": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ },
+ "engines": {
+ "node": ">= 8"
}
},
- "ms": {
+ "node_modules/append-transform": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
+ "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz",
+ "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==",
+ "dev": true,
+ "dependencies": {
+ "default-require-extensions": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/archy": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz",
+ "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==",
"dev": true
},
- "nyc": {
- "version": "11.9.0",
- "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.9.0.tgz",
- "integrity": "sha512-w8OdJAhXL5izerzZMdqzYKMj/pgHJyY3qEPYBjLLxrhcVoHEY9pU5ENIiZyCgG9OR7x3VcUMoD40o6PtVpfR4g==",
- "dev": true,
- "requires": {
- "archy": "^1.0.0",
- "arrify": "^1.0.1",
- "caching-transform": "^1.0.0",
- "convert-source-map": "^1.5.1",
- "debug-log": "^1.0.1",
- "default-require-extensions": "^1.0.0",
- "find-cache-dir": "^0.1.1",
- "find-up": "^2.1.0",
- "foreground-child": "^1.5.3",
- "glob": "^7.0.6",
- "istanbul-lib-coverage": "^1.1.2",
- "istanbul-lib-hook": "^1.1.0",
- "istanbul-lib-instrument": "^1.10.0",
- "istanbul-lib-report": "^1.1.3",
- "istanbul-lib-source-maps": "^1.2.3",
- "istanbul-reports": "^1.4.0",
- "md5-hex": "^1.2.0",
- "merge-source-map": "^1.1.0",
- "micromatch": "^3.1.10",
- "mkdirp": "^0.5.0",
- "resolve-from": "^2.0.0",
- "rimraf": "^2.6.2",
- "signal-exit": "^3.0.1",
- "spawn-wrap": "^1.4.2",
- "test-exclude": "^4.2.0",
- "yargs": "11.1.0",
- "yargs-parser": "^8.0.0"
- },
- "dependencies": {
- "align-text": {
- "version": "0.1.4",
- "bundled": true,
- "dev": true,
- "requires": {
- "kind-of": "^3.0.2",
- "longest": "^1.0.1",
- "repeat-string": "^1.5.2"
- }
- },
- "amdefine": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true
- },
- "ansi-regex": {
- "version": "2.1.1",
- "bundled": true,
- "dev": true
- },
- "ansi-styles": {
- "version": "2.2.1",
- "bundled": true,
- "dev": true
- },
- "append-transform": {
- "version": "0.4.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "default-require-extensions": "^1.0.0"
- }
- },
- "archy": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "arr-diff": {
- "version": "4.0.0",
- "bundled": true,
- "dev": true
- },
- "arr-flatten": {
- "version": "1.1.0",
- "bundled": true,
- "dev": true
- },
- "arr-union": {
- "version": "3.1.0",
- "bundled": true,
- "dev": true
- },
- "array-unique": {
- "version": "0.3.2",
- "bundled": true,
- "dev": true
- },
- "arrify": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true
- },
- "assign-symbols": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "async": {
- "version": "1.5.2",
- "bundled": true,
- "dev": true
- },
- "atob": {
- "version": "2.1.1",
- "bundled": true,
- "dev": true
- },
- "babel-code-frame": {
- "version": "6.26.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "chalk": "^1.1.3",
- "esutils": "^2.0.2",
- "js-tokens": "^3.0.2"
- }
- },
- "babel-generator": {
- "version": "6.26.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "babel-messages": "^6.23.0",
- "babel-runtime": "^6.26.0",
- "babel-types": "^6.26.0",
- "detect-indent": "^4.0.0",
- "jsesc": "^1.3.0",
- "lodash": "^4.17.4",
- "source-map": "^0.5.7",
- "trim-right": "^1.0.1"
- }
- },
- "babel-messages": {
- "version": "6.23.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "babel-runtime": "^6.22.0"
- }
- },
- "babel-runtime": {
- "version": "6.26.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "core-js": "^2.4.0",
- "regenerator-runtime": "^0.11.0"
- }
- },
- "babel-template": {
- "version": "6.26.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "babel-runtime": "^6.26.0",
- "babel-traverse": "^6.26.0",
- "babel-types": "^6.26.0",
- "babylon": "^6.18.0",
- "lodash": "^4.17.4"
- }
- },
- "babel-traverse": {
- "version": "6.26.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "babel-code-frame": "^6.26.0",
- "babel-messages": "^6.23.0",
- "babel-runtime": "^6.26.0",
- "babel-types": "^6.26.0",
- "babylon": "^6.18.0",
- "debug": "^2.6.8",
- "globals": "^9.18.0",
- "invariant": "^2.2.2",
- "lodash": "^4.17.4"
- }
- },
- "babel-types": {
- "version": "6.26.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "babel-runtime": "^6.26.0",
- "esutils": "^2.0.2",
- "lodash": "^4.17.4",
- "to-fast-properties": "^1.0.3"
- }
- },
- "babylon": {
- "version": "6.18.0",
- "bundled": true,
- "dev": true
- },
- "balanced-match": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "base": {
- "version": "0.11.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "cache-base": "^1.0.1",
- "class-utils": "^0.3.5",
- "component-emitter": "^1.2.1",
- "define-property": "^1.0.0",
- "isobject": "^3.0.1",
- "mixin-deep": "^1.2.0",
- "pascalcase": "^0.1.1"
- },
- "dependencies": {
- "define-property": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-descriptor": "^1.0.0"
- }
- },
- "is-accessor-descriptor": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "kind-of": "^6.0.0"
- }
- },
- "is-data-descriptor": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "kind-of": "^6.0.0"
- }
- },
- "is-descriptor": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-accessor-descriptor": "^1.0.0",
- "is-data-descriptor": "^1.0.0",
- "kind-of": "^6.0.2"
- }
- },
- "isobject": {
- "version": "3.0.1",
- "bundled": true,
- "dev": true
- },
- "kind-of": {
- "version": "6.0.2",
- "bundled": true,
- "dev": true
- }
- }
- },
- "brace-expansion": {
- "version": "1.1.11",
- "bundled": true,
- "dev": true,
- "requires": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
- "braces": {
- "version": "2.3.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "arr-flatten": "^1.1.0",
- "array-unique": "^0.3.2",
- "extend-shallow": "^2.0.1",
- "fill-range": "^4.0.0",
- "isobject": "^3.0.1",
- "repeat-element": "^1.1.2",
- "snapdragon": "^0.8.1",
- "snapdragon-node": "^2.0.1",
- "split-string": "^3.0.2",
- "to-regex": "^3.0.1"
- },
- "dependencies": {
- "extend-shallow": {
- "version": "2.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-extendable": "^0.1.0"
- }
- }
- }
- },
- "builtin-modules": {
- "version": "1.1.1",
- "bundled": true,
- "dev": true
- },
- "cache-base": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "collection-visit": "^1.0.0",
- "component-emitter": "^1.2.1",
- "get-value": "^2.0.6",
- "has-value": "^1.0.0",
- "isobject": "^3.0.1",
- "set-value": "^2.0.0",
- "to-object-path": "^0.3.0",
- "union-value": "^1.0.0",
- "unset-value": "^1.0.0"
- },
- "dependencies": {
- "isobject": {
- "version": "3.0.1",
- "bundled": true,
- "dev": true
- }
- }
- },
- "caching-transform": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "md5-hex": "^1.2.0",
- "mkdirp": "^0.5.1",
- "write-file-atomic": "^1.1.4"
- }
- },
- "camelcase": {
- "version": "1.2.1",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "center-align": {
- "version": "0.1.3",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "align-text": "^0.1.3",
- "lazy-cache": "^1.0.3"
- }
- },
- "chalk": {
- "version": "1.1.3",
- "bundled": true,
- "dev": true,
- "requires": {
- "ansi-styles": "^2.2.1",
- "escape-string-regexp": "^1.0.2",
- "has-ansi": "^2.0.0",
- "strip-ansi": "^3.0.0",
- "supports-color": "^2.0.0"
- }
- },
- "class-utils": {
- "version": "0.3.6",
- "bundled": true,
- "dev": true,
- "requires": {
- "arr-union": "^3.1.0",
- "define-property": "^0.2.5",
- "isobject": "^3.0.0",
- "static-extend": "^0.1.1"
- },
- "dependencies": {
- "define-property": {
- "version": "0.2.5",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-descriptor": "^0.1.0"
- }
- },
- "isobject": {
- "version": "3.0.1",
- "bundled": true,
- "dev": true
- }
- }
- },
- "cliui": {
- "version": "2.1.0",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "center-align": "^0.1.1",
- "right-align": "^0.1.1",
- "wordwrap": "0.0.2"
- },
- "dependencies": {
- "wordwrap": {
- "version": "0.0.2",
- "bundled": true,
- "dev": true,
- "optional": true
- }
- }
- },
- "code-point-at": {
- "version": "1.1.0",
- "bundled": true,
- "dev": true
- },
- "collection-visit": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "map-visit": "^1.0.0",
- "object-visit": "^1.0.0"
- }
- },
- "commondir": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true
- },
- "component-emitter": {
- "version": "1.2.1",
- "bundled": true,
- "dev": true
- },
- "concat-map": {
- "version": "0.0.1",
- "bundled": true,
- "dev": true
- },
- "convert-source-map": {
- "version": "1.5.1",
- "bundled": true,
- "dev": true
- },
- "copy-descriptor": {
- "version": "0.1.1",
- "bundled": true,
- "dev": true
- },
- "core-js": {
- "version": "2.5.6",
- "bundled": true,
- "dev": true
- },
- "cross-spawn": {
- "version": "4.0.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "lru-cache": "^4.0.1",
- "which": "^1.2.9"
- }
- },
- "debug": {
- "version": "2.6.9",
- "bundled": true,
- "dev": true,
- "requires": {
- "ms": "2.0.0"
- }
- },
- "debug-log": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true
- },
- "decamelize": {
- "version": "1.2.0",
- "bundled": true,
- "dev": true
- },
- "decode-uri-component": {
- "version": "0.2.0",
- "bundled": true,
- "dev": true
- },
- "default-require-extensions": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "strip-bom": "^2.0.0"
- }
- },
- "define-property": {
- "version": "2.0.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-descriptor": "^1.0.2",
- "isobject": "^3.0.1"
- },
- "dependencies": {
- "is-accessor-descriptor": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "kind-of": "^6.0.0"
- }
- },
- "is-data-descriptor": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "kind-of": "^6.0.0"
- }
- },
- "is-descriptor": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-accessor-descriptor": "^1.0.0",
- "is-data-descriptor": "^1.0.0",
- "kind-of": "^6.0.2"
- }
- },
- "isobject": {
- "version": "3.0.1",
- "bundled": true,
- "dev": true
- },
- "kind-of": {
- "version": "6.0.2",
- "bundled": true,
- "dev": true
- }
- }
- },
- "detect-indent": {
- "version": "4.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "repeating": "^2.0.0"
- }
- },
- "error-ex": {
- "version": "1.3.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-arrayish": "^0.2.1"
- }
- },
- "escape-string-regexp": {
- "version": "1.0.5",
- "bundled": true,
- "dev": true
- },
- "esutils": {
- "version": "2.0.2",
- "bundled": true,
- "dev": true
- },
- "execa": {
- "version": "0.7.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "cross-spawn": "^5.0.1",
- "get-stream": "^3.0.0",
- "is-stream": "^1.1.0",
- "npm-run-path": "^2.0.0",
- "p-finally": "^1.0.0",
- "signal-exit": "^3.0.0",
- "strip-eof": "^1.0.0"
- },
- "dependencies": {
- "cross-spawn": {
- "version": "5.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "lru-cache": "^4.0.1",
- "shebang-command": "^1.2.0",
- "which": "^1.2.9"
- }
- }
- }
- },
- "expand-brackets": {
- "version": "2.1.4",
- "bundled": true,
- "dev": true,
- "requires": {
- "debug": "^2.3.3",
- "define-property": "^0.2.5",
- "extend-shallow": "^2.0.1",
- "posix-character-classes": "^0.1.0",
- "regex-not": "^1.0.0",
- "snapdragon": "^0.8.1",
- "to-regex": "^3.0.1"
- },
- "dependencies": {
- "define-property": {
- "version": "0.2.5",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-descriptor": "^0.1.0"
- }
- },
- "extend-shallow": {
- "version": "2.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-extendable": "^0.1.0"
- }
- }
- }
- },
- "extend-shallow": {
- "version": "3.0.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "assign-symbols": "^1.0.0",
- "is-extendable": "^1.0.1"
- },
- "dependencies": {
- "is-extendable": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-plain-object": "^2.0.4"
- }
- }
- }
- },
- "extglob": {
- "version": "2.0.4",
- "bundled": true,
- "dev": true,
- "requires": {
- "array-unique": "^0.3.2",
- "define-property": "^1.0.0",
- "expand-brackets": "^2.1.4",
- "extend-shallow": "^2.0.1",
- "fragment-cache": "^0.2.1",
- "regex-not": "^1.0.0",
- "snapdragon": "^0.8.1",
- "to-regex": "^3.0.1"
- },
- "dependencies": {
- "define-property": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-descriptor": "^1.0.0"
- }
- },
- "extend-shallow": {
- "version": "2.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-extendable": "^0.1.0"
- }
- },
- "is-accessor-descriptor": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "kind-of": "^6.0.0"
- }
- },
- "is-data-descriptor": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "kind-of": "^6.0.0"
- }
- },
- "is-descriptor": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-accessor-descriptor": "^1.0.0",
- "is-data-descriptor": "^1.0.0",
- "kind-of": "^6.0.2"
- }
- },
- "kind-of": {
- "version": "6.0.2",
- "bundled": true,
- "dev": true
- }
- }
- },
- "fill-range": {
- "version": "4.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "extend-shallow": "^2.0.1",
- "is-number": "^3.0.0",
- "repeat-string": "^1.6.1",
- "to-regex-range": "^2.1.0"
- },
- "dependencies": {
- "extend-shallow": {
- "version": "2.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-extendable": "^0.1.0"
- }
- }
- }
- },
- "find-cache-dir": {
- "version": "0.1.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "commondir": "^1.0.1",
- "mkdirp": "^0.5.1",
- "pkg-dir": "^1.0.0"
- }
- },
- "find-up": {
- "version": "2.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "locate-path": "^2.0.0"
- }
- },
- "for-in": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true
- },
- "foreground-child": {
- "version": "1.5.6",
- "bundled": true,
- "dev": true,
- "requires": {
- "cross-spawn": "^4",
- "signal-exit": "^3.0.0"
- }
- },
- "fragment-cache": {
- "version": "0.2.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "map-cache": "^0.2.2"
- }
- },
- "fs.realpath": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "get-caller-file": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true
- },
- "get-stream": {
- "version": "3.0.0",
- "bundled": true,
- "dev": true
- },
- "get-value": {
- "version": "2.0.6",
- "bundled": true,
- "dev": true
- },
- "glob": {
- "version": "7.1.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.0.4",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- }
- },
- "globals": {
- "version": "9.18.0",
- "bundled": true,
- "dev": true
- },
- "graceful-fs": {
- "version": "4.1.11",
- "bundled": true,
- "dev": true
- },
- "handlebars": {
- "version": "4.0.11",
- "bundled": true,
- "dev": true,
- "requires": {
- "async": "^1.4.0",
- "optimist": "^0.6.1",
- "source-map": "^0.4.4",
- "uglify-js": "^2.6"
- },
- "dependencies": {
- "source-map": {
- "version": "0.4.4",
- "bundled": true,
- "dev": true,
- "requires": {
- "amdefine": ">=0.0.4"
- }
- }
- }
- },
- "has-ansi": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "ansi-regex": "^2.0.0"
- }
- },
- "has-flag": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "has-value": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "get-value": "^2.0.6",
- "has-values": "^1.0.0",
- "isobject": "^3.0.0"
- },
- "dependencies": {
- "isobject": {
- "version": "3.0.1",
- "bundled": true,
- "dev": true
- }
- }
- },
- "has-values": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-number": "^3.0.0",
- "kind-of": "^4.0.0"
- },
- "dependencies": {
- "is-number": {
- "version": "3.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "kind-of": "^3.0.2"
- },
- "dependencies": {
- "kind-of": {
- "version": "3.2.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-buffer": "^1.1.5"
- }
- }
- }
- },
- "kind-of": {
- "version": "4.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-buffer": "^1.1.5"
- }
- }
- }
- },
- "hosted-git-info": {
- "version": "2.6.0",
- "bundled": true,
- "dev": true
- },
- "imurmurhash": {
- "version": "0.1.4",
- "bundled": true,
- "dev": true
- },
- "inflight": {
- "version": "1.0.6",
- "bundled": true,
- "dev": true,
- "requires": {
- "once": "^1.3.0",
- "wrappy": "1"
- }
- },
- "inherits": {
- "version": "2.0.3",
- "bundled": true,
- "dev": true
- },
- "invariant": {
- "version": "2.2.4",
- "bundled": true,
- "dev": true,
- "requires": {
- "loose-envify": "^1.0.0"
- }
- },
- "invert-kv": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "is-accessor-descriptor": {
- "version": "0.1.6",
- "bundled": true,
- "dev": true,
- "requires": {
- "kind-of": "^3.0.2"
- }
- },
- "is-arrayish": {
- "version": "0.2.1",
- "bundled": true,
- "dev": true
- },
- "is-buffer": {
- "version": "1.1.6",
- "bundled": true,
- "dev": true
- },
- "is-builtin-module": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "builtin-modules": "^1.0.0"
- }
- },
- "is-data-descriptor": {
- "version": "0.1.4",
- "bundled": true,
- "dev": true,
- "requires": {
- "kind-of": "^3.0.2"
- }
- },
- "is-descriptor": {
- "version": "0.1.6",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-accessor-descriptor": "^0.1.6",
- "is-data-descriptor": "^0.1.4",
- "kind-of": "^5.0.0"
- },
- "dependencies": {
- "kind-of": {
- "version": "5.1.0",
- "bundled": true,
- "dev": true
- }
- }
- },
- "is-extendable": {
- "version": "0.1.1",
- "bundled": true,
- "dev": true
- },
- "is-finite": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "number-is-nan": "^1.0.0"
- }
- },
- "is-fullwidth-code-point": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true
- },
- "is-number": {
- "version": "3.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "kind-of": "^3.0.2"
- }
- },
- "is-odd": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-number": "^4.0.0"
- },
- "dependencies": {
- "is-number": {
- "version": "4.0.0",
- "bundled": true,
- "dev": true
- }
- }
- },
- "is-plain-object": {
- "version": "2.0.4",
- "bundled": true,
- "dev": true,
- "requires": {
- "isobject": "^3.0.1"
- },
- "dependencies": {
- "isobject": {
- "version": "3.0.1",
- "bundled": true,
- "dev": true
- }
- }
- },
- "is-stream": {
- "version": "1.1.0",
- "bundled": true,
- "dev": true
- },
- "is-utf8": {
- "version": "0.2.1",
- "bundled": true,
- "dev": true
- },
- "is-windows": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true
- },
- "isarray": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "isexe": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true
- },
- "isobject": {
- "version": "3.0.1",
- "bundled": true,
- "dev": true
- },
- "istanbul-lib-coverage": {
- "version": "1.2.0",
- "bundled": true,
- "dev": true
- },
- "istanbul-lib-hook": {
- "version": "1.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "append-transform": "^0.4.0"
- }
- },
- "istanbul-lib-instrument": {
- "version": "1.10.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "babel-generator": "^6.18.0",
- "babel-template": "^6.16.0",
- "babel-traverse": "^6.18.0",
- "babel-types": "^6.18.0",
- "babylon": "^6.18.0",
- "istanbul-lib-coverage": "^1.2.0",
- "semver": "^5.3.0"
- }
- },
- "istanbul-lib-report": {
- "version": "1.1.3",
- "bundled": true,
- "dev": true,
- "requires": {
- "istanbul-lib-coverage": "^1.1.2",
- "mkdirp": "^0.5.1",
- "path-parse": "^1.0.5",
- "supports-color": "^3.1.2"
- },
- "dependencies": {
- "supports-color": {
- "version": "3.2.3",
- "bundled": true,
- "dev": true,
- "requires": {
- "has-flag": "^1.0.0"
- }
- }
- }
- },
- "istanbul-lib-source-maps": {
- "version": "1.2.3",
- "bundled": true,
- "dev": true,
- "requires": {
- "debug": "^3.1.0",
- "istanbul-lib-coverage": "^1.1.2",
- "mkdirp": "^0.5.1",
- "rimraf": "^2.6.1",
- "source-map": "^0.5.3"
- },
- "dependencies": {
- "debug": {
- "version": "3.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "ms": "2.0.0"
- }
- }
- }
- },
- "istanbul-reports": {
- "version": "1.4.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "handlebars": "^4.0.3"
- }
- },
- "js-tokens": {
- "version": "3.0.2",
- "bundled": true,
- "dev": true
- },
- "jsesc": {
- "version": "1.3.0",
- "bundled": true,
- "dev": true
- },
- "kind-of": {
- "version": "3.2.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-buffer": "^1.1.5"
- }
- },
- "lazy-cache": {
- "version": "1.0.4",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "lcid": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "invert-kv": "^1.0.0"
- }
- },
- "load-json-file": {
- "version": "1.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "graceful-fs": "^4.1.2",
- "parse-json": "^2.2.0",
- "pify": "^2.0.0",
- "pinkie-promise": "^2.0.0",
- "strip-bom": "^2.0.0"
- }
- },
- "locate-path": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "p-locate": "^2.0.0",
- "path-exists": "^3.0.0"
- },
- "dependencies": {
- "path-exists": {
- "version": "3.0.0",
- "bundled": true,
- "dev": true
- }
- }
- },
- "lodash": {
- "version": "4.17.10",
- "bundled": true,
- "dev": true
- },
- "longest": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true
- },
- "loose-envify": {
- "version": "1.3.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "js-tokens": "^3.0.0"
- }
- },
- "lru-cache": {
- "version": "4.1.3",
- "bundled": true,
- "dev": true,
- "requires": {
- "pseudomap": "^1.0.2",
- "yallist": "^2.1.2"
- }
- },
- "map-cache": {
- "version": "0.2.2",
- "bundled": true,
- "dev": true
- },
- "map-visit": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "object-visit": "^1.0.0"
- }
- },
- "md5-hex": {
- "version": "1.3.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "md5-o-matic": "^0.1.1"
- }
- },
- "md5-o-matic": {
- "version": "0.1.1",
- "bundled": true,
- "dev": true
- },
- "mem": {
- "version": "1.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "mimic-fn": "^1.0.0"
- }
- },
- "merge-source-map": {
- "version": "1.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "source-map": "^0.6.1"
- },
- "dependencies": {
- "source-map": {
- "version": "0.6.1",
- "bundled": true,
- "dev": true
- }
- }
- },
- "micromatch": {
- "version": "3.1.10",
- "bundled": true,
- "dev": true,
- "requires": {
- "arr-diff": "^4.0.0",
- "array-unique": "^0.3.2",
- "braces": "^2.3.1",
- "define-property": "^2.0.2",
- "extend-shallow": "^3.0.2",
- "extglob": "^2.0.4",
- "fragment-cache": "^0.2.1",
- "kind-of": "^6.0.2",
- "nanomatch": "^1.2.9",
- "object.pick": "^1.3.0",
- "regex-not": "^1.0.0",
- "snapdragon": "^0.8.1",
- "to-regex": "^3.0.2"
- },
- "dependencies": {
- "kind-of": {
- "version": "6.0.2",
- "bundled": true,
- "dev": true
- }
- }
- },
- "mimic-fn": {
- "version": "1.2.0",
- "bundled": true,
- "dev": true
- },
- "minimatch": {
- "version": "3.0.4",
- "bundled": true,
- "dev": true,
- "requires": {
- "brace-expansion": "^1.1.7"
- }
- },
- "minimist": {
- "version": "0.0.8",
- "bundled": true,
- "dev": true
- },
- "mixin-deep": {
- "version": "1.3.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "for-in": "^1.0.2",
- "is-extendable": "^1.0.1"
- },
- "dependencies": {
- "is-extendable": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-plain-object": "^2.0.4"
- }
- }
- }
- },
- "mkdirp": {
- "version": "0.5.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "minimist": "0.0.8"
- }
- },
- "ms": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true
- },
- "nanomatch": {
- "version": "1.2.9",
- "bundled": true,
- "dev": true,
- "requires": {
- "arr-diff": "^4.0.0",
- "array-unique": "^0.3.2",
- "define-property": "^2.0.2",
- "extend-shallow": "^3.0.2",
- "fragment-cache": "^0.2.1",
- "is-odd": "^2.0.0",
- "is-windows": "^1.0.2",
- "kind-of": "^6.0.2",
- "object.pick": "^1.3.0",
- "regex-not": "^1.0.0",
- "snapdragon": "^0.8.1",
- "to-regex": "^3.0.1"
- },
- "dependencies": {
- "arr-diff": {
- "version": "4.0.0",
- "bundled": true,
- "dev": true
- },
- "array-unique": {
- "version": "0.3.2",
- "bundled": true,
- "dev": true
- },
- "kind-of": {
- "version": "6.0.2",
- "bundled": true,
- "dev": true
- }
- }
- },
- "normalize-package-data": {
- "version": "2.4.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "hosted-git-info": "^2.1.4",
- "is-builtin-module": "^1.0.0",
- "semver": "2 || 3 || 4 || 5",
- "validate-npm-package-license": "^3.0.1"
- }
- },
- "npm-run-path": {
- "version": "2.0.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "path-key": "^2.0.0"
- }
- },
- "number-is-nan": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true
- },
- "object-assign": {
- "version": "4.1.1",
- "bundled": true,
- "dev": true
- },
- "object-copy": {
- "version": "0.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "copy-descriptor": "^0.1.0",
- "define-property": "^0.2.5",
- "kind-of": "^3.0.3"
- },
- "dependencies": {
- "define-property": {
- "version": "0.2.5",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-descriptor": "^0.1.0"
- }
- }
- }
- },
- "object-visit": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "isobject": "^3.0.0"
- },
- "dependencies": {
- "isobject": {
- "version": "3.0.1",
- "bundled": true,
- "dev": true
- }
- }
- },
- "object.pick": {
- "version": "1.3.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "isobject": "^3.0.1"
- },
- "dependencies": {
- "isobject": {
- "version": "3.0.1",
- "bundled": true,
- "dev": true
- }
- }
- },
- "once": {
- "version": "1.4.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "wrappy": "1"
- }
- },
- "optimist": {
- "version": "0.6.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "minimist": "~0.0.1",
- "wordwrap": "~0.0.2"
- }
- },
- "os-homedir": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true
- },
- "os-locale": {
- "version": "2.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "execa": "^0.7.0",
- "lcid": "^1.0.0",
- "mem": "^1.1.0"
- }
- },
- "p-finally": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "p-limit": {
- "version": "1.2.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "p-try": "^1.0.0"
- }
- },
- "p-locate": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "p-limit": "^1.1.0"
- }
- },
- "p-try": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "parse-json": {
- "version": "2.2.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "error-ex": "^1.2.0"
- }
- },
- "pascalcase": {
- "version": "0.1.1",
- "bundled": true,
- "dev": true
- },
- "path-exists": {
- "version": "2.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "pinkie-promise": "^2.0.0"
- }
- },
- "path-is-absolute": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true
- },
- "path-key": {
- "version": "2.0.1",
- "bundled": true,
- "dev": true
- },
- "path-parse": {
- "version": "1.0.5",
- "bundled": true,
- "dev": true
- },
- "path-type": {
- "version": "1.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "graceful-fs": "^4.1.2",
- "pify": "^2.0.0",
- "pinkie-promise": "^2.0.0"
- }
- },
- "pify": {
- "version": "2.3.0",
- "bundled": true,
- "dev": true
- },
- "pinkie": {
- "version": "2.0.4",
- "bundled": true,
- "dev": true
- },
- "pinkie-promise": {
- "version": "2.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "pinkie": "^2.0.0"
- }
- },
- "pkg-dir": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "find-up": "^1.0.0"
- },
- "dependencies": {
- "find-up": {
- "version": "1.1.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "path-exists": "^2.0.0",
- "pinkie-promise": "^2.0.0"
- }
- }
- }
- },
- "posix-character-classes": {
- "version": "0.1.1",
- "bundled": true,
- "dev": true
- },
- "pseudomap": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true
- },
- "read-pkg": {
- "version": "1.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "load-json-file": "^1.0.0",
- "normalize-package-data": "^2.3.2",
- "path-type": "^1.0.0"
- }
- },
- "read-pkg-up": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "find-up": "^1.0.0",
- "read-pkg": "^1.0.0"
- },
- "dependencies": {
- "find-up": {
- "version": "1.1.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "path-exists": "^2.0.0",
- "pinkie-promise": "^2.0.0"
- }
- }
- }
- },
- "regenerator-runtime": {
- "version": "0.11.1",
- "bundled": true,
- "dev": true
- },
- "regex-not": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "extend-shallow": "^3.0.2",
- "safe-regex": "^1.1.0"
- }
- },
- "repeat-element": {
- "version": "1.1.2",
- "bundled": true,
- "dev": true
- },
- "repeat-string": {
- "version": "1.6.1",
- "bundled": true,
- "dev": true
- },
- "repeating": {
- "version": "2.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-finite": "^1.0.0"
- }
- },
- "require-directory": {
- "version": "2.1.1",
- "bundled": true,
- "dev": true
- },
- "require-main-filename": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true
- },
- "resolve-from": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true
- },
- "resolve-url": {
- "version": "0.2.1",
- "bundled": true,
- "dev": true
- },
- "ret": {
- "version": "0.1.15",
- "bundled": true,
- "dev": true
- },
- "right-align": {
- "version": "0.1.3",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "align-text": "^0.1.1"
- }
- },
- "rimraf": {
- "version": "2.6.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "glob": "^7.0.5"
- }
- },
- "safe-regex": {
- "version": "1.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "ret": "~0.1.10"
- }
- },
- "semver": {
- "version": "5.5.0",
- "bundled": true,
- "dev": true
- },
- "set-blocking": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true
- },
- "set-value": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "extend-shallow": "^2.0.1",
- "is-extendable": "^0.1.1",
- "is-plain-object": "^2.0.3",
- "split-string": "^3.0.1"
- },
- "dependencies": {
- "extend-shallow": {
- "version": "2.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-extendable": "^0.1.0"
- }
- }
- }
- },
- "shebang-command": {
- "version": "1.2.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "shebang-regex": "^1.0.0"
- }
- },
- "shebang-regex": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "signal-exit": {
- "version": "3.0.2",
- "bundled": true,
- "dev": true
- },
- "slide": {
- "version": "1.1.6",
- "bundled": true,
- "dev": true
- },
- "snapdragon": {
- "version": "0.8.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "base": "^0.11.1",
- "debug": "^2.2.0",
- "define-property": "^0.2.5",
- "extend-shallow": "^2.0.1",
- "map-cache": "^0.2.2",
- "source-map": "^0.5.6",
- "source-map-resolve": "^0.5.0",
- "use": "^3.1.0"
- },
- "dependencies": {
- "define-property": {
- "version": "0.2.5",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-descriptor": "^0.1.0"
- }
- },
- "extend-shallow": {
- "version": "2.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-extendable": "^0.1.0"
- }
- }
- }
- },
- "snapdragon-node": {
- "version": "2.1.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "define-property": "^1.0.0",
- "isobject": "^3.0.0",
- "snapdragon-util": "^3.0.1"
- },
- "dependencies": {
- "define-property": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-descriptor": "^1.0.0"
- }
- },
- "is-accessor-descriptor": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "kind-of": "^6.0.0"
- }
- },
- "is-data-descriptor": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "kind-of": "^6.0.0"
- }
- },
- "is-descriptor": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-accessor-descriptor": "^1.0.0",
- "is-data-descriptor": "^1.0.0",
- "kind-of": "^6.0.2"
- }
- },
- "isobject": {
- "version": "3.0.1",
- "bundled": true,
- "dev": true
- },
- "kind-of": {
- "version": "6.0.2",
- "bundled": true,
- "dev": true
- }
- }
- },
- "snapdragon-util": {
- "version": "3.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "kind-of": "^3.2.0"
- }
- },
- "source-map": {
- "version": "0.5.7",
- "bundled": true,
- "dev": true
- },
- "source-map-resolve": {
- "version": "0.5.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "atob": "^2.0.0",
- "decode-uri-component": "^0.2.0",
- "resolve-url": "^0.2.1",
- "source-map-url": "^0.4.0",
- "urix": "^0.1.0"
- }
- },
- "source-map-url": {
- "version": "0.4.0",
- "bundled": true,
- "dev": true
- },
- "spawn-wrap": {
- "version": "1.4.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "foreground-child": "^1.5.6",
- "mkdirp": "^0.5.0",
- "os-homedir": "^1.0.1",
- "rimraf": "^2.6.2",
- "signal-exit": "^3.0.2",
- "which": "^1.3.0"
- }
- },
- "spdx-correct": {
- "version": "3.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "spdx-expression-parse": "^3.0.0",
- "spdx-license-ids": "^3.0.0"
- }
- },
- "spdx-exceptions": {
- "version": "2.1.0",
- "bundled": true,
- "dev": true
- },
- "spdx-expression-parse": {
- "version": "3.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "spdx-exceptions": "^2.1.0",
- "spdx-license-ids": "^3.0.0"
- }
- },
- "spdx-license-ids": {
- "version": "3.0.0",
- "bundled": true,
- "dev": true
- },
- "split-string": {
- "version": "3.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "extend-shallow": "^3.0.0"
- }
- },
- "static-extend": {
- "version": "0.1.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "define-property": "^0.2.5",
- "object-copy": "^0.1.0"
- },
- "dependencies": {
- "define-property": {
- "version": "0.2.5",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-descriptor": "^0.1.0"
- }
- }
- }
- },
- "string-width": {
- "version": "2.1.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^4.0.0"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "3.0.0",
- "bundled": true,
- "dev": true
- },
- "strip-ansi": {
- "version": "4.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "ansi-regex": "^3.0.0"
- }
- }
- }
- },
- "strip-ansi": {
- "version": "3.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "ansi-regex": "^2.0.0"
- }
- },
- "strip-bom": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-utf8": "^0.2.0"
- }
- },
- "strip-eof": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true
- },
- "supports-color": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true
- },
- "test-exclude": {
- "version": "4.2.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "arrify": "^1.0.1",
- "micromatch": "^3.1.8",
- "object-assign": "^4.1.0",
- "read-pkg-up": "^1.0.1",
- "require-main-filename": "^1.0.1"
- },
- "dependencies": {
- "arr-diff": {
- "version": "4.0.0",
- "bundled": true,
- "dev": true
- },
- "array-unique": {
- "version": "0.3.2",
- "bundled": true,
- "dev": true
- },
- "braces": {
- "version": "2.3.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "arr-flatten": "^1.1.0",
- "array-unique": "^0.3.2",
- "extend-shallow": "^2.0.1",
- "fill-range": "^4.0.0",
- "isobject": "^3.0.1",
- "repeat-element": "^1.1.2",
- "snapdragon": "^0.8.1",
- "snapdragon-node": "^2.0.1",
- "split-string": "^3.0.2",
- "to-regex": "^3.0.1"
- },
- "dependencies": {
- "extend-shallow": {
- "version": "2.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-extendable": "^0.1.0"
- }
- }
- }
- },
- "expand-brackets": {
- "version": "2.1.4",
- "bundled": true,
- "dev": true,
- "requires": {
- "debug": "^2.3.3",
- "define-property": "^0.2.5",
- "extend-shallow": "^2.0.1",
- "posix-character-classes": "^0.1.0",
- "regex-not": "^1.0.0",
- "snapdragon": "^0.8.1",
- "to-regex": "^3.0.1"
- },
- "dependencies": {
- "define-property": {
- "version": "0.2.5",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-descriptor": "^0.1.0"
- }
- },
- "extend-shallow": {
- "version": "2.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-extendable": "^0.1.0"
- }
- },
- "is-accessor-descriptor": {
- "version": "0.1.6",
- "bundled": true,
- "dev": true,
- "requires": {
- "kind-of": "^3.0.2"
- },
- "dependencies": {
- "kind-of": {
- "version": "3.2.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-buffer": "^1.1.5"
- }
- }
- }
- },
- "is-data-descriptor": {
- "version": "0.1.4",
- "bundled": true,
- "dev": true,
- "requires": {
- "kind-of": "^3.0.2"
- },
- "dependencies": {
- "kind-of": {
- "version": "3.2.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-buffer": "^1.1.5"
- }
- }
- }
- },
- "is-descriptor": {
- "version": "0.1.6",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-accessor-descriptor": "^0.1.6",
- "is-data-descriptor": "^0.1.4",
- "kind-of": "^5.0.0"
- }
- },
- "kind-of": {
- "version": "5.1.0",
- "bundled": true,
- "dev": true
- }
- }
- },
- "extglob": {
- "version": "2.0.4",
- "bundled": true,
- "dev": true,
- "requires": {
- "array-unique": "^0.3.2",
- "define-property": "^1.0.0",
- "expand-brackets": "^2.1.4",
- "extend-shallow": "^2.0.1",
- "fragment-cache": "^0.2.1",
- "regex-not": "^1.0.0",
- "snapdragon": "^0.8.1",
- "to-regex": "^3.0.1"
- },
- "dependencies": {
- "define-property": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-descriptor": "^1.0.0"
- }
- },
- "extend-shallow": {
- "version": "2.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-extendable": "^0.1.0"
- }
- }
- }
- },
- "fill-range": {
- "version": "4.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "extend-shallow": "^2.0.1",
- "is-number": "^3.0.0",
- "repeat-string": "^1.6.1",
- "to-regex-range": "^2.1.0"
- },
- "dependencies": {
- "extend-shallow": {
- "version": "2.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-extendable": "^0.1.0"
- }
- }
- }
- },
- "is-accessor-descriptor": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "kind-of": "^6.0.0"
- }
- },
- "is-data-descriptor": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "kind-of": "^6.0.0"
- }
- },
- "is-descriptor": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-accessor-descriptor": "^1.0.0",
- "is-data-descriptor": "^1.0.0",
- "kind-of": "^6.0.2"
- }
- },
- "is-number": {
- "version": "3.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "kind-of": "^3.0.2"
- },
- "dependencies": {
- "kind-of": {
- "version": "3.2.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-buffer": "^1.1.5"
- }
- }
- }
- },
- "isobject": {
- "version": "3.0.1",
- "bundled": true,
- "dev": true
- },
- "kind-of": {
- "version": "6.0.2",
- "bundled": true,
- "dev": true
- },
- "micromatch": {
- "version": "3.1.10",
- "bundled": true,
- "dev": true,
- "requires": {
- "arr-diff": "^4.0.0",
- "array-unique": "^0.3.2",
- "braces": "^2.3.1",
- "define-property": "^2.0.2",
- "extend-shallow": "^3.0.2",
- "extglob": "^2.0.4",
- "fragment-cache": "^0.2.1",
- "kind-of": "^6.0.2",
- "nanomatch": "^1.2.9",
- "object.pick": "^1.3.0",
- "regex-not": "^1.0.0",
- "snapdragon": "^0.8.1",
- "to-regex": "^3.0.2"
- }
- }
- }
- },
- "to-fast-properties": {
- "version": "1.0.3",
- "bundled": true,
- "dev": true
- },
- "to-object-path": {
- "version": "0.3.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "kind-of": "^3.0.2"
- }
- },
- "to-regex": {
- "version": "3.0.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "define-property": "^2.0.2",
- "extend-shallow": "^3.0.2",
- "regex-not": "^1.0.2",
- "safe-regex": "^1.1.0"
- }
- },
- "to-regex-range": {
- "version": "2.1.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-number": "^3.0.0",
- "repeat-string": "^1.6.1"
- },
- "dependencies": {
- "is-number": {
- "version": "3.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "kind-of": "^3.0.2"
- }
- }
- }
- },
- "trim-right": {
- "version": "1.0.1",
- "bundled": true,
- "dev": true
- },
- "uglify-js": {
- "version": "2.8.29",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "source-map": "~0.5.1",
- "uglify-to-browserify": "~1.0.0",
- "yargs": "~3.10.0"
- },
- "dependencies": {
- "yargs": {
- "version": "3.10.0",
- "bundled": true,
- "dev": true,
- "optional": true,
- "requires": {
- "camelcase": "^1.0.2",
- "cliui": "^2.1.0",
- "decamelize": "^1.0.0",
- "window-size": "0.1.0"
- }
- }
- }
- },
- "uglify-to-browserify": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "union-value": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "arr-union": "^3.1.0",
- "get-value": "^2.0.6",
- "is-extendable": "^0.1.1",
- "set-value": "^0.4.3"
- },
- "dependencies": {
- "extend-shallow": {
- "version": "2.0.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "is-extendable": "^0.1.0"
- }
- },
- "set-value": {
- "version": "0.4.3",
- "bundled": true,
- "dev": true,
- "requires": {
- "extend-shallow": "^2.0.1",
- "is-extendable": "^0.1.1",
- "is-plain-object": "^2.0.1",
- "to-object-path": "^0.3.0"
- }
- }
- }
- },
- "unset-value": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "has-value": "^0.3.1",
- "isobject": "^3.0.0"
- },
- "dependencies": {
- "has-value": {
- "version": "0.3.1",
- "bundled": true,
- "dev": true,
- "requires": {
- "get-value": "^2.0.3",
- "has-values": "^0.1.4",
- "isobject": "^2.0.0"
- },
- "dependencies": {
- "isobject": {
- "version": "2.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "isarray": "1.0.0"
- }
- }
- }
- },
- "has-values": {
- "version": "0.1.4",
- "bundled": true,
- "dev": true
- },
- "isobject": {
- "version": "3.0.1",
- "bundled": true,
- "dev": true
- }
- }
- },
- "urix": {
- "version": "0.1.0",
- "bundled": true,
- "dev": true
- },
- "use": {
- "version": "3.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "kind-of": "^6.0.2"
- },
- "dependencies": {
- "kind-of": {
- "version": "6.0.2",
- "bundled": true,
- "dev": true
- }
- }
- },
- "validate-npm-package-license": {
- "version": "3.0.3",
- "bundled": true,
- "dev": true,
- "requires": {
- "spdx-correct": "^3.0.0",
- "spdx-expression-parse": "^3.0.0"
- }
- },
- "which": {
- "version": "1.3.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "isexe": "^2.0.0"
- }
- },
- "which-module": {
- "version": "2.0.0",
- "bundled": true,
- "dev": true
- },
- "window-size": {
- "version": "0.1.0",
- "bundled": true,
- "dev": true,
- "optional": true
- },
- "wordwrap": {
- "version": "0.0.3",
- "bundled": true,
- "dev": true
- },
- "wrap-ansi": {
- "version": "2.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "string-width": "^1.0.1",
- "strip-ansi": "^3.0.1"
- },
- "dependencies": {
- "is-fullwidth-code-point": {
- "version": "1.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "number-is-nan": "^1.0.0"
- }
- },
- "string-width": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "code-point-at": "^1.0.0",
- "is-fullwidth-code-point": "^1.0.0",
- "strip-ansi": "^3.0.0"
- }
- }
- }
- },
- "wrappy": {
- "version": "1.0.2",
- "bundled": true,
- "dev": true
- },
- "write-file-atomic": {
- "version": "1.3.4",
- "bundled": true,
- "dev": true,
- "requires": {
- "graceful-fs": "^4.1.11",
- "imurmurhash": "^0.1.4",
- "slide": "^1.1.5"
- }
- },
- "y18n": {
- "version": "3.2.1",
- "bundled": true,
- "dev": true
- },
- "yallist": {
- "version": "2.1.2",
- "bundled": true,
- "dev": true
- },
- "yargs": {
- "version": "11.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "cliui": "^4.0.0",
- "decamelize": "^1.1.1",
- "find-up": "^2.1.0",
- "get-caller-file": "^1.0.1",
- "os-locale": "^2.0.0",
- "require-directory": "^2.1.1",
- "require-main-filename": "^1.0.1",
- "set-blocking": "^2.0.0",
- "string-width": "^2.0.0",
- "which-module": "^2.0.0",
- "y18n": "^3.2.1",
- "yargs-parser": "^9.0.2"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "3.0.0",
- "bundled": true,
- "dev": true
- },
- "camelcase": {
- "version": "4.1.0",
- "bundled": true,
- "dev": true
- },
- "cliui": {
- "version": "4.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "string-width": "^2.1.1",
- "strip-ansi": "^4.0.0",
- "wrap-ansi": "^2.0.0"
- }
- },
- "strip-ansi": {
- "version": "4.0.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "ansi-regex": "^3.0.0"
- }
- },
- "yargs-parser": {
- "version": "9.0.2",
- "bundled": true,
- "dev": true,
- "requires": {
- "camelcase": "^4.1.0"
- }
- }
- }
- },
- "yargs-parser": {
- "version": "8.1.0",
- "bundled": true,
- "dev": true,
- "requires": {
- "camelcase": "^4.1.0"
- },
- "dependencies": {
- "camelcase": {
- "version": "4.1.0",
- "bundled": true,
- "dev": true
- }
- }
+ "node_modules/arg": {
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
+ "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
+ "dev": true
+ },
+ "node_modules/argparse": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
+ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+ "dev": true,
+ "dependencies": {
+ "sprintf-js": "~1.0.2"
+ }
+ },
+ "node_modules/async-hook-domain": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/async-hook-domain/-/async-hook-domain-2.0.4.tgz",
+ "integrity": "sha512-14LjCmlK1PK8eDtTezR6WX8TMaYNIzBIsd2D1sGoGjgx0BuNMMoSdk7i/drlbtamy0AWv9yv2tkB+ASdmeqFIw==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/balanced-match": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
+ },
+ "node_modules/binary-extensions": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
+ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/bind-obj-methods": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/bind-obj-methods/-/bind-obj-methods-3.0.0.tgz",
+ "integrity": "sha512-nLEaaz3/sEzNSyPWRsN9HNsqwk1AUyECtGj+XwGdIi3xABnEqecvXtIJ0wehQXuuER5uZ/5fTs2usONgYjG+iw==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "dependencies": {
+ "balanced-match": "^1.0.0"
+ }
+ },
+ "node_modules/braces": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "dev": true,
+ "dependencies": {
+ "fill-range": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/browserslist": {
+ "version": "4.21.5",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz",
+ "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
}
+ ],
+ "dependencies": {
+ "caniuse-lite": "^1.0.30001449",
+ "electron-to-chromium": "^1.4.284",
+ "node-releases": "^2.0.8",
+ "update-browserslist-db": "^1.0.10"
+ },
+ "bin": {
+ "browserslist": "cli.js"
+ },
+ "engines": {
+ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
+ }
+ },
+ "node_modules/buffer-from": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
+ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
+ "dev": true
+ },
+ "node_modules/c8": {
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/c8/-/c8-7.13.0.tgz",
+ "integrity": "sha512-/NL4hQTv1gBL6J6ei80zu3IiTrmePDKXKXOTLpHvcIWZTVYQlDhVWjjWvkhICylE8EwwnMVzDZugCvdx0/DIIA==",
+ "dev": true,
+ "dependencies": {
+ "@bcoe/v8-coverage": "^0.2.3",
+ "@istanbuljs/schema": "^0.1.3",
+ "find-up": "^5.0.0",
+ "foreground-child": "^2.0.0",
+ "istanbul-lib-coverage": "^3.2.0",
+ "istanbul-lib-report": "^3.0.0",
+ "istanbul-reports": "^3.1.4",
+ "rimraf": "^3.0.2",
+ "test-exclude": "^6.0.0",
+ "v8-to-istanbul": "^9.0.0",
+ "yargs": "^16.2.0",
+ "yargs-parser": "^20.2.9"
+ },
+ "bin": {
+ "c8": "bin/c8.js"
+ },
+ "engines": {
+ "node": ">=10.12.0"
+ }
+ },
+ "node_modules/c8/node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/c8/node_modules/glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "dev": true,
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/c8/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/c8/node_modules/rimraf": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+ "dev": true,
+ "dependencies": {
+ "glob": "^7.1.3"
+ },
+ "bin": {
+ "rimraf": "bin.js"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/caching-transform": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz",
+ "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==",
+ "dev": true,
+ "dependencies": {
+ "hasha": "^5.0.0",
+ "make-dir": "^3.0.0",
+ "package-hash": "^4.0.0",
+ "write-file-atomic": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/camelcase": {
+ "version": "5.3.1",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
+ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/caniuse-lite": {
+ "version": "1.0.30001468",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001468.tgz",
+ "integrity": "sha512-zgAo8D5kbOyUcRAgSmgyuvBkjrGk5CGYG5TYgFdpQv+ywcyEpo1LOWoG8YmoflGnh+V+UsNuKYedsoYs0hzV5A==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
+ }
+ ]
+ },
+ "node_modules/chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/chalk/node_modules/has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/chalk/node_modules/supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "dependencies": {
+ "has-flag": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/chokidar": {
+ "version": "3.5.3",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
+ "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://paulmillr.com/funding/"
+ }
+ ],
+ "dependencies": {
+ "anymatch": "~3.1.2",
+ "braces": "~3.0.2",
+ "glob-parent": "~5.1.2",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.6.0"
+ },
+ "engines": {
+ "node": ">= 8.10.0"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/clean-stack": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz",
+ "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/cliui": {
+ "version": "7.0.4",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
+ "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
+ "dev": true,
+ "dependencies": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.0",
+ "wrap-ansi": "^7.0.0"
+ }
+ },
+ "node_modules/color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dev": true,
+ "dependencies": {
+ "color-name": "1.1.3"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
+ "dev": true
+ },
+ "node_modules/color-support": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
+ "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",
+ "dev": true,
+ "bin": {
+ "color-support": "bin.js"
+ }
+ },
+ "node_modules/commondir": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
+ "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==",
+ "dev": true
+ },
+ "node_modules/concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
+ "dev": true
+ },
+ "node_modules/convert-source-map": {
+ "version": "1.9.0",
+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz",
+ "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==",
+ "dev": true
+ },
+ "node_modules/create-require": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
+ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
+ "dev": true
+ },
+ "node_modules/cross-spawn": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
+ "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
+ "dev": true,
+ "dependencies": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dev": true,
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/decamelize": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
+ "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/default-require-extensions": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.1.tgz",
+ "integrity": "sha512-eXTJmRbm2TIt9MgWTsOH1wEuhew6XGZcMeGKCtLedIg/NCsg1iBePXkceTdK4Fii7pzmN9tGsZhKzZ4h7O/fxw==",
+ "dev": true,
+ "dependencies": {
+ "strip-bom": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/diff": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
+ "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.3.1"
+ }
+ },
+ "node_modules/electron-to-chromium": {
+ "version": "1.4.334",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.334.tgz",
+ "integrity": "sha512-laZ1odk+TRen6q0GeyQx/JEkpD3iSZT7ewopCpKqg9bTjP1l8XRfU3Bg20CFjNPZkp5+NDBl3iqd4o/kPO+Vew==",
+ "dev": true
+ },
+ "node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
+ "node_modules/es6-error": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz",
+ "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==",
+ "dev": true
+ },
+ "node_modules/escalade": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
+ "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+ "dev": true,
+ "bin": {
+ "esparse": "bin/esparse.js",
+ "esvalidate": "bin/esvalidate.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/events-to-array": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/events-to-array/-/events-to-array-1.1.2.tgz",
+ "integrity": "sha512-inRWzRY7nG+aXZxBzEqYKB3HPgwflZRopAjDCHv0whhRx+MTUr1ei0ICZUypdyE0HRm4L2d5VEcIqLD6yl+BFA==",
+ "dev": true
+ },
+ "node_modules/fill-range": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "dev": true,
+ "dependencies": {
+ "to-regex-range": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/find-cache-dir": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz",
+ "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==",
+ "dev": true,
+ "dependencies": {
+ "commondir": "^1.0.1",
+ "make-dir": "^3.0.2",
+ "pkg-dir": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/avajs/find-cache-dir?sponsor=1"
+ }
+ },
+ "node_modules/find-up": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
+ "dev": true,
+ "dependencies": {
+ "locate-path": "^6.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/findit": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/findit/-/findit-2.0.0.tgz",
+ "integrity": "sha512-ENZS237/Hr8bjczn5eKuBohLgaD0JyUd0arxretR1f9RO46vZHA1b2y0VorgGV3WaOT3c+78P8h7v4JGJ1i/rg==",
+ "dev": true
+ },
+ "node_modules/foreground-child": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz",
+ "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==",
+ "dev": true,
+ "dependencies": {
+ "cross-spawn": "^7.0.0",
+ "signal-exit": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/fromentries": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz",
+ "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
+ "node_modules/fs-exists-cached": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs-exists-cached/-/fs-exists-cached-1.0.0.tgz",
+ "integrity": "sha512-kSxoARUDn4F2RPXX48UXnaFKwVU7Ivd/6qpzZL29MCDmr9sTvybv4gFCp+qaI4fM9m0z9fgz/yJvi56GAz+BZg==",
+ "dev": true
+ },
+ "node_modules/fs-monkey": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.3.tgz",
+ "integrity": "sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q==",
+ "dev": true
+ },
+ "node_modules/fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
+ },
+ "node_modules/fsevents": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
+ "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
+ "dev": true,
+ "hasInstallScript": true,
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
+ "node_modules/function-loop": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/function-loop/-/function-loop-2.0.1.tgz",
+ "integrity": "sha512-ktIR+O6i/4h+j/ZhZJNdzeI4i9lEPeEK6UPR2EVyTVBqOwcU3Za9xYKLH64ZR9HmcROyRrOkizNyjjtWJzDDkQ==",
+ "dev": true
+ },
+ "node_modules/gensync": {
+ "version": "1.0.0-beta.2",
+ "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
+ "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/get-caller-file": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+ "dev": true,
+ "engines": {
+ "node": "6.* || 8.* || >= 10.*"
+ }
+ },
+ "node_modules/get-package-type": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz",
+ "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/glob": {
+ "version": "9.3.1",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.1.tgz",
+ "integrity": "sha512-qERvJb7IGsnkx6YYmaaGvDpf77c951hICMdWaFXyH3PlVob8sbPJJyJX0kWkiCWyXUzoy9UOTNjGg0RbD8bYIw==",
+ "dev": true,
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "minimatch": "^7.4.1",
+ "minipass": "^4.2.4",
+ "path-scurry": "^1.6.1"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "dev": true,
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/glob/node_modules/minimatch": {
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.4.tgz",
+ "integrity": "sha512-T+8B3kNrLP7jDb5eaC4rUIp6DKoeTSb6f9SwF2phcY2gxJUA0GEf1i29/FHxBMEfx0ppWlr434/D0P+6jb8bOQ==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/globals": {
+ "version": "11.12.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
+ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/graceful-fs": {
+ "version": "4.2.11",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
+ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
+ "dev": true
+ },
+ "node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/hasha": {
+ "version": "5.2.2",
+ "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz",
+ "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==",
+ "dev": true,
+ "dependencies": {
+ "is-stream": "^2.0.0",
+ "type-fest": "^0.8.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/html-escaper": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz",
+ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==",
+ "dev": true
+ },
+ "node_modules/imurmurhash": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.8.19"
+ }
+ },
+ "node_modules/indent-string": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz",
+ "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
+ "dev": true,
+ "dependencies": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "dev": true
+ },
+ "node_modules/is-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+ "dev": true,
+ "dependencies": {
+ "binary-extensions": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "dev": true,
+ "dependencies": {
+ "is-extglob": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.12.0"
+ }
+ },
+ "node_modules/is-stream": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
+ "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-typedarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
+ "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==",
+ "dev": true
+ },
+ "node_modules/is-windows": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
+ "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
+ "dev": true
+ },
+ "node_modules/istanbul-lib-coverage": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz",
+ "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/istanbul-lib-hook": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz",
+ "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==",
+ "dev": true,
+ "dependencies": {
+ "append-transform": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/istanbul-lib-instrument": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz",
+ "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/core": "^7.7.5",
+ "@istanbuljs/schema": "^0.1.2",
+ "istanbul-lib-coverage": "^3.0.0",
+ "semver": "^6.3.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/istanbul-lib-processinfo": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.3.tgz",
+ "integrity": "sha512-NkwHbo3E00oybX6NGJi6ar0B29vxyvNwoC7eJ4G4Yq28UfY758Hgn/heV8VRFhevPED4LXfFz0DQ8z/0kw9zMg==",
+ "dev": true,
+ "dependencies": {
+ "archy": "^1.0.0",
+ "cross-spawn": "^7.0.3",
+ "istanbul-lib-coverage": "^3.2.0",
+ "p-map": "^3.0.0",
+ "rimraf": "^3.0.0",
+ "uuid": "^8.3.2"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/istanbul-lib-processinfo/node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/istanbul-lib-processinfo/node_modules/glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "dev": true,
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/istanbul-lib-processinfo/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/istanbul-lib-processinfo/node_modules/rimraf": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+ "dev": true,
+ "dependencies": {
+ "glob": "^7.1.3"
+ },
+ "bin": {
+ "rimraf": "bin.js"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/istanbul-lib-report": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz",
+ "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==",
+ "dev": true,
+ "dependencies": {
+ "istanbul-lib-coverage": "^3.0.0",
+ "make-dir": "^3.0.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/istanbul-lib-source-maps": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz",
+ "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==",
+ "dev": true,
+ "dependencies": {
+ "debug": "^4.1.1",
+ "istanbul-lib-coverage": "^3.0.0",
+ "source-map": "^0.6.1"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/istanbul-reports": {
+ "version": "3.1.5",
+ "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz",
+ "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==",
+ "dev": true,
+ "dependencies": {
+ "html-escaper": "^2.0.0",
+ "istanbul-lib-report": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/jackspeak": {
+ "version": "1.4.2",
+ "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-1.4.2.tgz",
+ "integrity": "sha512-GHeGTmnuaHnvS+ZctRB01bfxARuu9wW83ENbuiweu07SFcVlZrJpcshSre/keGT7YGBhLHg/+rXCNSrsEHKU4Q==",
+ "dev": true,
+ "dependencies": {
+ "cliui": "^7.0.4"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/js-tokens": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+ "dev": true
+ },
+ "node_modules/js-yaml": {
+ "version": "3.14.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
+ "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
+ "dev": true,
+ "dependencies": {
+ "argparse": "^1.0.7",
+ "esprima": "^4.0.0"
+ },
+ "bin": {
+ "js-yaml": "bin/js-yaml.js"
+ }
+ },
+ "node_modules/jsesc": {
+ "version": "2.5.2",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz",
+ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==",
+ "dev": true,
+ "bin": {
+ "jsesc": "bin/jsesc"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/json5": {
+ "version": "2.2.3",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
+ "dev": true,
+ "bin": {
+ "json5": "lib/cli.js"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/jsonc-parser": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz",
+ "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==",
+ "dev": true
+ },
+ "node_modules/libtap": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/libtap/-/libtap-1.4.0.tgz",
+ "integrity": "sha512-STLFynswQ2A6W14JkabgGetBNk6INL1REgJ9UeNKw5llXroC2cGLgKTqavv0sl8OLVztLLipVKMcQ7yeUcqpmg==",
+ "dev": true,
+ "dependencies": {
+ "async-hook-domain": "^2.0.4",
+ "bind-obj-methods": "^3.0.0",
+ "diff": "^4.0.2",
+ "function-loop": "^2.0.1",
+ "minipass": "^3.1.5",
+ "own-or": "^1.0.0",
+ "own-or-env": "^1.0.2",
+ "signal-exit": "^3.0.4",
+ "stack-utils": "^2.0.4",
+ "tap-parser": "^11.0.0",
+ "tap-yaml": "^1.0.0",
+ "tcompare": "^5.0.6",
+ "trivial-deferred": "^1.0.1"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/libtap/node_modules/minipass": {
+ "version": "3.3.6",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
+ "dev": true,
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/libtap/node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ },
+ "node_modules/locate-path": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
+ "dev": true,
+ "dependencies": {
+ "p-locate": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/lodash.flattendeep": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz",
+ "integrity": "sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==",
+ "dev": true
+ },
+ "node_modules/lru-cache": {
+ "version": "7.18.3",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz",
+ "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/lunr": {
+ "version": "2.3.9",
+ "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz",
+ "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==",
+ "dev": true
+ },
+ "node_modules/make-dir": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
+ "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
+ "dev": true,
+ "dependencies": {
+ "semver": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/make-error": {
+ "version": "1.3.6",
+ "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
+ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
+ "dev": true
+ },
+ "node_modules/marked": {
+ "version": "4.2.12",
+ "resolved": "https://registry.npmjs.org/marked/-/marked-4.2.12.tgz",
+ "integrity": "sha512-yr8hSKa3Fv4D3jdZmtMMPghgVt6TWbk86WQaWhDloQjRSQhMMYCAro7jP7VDJrjjdV8pxVxMssXS8B8Y5DZ5aw==",
+ "dev": true,
+ "bin": {
+ "marked": "bin/marked.js"
+ },
+ "engines": {
+ "node": ">= 12"
+ }
+ },
+ "node_modules/memfs": {
+ "version": "3.4.13",
+ "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.4.13.tgz",
+ "integrity": "sha512-omTM41g3Skpvx5dSYeZIbXKcXoAVc/AoMNwn9TKx++L/gaen/+4TTttmu8ZSch5vfVJ8uJvGbroTsIlslRg6lg==",
+ "dev": true,
+ "dependencies": {
+ "fs-monkey": "^1.0.3"
+ },
+ "engines": {
+ "node": ">= 4.0.0"
+ }
+ },
+ "node_modules/minimatch": {
+ "version": "8.0.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.2.tgz",
+ "integrity": "sha512-ikHGF67ODxj7vS5NKU2wvTsFLbExee+KXVCnBWh8Cg2hVJfBMQIrlo50qru/09E0EifjnU8dZhJ/iHhyXJM6Mw==",
+ "dependencies": {
+ "brace-expansion": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/minipass": {
+ "version": "4.2.5",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.5.tgz",
+ "integrity": "sha512-+yQl7SX3bIT83Lhb4BVorMAHVuqsskxRdlmO9kTpyukp8vsm2Sn/fUOV9xlnG8/a5JsypJzap21lz/y3FBMJ8Q==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/mkdirp": {
+ "version": "2.1.5",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.5.tgz",
+ "integrity": "sha512-jbjfql+shJtAPrFoKxHOXip4xS+kul9W3OzfzzrqueWK2QMGon2bFH2opl6W9EagBThjEz+iysyi/swOoVfB/w==",
+ "dev": true,
+ "bin": {
+ "mkdirp": "dist/cjs/src/bin.js"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ },
+ "node_modules/node-preload": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz",
+ "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==",
+ "dev": true,
+ "dependencies": {
+ "process-on-spawn": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/node-releases": {
+ "version": "2.0.10",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz",
+ "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==",
+ "dev": true
+ },
+ "node_modules/normalize-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/nyc": {
+ "version": "15.1.0",
+ "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz",
+ "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==",
+ "dev": true,
+ "dependencies": {
+ "@istanbuljs/load-nyc-config": "^1.0.0",
+ "@istanbuljs/schema": "^0.1.2",
+ "caching-transform": "^4.0.0",
+ "convert-source-map": "^1.7.0",
+ "decamelize": "^1.2.0",
+ "find-cache-dir": "^3.2.0",
+ "find-up": "^4.1.0",
+ "foreground-child": "^2.0.0",
+ "get-package-type": "^0.1.0",
+ "glob": "^7.1.6",
+ "istanbul-lib-coverage": "^3.0.0",
+ "istanbul-lib-hook": "^3.0.0",
+ "istanbul-lib-instrument": "^4.0.0",
+ "istanbul-lib-processinfo": "^2.0.2",
+ "istanbul-lib-report": "^3.0.0",
+ "istanbul-lib-source-maps": "^4.0.0",
+ "istanbul-reports": "^3.0.2",
+ "make-dir": "^3.0.0",
+ "node-preload": "^0.2.1",
+ "p-map": "^3.0.0",
+ "process-on-spawn": "^1.0.0",
+ "resolve-from": "^5.0.0",
+ "rimraf": "^3.0.0",
+ "signal-exit": "^3.0.2",
+ "spawn-wrap": "^2.0.0",
+ "test-exclude": "^6.0.0",
+ "yargs": "^15.0.2"
+ },
+ "bin": {
+ "nyc": "bin/nyc.js"
+ },
+ "engines": {
+ "node": ">=8.9"
+ }
+ },
+ "node_modules/nyc/node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/nyc/node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/nyc/node_modules/cliui": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
+ "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
+ "dev": true,
+ "dependencies": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.0",
+ "wrap-ansi": "^6.2.0"
+ }
+ },
+ "node_modules/nyc/node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/nyc/node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "node_modules/nyc/node_modules/find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "dev": true,
+ "dependencies": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/nyc/node_modules/glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "dev": true,
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/nyc/node_modules/locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "dev": true,
+ "dependencies": {
+ "p-locate": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/nyc/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/nyc/node_modules/p-limit": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+ "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+ "dev": true,
+ "dependencies": {
+ "p-try": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/nyc/node_modules/p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "dev": true,
+ "dependencies": {
+ "p-limit": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/nyc/node_modules/rimraf": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+ "dev": true,
+ "dependencies": {
+ "glob": "^7.1.3"
+ },
+ "bin": {
+ "rimraf": "bin.js"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/nyc/node_modules/wrap-ansi": {
+ "version": "6.2.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
+ "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/nyc/node_modules/y18n": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz",
+ "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==",
+ "dev": true
+ },
+ "node_modules/nyc/node_modules/yargs": {
+ "version": "15.4.1",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
+ "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
+ "dev": true,
+ "dependencies": {
+ "cliui": "^6.0.0",
+ "decamelize": "^1.2.0",
+ "find-up": "^4.1.0",
+ "get-caller-file": "^2.0.1",
+ "require-directory": "^2.1.1",
+ "require-main-filename": "^2.0.0",
+ "set-blocking": "^2.0.0",
+ "string-width": "^4.2.0",
+ "which-module": "^2.0.0",
+ "y18n": "^4.0.0",
+ "yargs-parser": "^18.1.2"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/nyc/node_modules/yargs-parser": {
+ "version": "18.1.3",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
+ "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
+ "dev": true,
+ "dependencies": {
+ "camelcase": "^5.0.0",
+ "decamelize": "^1.2.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+ "dev": true,
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/opener": {
+ "version": "1.5.2",
+ "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz",
+ "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==",
+ "dev": true,
+ "bin": {
+ "opener": "bin/opener-bin.js"
+ }
+ },
+ "node_modules/own-or": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/own-or/-/own-or-1.0.0.tgz",
+ "integrity": "sha512-NfZr5+Tdf6MB8UI9GLvKRs4cXY8/yB0w3xtt84xFdWy8hkGjn+JFc60VhzS/hFRfbyxFcGYMTjnF4Me+RbbqrA==",
+ "dev": true
+ },
+ "node_modules/own-or-env": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/own-or-env/-/own-or-env-1.0.2.tgz",
+ "integrity": "sha512-NQ7v0fliWtK7Lkb+WdFqe6ky9XAzYmlkXthQrBbzlYbmFKoAYbDDcwmOm6q8kOuwSRXW8bdL5ORksploUJmWgw==",
+ "dev": true,
+ "dependencies": {
+ "own-or": "^1.0.0"
+ }
+ },
+ "node_modules/p-limit": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
+ "dev": true,
+ "dependencies": {
+ "yocto-queue": "^0.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-locate": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
+ "dev": true,
+ "dependencies": {
+ "p-limit": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-map": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz",
+ "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==",
+ "dev": true,
+ "dependencies": {
+ "aggregate-error": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/p-try": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
+ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/package-hash": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz",
+ "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==",
+ "dev": true,
+ "dependencies": {
+ "graceful-fs": "^4.1.15",
+ "hasha": "^5.0.0",
+ "lodash.flattendeep": "^4.4.0",
+ "release-zalgo": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/path-key": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-scurry": {
+ "version": "1.6.1",
+ "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.6.1.tgz",
+ "integrity": "sha512-OW+5s+7cw6253Q4E+8qQ/u1fVvcJQCJo/VFD8pje+dbJCF1n5ZRMV2AEHbGp+5Q7jxQIYJxkHopnj6nzdGeZLA==",
+ "dependencies": {
+ "lru-cache": "^7.14.1",
+ "minipass": "^4.0.2"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/picocolors": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
+ "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
+ "dev": true
+ },
+ "node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "dev": true,
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/pkg-dir": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
+ "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
+ "dev": true,
+ "dependencies": {
+ "find-up": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/pkg-dir/node_modules/find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "dev": true,
+ "dependencies": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/pkg-dir/node_modules/locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "dev": true,
+ "dependencies": {
+ "p-locate": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/pkg-dir/node_modules/p-limit": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+ "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+ "dev": true,
+ "dependencies": {
+ "p-try": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/pkg-dir/node_modules/p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "dev": true,
+ "dependencies": {
+ "p-limit": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/prettier": {
+ "version": "2.8.5",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.5.tgz",
+ "integrity": "sha512-3gzuxrHbKUePRBB4ZeU08VNkUcqEHaUaouNt0m7LGP4Hti/NuB07C7PPTM/LkWqXoJYJn2McEo5+kxPNrtQkLQ==",
+ "dev": true,
+ "bin": {
+ "prettier": "bin-prettier.js"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ },
+ "funding": {
+ "url": "https://github.com/prettier/prettier?sponsor=1"
+ }
+ },
+ "node_modules/process-on-spawn": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz",
+ "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==",
+ "dev": true,
+ "dependencies": {
+ "fromentries": "^1.2.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/punycode": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz",
+ "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/readdirp": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+ "dev": true,
+ "dependencies": {
+ "picomatch": "^2.2.1"
+ },
+ "engines": {
+ "node": ">=8.10.0"
+ }
+ },
+ "node_modules/release-zalgo": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz",
+ "integrity": "sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA==",
+ "dev": true,
+ "dependencies": {
+ "es6-error": "^4.0.1"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/require-directory": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/require-main-filename": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
+ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
+ "dev": true
+ },
+ "node_modules/resolve-from": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
+ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/rimraf": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.4.0.tgz",
+ "integrity": "sha512-X36S+qpCUR0HjXlkDe4NAOhS//aHH0Z+h8Ckf2auGJk3PTnx5rLmrHkwNdbVQuCSUhOyFrlRvFEllZOYE+yZGQ==",
+ "dev": true,
+ "dependencies": {
+ "glob": "^9.2.0"
+ },
+ "bin": {
+ "rimraf": "dist/cjs/src/bin.js"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/semver": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+ "dev": true,
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/set-blocking": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
+ "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",
+ "dev": true
+ },
+ "node_modules/shebang-command": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "dev": true,
+ "dependencies": {
+ "shebang-regex": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shiki": {
+ "version": "0.14.1",
+ "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.1.tgz",
+ "integrity": "sha512-+Jz4nBkCBe0mEDqo1eKRcCdjRtrCjozmcbTUjbPTX7OOJfEbTZzlUWlZtGe3Gb5oV1/jnojhG//YZc3rs9zSEw==",
+ "dev": true,
+ "dependencies": {
+ "ansi-sequence-parser": "^1.1.0",
+ "jsonc-parser": "^3.2.0",
+ "vscode-oniguruma": "^1.7.0",
+ "vscode-textmate": "^8.0.0"
+ }
+ },
+ "node_modules/signal-exit": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
+ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
+ "dev": true
+ },
+ "node_modules/source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/source-map-support": {
+ "version": "0.5.21",
+ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
+ "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
+ "dev": true,
+ "dependencies": {
+ "buffer-from": "^1.0.0",
+ "source-map": "^0.6.0"
+ }
+ },
+ "node_modules/spawn-wrap": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz",
+ "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==",
+ "dev": true,
+ "dependencies": {
+ "foreground-child": "^2.0.0",
+ "is-windows": "^1.0.2",
+ "make-dir": "^3.0.0",
+ "rimraf": "^3.0.0",
+ "signal-exit": "^3.0.2",
+ "which": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/spawn-wrap/node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/spawn-wrap/node_modules/glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "dev": true,
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/spawn-wrap/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/spawn-wrap/node_modules/rimraf": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+ "dev": true,
+ "dependencies": {
+ "glob": "^7.1.3"
+ },
+ "bin": {
+ "rimraf": "bin.js"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/sprintf-js": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
+ "dev": true
+ },
+ "node_modules/stack-utils": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz",
+ "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==",
+ "dev": true,
+ "dependencies": {
+ "escape-string-regexp": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/stack-utils/node_modules/escape-string-regexp": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
+ "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dev": true,
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/strip-bom": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz",
+ "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tap": {
+ "version": "16.3.4",
+ "resolved": "https://registry.npmjs.org/tap/-/tap-16.3.4.tgz",
+ "integrity": "sha512-SAexdt2ZF4XBgye6TPucFI2y7VE0qeFXlXucJIV1XDPCs+iJodk0MYacr1zR6Ycltzz7PYg8zrblDXKbAZM2LQ==",
+ "bundleDependencies": [
+ "ink",
+ "treport",
+ "@types/react",
+ "@isaacs/import-jsx",
+ "react"
+ ],
+ "dev": true,
+ "dependencies": {
+ "@isaacs/import-jsx": "^4.0.1",
+ "@types/react": "^17.0.52",
+ "chokidar": "^3.3.0",
+ "findit": "^2.0.0",
+ "foreground-child": "^2.0.0",
+ "fs-exists-cached": "^1.0.0",
+ "glob": "^7.2.3",
+ "ink": "^3.2.0",
+ "isexe": "^2.0.0",
+ "istanbul-lib-processinfo": "^2.0.3",
+ "jackspeak": "^1.4.2",
+ "libtap": "^1.4.0",
+ "minipass": "^3.3.4",
+ "mkdirp": "^1.0.4",
+ "nyc": "^15.1.0",
+ "opener": "^1.5.1",
+ "react": "^17.0.2",
+ "rimraf": "^3.0.0",
+ "signal-exit": "^3.0.6",
+ "source-map-support": "^0.5.16",
+ "tap-mocha-reporter": "^5.0.3",
+ "tap-parser": "^11.0.2",
+ "tap-yaml": "^1.0.2",
+ "tcompare": "^5.0.7",
+ "treport": "^3.0.4",
+ "which": "^2.0.2"
+ },
+ "bin": {
+ "tap": "bin/run.js"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ },
+ "peerDependencies": {
+ "coveralls": "^3.1.1",
+ "flow-remove-types": ">=2.112.0",
+ "ts-node": ">=8.5.2",
+ "typescript": ">=3.7.2"
+ },
+ "peerDependenciesMeta": {
+ "coveralls": {
+ "optional": true
+ },
+ "flow-remove-types": {
+ "optional": true
+ },
+ "ts-node": {
+ "optional": true
+ },
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/tap-mocha-reporter": {
+ "version": "5.0.3",
+ "resolved": "https://registry.npmjs.org/tap-mocha-reporter/-/tap-mocha-reporter-5.0.3.tgz",
+ "integrity": "sha512-6zlGkaV4J+XMRFkN0X+yuw6xHbE9jyCZ3WUKfw4KxMyRGOpYSRuuQTRJyWX88WWuLdVTuFbxzwXhXuS2XE6o0g==",
+ "dev": true,
+ "dependencies": {
+ "color-support": "^1.1.0",
+ "debug": "^4.1.1",
+ "diff": "^4.0.1",
+ "escape-string-regexp": "^2.0.0",
+ "glob": "^7.0.5",
+ "tap-parser": "^11.0.0",
+ "tap-yaml": "^1.0.0",
+ "unicode-length": "^2.0.2"
+ },
+ "bin": {
+ "tap-mocha-reporter": "index.js"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/tap-mocha-reporter/node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/tap-mocha-reporter/node_modules/escape-string-regexp": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
+ "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tap-mocha-reporter/node_modules/glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "dev": true,
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/tap-mocha-reporter/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/tap-parser": {
+ "version": "11.0.2",
+ "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-11.0.2.tgz",
+ "integrity": "sha512-6qGlC956rcORw+fg7Fv1iCRAY8/bU9UabUAhs3mXRH6eRmVZcNPLheSXCYaVaYeSwx5xa/1HXZb1537YSvwDZg==",
+ "dev": true,
+ "dependencies": {
+ "events-to-array": "^1.0.1",
+ "minipass": "^3.1.6",
+ "tap-yaml": "^1.0.0"
+ },
+ "bin": {
+ "tap-parser": "bin/cmd.js"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/tap-parser/node_modules/minipass": {
+ "version": "3.3.6",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
+ "dev": true,
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tap-parser/node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ },
+ "node_modules/tap-yaml": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/tap-yaml/-/tap-yaml-1.0.2.tgz",
+ "integrity": "sha512-GegASpuqBnRNdT1U+yuUPZ8rEU64pL35WPBpCISWwff4dErS2/438barz7WFJl4Nzh3Y05tfPidZnH+GaV1wMg==",
+ "dev": true,
+ "dependencies": {
+ "yaml": "^1.10.2"
+ }
+ },
+ "node_modules/tap/node_modules/@ampproject/remapping": {
+ "version": "2.1.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@jridgewell/trace-mapping": "^0.3.0"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/code-frame": {
+ "version": "7.16.7",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/highlight": "^7.16.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/compat-data": {
+ "version": "7.17.7",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/core": {
+ "version": "7.17.8",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@ampproject/remapping": "^2.1.0",
+ "@babel/code-frame": "^7.16.7",
+ "@babel/generator": "^7.17.7",
+ "@babel/helper-compilation-targets": "^7.17.7",
+ "@babel/helper-module-transforms": "^7.17.7",
+ "@babel/helpers": "^7.17.8",
+ "@babel/parser": "^7.17.8",
+ "@babel/template": "^7.16.7",
+ "@babel/traverse": "^7.17.3",
+ "@babel/types": "^7.17.0",
+ "convert-source-map": "^1.7.0",
+ "debug": "^4.1.0",
+ "gensync": "^1.0.0-beta.2",
+ "json5": "^2.1.2",
+ "semver": "^6.3.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/babel"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/generator": {
+ "version": "7.17.7",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.17.0",
+ "jsesc": "^2.5.1",
+ "source-map": "^0.5.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/helper-annotate-as-pure": {
+ "version": "7.16.7",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.16.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/helper-compilation-targets": {
+ "version": "7.17.7",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/compat-data": "^7.17.7",
+ "@babel/helper-validator-option": "^7.16.7",
+ "browserslist": "^4.17.5",
+ "semver": "^6.3.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/helper-environment-visitor": {
+ "version": "7.16.7",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.16.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/helper-function-name": {
+ "version": "7.16.7",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-get-function-arity": "^7.16.7",
+ "@babel/template": "^7.16.7",
+ "@babel/types": "^7.16.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/helper-get-function-arity": {
+ "version": "7.16.7",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.16.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/helper-hoist-variables": {
+ "version": "7.16.7",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.16.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/helper-module-imports": {
+ "version": "7.16.7",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.16.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/helper-module-transforms": {
+ "version": "7.17.7",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-environment-visitor": "^7.16.7",
+ "@babel/helper-module-imports": "^7.16.7",
+ "@babel/helper-simple-access": "^7.17.7",
+ "@babel/helper-split-export-declaration": "^7.16.7",
+ "@babel/helper-validator-identifier": "^7.16.7",
+ "@babel/template": "^7.16.7",
+ "@babel/traverse": "^7.17.3",
+ "@babel/types": "^7.17.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/helper-plugin-utils": {
+ "version": "7.16.7",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/helper-simple-access": {
+ "version": "7.17.7",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.17.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/helper-split-export-declaration": {
+ "version": "7.16.7",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.16.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/helper-validator-identifier": {
+ "version": "7.16.7",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/helper-validator-option": {
+ "version": "7.16.7",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/helpers": {
+ "version": "7.17.8",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/template": "^7.16.7",
+ "@babel/traverse": "^7.17.3",
+ "@babel/types": "^7.17.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/highlight": {
+ "version": "7.16.10",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-validator-identifier": "^7.16.7",
+ "chalk": "^2.0.0",
+ "js-tokens": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/parser": {
+ "version": "7.17.8",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "bin": {
+ "parser": "bin/babel-parser.js"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/plugin-proposal-object-rest-spread": {
+ "version": "7.17.3",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/compat-data": "^7.17.0",
+ "@babel/helper-compilation-targets": "^7.16.7",
+ "@babel/helper-plugin-utils": "^7.16.7",
+ "@babel/plugin-syntax-object-rest-spread": "^7.8.3",
+ "@babel/plugin-transform-parameters": "^7.16.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/plugin-syntax-jsx": {
+ "version": "7.16.7",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.16.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/plugin-syntax-object-rest-spread": {
+ "version": "7.8.3",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/plugin-transform-destructuring": {
+ "version": "7.17.7",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.16.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/plugin-transform-parameters": {
+ "version": "7.16.7",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.16.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/plugin-transform-react-jsx": {
+ "version": "7.17.3",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.16.7",
+ "@babel/helper-module-imports": "^7.16.7",
+ "@babel/helper-plugin-utils": "^7.16.7",
+ "@babel/plugin-syntax-jsx": "^7.16.7",
+ "@babel/types": "^7.17.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/template": {
+ "version": "7.16.7",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.16.7",
+ "@babel/parser": "^7.16.7",
+ "@babel/types": "^7.16.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/traverse": {
+ "version": "7.17.3",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.16.7",
+ "@babel/generator": "^7.17.3",
+ "@babel/helper-environment-visitor": "^7.16.7",
+ "@babel/helper-function-name": "^7.16.7",
+ "@babel/helper-hoist-variables": "^7.16.7",
+ "@babel/helper-split-export-declaration": "^7.16.7",
+ "@babel/parser": "^7.17.3",
+ "@babel/types": "^7.17.0",
+ "debug": "^4.1.0",
+ "globals": "^11.1.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/tap/node_modules/@babel/types": {
+ "version": "7.17.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-validator-identifier": "^7.16.7",
+ "to-fast-properties": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/tap/node_modules/@isaacs/import-jsx": {
+ "version": "4.0.1",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/core": "^7.5.5",
+ "@babel/plugin-proposal-object-rest-spread": "^7.5.5",
+ "@babel/plugin-transform-destructuring": "^7.5.0",
+ "@babel/plugin-transform-react-jsx": "^7.3.0",
+ "caller-path": "^3.0.1",
+ "find-cache-dir": "^3.2.0",
+ "make-dir": "^3.0.2",
+ "resolve-from": "^3.0.0",
+ "rimraf": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/tap/node_modules/@jridgewell/resolve-uri": {
+ "version": "3.0.5",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/tap/node_modules/@jridgewell/sourcemap-codec": {
+ "version": "1.4.11",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT"
+ },
+ "node_modules/tap/node_modules/@jridgewell/trace-mapping": {
+ "version": "0.3.4",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/resolve-uri": "^3.0.3",
+ "@jridgewell/sourcemap-codec": "^1.4.10"
+ }
+ },
+ "node_modules/tap/node_modules/@types/prop-types": {
+ "version": "15.7.4",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT"
+ },
+ "node_modules/tap/node_modules/@types/react": {
+ "version": "17.0.52",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/prop-types": "*",
+ "@types/scheduler": "*",
+ "csstype": "^3.0.2"
+ }
+ },
+ "node_modules/tap/node_modules/@types/scheduler": {
+ "version": "0.16.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT"
+ },
+ "node_modules/tap/node_modules/@types/yoga-layout": {
+ "version": "1.9.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT"
+ },
+ "node_modules/tap/node_modules/ansi-escapes": {
+ "version": "4.3.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "type-fest": "^0.21.3"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/tap/node_modules/ansi-escapes/node_modules/type-fest": {
+ "version": "0.21.3",
+ "dev": true,
+ "inBundle": true,
+ "license": "(MIT OR CC0-1.0)",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/tap/node_modules/ansi-regex": {
+ "version": "5.0.1",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tap/node_modules/ansi-styles": {
+ "version": "3.2.1",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "color-convert": "^1.9.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/tap/node_modules/ansicolors": {
+ "version": "0.3.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT"
+ },
+ "node_modules/tap/node_modules/astral-regex": {
+ "version": "2.0.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tap/node_modules/auto-bind": {
+ "version": "4.0.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/tap/node_modules/balanced-match": {
+ "version": "1.0.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT"
+ },
+ "node_modules/tap/node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/tap/node_modules/browserslist": {
+ "version": "4.20.2",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
+ }
+ ],
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "caniuse-lite": "^1.0.30001317",
+ "electron-to-chromium": "^1.4.84",
+ "escalade": "^3.1.1",
+ "node-releases": "^2.0.2",
+ "picocolors": "^1.0.0"
+ },
+ "bin": {
+ "browserslist": "cli.js"
+ },
+ "engines": {
+ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
+ }
+ },
+ "node_modules/tap/node_modules/caller-callsite": {
+ "version": "4.1.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "callsites": "^3.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tap/node_modules/caller-path": {
+ "version": "3.0.1",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "caller-callsite": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tap/node_modules/callsites": {
+ "version": "3.1.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/tap/node_modules/caniuse-lite": {
+ "version": "1.0.30001319",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
+ }
+ ],
+ "inBundle": true,
+ "license": "CC-BY-4.0"
+ },
+ "node_modules/tap/node_modules/cardinal": {
+ "version": "2.1.1",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansicolors": "~0.3.2",
+ "redeyed": "~2.1.0"
+ },
+ "bin": {
+ "cdl": "bin/cdl.js"
+ }
+ },
+ "node_modules/tap/node_modules/chalk": {
+ "version": "2.4.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/tap/node_modules/ci-info": {
+ "version": "2.0.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT"
+ },
+ "node_modules/tap/node_modules/cli-boxes": {
+ "version": "2.2.1",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/tap/node_modules/cli-cursor": {
+ "version": "3.1.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "restore-cursor": "^3.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tap/node_modules/cli-truncate": {
+ "version": "2.1.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "slice-ansi": "^3.0.0",
+ "string-width": "^4.2.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/tap/node_modules/code-excerpt": {
+ "version": "3.0.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "convert-to-spaces": "^1.0.1"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/tap/node_modules/color-convert": {
+ "version": "1.9.3",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "color-name": "1.1.3"
+ }
+ },
+ "node_modules/tap/node_modules/color-name": {
+ "version": "1.1.3",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT"
+ },
+ "node_modules/tap/node_modules/commondir": {
+ "version": "1.0.1",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT"
+ },
+ "node_modules/tap/node_modules/concat-map": {
+ "version": "0.0.1",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT"
+ },
+ "node_modules/tap/node_modules/convert-source-map": {
+ "version": "1.8.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "safe-buffer": "~5.1.1"
+ }
+ },
+ "node_modules/tap/node_modules/convert-to-spaces": {
+ "version": "1.0.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/tap/node_modules/csstype": {
+ "version": "3.0.11",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT"
+ },
+ "node_modules/tap/node_modules/debug": {
+ "version": "4.3.4",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/tap/node_modules/electron-to-chromium": {
+ "version": "1.4.89",
+ "dev": true,
+ "inBundle": true,
+ "license": "ISC"
+ },
+ "node_modules/tap/node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT"
+ },
+ "node_modules/tap/node_modules/escalade": {
+ "version": "3.1.1",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/tap/node_modules/escape-string-regexp": {
+ "version": "1.0.5",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/tap/node_modules/esprima": {
+ "version": "4.0.1",
+ "dev": true,
+ "inBundle": true,
+ "license": "BSD-2-Clause",
+ "bin": {
+ "esparse": "bin/esparse.js",
+ "esvalidate": "bin/esvalidate.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/tap/node_modules/events-to-array": {
+ "version": "1.1.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "ISC"
+ },
+ "node_modules/tap/node_modules/find-cache-dir": {
+ "version": "3.3.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "commondir": "^1.0.1",
+ "make-dir": "^3.0.2",
+ "pkg-dir": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/avajs/find-cache-dir?sponsor=1"
+ }
+ },
+ "node_modules/tap/node_modules/find-up": {
+ "version": "4.1.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tap/node_modules/fs.realpath": {
+ "version": "1.0.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "ISC"
+ },
+ "node_modules/tap/node_modules/gensync": {
+ "version": "1.0.0-beta.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/tap/node_modules/glob": {
+ "version": "7.2.3",
+ "dev": true,
+ "inBundle": true,
+ "license": "ISC",
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/tap/node_modules/globals": {
+ "version": "11.12.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/tap/node_modules/has-flag": {
+ "version": "3.0.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/tap/node_modules/indent-string": {
+ "version": "4.0.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tap/node_modules/inflight": {
+ "version": "1.0.6",
+ "dev": true,
+ "inBundle": true,
+ "license": "ISC",
+ "dependencies": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "node_modules/tap/node_modules/inherits": {
+ "version": "2.0.4",
+ "dev": true,
+ "inBundle": true,
+ "license": "ISC"
+ },
+ "node_modules/tap/node_modules/ink": {
+ "version": "3.2.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansi-escapes": "^4.2.1",
+ "auto-bind": "4.0.0",
+ "chalk": "^4.1.0",
+ "cli-boxes": "^2.2.0",
+ "cli-cursor": "^3.1.0",
+ "cli-truncate": "^2.1.0",
+ "code-excerpt": "^3.0.0",
+ "indent-string": "^4.0.0",
+ "is-ci": "^2.0.0",
+ "lodash": "^4.17.20",
+ "patch-console": "^1.0.0",
+ "react-devtools-core": "^4.19.1",
+ "react-reconciler": "^0.26.2",
+ "scheduler": "^0.20.2",
+ "signal-exit": "^3.0.2",
+ "slice-ansi": "^3.0.0",
+ "stack-utils": "^2.0.2",
+ "string-width": "^4.2.2",
+ "type-fest": "^0.12.0",
+ "widest-line": "^3.1.0",
+ "wrap-ansi": "^6.2.0",
+ "ws": "^7.5.5",
+ "yoga-layout-prebuilt": "^1.9.6"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "peerDependencies": {
+ "@types/react": ">=16.8.0",
+ "react": ">=16.8.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/tap/node_modules/ink/node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/tap/node_modules/ink/node_modules/chalk": {
+ "version": "4.1.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/tap/node_modules/ink/node_modules/color-convert": {
+ "version": "2.0.1",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/tap/node_modules/ink/node_modules/color-name": {
+ "version": "1.1.4",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT"
+ },
+ "node_modules/tap/node_modules/ink/node_modules/has-flag": {
+ "version": "4.0.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tap/node_modules/ink/node_modules/supports-color": {
+ "version": "7.2.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tap/node_modules/is-ci": {
+ "version": "2.0.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "ci-info": "^2.0.0"
+ },
+ "bin": {
+ "is-ci": "bin.js"
+ }
+ },
+ "node_modules/tap/node_modules/is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tap/node_modules/js-tokens": {
+ "version": "4.0.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT"
+ },
+ "node_modules/tap/node_modules/jsesc": {
+ "version": "2.5.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "bin": {
+ "jsesc": "bin/jsesc"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/tap/node_modules/json5": {
+ "version": "2.2.3",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "bin": {
+ "json5": "lib/cli.js"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/tap/node_modules/locate-path": {
+ "version": "5.0.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "p-locate": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tap/node_modules/lodash": {
+ "version": "4.17.21",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT"
+ },
+ "node_modules/tap/node_modules/loose-envify": {
+ "version": "1.4.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "js-tokens": "^3.0.0 || ^4.0.0"
+ },
+ "bin": {
+ "loose-envify": "cli.js"
+ }
+ },
+ "node_modules/tap/node_modules/make-dir": {
+ "version": "3.1.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "semver": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/tap/node_modules/mimic-fn": {
+ "version": "2.1.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/tap/node_modules/minimatch": {
+ "version": "3.1.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "ISC",
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/tap/node_modules/minipass": {
+ "version": "3.3.4",
+ "dev": true,
+ "inBundle": true,
+ "license": "ISC",
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tap/node_modules/mkdirp": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
+ "dev": true,
+ "bin": {
+ "mkdirp": "bin/cmd.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/tap/node_modules/ms": {
+ "version": "2.1.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT"
+ },
+ "node_modules/tap/node_modules/node-releases": {
+ "version": "2.0.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT"
+ },
+ "node_modules/tap/node_modules/object-assign": {
+ "version": "4.1.1",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/tap/node_modules/once": {
+ "version": "1.4.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "ISC",
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/tap/node_modules/onetime": {
+ "version": "5.1.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "mimic-fn": "^2.1.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/tap/node_modules/p-limit": {
+ "version": "2.3.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "p-try": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/tap/node_modules/p-locate": {
+ "version": "4.1.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "p-limit": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tap/node_modules/p-try": {
+ "version": "2.2.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/tap/node_modules/patch-console": {
+ "version": "1.0.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/tap/node_modules/path-exists": {
+ "version": "4.0.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tap/node_modules/path-is-absolute": {
+ "version": "1.0.1",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/tap/node_modules/picocolors": {
+ "version": "1.0.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "ISC"
+ },
+ "node_modules/tap/node_modules/pkg-dir": {
+ "version": "4.2.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "find-up": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tap/node_modules/punycode": {
+ "version": "2.1.1",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/tap/node_modules/react": {
+ "version": "17.0.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "loose-envify": "^1.1.0",
+ "object-assign": "^4.1.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/tap/node_modules/react-devtools-core": {
+ "version": "4.24.1",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "shell-quote": "^1.6.1",
+ "ws": "^7"
+ }
+ },
+ "node_modules/tap/node_modules/react-reconciler": {
+ "version": "0.26.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "loose-envify": "^1.1.0",
+ "object-assign": "^4.1.1",
+ "scheduler": "^0.20.2"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "peerDependencies": {
+ "react": "^17.0.2"
+ }
+ },
+ "node_modules/tap/node_modules/redeyed": {
+ "version": "2.1.1",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "esprima": "~4.0.0"
+ }
+ },
+ "node_modules/tap/node_modules/resolve-from": {
+ "version": "3.0.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/tap/node_modules/restore-cursor": {
+ "version": "3.1.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "onetime": "^5.1.0",
+ "signal-exit": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tap/node_modules/rimraf": {
+ "version": "3.0.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "ISC",
+ "dependencies": {
+ "glob": "^7.1.3"
+ },
+ "bin": {
+ "rimraf": "bin.js"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/tap/node_modules/safe-buffer": {
+ "version": "5.1.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT"
+ },
+ "node_modules/tap/node_modules/scheduler": {
+ "version": "0.20.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "loose-envify": "^1.1.0",
+ "object-assign": "^4.1.1"
+ }
+ },
+ "node_modules/tap/node_modules/semver": {
+ "version": "6.3.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/tap/node_modules/shell-quote": {
+ "version": "1.7.3",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT"
+ },
+ "node_modules/tap/node_modules/signal-exit": {
+ "version": "3.0.7",
+ "dev": true,
+ "inBundle": true,
+ "license": "ISC"
+ },
+ "node_modules/tap/node_modules/slice-ansi": {
+ "version": "3.0.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^4.0.0",
+ "astral-regex": "^2.0.0",
+ "is-fullwidth-code-point": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tap/node_modules/slice-ansi/node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/tap/node_modules/slice-ansi/node_modules/color-convert": {
+ "version": "2.0.1",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/tap/node_modules/slice-ansi/node_modules/color-name": {
+ "version": "1.1.4",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT"
+ },
+ "node_modules/tap/node_modules/source-map": {
+ "version": "0.5.7",
+ "dev": true,
+ "inBundle": true,
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/tap/node_modules/stack-utils": {
+ "version": "2.0.5",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "escape-string-regexp": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/tap/node_modules/stack-utils/node_modules/escape-string-regexp": {
+ "version": "2.0.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tap/node_modules/string-width": {
+ "version": "4.2.3",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tap/node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tap/node_modules/supports-color": {
+ "version": "5.5.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/tap/node_modules/tap-parser": {
+ "version": "11.0.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "events-to-array": "^1.0.1",
+ "minipass": "^3.1.6",
+ "tap-yaml": "^1.0.0"
+ },
+ "bin": {
+ "tap-parser": "bin/cmd.js"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/tap/node_modules/tap-yaml": {
+ "version": "1.0.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "ISC",
+ "dependencies": {
+ "yaml": "^1.10.2"
+ }
+ },
+ "node_modules/tap/node_modules/to-fast-properties": {
+ "version": "2.0.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/tap/node_modules/treport": {
+ "version": "3.0.4",
+ "dev": true,
+ "inBundle": true,
+ "license": "ISC",
+ "dependencies": {
+ "@isaacs/import-jsx": "^4.0.1",
+ "cardinal": "^2.1.1",
+ "chalk": "^3.0.0",
+ "ink": "^3.2.0",
+ "ms": "^2.1.2",
+ "tap-parser": "^11.0.0",
+ "tap-yaml": "^1.0.0",
+ "unicode-length": "^2.0.2"
+ },
+ "peerDependencies": {
+ "react": "^17.0.2"
}
},
- "oauth-sign": {
- "version": "0.9.0",
- "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
- "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==",
- "dev": true
+ "node_modules/tap/node_modules/treport/node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
},
- "once": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
- "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
- "requires": {
- "wrappy": "1"
+ "node_modules/tap/node_modules/treport/node_modules/chalk": {
+ "version": "3.0.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=8"
}
},
- "opener": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.0.tgz",
- "integrity": "sha512-MD4s/o61y2slS27zm2s4229V2gAUHX0/e3/XOmY/jsXwhysjjCIHN8lx7gqZCrZk19ym+HjCUWHeMKD7YJtKCQ==",
- "dev": true
+ "node_modules/tap/node_modules/treport/node_modules/color-convert": {
+ "version": "2.0.1",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
},
- "os-homedir": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
- "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
- "dev": true
+ "node_modules/tap/node_modules/treport/node_modules/color-name": {
+ "version": "1.1.4",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT"
},
- "own-or": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/own-or/-/own-or-1.0.0.tgz",
- "integrity": "sha1-Tod/vtqaLsgAD7wLyuOWRe6L+Nw=",
- "dev": true
+ "node_modules/tap/node_modules/treport/node_modules/has-flag": {
+ "version": "4.0.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
},
- "own-or-env": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/own-or-env/-/own-or-env-1.0.1.tgz",
- "integrity": "sha512-y8qULRbRAlL6x2+M0vIe7jJbJx/kmUTzYonRAa2ayesR2qWLswninkVyeJe4x3IEXhdgoNodzjQRKAoEs6Fmrw==",
+ "node_modules/tap/node_modules/treport/node_modules/supports-color": {
+ "version": "7.2.0",
"dev": true,
- "requires": {
- "own-or": "^1.0.0"
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
}
},
- "path-is-absolute": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
- "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
+ "node_modules/tap/node_modules/type-fest": {
+ "version": "0.12.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "(MIT OR CC0-1.0)",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
},
- "performance-now": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
- "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
- "dev": true
+ "node_modules/tap/node_modules/unicode-length": {
+ "version": "2.0.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "punycode": "^2.0.0",
+ "strip-ansi": "^3.0.1"
+ }
},
- "process-nextick-args": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
- "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
+ "node_modules/tap/node_modules/unicode-length/node_modules/ansi-regex": {
+ "version": "2.1.1",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/tap/node_modules/unicode-length/node_modules/strip-ansi": {
+ "version": "3.0.1",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansi-regex": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/tap/node_modules/widest-line": {
+ "version": "3.1.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "string-width": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tap/node_modules/wrap-ansi": {
+ "version": "6.2.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tap/node_modules/wrap-ansi/node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/tap/node_modules/wrap-ansi/node_modules/color-convert": {
+ "version": "2.0.1",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/tap/node_modules/wrap-ansi/node_modules/color-name": {
+ "version": "1.1.4",
"dev": true,
- "optional": true
+ "inBundle": true,
+ "license": "MIT"
},
- "pseudomap": {
+ "node_modules/tap/node_modules/wrappy": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
- "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
- "dev": true
+ "dev": true,
+ "inBundle": true,
+ "license": "ISC"
},
- "psl": {
- "version": "1.1.29",
- "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz",
- "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==",
- "dev": true
+ "node_modules/tap/node_modules/ws": {
+ "version": "7.5.7",
+ "dev": true,
+ "inBundle": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.3.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": "^5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
},
- "punycode": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
- "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
- "dev": true
+ "node_modules/tap/node_modules/yallist": {
+ "version": "4.0.0",
+ "dev": true,
+ "inBundle": true,
+ "license": "ISC"
},
- "qs": {
- "version": "6.5.2",
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
- "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
- "dev": true
+ "node_modules/tap/node_modules/yaml": {
+ "version": "1.10.2",
+ "dev": true,
+ "inBundle": true,
+ "license": "ISC",
+ "engines": {
+ "node": ">= 6"
+ }
},
- "readable-stream": {
- "version": "2.3.6",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
- "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "node_modules/tap/node_modules/yoga-layout-prebuilt": {
+ "version": "1.10.0",
"dev": true,
- "optional": true,
- "requires": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.3",
- "isarray": "~1.0.0",
- "process-nextick-args": "~2.0.0",
- "safe-buffer": "~5.1.1",
- "string_decoder": "~1.1.1",
- "util-deprecate": "~1.0.1"
- }
- },
- "request": {
- "version": "2.88.0",
- "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz",
- "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==",
- "dev": true,
- "requires": {
- "aws-sign2": "~0.7.0",
- "aws4": "^1.8.0",
- "caseless": "~0.12.0",
- "combined-stream": "~1.0.6",
- "extend": "~3.0.2",
- "forever-agent": "~0.6.1",
- "form-data": "~2.3.2",
- "har-validator": "~5.1.0",
- "http-signature": "~1.2.0",
- "is-typedarray": "~1.0.0",
- "isstream": "~0.1.2",
- "json-stringify-safe": "~5.0.1",
- "mime-types": "~2.1.19",
- "oauth-sign": "~0.9.0",
- "performance-now": "^2.1.0",
- "qs": "~6.5.2",
- "safe-buffer": "^5.1.2",
- "tough-cookie": "~2.4.3",
- "tunnel-agent": "^0.6.0",
- "uuid": "^3.3.2"
- }
- },
- "rimraf": {
- "version": "2.6.1",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz",
- "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=",
- "dev": true,
- "requires": {
- "glob": "^7.0.5"
- }
- },
- "safe-buffer": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
- "dev": true
+ "inBundle": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/yoga-layout": "1.9.2"
+ },
+ "engines": {
+ "node": ">=8"
+ }
},
- "safer-buffer": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
- "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
- "dev": true
+ "node_modules/tcompare": {
+ "version": "5.0.7",
+ "resolved": "https://registry.npmjs.org/tcompare/-/tcompare-5.0.7.tgz",
+ "integrity": "sha512-d9iddt6YYGgyxJw5bjsN7UJUO1kGOtjSlNy/4PoGYAjQS5pAT/hzIoLf1bZCw+uUxRmZJh7Yy1aA7xKVRT9B4w==",
+ "dev": true,
+ "dependencies": {
+ "diff": "^4.0.2"
+ },
+ "engines": {
+ "node": ">=10"
+ }
},
- "signal-exit": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
- "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
- "dev": true
+ "node_modules/test-exclude": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz",
+ "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==",
+ "dev": true,
+ "dependencies": {
+ "@istanbuljs/schema": "^0.1.2",
+ "glob": "^7.1.4",
+ "minimatch": "^3.0.4"
+ },
+ "engines": {
+ "node": ">=8"
+ }
},
- "source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "dev": true
+ "node_modules/test-exclude/node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
},
- "source-map-support": {
- "version": "0.5.9",
- "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz",
- "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==",
+ "node_modules/test-exclude/node_modules/glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
"dev": true,
- "requires": {
- "buffer-from": "^1.0.0",
- "source-map": "^0.6.0"
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
}
},
- "sprintf-js": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
- "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
- "dev": true
+ "node_modules/test-exclude/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
},
- "sshpk": {
- "version": "1.14.2",
- "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz",
- "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=",
+ "node_modules/to-fast-properties": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
+ "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==",
"dev": true,
- "requires": {
- "asn1": "~0.2.3",
- "assert-plus": "^1.0.0",
- "bcrypt-pbkdf": "^1.0.0",
- "dashdash": "^1.12.0",
- "ecc-jsbn": "~0.1.1",
- "getpass": "^0.1.1",
- "jsbn": "~0.1.0",
- "safer-buffer": "^2.0.2",
- "tweetnacl": "~0.14.0"
+ "engines": {
+ "node": ">=4"
}
},
- "stack-utils": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.1.tgz",
- "integrity": "sha1-1PM6tU6OOHeLDKXP07OvsS22hiA=",
- "dev": true
+ "node_modules/to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "dev": true,
+ "dependencies": {
+ "is-number": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
},
- "string_decoder": {
+ "node_modules/trivial-deferred": {
"version": "1.1.1",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
- "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "resolved": "https://registry.npmjs.org/trivial-deferred/-/trivial-deferred-1.1.1.tgz",
+ "integrity": "sha512-CRmSsCN0PAzyZ5hSFPByf1OPAOxVy4yLctYfrdz3zYMSxGpZI/2UjhYn22VE1iQTlasP4aLHc5/bhFb6WKJwpA==",
"dev": true,
- "optional": true,
- "requires": {
- "safe-buffer": "~5.1.0"
+ "engines": {
+ "node": ">= 8"
}
},
- "strip-ansi": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
+ "node_modules/ts-node": {
+ "version": "10.9.1",
+ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
+ "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==",
"dev": true,
- "requires": {
- "ansi-regex": "^2.0.0"
+ "dependencies": {
+ "@cspotcode/source-map-support": "^0.8.0",
+ "@tsconfig/node10": "^1.0.7",
+ "@tsconfig/node12": "^1.0.7",
+ "@tsconfig/node14": "^1.0.0",
+ "@tsconfig/node16": "^1.0.2",
+ "acorn": "^8.4.1",
+ "acorn-walk": "^8.1.1",
+ "arg": "^4.1.0",
+ "create-require": "^1.1.0",
+ "diff": "^4.0.1",
+ "make-error": "^1.1.1",
+ "v8-compile-cache-lib": "^3.0.1",
+ "yn": "3.1.1"
+ },
+ "bin": {
+ "ts-node": "dist/bin.js",
+ "ts-node-cwd": "dist/bin-cwd.js",
+ "ts-node-esm": "dist/bin-esm.js",
+ "ts-node-script": "dist/bin-script.js",
+ "ts-node-transpile-only": "dist/bin-transpile.js",
+ "ts-script": "dist/bin-script-deprecated.js"
+ },
+ "peerDependencies": {
+ "@swc/core": ">=1.2.50",
+ "@swc/wasm": ">=1.2.50",
+ "@types/node": "*",
+ "typescript": ">=2.7"
+ },
+ "peerDependenciesMeta": {
+ "@swc/core": {
+ "optional": true
+ },
+ "@swc/wasm": {
+ "optional": true
+ }
}
},
- "tap": {
- "version": "12.0.1",
- "resolved": "https://registry.npmjs.org/tap/-/tap-12.0.1.tgz",
- "integrity": "sha512-iEJytWaZy8risvfRjuV4+ST+Lrrui/MW2ZCWn01ZaMn0NKFej4+PpBy6bXGOg9+cEGNmI7d3Sdka/zTUZUGidA==",
+ "node_modules/type-fest": {
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
+ "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==",
"dev": true,
- "requires": {
- "bind-obj-methods": "^2.0.0",
- "bluebird": "^3.5.1",
- "clean-yaml-object": "^0.1.0",
- "color-support": "^1.1.0",
- "coveralls": "^3.0.1",
- "foreground-child": "^1.3.3",
- "fs-exists-cached": "^1.0.0",
- "function-loop": "^1.0.1",
- "glob": "^7.0.0",
- "isexe": "^2.0.0",
- "js-yaml": "^3.11.0",
- "minipass": "^2.3.0",
- "mkdirp": "^0.5.1",
- "nyc": "^11.8.0",
- "opener": "^1.4.1",
- "os-homedir": "^1.0.2",
- "own-or": "^1.0.0",
- "own-or-env": "^1.0.1",
- "rimraf": "^2.6.2",
- "signal-exit": "^3.0.0",
- "source-map-support": "^0.5.6",
- "stack-utils": "^1.0.0",
- "tap-mocha-reporter": "^3.0.7",
- "tap-parser": "^7.0.0",
- "tmatch": "^4.0.0",
- "trivial-deferred": "^1.0.1",
- "tsame": "^2.0.0",
- "write-file-atomic": "^2.3.0",
- "yapool": "^1.0.0"
- },
- "dependencies": {
- "rimraf": {
- "version": "2.6.2",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
- "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==",
- "dev": true,
- "requires": {
- "glob": "^7.0.5"
- }
- }
+ "engines": {
+ "node": ">=8"
}
},
- "tap-mocha-reporter": {
- "version": "3.0.7",
- "resolved": "https://registry.npmjs.org/tap-mocha-reporter/-/tap-mocha-reporter-3.0.7.tgz",
- "integrity": "sha512-GHVXJ38C3oPRpM3YUc43JlGdpVZYiKeT1fmAd3HH2+J+ZWwsNAUFvRRdoGsXLw9+gU9o+zXpBqhS/oXyRQYwlA==",
+ "node_modules/typedarray-to-buffer": {
+ "version": "3.1.5",
+ "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
+ "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
"dev": true,
- "requires": {
- "color-support": "^1.1.0",
- "debug": "^2.1.3",
- "diff": "^1.3.2",
- "escape-string-regexp": "^1.0.3",
- "glob": "^7.0.5",
- "js-yaml": "^3.3.1",
- "readable-stream": "^2.1.5",
- "tap-parser": "^5.1.0",
- "unicode-length": "^1.0.0"
- },
- "dependencies": {
- "tap-parser": {
- "version": "5.4.0",
- "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-5.4.0.tgz",
- "integrity": "sha512-BIsIaGqv7uTQgTW1KLTMNPSEQf4zDDPgYOBRdgOfuB+JFOLRBfEu6cLa/KvMvmqggu1FKXDfitjLwsq4827RvA==",
- "dev": true,
- "requires": {
- "events-to-array": "^1.0.1",
- "js-yaml": "^3.2.7",
- "readable-stream": "^2"
- }
- }
+ "dependencies": {
+ "is-typedarray": "^1.0.0"
}
},
- "tap-parser": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-7.0.0.tgz",
- "integrity": "sha512-05G8/LrzqOOFvZhhAk32wsGiPZ1lfUrl+iV7+OkKgfofZxiceZWMHkKmow71YsyVQ8IvGBP2EjcIjE5gL4l5lA==",
+ "node_modules/typedoc": {
+ "version": "0.23.28",
+ "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.23.28.tgz",
+ "integrity": "sha512-9x1+hZWTHEQcGoP7qFmlo4unUoVJLB0H/8vfO/7wqTnZxg4kPuji9y3uRzEu0ZKez63OJAUmiGhUrtukC6Uj3w==",
"dev": true,
- "requires": {
- "events-to-array": "^1.0.1",
- "js-yaml": "^3.2.7",
- "minipass": "^2.2.0"
+ "dependencies": {
+ "lunr": "^2.3.9",
+ "marked": "^4.2.12",
+ "minimatch": "^7.1.3",
+ "shiki": "^0.14.1"
+ },
+ "bin": {
+ "typedoc": "bin/typedoc"
+ },
+ "engines": {
+ "node": ">= 14.14"
+ },
+ "peerDependencies": {
+ "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x"
+ }
+ },
+ "node_modules/typedoc/node_modules/minimatch": {
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.4.tgz",
+ "integrity": "sha512-T+8B3kNrLP7jDb5eaC4rUIp6DKoeTSb6f9SwF2phcY2gxJUA0GEf1i29/FHxBMEfx0ppWlr434/D0P+6jb8bOQ==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
}
},
- "tick": {
- "version": "0.0.6",
- "resolved": "https://registry.npmjs.org/tick/-/tick-0.0.6.tgz",
- "integrity": "sha1-XvgPPRHheef+gRDMintvfF2hycQ=",
+ "node_modules/typescript": {
+ "version": "4.9.5",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
+ "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
"dev": true,
- "requires": {
- "byline": "~2.0.3"
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=4.2.0"
}
},
- "tmatch": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/tmatch/-/tmatch-4.0.0.tgz",
- "integrity": "sha512-Ynn2Gsp+oCvYScQXeV+cCs7citRDilq0qDXA6tuvFwDgiYyyaq7D5vKUlAPezzZR5NDobc/QMeN6e5guOYmvxg==",
+ "node_modules/unicode-length": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/unicode-length/-/unicode-length-2.1.0.tgz",
+ "integrity": "sha512-4bV582zTV9Q02RXBxSUMiuN/KHo5w4aTojuKTNT96DIKps/SIawFp7cS5Mu25VuY1AioGXrmYyzKZUzh8OqoUw==",
+ "dev": true,
+ "dependencies": {
+ "punycode": "^2.0.0"
+ }
+ },
+ "node_modules/update-browserslist-db": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz",
+ "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
+ }
+ ],
+ "dependencies": {
+ "escalade": "^3.1.1",
+ "picocolors": "^1.0.0"
+ },
+ "bin": {
+ "browserslist-lint": "cli.js"
+ },
+ "peerDependencies": {
+ "browserslist": ">= 4.21.0"
+ }
+ },
+ "node_modules/uuid": {
+ "version": "8.3.2",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
+ "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
+ "dev": true,
+ "bin": {
+ "uuid": "dist/bin/uuid"
+ }
+ },
+ "node_modules/v8-compile-cache-lib": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
+ "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
"dev": true
},
- "tough-cookie": {
- "version": "2.4.3",
- "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz",
- "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==",
+ "node_modules/v8-to-istanbul": {
+ "version": "9.1.0",
+ "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz",
+ "integrity": "sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==",
"dev": true,
- "requires": {
- "psl": "^1.1.24",
- "punycode": "^1.4.1"
+ "dependencies": {
+ "@jridgewell/trace-mapping": "^0.3.12",
+ "@types/istanbul-lib-coverage": "^2.0.1",
+ "convert-source-map": "^1.6.0"
+ },
+ "engines": {
+ "node": ">=10.12.0"
}
},
- "trivial-deferred": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/trivial-deferred/-/trivial-deferred-1.0.1.tgz",
- "integrity": "sha1-N21NKdlR1jaKb3oK6FwvTV4GWPM=",
+ "node_modules/vscode-oniguruma": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz",
+ "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==",
+ "dev": true
+ },
+ "node_modules/vscode-textmate": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz",
+ "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==",
"dev": true
},
- "tsame": {
+ "node_modules/which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "dev": true,
+ "dependencies": {
+ "isexe": "^2.0.0"
+ },
+ "bin": {
+ "node-which": "bin/node-which"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/which-module": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/tsame/-/tsame-2.0.0.tgz",
- "integrity": "sha512-dAuzcnOPdqZYojylFQzEes95UDjve3HqKrlTCeLZKSDPMTsn3smzHZqsJj/sWD8wOUkg0RD++B11evyLn2+bIw==",
+ "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
+ "integrity": "sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==",
"dev": true
},
- "tunnel-agent": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
- "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
+ "node_modules/wrap-ansi": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
"dev": true,
- "requires": {
- "safe-buffer": "^5.0.1"
+ "dependencies": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
- "tweetnacl": {
- "version": "0.14.5",
- "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
- "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
+ "node_modules/wrap-ansi/node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
- "optional": true
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
},
- "unicode-length": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/unicode-length/-/unicode-length-1.0.3.tgz",
- "integrity": "sha1-Wtp6f+1RhBpBijKM8UlHisg1irs=",
+ "node_modules/wrap-ansi/node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
- "requires": {
- "punycode": "^1.3.2",
- "strip-ansi": "^3.0.1"
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
}
},
- "util-deprecate": {
+ "node_modules/wrap-ansi/node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "node_modules/wrappy": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
- "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
+ "dev": true
+ },
+ "node_modules/write-file-atomic": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",
+ "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==",
+ "dev": true,
+ "dependencies": {
+ "imurmurhash": "^0.1.4",
+ "is-typedarray": "^1.0.0",
+ "signal-exit": "^3.0.2",
+ "typedarray-to-buffer": "^3.1.5"
+ }
+ },
+ "node_modules/y18n": {
+ "version": "5.0.8",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
"dev": true,
- "optional": true
+ "engines": {
+ "node": ">=10"
+ }
},
- "uuid": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
- "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==",
+ "node_modules/yallist": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
+ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
"dev": true
},
- "verror": {
- "version": "1.10.0",
- "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
- "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
+ "node_modules/yaml": {
+ "version": "1.10.2",
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
+ "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==",
"dev": true,
- "requires": {
- "assert-plus": "^1.0.0",
- "core-util-is": "1.0.2",
- "extsprintf": "^1.2.0"
+ "engines": {
+ "node": ">= 6"
}
},
- "which": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
- "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+ "node_modules/yargs": {
+ "version": "16.2.0",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
+ "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
"dev": true,
- "requires": {
- "isexe": "^2.0.0"
+ "dependencies": {
+ "cliui": "^7.0.2",
+ "escalade": "^3.1.1",
+ "get-caller-file": "^2.0.5",
+ "require-directory": "^2.1.1",
+ "string-width": "^4.2.0",
+ "y18n": "^5.0.5",
+ "yargs-parser": "^20.2.2"
+ },
+ "engines": {
+ "node": ">=10"
}
},
- "wrappy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
- },
- "write-file-atomic": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz",
- "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==",
+ "node_modules/yargs-parser": {
+ "version": "20.2.9",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
+ "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
"dev": true,
- "requires": {
- "graceful-fs": "^4.1.11",
- "imurmurhash": "^0.1.4",
- "signal-exit": "^3.0.2"
+ "engines": {
+ "node": ">=10"
}
},
- "yallist": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
- "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
- "dev": true
+ "node_modules/yn": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
+ "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
},
- "yapool": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/yapool/-/yapool-1.0.0.tgz",
- "integrity": "sha1-9pPymjFbUNmp2iZGp6ZkXJaYW2o=",
- "dev": true
+ "node_modules/yocto-queue": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
}
}
}
diff --git a/package.json b/package.json
index 6477c307..e3f5e572 100644
--- a/package.json
+++ b/package.json
@@ -1,46 +1,97 @@
{
"author": "Isaac Z. Schlueter (http://blog.izs.me/)",
"name": "glob",
- "description": "a little globber",
- "version": "7.1.6",
+ "description": "the most correct and second fastest glob implementation in JavaScript",
+ "version": "9.3.4",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-glob.git"
},
- "main": "glob.js",
+ "main": "./dist/cjs/index-cjs.js",
+ "module": "./dist/mjs/index.js",
+ "types": "./dist/mjs/index.d.ts",
+ "exports": {
+ ".": {
+ "import": {
+ "types": "./dist/mjs/index.d.ts",
+ "default": "./dist/mjs/index.js"
+ },
+ "require": {
+ "types": "./dist/cjs/index.d.ts",
+ "default": "./dist/cjs/index-cjs.js"
+ }
+ }
+ },
"files": [
- "glob.js",
- "sync.js",
- "common.js"
+ "dist"
],
- "engines": {
- "node": "*"
+ "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",
+ "postprepare": "bash fixup.sh",
+ "pretest": "npm run prepare",
+ "presnap": "npm run prepare",
+ "test": "c8 tap",
+ "snap": "c8 tap",
+ "format": "prettier --write . --loglevel warn",
+ "typedoc": "typedoc --tsconfig tsconfig-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"
+ },
+ "prettier": {
+ "semi": false,
+ "printWidth": 75,
+ "tabWidth": 2,
+ "useTabs": false,
+ "singleQuote": true,
+ "jsxSingleQuote": false,
+ "bracketSameLine": true,
+ "arrowParens": "avoid",
+ "endOfLine": "lf"
},
"dependencies": {
"fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.0.4",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
+ "minimatch": "^8.0.2",
+ "minipass": "^4.2.4",
+ "path-scurry": "^1.6.1"
},
"devDependencies": {
- "mkdirp": "0",
- "rimraf": "^2.2.8",
- "tap": "^12.0.1",
- "tick": "0.0.6"
+ "@types/node": "^18.11.18",
+ "@types/tap": "^15.0.7",
+ "c8": "^7.12.0",
+ "memfs": "^3.4.13",
+ "mkdirp": "^2.1.4",
+ "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"
},
- "scripts": {
- "prepublish": "npm run benchclean",
- "profclean": "rm -f v8.log profile.txt",
- "test": "tap test/*.js --cov",
- "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js",
- "bench": "bash benchmark.sh",
- "prof": "bash prof.sh && cat profile.txt",
- "benchclean": "node benchclean.js"
+ "tap": {
+ "before": "test/00-setup.ts",
+ "coverage": false,
+ "node-arg": [
+ "--no-warnings",
+ "--loader",
+ "ts-node/esm"
+ ],
+ "ts": false
},
"license": "ISC",
"funding": {
"url": "https://github.com/sponsors/isaacs"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
}
}
diff --git a/patterns.sh b/patterns.sh
new file mode 100644
index 00000000..6dfb492e
--- /dev/null
+++ b/patterns.sh
@@ -0,0 +1,47 @@
+patterns=(
+ '**'
+ '**/..'
+
+ # some of these aren't particularly "representative" of real-world
+ # glob patterns, but they're here to highlight pathological perf
+ # cases that I found while working on the rewrite of this library.
+ './**/0/**/0/**/0/**/0/**/*.txt'
+ './**/[01]/**/[12]/**/[23]/**/[45]/**/*.txt'
+ './**/0/**/0/**/*.txt'
+
+ '**/*.txt'
+ '{**/*.txt,**/?/**/*.txt,**/?/**/?/**/*.txt,**/?/**/?/**/?/**/*.txt,**/?/**/?/**/?/**/?/**/*.txt}'
+ '**/5555/0000/*.txt'
+
+ './**/0/**/../[01]/**/0/../**/0/*.txt'
+ '**/????/????/????/????/*.txt'
+
+
+ './{**/?{/**/?{/**/?{/**/?,,,,},,,,},,,,},,,}/**/*.txt'
+
+
+ '**/!(0|9).txt'
+
+ './{*/**/../{*/**/../{*/**/../{*/**/../{*/**,,,,},,,,},,,,},,,,},,,,}/*.txt'
+ './*/**/../*/**/../*/**/../*/**/../*/**/../*/**/../*/**/../*/**/*.txt'
+ './*/**/../*/**/../*/**/../*/**/../*/**/*.txt'
+ './0/**/../1/**/../2/**/../3/**/../4/**/../5/**/../6/**/../7/**/*.txt'
+ './**/?/**/?/**/?/**/?/**/*.txt'
+ '**/*/**/*/**/*/**/*/**'
+ # '5555/0000/**/*.txt'
+ # '*/*/9/**/**/**/**/*/**/**/*.txt'
+ './**/*/**/*/**/*/**/*/**/*.txt'
+ '**/*.txt'
+ # './**/*.txt'
+ './**/**/**/**/**/**/**/**/*.txt'
+ '**/*/*.txt'
+ '**/*/**/*.txt'
+ '**/[0-9]/**/*.txt'
+ # '0/@([5-9]/*.txt|8/**)'
+ # '[0-9]/[0-9]/[0-9]/[0-9]/[0-9].txt'
+ # /**/**/**/**//////**/**//*.txt'
+ # '**/[5-9]/*.txt'
+ # '[678]/**/2.txt'
+ # '0/!(1|2)@(4|5)/**/**/**/**/*.txt'
+ # '0/!(1|2|@(4|5))/**/**/**/**/*.txt'
+)
diff --git a/prof.sh b/prof.sh
index 7fa97fd3..366a5859 100644
--- a/prof.sh
+++ b/prof.sh
@@ -1,19 +1,32 @@
#!/bin/bash
export CDPATH=
set -e
+set -x
-tmp=${TMPDIR:-/tmp}
-bash make-benchmark-fixture.sh
+. patterns.sh
+
+bash -x make-benchmark-fixture.sh
wd=$PWD
-cd $tmp/benchmark-fixture
+tmp="$wd/bench-working-dir"
+cd "$tmp"
+
+export __GLOB_PROFILE__=1
+
+cat > "profscript.mjs" < {
+ await glob("./fixture/" + p)
+}))
+MJS
-node --prof -e '
- var glob=require(process.argv[1]);
- glob("**/*.txt", function (er, files) {
- console.log(files.length)
- })
- //console.log(glob.sync("**/*.txt").length);
- ' "$wd"
-mv *v8.log "$wd/v8.log"
-cd "$wd"
-node-tick-processor > profile.txt
+node --prof profscript.mjs "${patterns[@]}" &> profile.out
+mkdir -p profiles
+d=./profiles/$(date +%s)
+mv isolate*.log ${d}.log
+node --prof-process ${d}.log > ${d}.txt
+cp ${d}.txt ../profile.txt
+#cat ${d}.txt
diff --git a/scripts/make-big-tree.js b/scripts/make-big-tree.js
new file mode 100644
index 00000000..a2543771
--- /dev/null
+++ b/scripts/make-big-tree.js
@@ -0,0 +1,56 @@
+#!/usr/bin/env node
+const mkdirp = require('mkdirp')
+const { readFileSync } = require('fs')
+const { writeFile } = require('fs/promises')
+const rimraf = require('rimraf')
+const filesPerDir = 10
+const dirsPerDir = 5
+const max = (module === require.main && +process.argv[2]) || 1_000_000
+const { now } = performance
+let lastReported = now()
+
+const report = s => {
+ if (!process.stderr.isTTY) return
+ process.stderr.write('\r' + s.padEnd(40))
+}
+
+let made = 0
+const makeStep = async dir => {
+ if (now() - lastReported > 250) report('growing: ' + made)
+ const promises = []
+ for (let i = 0; i < filesPerDir && made < max; i++) {
+ made++
+ promises.push(writeFile(`${dir}/${i}.txt`, ''))
+ }
+ await Promise.all(promises)
+
+ const childDirs = []
+ for (let i = 0; i < dirsPerDir && made < max; i++) {
+ made++
+ await mkdirp(`${dir}/${i}`)
+ childDirs.push(makeStep(`${dir}/${i}`))
+ }
+ await Promise.all(childDirs)
+}
+
+const make = async root => {
+ try {
+ const already = +readFileSync(`${root}/bigtree.txt`)
+ if (already === max) {
+ console.log('already done!')
+ return
+ }
+ } catch (_) {}
+ report('chop down previous bigtree...')
+ await rimraf(root + '/bigtree')
+ report('creating bigtree...')
+ report('\n')
+ await mkdirp(root + '/bigtree')
+ await makeStep(root + '/bigtree')
+ await writeFile(`${root}/bigtree.txt`, `${max}`)
+}
+
+make(__dirname + '/fixture').then(() => {
+ if (process.stderr.isTTY) process.stderr.write('\r'.padEnd(40) + '\r')
+ console.log('done')
+})
diff --git a/src/glob.ts b/src/glob.ts
new file mode 100644
index 00000000..a78d92b9
--- /dev/null
+++ b/src/glob.ts
@@ -0,0 +1,564 @@
+import { Minimatch, MinimatchOptions } from 'minimatch'
+import Minipass from 'minipass'
+import {
+ FSOption,
+ Path,
+ PathScurry,
+ PathScurryDarwin,
+ PathScurryPosix,
+ PathScurryWin32,
+} from 'path-scurry'
+import { fileURLToPath } from 'url'
+import { IgnoreLike } from './ignore.js'
+import { Pattern } from './pattern.js'
+import { GlobStream, GlobWalker } from './walker.js'
+
+export type MatchSet = Minimatch['set']
+export type GlobParts = Exclude
+
+// if no process global, just call it linux.
+// so we default to case-sensitive, / separators
+const defaultPlatform: NodeJS.Platform =
+ typeof process === 'object' &&
+ process &&
+ typeof process.platform === 'string'
+ ? process.platform
+ : 'linux'
+
+/**
+ * A `GlobOptions` object may be provided to any of the exported methods, and
+ * must be provided to the `Glob` constructor.
+ *
+ * All options are optional, boolean, and false by default, unless otherwise
+ * noted.
+ *
+ * All resolved options are added to the Glob object as properties.
+ *
+ * If you are running many `glob` operations, you can pass a Glob object as the
+ * `options` argument to a subsequent operation to share the previously loaded
+ * cache.
+ */
+export interface GlobOptions {
+ /**
+ * Set to `true` to always receive absolute paths for
+ * matched files. Set to `false` to always return relative paths.
+ *
+ * When this option is not set, absolute paths are returned for patterns
+ * that are absolute, and otherwise paths are returned that are relative
+ * to the `cwd` setting.
+ *
+ * This does _not_ make an extra system call to get
+ * the realpath, it only does string path resolution.
+ *
+ * Conflicts with {@link withFileTypes}
+ */
+ absolute?: boolean
+
+ /**
+ * Set to false to enable {@link windowsPathsNoEscape}
+ *
+ * @deprecated
+ */
+ allowWindowsEscape?: boolean
+
+ /**
+ * The current working directory in which to search. Defaults to
+ * `process.cwd()`.
+ *
+ * May be eiher a string path or a `file://` URL object or string.
+ */
+ cwd?: string | URL
+
+ /**
+ * Include `.dot` files in normal matches and `globstar`
+ * matches. Note that an explicit dot in a portion of the pattern
+ * will always match dot files.
+ */
+ dot?: boolean
+
+ /**
+ * Prepend all relative path strings with `./` (or `.\` on Windows).
+ *
+ * Without this option, returned relative paths are "bare", so instead of
+ * returning `'./foo/bar'`, they are returned as `'foo/bar'`.
+ *
+ * Relative patterns starting with `'../'` are not prepended with `./`, even
+ * if this option is set.
+ */
+ dotRelative?: boolean
+
+ /**
+ * 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.
+ *
+ * By default, a `**` in a pattern will follow 1 symbolic link if
+ * 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.
+ */
+ follow?: boolean
+
+ /**
+ * string or string[], or an object with `ignore` and `ignoreChildren`
+ * 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 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 children should be
+ * traversed, respectively.
+ */
+ ignore?: string | string[] | IgnoreLike
+
+ /**
+ * Treat brace expansion like `{a,b}` as a "magic" pattern. Has no
+ * effect if {@link nobrace} is set.
+ *
+ * Only has effect on the {@link hasMagic} function.
+ */
+ magicalBraces?: boolean
+
+ /**
+ * Add a `/` character to directory matches. Note that this requires
+ * additional stat calls in some cases.
+ */
+ mark?: boolean
+
+ /**
+ * Perform a basename-only match if the pattern does not contain any slash
+ * characters. That is, `*.js` would be treated as equivalent to
+ * `**\/*.js`, matching all js files in all directories.
+ */
+ matchBase?: boolean
+
+ /**
+ * Limit the directory traversal to a given depth below the cwd.
+ * Note that this does NOT prevent traversal to sibling folders,
+ * root patterns, and so on. It only limits the maximum folder depth
+ * that the walk will descend, relative to the cwd.
+ */
+ maxDepth?: number
+
+ /**
+ * Do not expand `{a,b}` and `{1..3}` brace sets.
+ */
+ nobrace?: boolean
+
+ /**
+ * 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.
+ */
+ nocase?: boolean
+
+ /**
+ * Do not match directories, only files. (Note: to match
+ * _only_ directories, put a `/` at the end of the pattern.)
+ */
+ nodir?: boolean
+
+ /**
+ * Do not match "extglob" patterns such as `+(a|b)`.
+ */
+ noext?: boolean
+
+ /**
+ * Do not match `**` against multiple filenames. (Ie, treat it as a normal
+ * `*` instead.)
+ *
+ * Conflicts with {@link matchBase}
+ */
+ noglobstar?: boolean
+
+ /**
+ * Defaults to value of `process.platform` if available, or `'linux'` if
+ * not. Setting `platform:'win32'` on non-Windows systems may cause strange
+ * behavior.
+ */
+ platform?: NodeJS.Platform
+
+ /**
+ * Set to true to call `fs.realpath` on all of the
+ * results. In the case of an entry that cannot be resolved, the
+ * entry is omitted. This incurs a slight performance penalty, of
+ * course, because of the added system calls.
+ */
+ realpath?: boolean
+
+ /**
+ *
+ * A string path resolved against the `cwd` option, which
+ * 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.
+ */
+ root?: string
+
+ /**
+ * 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?: PathScurry
+
+ /**
+ * Call `lstat()` on all entries, whether required or not to determine
+ * whether it's a valid match. When used with {@link withFileTypes}, this
+ * means that matches will include data such as modified time, permissions,
+ * and so on. Note that this will incur a performance cost due to the added
+ * system calls.
+ */
+ stat?: boolean
+
+ /**
+ * An AbortSignal which will cancel the Glob walk when
+ * triggered.
+ */
+ signal?: AbortSignal
+
+ /**
+ * 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`.)
+ */
+ windowsPathsNoEscape?: boolean
+
+ /**
+ * 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.
+ *
+ * Conflicts with {@link absolute}
+ */
+ withFileTypes?: boolean
+
+ /**
+ * An fs implementation to override some or all of the defaults. See
+ * http://npm.im/path-scurry for details about what can be overridden.
+ */
+ fs?: FSOption
+}
+
+export type GlobOptionsWithFileTypesTrue = GlobOptions & {
+ withFileTypes: true
+ absolute?: undefined
+}
+
+export type GlobOptionsWithFileTypesFalse = GlobOptions & {
+ withFileTypes?: false
+}
+
+export type GlobOptionsWithFileTypesUnset = GlobOptions & {
+ withFileTypes?: undefined
+}
+
+export type Result = Opts extends GlobOptionsWithFileTypesTrue
+ ? Path
+ : Opts extends GlobOptionsWithFileTypesFalse
+ ? string
+ : Opts extends GlobOptionsWithFileTypesUnset
+ ? string
+ : string | Path
+export type Results = Result[]
+
+export type FileTypes = Opts extends GlobOptionsWithFileTypesTrue
+ ? true
+ : Opts extends GlobOptionsWithFileTypesFalse
+ ? false
+ : Opts extends GlobOptionsWithFileTypesUnset
+ ? false
+ : boolean
+
+/**
+ * An object that can perform glob pattern traversals.
+ */
+export class Glob implements GlobOptions {
+ absolute?: boolean
+ cwd: string
+ root?: string
+ dot: boolean
+ dotRelative: boolean
+ follow: boolean
+ ignore?: string | string[] | IgnoreLike
+ magicalBraces: boolean
+ mark?: boolean
+ matchBase: boolean
+ maxDepth: number
+ nobrace: boolean
+ nocase: boolean
+ nodir: boolean
+ noext: boolean
+ noglobstar: boolean
+ pattern: string[]
+ platform: NodeJS.Platform
+ realpath: boolean
+ scurry: PathScurry
+ stat: boolean
+ signal?: AbortSignal
+ windowsPathsNoEscape: boolean
+ withFileTypes: FileTypes
+
+ /**
+ * The options provided to the constructor.
+ */
+ opts: Opts
+
+ /**
+ * An array of parsed immutable {@link Pattern} objects.
+ */
+ patterns: Pattern[]
+
+ /**
+ * All options are stored as properties on the `Glob` object.
+ *
+ * See {@link GlobOptions} for full options descriptions.
+ *
+ * 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.
+ *
+ * Traversal functions can be called multiple times to run the walk
+ * again.
+ */
+ constructor(pattern: string | string[], opts: Opts) {
+ this.withFileTypes = !!opts.withFileTypes as FileTypes
+ this.signal = opts.signal
+ this.follow = !!opts.follow
+ this.dot = !!opts.dot
+ this.dotRelative = !!opts.dotRelative
+ this.nodir = !!opts.nodir
+ this.mark = !!opts.mark
+ if (!opts.cwd) {
+ this.cwd = ''
+ } else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) {
+ opts.cwd = fileURLToPath(opts.cwd)
+ }
+ this.cwd = opts.cwd || ''
+ this.root = opts.root
+ this.magicalBraces = !!opts.magicalBraces
+ this.nobrace = !!opts.nobrace
+ this.noext = !!opts.noext
+ this.realpath = !!opts.realpath
+ this.absolute = opts.absolute
+
+ this.noglobstar = !!opts.noglobstar
+ this.matchBase = !!opts.matchBase
+ this.maxDepth =
+ typeof opts.maxDepth === 'number' ? opts.maxDepth : Infinity
+ this.stat = !!opts.stat
+ this.ignore = opts.ignore
+
+ if (this.withFileTypes && this.absolute !== undefined) {
+ throw new Error('cannot set absolute and withFileTypes:true')
+ }
+
+ if (typeof pattern === 'string') {
+ pattern = [pattern]
+ }
+
+ this.windowsPathsNoEscape =
+ !!opts.windowsPathsNoEscape ||
+ (opts as GlobOptions).allowWindowsEscape === false
+
+ if (this.windowsPathsNoEscape) {
+ pattern = pattern.map(p => p.replace(/\\/g, '/'))
+ }
+
+ if (this.matchBase) {
+ if (opts.noglobstar) {
+ throw new TypeError('base matching requires globstar')
+ }
+ pattern = pattern.map(p => (p.includes('/') ? p : `./**/${p}`))
+ }
+
+ this.pattern = pattern
+
+ this.platform = opts.platform || defaultPlatform
+ this.opts = { ...opts, platform: this.platform }
+ if (opts.scurry) {
+ this.scurry = opts.scurry
+ if (
+ opts.nocase !== undefined &&
+ opts.nocase !== opts.scurry.nocase
+ ) {
+ throw new Error('nocase option contradicts provided scurry option')
+ }
+ } else {
+ const Scurry =
+ opts.platform === 'win32'
+ ? PathScurryWin32
+ : opts.platform === 'darwin'
+ ? PathScurryDarwin
+ : opts.platform
+ ? PathScurryPosix
+ : PathScurry
+ this.scurry = new Scurry(this.cwd, {
+ nocase: opts.nocase,
+ fs: opts.fs,
+ })
+ }
+ this.nocase = this.scurry.nocase
+
+ const mmo: MinimatchOptions = {
+ // default nocase based on platform
+ ...opts,
+ dot: this.dot,
+ matchBase: this.matchBase,
+ nobrace: this.nobrace,
+ nocase: this.nocase,
+ nocaseMagicOnly: true,
+ nocomment: true,
+ noext: this.noext,
+ nonegate: true,
+ optimizationLevel: 2,
+ platform: this.platform,
+ windowsPathsNoEscape: this.windowsPathsNoEscape,
+ }
+
+ const mms = this.pattern.map(p => new Minimatch(p, mmo))
+ const [matchSet, globParts] = mms.reduce(
+ (set: [MatchSet, GlobParts], m) => {
+ set[0].push(...m.set)
+ set[1].push(...m.globParts)
+ return set
+ },
+ [[], []]
+ )
+ this.patterns = matchSet.map((set, i) => {
+ return new Pattern(set, globParts[i], 0, this.platform)
+ })
+ }
+
+ /**
+ * Returns a Promise that resolves to the results array.
+ */
+ async walk(): Promise>
+ async walk(): Promise<(string | Path)[]> {
+ // Walkers always return array of Path objects, so we just have to
+ // coerce them into the right shape. It will have already called
+ // realpath() if the option was set to do so, so we know that's cached.
+ // start out knowing the cwd, at least
+ return [
+ ...(await new GlobWalker(this.patterns, this.scurry.cwd, {
+ ...this.opts,
+ maxDepth:
+ this.maxDepth !== Infinity
+ ? this.maxDepth + this.scurry.cwd.depth()
+ : Infinity,
+ platform: this.platform,
+ nocase: this.nocase,
+ }).walk()),
+ ]
+ }
+
+ /**
+ * synchronous {@link Glob.walk}
+ */
+ walkSync(): Results
+ walkSync(): (string | Path)[] {
+ return [
+ ...new GlobWalker(this.patterns, this.scurry.cwd, {
+ ...this.opts,
+ maxDepth:
+ this.maxDepth !== Infinity
+ ? this.maxDepth + this.scurry.cwd.depth()
+ : Infinity,
+ platform: this.platform,
+ nocase: this.nocase,
+ }).walkSync(),
+ ]
+ }
+
+ /**
+ * Stream results asynchronously.
+ */
+ stream(): Minipass, Result>
+ stream(): Minipass {
+ return new GlobStream(this.patterns, this.scurry.cwd, {
+ ...this.opts,
+ maxDepth:
+ this.maxDepth !== Infinity
+ ? this.maxDepth + this.scurry.cwd.depth()
+ : Infinity,
+ platform: this.platform,
+ nocase: this.nocase,
+ }).stream()
+ }
+
+ /**
+ * Stream results synchronously.
+ */
+ streamSync(): Minipass, Result>
+ streamSync(): Minipass {
+ return new GlobStream(this.patterns, this.scurry.cwd, {
+ ...this.opts,
+ maxDepth:
+ this.maxDepth !== Infinity
+ ? this.maxDepth + this.scurry.cwd.depth()
+ : Infinity,
+ platform: this.platform,
+ nocase: this.nocase,
+ }).streamSync()
+ }
+
+ /**
+ * Default sync iteration function. Returns a Generator that
+ * iterates over the results.
+ */
+ iterateSync(): Generator, void, void> {
+ return this.streamSync()[Symbol.iterator]()
+ }
+ [Symbol.iterator]() {
+ return this.iterateSync()
+ }
+
+ /**
+ * Default async iteration function. Returns an AsyncGenerator that
+ * iterates over the results.
+ */
+ iterate(): AsyncGenerator, void, void> {
+ return this.stream()[Symbol.asyncIterator]()
+ }
+ [Symbol.asyncIterator]() {
+ return this.iterate()
+ }
+}
diff --git a/src/has-magic.ts b/src/has-magic.ts
new file mode 100644
index 00000000..748d7c52
--- /dev/null
+++ b/src/has-magic.ts
@@ -0,0 +1,26 @@
+import { Minimatch } from 'minimatch'
+import { GlobOptions } from './glob.js'
+
+/**
+ * Return true if the patterns provided contain any magic glob characters,
+ * given the options provided.
+ *
+ * Brace expansion is not considered "magic" unless the `magicalBraces` option
+ * is set, as brace expansion just turns one string into an array of strings.
+ * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and
+ * `'xby'` both do not contain any magic glob characters, and it's treated the
+ * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true`
+ * is in the options, brace expansion _is_ treated as a pattern having magic.
+ */
+export const hasMagic = (
+ pattern: string | string[],
+ options: GlobOptions = {}
+): boolean => {
+ if (!Array.isArray(pattern)) {
+ pattern = [pattern]
+ }
+ for (const p of pattern) {
+ if (new Minimatch(p, options).hasMagic()) return true
+ }
+ return false
+}
diff --git a/src/ignore.ts b/src/ignore.ts
new file mode 100644
index 00000000..7ba09cfb
--- /dev/null
+++ b/src/ignore.ts
@@ -0,0 +1,114 @@
+// give it a pattern, and it'll be able to tell you if
+// a given path should be ignored.
+// Ignoring a path ignores its children if the pattern ends in /**
+// Ignores are always parsed in dot:true mode
+
+import { Minimatch } from 'minimatch'
+import { Path } from 'path-scurry'
+import { Pattern } from './pattern.js'
+import { GlobWalkerOpts } from './walker.js'
+
+export interface IgnoreLike {
+ ignored?: (p: Path) => boolean
+ childrenIgnored?: (p: Path) => boolean
+}
+
+const defaultPlatform: NodeJS.Platform =
+ typeof process === 'object' &&
+ process &&
+ typeof process.platform === 'string'
+ ? process.platform
+ : 'linux'
+
+/**
+ * Class used to process ignored patterns
+ */
+export class Ignore implements IgnoreLike {
+ relative: Minimatch[]
+ relativeChildren: Minimatch[]
+ absolute: Minimatch[]
+ absoluteChildren: Minimatch[]
+
+ constructor(
+ ignored: string[],
+ {
+ nobrace,
+ nocase,
+ noext,
+ noglobstar,
+ platform = defaultPlatform,
+ }: GlobWalkerOpts
+ ) {
+ this.relative = []
+ this.absolute = []
+ this.relativeChildren = []
+ this.absoluteChildren = []
+ const mmopts = {
+ dot: true,
+ nobrace,
+ nocase,
+ noext,
+ noglobstar,
+ optimizationLevel: 2,
+ platform,
+ nocomment: true,
+ nonegate: true,
+ }
+
+ // this is a little weird, but it gives us a clean set of optimized
+ // minimatch matchers, without getting tripped up if one of them
+ // ends in /** inside a brace section, and it's only inefficient at
+ // the start of the walk, not along it.
+ // It'd be nice if the Pattern class just had a .test() method, but
+ // handling globstars is a bit of a pita, and that code already lives
+ // in minimatch anyway.
+ // Another way would be if maybe Minimatch could take its set/globParts
+ // as an option, and then we could at least just use Pattern to test
+ // for absolute-ness.
+ // Yet another way, Minimatch could take an array of glob strings, and
+ // a cwd option, and do the right thing.
+ for (const ign of ignored) {
+ const mm = new Minimatch(ign, mmopts)
+ for (let i = 0; i < mm.set.length; i++) {
+ const parsed = mm.set[i]
+ const globParts = mm.globParts[i]
+ const p = new Pattern(parsed, globParts, 0, platform)
+ const m = new Minimatch(p.globString(), mmopts)
+ const children = globParts[globParts.length - 1] === '**'
+ const absolute = p.isAbsolute()
+ if (absolute) this.absolute.push(m)
+ else this.relative.push(m)
+ if (children) {
+ if (absolute) this.absoluteChildren.push(m)
+ else this.relativeChildren.push(m)
+ }
+ }
+ }
+ }
+
+ ignored(p: Path): boolean {
+ const fullpath = p.fullpath()
+ const fullpaths = `${fullpath}/`
+ const relative = p.relative() || '.'
+ const relatives = `${relative}/`
+ for (const m of this.relative) {
+ if (m.match(relative) || m.match(relatives)) return true
+ }
+ for (const m of this.absolute) {
+ if (m.match(fullpath) || m.match(fullpaths)) return true
+ }
+ return false
+ }
+
+ childrenIgnored(p: Path): boolean {
+ const fullpath = p.fullpath() + '/'
+ const relative = (p.relative() || '.') + '/'
+ for (const m of this.relativeChildren) {
+ if (m.match(relative)) return true
+ }
+ for (const m of this.absoluteChildren) {
+ if (m.match(fullpath)) true
+ }
+ return false
+ }
+}
diff --git a/src/index-cjs.ts b/src/index-cjs.ts
new file mode 100644
index 00000000..9cdb55a2
--- /dev/null
+++ b/src/index-cjs.ts
@@ -0,0 +1,3 @@
+import glob from './index.js'
+
+export = Object.assign(glob, { default: glob, glob })
diff --git a/src/index.ts b/src/index.ts
new file mode 100644
index 00000000..27e04f90
--- /dev/null
+++ b/src/index.ts
@@ -0,0 +1,217 @@
+import { escape, unescape } from 'minimatch'
+import Minipass from 'minipass'
+import { Path } from 'path-scurry'
+import type {
+ GlobOptions,
+ GlobOptionsWithFileTypesFalse,
+ GlobOptionsWithFileTypesTrue,
+ GlobOptionsWithFileTypesUnset,
+} from './glob.js'
+import { Glob } from './glob.js'
+import { hasMagic } from './has-magic.js'
+
+/**
+ * Syncronous form of {@link globStream}. Will read all the matches as fast as
+ * you consume them, even all in a single tick if you consume them immediately,
+ * but will still respond to backpressure if they're not consumed immediately.
+ */
+export function globStreamSync(
+ pattern: string | string[],
+ options: GlobOptionsWithFileTypesTrue
+): Minipass
+export function globStreamSync(
+ pattern: string | string[],
+ options: GlobOptionsWithFileTypesFalse
+): Minipass
+export function globStreamSync(
+ pattern: string | string[],
+ options: GlobOptionsWithFileTypesUnset
+): Minipass
+export function globStreamSync(
+ pattern: string | string[],
+ options: GlobOptions
+): Minipass | Minipass
+export function globStreamSync(
+ pattern: string | string[],
+ options: GlobOptions = {}
+) {
+ return new Glob(pattern, options).streamSync()
+}
+
+/**
+ * Return a stream that emits all the strings or `Path` objects and
+ * then emits `end` when completed.
+ */
+export function globStream(
+ pattern: string | string[],
+ options: GlobOptionsWithFileTypesFalse
+): Minipass
+export function globStream(
+ pattern: string | string[],
+ options: GlobOptionsWithFileTypesTrue
+): Minipass
+export function globStream(
+ pattern: string | string[],
+ options?: GlobOptionsWithFileTypesUnset | undefined
+): Minipass
+export function globStream(
+ pattern: string | string[],
+ options: GlobOptions
+): Minipass | Minipass
+export function globStream(
+ pattern: string | string[],
+ options: GlobOptions = {}
+) {
+ return new Glob(pattern, options).stream()
+}
+
+/**
+ * Synchronous form of {@link glob}
+ */
+export function globSync(
+ pattern: string | string[],
+ options: GlobOptionsWithFileTypesFalse
+): string[]
+export function globSync(
+ pattern: string | string[],
+ options: GlobOptionsWithFileTypesTrue
+): Path[]
+export function globSync(
+ pattern: string | string[],
+ options?: GlobOptionsWithFileTypesUnset | undefined
+): string[]
+export function globSync(
+ pattern: string | string[],
+ options: GlobOptions
+): Path[] | string[]
+export function globSync(
+ pattern: string | string[],
+ options: GlobOptions = {}
+) {
+ return new Glob(pattern, options).walkSync()
+}
+
+/**
+ * Perform an asynchronous glob search for the pattern(s) specified. Returns
+ * [Path](https://isaacs.github.io/path-scurry/classes/PathBase) objects if the
+ * {@link withFileTypes} option is set to `true`. See {@link GlobOptions} for
+ * full option descriptions.
+ */
+export async function glob(
+ pattern: string | string[],
+ options?: GlobOptionsWithFileTypesUnset | undefined
+): Promise
+export async function glob(
+ pattern: string | string[],
+ options: GlobOptionsWithFileTypesTrue
+): Promise
+export async function glob(
+ pattern: string | string[],
+ options: GlobOptionsWithFileTypesFalse
+): Promise
+export async function glob(
+ pattern: string | string[],
+ options: GlobOptions
+): Promise
+export async function glob(
+ pattern: string | string[],
+ options: GlobOptions = {}
+) {
+ return new Glob(pattern, options).walk()
+}
+
+/**
+ * Return a sync iterator for walking glob pattern matches.
+ */
+export function globIterateSync(
+ pattern: string | string[],
+ options?: GlobOptionsWithFileTypesUnset | undefined
+): Generator
+export function globIterateSync(
+ pattern: string | string[],
+ options: GlobOptionsWithFileTypesTrue
+): Generator
+export function globIterateSync(
+ pattern: string | string[],
+ options: GlobOptionsWithFileTypesFalse
+): Generator
+export function globIterateSync(
+ pattern: string | string[],
+ options: GlobOptions
+): Generator | Generator
+export function globIterateSync(
+ pattern: string | string[],
+ options: GlobOptions = {}
+) {
+ return new Glob(pattern, options).iterateSync()
+}
+
+/**
+ * Return an async iterator for walking glob pattern matches.
+ */
+export function globIterate(
+ pattern: string | string[],
+ options?: GlobOptionsWithFileTypesUnset | undefined
+): AsyncGenerator
+export function globIterate(
+ pattern: string | string[],
+ options: GlobOptionsWithFileTypesTrue
+): AsyncGenerator
+export function globIterate(
+ pattern: string | string[],
+ options: GlobOptionsWithFileTypesFalse
+): AsyncGenerator
+export function globIterate(
+ pattern: string | string[],
+ options: GlobOptions
+): AsyncGenerator | AsyncGenerator
+export function globIterate(
+ pattern: string | string[],
+ options: GlobOptions = {}
+) {
+ return new Glob(pattern, options).iterate()
+}
+
+// aliases: glob.sync.stream() glob.stream.sync() glob.sync() etc
+export const streamSync = globStreamSync
+export const stream = Object.assign(globStream, { sync: globStreamSync })
+export const iterateSync = globIterateSync
+export const iterate = Object.assign(globIterate, {
+ sync: globIterateSync,
+})
+export const sync = Object.assign(globSync, {
+ stream: globStreamSync,
+ iterate: globIterateSync,
+})
+
+/* c8 ignore start */
+export { escape, unescape } from 'minimatch'
+export { Glob } from './glob.js'
+export type {
+ GlobOptions,
+ GlobOptionsWithFileTypesFalse,
+ GlobOptionsWithFileTypesTrue,
+ GlobOptionsWithFileTypesUnset,
+} from './glob.js'
+export { hasMagic } from './has-magic.js'
+export type { IgnoreLike } from './ignore.js'
+export type { MatchStream } from './walker.js'
+/* c8 ignore stop */
+
+export default Object.assign(glob, {
+ glob,
+ globSync,
+ sync,
+ globStream,
+ stream,
+ globStreamSync,
+ streamSync,
+ globIterate,
+ iterate,
+ globIterateSync,
+ iterateSync,
+ Glob,
+ hasMagic,
+ escape,
+ unescape,
+})
diff --git a/src/pattern.ts b/src/pattern.ts
new file mode 100644
index 00000000..32da1fac
--- /dev/null
+++ b/src/pattern.ts
@@ -0,0 +1,254 @@
+// this is just a very light wrapper around 2 arrays with an offset index
+
+import { GLOBSTAR } from 'minimatch'
+export type MMPattern = string | RegExp | typeof GLOBSTAR
+
+// an array of length >= 1
+export type PatternList = [p: MMPattern, ...rest: MMPattern[]]
+export type UNCPatternList = [
+ p0: '',
+ p1: '',
+ p2: string,
+ p3: string,
+ ...rest: MMPattern[]
+]
+export type DrivePatternList = [p0: string, ...rest: MMPattern[]]
+export type AbsolutePatternList = [p0: '', ...rest: MMPattern[]]
+export type GlobList = [p: string, ...rest: string[]]
+
+const isPatternList = (pl: MMPattern[]): pl is PatternList =>
+ pl.length >= 1
+const isGlobList = (gl: string[]): gl is GlobList => gl.length >= 1
+
+/**
+ * An immutable-ish view on an array of glob parts and their parsed
+ * results
+ */
+export class Pattern {
+ readonly #patternList: PatternList
+ readonly #globList: GlobList
+ readonly #index: number
+ readonly length: number
+ readonly #platform: NodeJS.Platform
+ #rest?: Pattern | null
+ #globString?: string
+ #isDrive?: boolean
+ #isUNC?: boolean
+ #isAbsolute?: boolean
+ #followGlobstar: boolean = true
+
+ constructor(
+ patternList: MMPattern[],
+ globList: string[],
+ index: number,
+ platform: NodeJS.Platform
+ ) {
+ if (!isPatternList(patternList)) {
+ throw new TypeError('empty pattern list')
+ }
+ if (!isGlobList(globList)) {
+ throw new TypeError('empty glob list')
+ }
+ if (globList.length !== patternList.length) {
+ throw new TypeError('mismatched pattern list and glob list lengths')
+ }
+ this.length = patternList.length
+ if (index < 0 || index >= this.length) {
+ throw new TypeError('index out of range')
+ }
+ this.#patternList = patternList
+ this.#globList = globList
+ this.#index = index
+ this.#platform = platform
+
+ // normalize root entries of absolute patterns on initial creation.
+ if (this.#index === 0) {
+ // c: => ['c:/']
+ // C:/ => ['C:/']
+ // C:/x => ['C:/', 'x']
+ // //host/share => ['//host/share/']
+ // //host/share/ => ['//host/share/']
+ // //host/share/x => ['//host/share/', 'x']
+ // /etc => ['/', 'etc']
+ // / => ['/']
+ if (this.isUNC()) {
+ // '' / '' / 'host' / 'share'
+ const [p0, p1, p2, p3, ...prest] = this.#patternList
+ const [g0, g1, g2, g3, ...grest] = this.#globList
+ if (prest[0] === '') {
+ // ends in /
+ prest.shift()
+ grest.shift()
+ }
+ const p = [p0, p1, p2, p3, ''].join('/')
+ const g = [g0, g1, g2, g3, ''].join('/')
+ this.#patternList = [p, ...prest]
+ this.#globList = [g, ...grest]
+ this.length = this.#patternList.length
+ } else if (this.isDrive() || this.isAbsolute()) {
+ const [p1, ...prest] = this.#patternList
+ const [g1, ...grest] = this.#globList
+ if (prest[0] === '') {
+ // ends in /
+ prest.shift()
+ grest.shift()
+ }
+ const p = (p1 as string) + '/'
+ const g = g1 + '/'
+ this.#patternList = [p, ...prest]
+ this.#globList = [g, ...grest]
+ this.length = this.#patternList.length
+ }
+ }
+ }
+
+ /**
+ * The first entry in the parsed list of patterns
+ */
+ pattern(): MMPattern {
+ return this.#patternList[this.#index]
+ }
+
+ /**
+ * true of if pattern() returns a string
+ */
+ isString(): boolean {
+ return typeof this.#patternList[this.#index] === 'string'
+ }
+ /**
+ * true of if pattern() returns GLOBSTAR
+ */
+ isGlobstar(): boolean {
+ return this.#patternList[this.#index] === GLOBSTAR
+ }
+ /**
+ * true if pattern() returns a regexp
+ */
+ isRegExp(): boolean {
+ return this.#patternList[this.#index] instanceof RegExp
+ }
+
+ /**
+ * The /-joined set of glob parts that make up this pattern
+ */
+ globString(): string {
+ return (this.#globString =
+ this.#globString ||
+ (this.#index === 0
+ ? this.isAbsolute()
+ ? this.#globList[0] + this.#globList.slice(1).join('/')
+ : this.#globList.join('/')
+ : this.#globList.slice(this.#index).join('/')))
+ }
+
+ /**
+ * true if there are more pattern parts after this one
+ */
+ hasMore(): boolean {
+ return this.length > this.#index + 1
+ }
+
+ /**
+ * The rest of the pattern after this part, or null if this is the end
+ */
+ rest(): Pattern | null {
+ if (this.#rest !== undefined) return this.#rest
+ if (!this.hasMore()) return (this.#rest = null)
+ this.#rest = new Pattern(
+ this.#patternList,
+ this.#globList,
+ this.#index + 1,
+ this.#platform
+ )
+ this.#rest.#isAbsolute = this.#isAbsolute
+ this.#rest.#isUNC = this.#isUNC
+ this.#rest.#isDrive = this.#isDrive
+ return this.#rest
+ }
+
+ /**
+ * true if the pattern represents a //unc/path/ on windows
+ */
+ isUNC(): boolean {
+ const pl = this.#patternList
+ return this.#isUNC !== undefined
+ ? this.#isUNC
+ : (this.#isUNC =
+ this.#platform === 'win32' &&
+ this.#index === 0 &&
+ pl[0] === '' &&
+ pl[1] === '' &&
+ typeof pl[2] === 'string' &&
+ !!pl[2] &&
+ typeof pl[3] === 'string' &&
+ !!pl[3])
+ }
+
+ // pattern like C:/...
+ // split = ['C:', ...]
+ // XXX: would be nice to handle patterns like `c:*` to test the cwd
+ // in c: for *, but I don't know of a way to even figure out what that
+ // cwd is without actually chdir'ing into it?
+ /**
+ * True if the pattern starts with a drive letter on Windows
+ */
+ isDrive(): boolean {
+ const pl = this.#patternList
+ return this.#isDrive !== undefined
+ ? this.#isDrive
+ : (this.#isDrive =
+ this.#platform === 'win32' &&
+ this.#index === 0 &&
+ this.length > 1 &&
+ typeof pl[0] === 'string' &&
+ /^[a-z]:$/i.test(pl[0]))
+ }
+
+ // pattern = '/' or '/...' or '/x/...'
+ // split = ['', ''] or ['', ...] or ['', 'x', ...]
+ // Drive and UNC both considered absolute on windows
+ /**
+ * True if the pattern is rooted on an absolute path
+ */
+ isAbsolute(): boolean {
+ const pl = this.#patternList
+ return this.#isAbsolute !== undefined
+ ? this.#isAbsolute
+ : (this.#isAbsolute =
+ (pl[0] === '' && pl.length > 1) ||
+ this.isDrive() ||
+ this.isUNC())
+ }
+
+ /**
+ * consume the root of the pattern, and return it
+ */
+ root(): string {
+ const p = this.#patternList[0]
+ return typeof p === 'string' && this.isAbsolute() && this.#index === 0
+ ? p
+ : ''
+ }
+
+ /**
+ * Check to see if the current globstar pattern is allowed to follow
+ * a symbolic link.
+ */
+ checkFollowGlobstar(): boolean {
+ return !(
+ this.#index === 0 ||
+ !this.isGlobstar() ||
+ !this.#followGlobstar
+ )
+ }
+
+ /**
+ * Mark that the current globstar pattern is following a symbolic link
+ */
+ markFollowGlobstar(): boolean {
+ if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar)
+ return false
+ this.#followGlobstar = false
+ return true
+ }
+}
diff --git a/src/processor.ts b/src/processor.ts
new file mode 100644
index 00000000..b0949ceb
--- /dev/null
+++ b/src/processor.ts
@@ -0,0 +1,320 @@
+// synchronous utility for filtering entries and calculating subwalks
+
+import { GLOBSTAR, MMRegExp } from 'minimatch'
+import { Path } from 'path-scurry'
+import { MMPattern, Pattern } from './pattern.js'
+import { GlobWalkerOpts } from './walker.js'
+
+/**
+ * A cache of which patterns have been processed for a given Path
+ */
+export class HasWalkedCache {
+ store: Map>
+ constructor(store: Map> = new Map()) {
+ this.store = store
+ }
+ copy() {
+ return new HasWalkedCache(new Map(this.store))
+ }
+ hasWalked(target: Path, pattern: Pattern) {
+ return this.store.get(target.fullpath())?.has(pattern.globString())
+ }
+ storeWalked(target: Path, pattern: Pattern) {
+ const fullpath = target.fullpath()
+ const cached = this.store.get(fullpath)
+ if (cached) cached.add(pattern.globString())
+ else this.store.set(fullpath, new Set([pattern.globString()]))
+ }
+}
+
+/**
+ * A record of which paths have been matched in a given walk step,
+ * and whether they only are considered a match if they are a directory,
+ * and whether their absolute or relative path should be returned.
+ */
+export class MatchRecord {
+ store: Map = new Map()
+ add(target: Path, absolute: boolean, ifDir: boolean) {
+ const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0)
+ const current = this.store.get(target)
+ this.store.set(target, current === undefined ? n : n & current)
+ }
+ // match, absolute, ifdir
+ entries(): [Path, boolean, boolean][] {
+ return [...this.store.entries()].map(([path, n]) => [
+ path,
+ !!(n & 2),
+ !!(n & 1),
+ ])
+ }
+}
+
+/**
+ * A collection of patterns that must be processed in a subsequent step
+ * for a given path.
+ */
+export class SubWalks {
+ store: Map = new Map()
+ add(target: Path, pattern: Pattern) {
+ if (!target.canReaddir()) {
+ return
+ }
+ const subs = this.store.get(target)
+ if (subs) {
+ if (!subs.find(p => p.globString() === pattern.globString())) {
+ subs.push(pattern)
+ }
+ } else this.store.set(target, [pattern])
+ }
+ get(target: Path): Pattern[] {
+ const subs = this.store.get(target)
+ /* c8 ignore start */
+ if (!subs) {
+ throw new Error('attempting to walk unknown path')
+ }
+ /* c8 ignore stop */
+ return subs
+ }
+ entries(): [Path, Pattern[]][] {
+ return this.keys().map(k => [k, this.store.get(k) as Pattern[]])
+ }
+ keys(): Path[] {
+ return [...this.store.keys()].filter(t => t.canReaddir())
+ }
+}
+
+/**
+ * The class that processes patterns for a given path.
+ *
+ * Handles child entry filtering, and determining whether a path's
+ * directory contents must be read.
+ */
+export class Processor {
+ hasWalkedCache: HasWalkedCache
+ matches = new MatchRecord()
+ subwalks = new SubWalks()
+ patterns?: Pattern[]
+ follow: boolean
+ dot: boolean
+ opts: GlobWalkerOpts
+
+ constructor(opts: GlobWalkerOpts, hasWalkedCache?: HasWalkedCache) {
+ this.opts = opts
+ this.follow = !!opts.follow
+ this.dot = !!opts.dot
+ this.hasWalkedCache = hasWalkedCache
+ ? hasWalkedCache.copy()
+ : new HasWalkedCache()
+ }
+
+ processPatterns(target: Path, patterns: Pattern[]) {
+ this.patterns = patterns
+ const processingSet: [Path, Pattern][] = patterns.map(p => [target, p])
+
+ // map of paths to the magic-starting subwalks they need to walk
+ // first item in patterns is the filter
+
+ for (let [t, pattern] of processingSet) {
+ this.hasWalkedCache.storeWalked(t, pattern)
+
+ const root = pattern.root()
+ const absolute = pattern.isAbsolute() && this.opts.absolute !== false
+
+ // start absolute patterns at root
+ if (root) {
+ t = t.resolve(
+ root === '/' && this.opts.root !== undefined
+ ? this.opts.root
+ : root
+ )
+ const rest = pattern.rest()
+ if (!rest) {
+ this.matches.add(t, true, false)
+ continue
+ } else {
+ pattern = rest
+ }
+ }
+
+ if (t.isENOENT()) continue
+
+ let p: MMPattern
+ let rest: Pattern | null
+ let changed = false
+ 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
+ }
+ p = pattern.pattern()
+ rest = pattern.rest()
+ if (changed) {
+ if (this.hasWalkedCache.hasWalked(t, pattern)) continue
+ this.hasWalkedCache.storeWalked(t, pattern)
+ }
+
+ // now we have either a final string for a known entry,
+ // 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)
+ }
+ continue
+ } else if (p === GLOBSTAR) {
+ // if no rest, match and subwalk pattern
+ // if rest, process rest and subwalk pattern
+ // if it's a symlink, but we didn't get here by way of a
+ // globstar match (meaning it's the first time THIS globstar
+ // has traversed a symlink), then we follow it. Otherwise, stop.
+ if (
+ !t.isSymbolicLink() ||
+ this.follow ||
+ pattern.checkFollowGlobstar()
+ ) {
+ this.subwalks.add(t, pattern)
+ }
+ const rp = rest?.pattern()
+ const rrest = rest?.rest()
+ if (!rest || ((rp === '' || rp === '.') && !rrest)) {
+ // only HAS to be a dir if it ends in **/ or **/.
+ // but ending in ** will match files as well.
+ this.matches.add(t, absolute, rp === '' || rp === '.')
+ } else {
+ if (rp === '..') {
+ // this would mean you're matching **/.. at the fs root,
+ // and no thanks, I'm not gonna test that specific case.
+ /* c8 ignore start */
+ const tp = t.parent || t
+ /* c8 ignore stop */
+ if (!rrest) this.matches.add(tp, absolute, true)
+ else if (!this.hasWalkedCache.hasWalked(tp, rrest)) {
+ this.subwalks.add(tp, rrest)
+ }
+ }
+ }
+ } else if (p instanceof RegExp) {
+ this.subwalks.add(t, pattern)
+ }
+ }
+
+ return this
+ }
+
+ subwalkTargets(): Path[] {
+ return this.subwalks.keys()
+ }
+
+ child() {
+ return new Processor(this.opts, this.hasWalkedCache)
+ }
+
+ // return a new Processor containing the subwalks for each
+ // child entry, and a set of matches, and
+ // a hasWalkedCache that's a copy of this one
+ // then we're going to call
+ filterEntries(parent: Path, entries: Path[]): Processor {
+ const patterns = this.subwalks.get(parent)
+ // put matches and entry walks into the results processor
+ const results = this.child()
+ for (const e of entries) {
+ for (const pattern of patterns) {
+ const absolute = pattern.isAbsolute()
+ const p = pattern.pattern()
+ const rest = pattern.rest()
+ if (p === GLOBSTAR) {
+ results.testGlobstar(e, pattern, rest, absolute)
+ } else if (p instanceof RegExp) {
+ results.testRegExp(e, p, rest, absolute)
+ } else {
+ results.testString(e, p, rest, absolute)
+ }
+ }
+ }
+ return results
+ }
+
+ testGlobstar(
+ e: Path,
+ pattern: Pattern,
+ rest: Pattern | null,
+ absolute: boolean
+ ) {
+ if (this.dot || !e.name.startsWith('.')) {
+ if (!pattern.hasMore()) {
+ this.matches.add(e, absolute, false)
+ }
+ if (e.canReaddir()) {
+ // if we're in follow mode or it's not a symlink, just keep
+ // testing the same pattern. If there's more after the globstar,
+ // then this symlink consumes the globstar. If not, then we can
+ // follow at most ONE symlink along the way, so we mark it, which
+ // also checks to ensure that it wasn't already marked.
+ if (this.follow || !e.isSymbolicLink()) {
+ this.subwalks.add(e, pattern)
+ } else if (e.isSymbolicLink()) {
+ if (rest && pattern.checkFollowGlobstar()) {
+ this.subwalks.add(e, rest)
+ } else if (pattern.markFollowGlobstar()) {
+ this.subwalks.add(e, pattern)
+ }
+ }
+ }
+ }
+ // if the NEXT thing matches this entry, then also add
+ // the rest.
+ if (rest) {
+ const rp = rest.pattern()
+ if (
+ typeof rp === 'string' &&
+ // dots and empty were handled already
+ rp !== '..' &&
+ rp !== '' &&
+ rp !== '.'
+ ) {
+ this.testString(e, rp, rest.rest(), absolute)
+ } else if (rp === '..') {
+ /* c8 ignore start */
+ const ep = e.parent || e
+ /* c8 ignore stop */
+ this.subwalks.add(ep, rest)
+ } else if (rp instanceof RegExp) {
+ this.testRegExp(e, rp, rest.rest(), absolute)
+ }
+ }
+ }
+
+ testRegExp(
+ e: Path,
+ p: MMRegExp,
+ rest: Pattern | null,
+ absolute: boolean
+ ) {
+ if (!p.test(e.name)) return
+ if (!rest) {
+ this.matches.add(e, absolute, false)
+ } else {
+ this.subwalks.add(e, rest)
+ }
+ }
+
+ testString(e: Path, p: string, rest: Pattern | null, absolute: boolean) {
+ // should never happen?
+ if (!e.isNamed(p)) return
+ if (!rest) {
+ this.matches.add(e, absolute, false)
+ } else {
+ this.subwalks.add(e, rest)
+ }
+ }
+}
diff --git a/src/walker.ts b/src/walker.ts
new file mode 100644
index 00000000..6248da6c
--- /dev/null
+++ b/src/walker.ts
@@ -0,0 +1,482 @@
+/**
+ * Single-use utility classes to provide functionality to the {@link Glob}
+ * methods.
+ *
+ * @module
+ */
+import Minipass from 'minipass'
+import { Path } from 'path-scurry'
+import { Ignore, IgnoreLike } from './ignore.js'
+
+// XXX can we somehow make it so that it NEVER processes a given path more than
+// once, enough that the match set tracking is no longer needed? that'd speed
+// things up a lot. Or maybe bring back nounique, and skip it in that case?
+
+// a single minimatch set entry with 1 or more parts
+import { Pattern } from './pattern.js'
+import { Processor } from './processor.js'
+
+export interface GlobWalkerOpts {
+ absolute?: boolean
+ allowWindowsEscape?: boolean
+ cwd?: string | URL
+ dot?: boolean
+ dotRelative?: boolean
+ follow?: boolean
+ ignore?: string | string[] | IgnoreLike
+ mark?: boolean
+ matchBase?: boolean
+ // Note: maxDepth here means "maximum actual Path.depth()",
+ // not "maximum depth beyond cwd"
+ maxDepth?: number
+ nobrace?: boolean
+ nocase?: boolean
+ nodir?: boolean
+ noext?: boolean
+ noglobstar?: boolean
+ platform?: NodeJS.Platform
+ realpath?: boolean
+ root?: string
+ stat?: boolean
+ signal?: AbortSignal
+ windowsPathsNoEscape?: boolean
+ withFileTypes?: boolean
+}
+
+export type GWOFileTypesTrue = GlobWalkerOpts & {
+ withFileTypes: true
+}
+export type GWOFileTypesFalse = GlobWalkerOpts & {
+ withFileTypes: false
+}
+export type GWOFileTypesUnset = GlobWalkerOpts & {
+ withFileTypes?: undefined
+}
+
+export type Result = O extends GWOFileTypesTrue
+ ? Path
+ : O extends GWOFileTypesFalse
+ ? string
+ : O extends GWOFileTypesUnset
+ ? string
+ : Path | string
+
+export type Matches = O extends GWOFileTypesTrue
+ ? Set
+ : O extends GWOFileTypesFalse
+ ? Set
+ : O extends GWOFileTypesUnset
+ ? Set
+ : Set
+
+export type MatchStream =
+ O extends GWOFileTypesTrue
+ ? Minipass
+ : O extends GWOFileTypesFalse
+ ? Minipass
+ : O extends GWOFileTypesUnset
+ ? Minipass
+ : Minipass
+
+const makeIgnore = (
+ ignore: string | string[] | IgnoreLike,
+ opts: GlobWalkerOpts
+): IgnoreLike =>
+ typeof ignore === 'string'
+ ? new Ignore([ignore], opts)
+ : Array.isArray(ignore)
+ ? new Ignore(ignore, opts)
+ : ignore
+
+/**
+ * basic walking utilities that all the glob walker types use
+ */
+export abstract class GlobUtil {
+ path: Path
+ patterns: Pattern[]
+ opts: O
+ seen: Set = new Set()
+ paused: boolean = false
+ aborted: boolean = false
+ #onResume: (() => any)[] = []
+ #ignore?: IgnoreLike
+ #sep: '\\' | '/'
+ signal?: AbortSignal
+ maxDepth: number
+
+ constructor(patterns: Pattern[], path: Path, opts: O)
+ constructor(patterns: Pattern[], path: Path, opts: O) {
+ this.patterns = patterns
+ this.path = path
+ this.opts = opts
+ this.#sep = opts.platform === 'win32' ? '\\' : '/'
+ if (opts.ignore) {
+ this.#ignore = makeIgnore(opts.ignore, opts)
+ }
+ // ignore, always set with maxDepth, but it's optional on the
+ // GlobOptions type
+ /* c8 ignore start */
+ this.maxDepth = opts.maxDepth || Infinity
+ /* c8 ignore stop */
+ if (opts.signal) {
+ this.signal = opts.signal
+ this.signal.addEventListener('abort', () => {
+ this.#onResume.length = 0
+ })
+ }
+ }
+
+ #ignored(path: Path): boolean {
+ return this.seen.has(path) || !!this.#ignore?.ignored?.(path)
+ }
+ #childrenIgnored(path: Path): boolean {
+ return !!this.#ignore?.childrenIgnored?.(path)
+ }
+
+ // backpressure mechanism
+ pause() {
+ this.paused = true
+ }
+ resume() {
+ /* c8 ignore start */
+ if (this.signal?.aborted) return
+ /* c8 ignore stop */
+ this.paused = false
+ let fn: (() => any) | undefined = undefined
+ while (!this.paused && (fn = this.#onResume.shift())) {
+ fn()
+ }
+ }
+ onResume(fn: () => any) {
+ if (this.signal?.aborted) return
+ /* c8 ignore start */
+ if (!this.paused) {
+ fn()
+ } else {
+ /* c8 ignore stop */
+ this.#onResume.push(fn)
+ }
+ }
+
+ // do the requisite realpath/stat checking, and return the path
+ // to add or undefined to filter it out.
+ async matchCheck(e: Path, ifDir: boolean): Promise {
+ if (ifDir && this.opts.nodir) return undefined
+ let rpc: Path | undefined
+ if (this.opts.realpath) {
+ rpc = e.realpathCached() || (await e.realpath())
+ if (!rpc) return undefined
+ e = rpc
+ }
+ const needStat = e.isUnknown() || this.opts.stat
+ return this.matchCheckTest(needStat ? await e.lstat() : e, ifDir)
+ }
+
+ matchCheckTest(e: Path | undefined, ifDir: boolean): Path | undefined {
+ return e &&
+ (this.maxDepth === Infinity || e.depth() <= this.maxDepth) &&
+ (!ifDir || e.canReaddir()) &&
+ (!this.opts.nodir || !e.isDirectory()) &&
+ !this.#ignored(e)
+ ? e
+ : undefined
+ }
+
+ matchCheckSync(e: Path, ifDir: boolean): Path | undefined {
+ if (ifDir && this.opts.nodir) return undefined
+ let rpc: Path | undefined
+ if (this.opts.realpath) {
+ rpc = e.realpathCached() || e.realpathSync()
+ if (!rpc) return undefined
+ e = rpc
+ }
+ const needStat = e.isUnknown() || this.opts.stat
+ return this.matchCheckTest(needStat ? e.lstatSync() : e, ifDir)
+ }
+
+ abstract matchEmit(p: Result): void
+ abstract matchEmit(p: string | Path): void
+
+ matchFinish(e: Path, absolute: boolean) {
+ if (this.#ignored(e)) return
+ const abs =
+ this.opts.absolute === undefined ? absolute : this.opts.absolute
+ this.seen.add(e)
+ const mark = this.opts.mark && e.isDirectory() ? this.#sep : ''
+ // ok, we have what we need!
+ if (this.opts.withFileTypes) {
+ this.matchEmit(e)
+ } else if (abs) {
+ this.matchEmit(e.fullpath() + mark)
+ } else {
+ const rel = e.relative()
+ const pre =
+ this.opts.dotRelative && !rel.startsWith('..' + this.#sep)
+ ? '.' + this.#sep
+ : ''
+ this.matchEmit(!rel && mark ? '.' + mark : pre + rel + mark)
+ }
+ }
+
+ async match(e: Path, absolute: boolean, ifDir: boolean): Promise {
+ const p = await this.matchCheck(e, ifDir)
+ if (p) this.matchFinish(p, absolute)
+ }
+
+ matchSync(e: Path, absolute: boolean, ifDir: boolean): void {
+ const p = this.matchCheckSync(e, ifDir)
+ if (p) this.matchFinish(p, absolute)
+ }
+
+ walkCB(target: Path, patterns: Pattern[], cb: () => any) {
+ /* c8 ignore start */
+ if (this.signal?.aborted) cb()
+ /* c8 ignore stop */
+ this.walkCB2(target, patterns, new Processor(this.opts), cb)
+ }
+
+ walkCB2(
+ target: Path,
+ patterns: Pattern[],
+ processor: Processor,
+ cb: () => any
+ ) {
+ if (this.#childrenIgnored(target)) return cb()
+ if (this.signal?.aborted) cb()
+ if (this.paused) {
+ this.onResume(() => this.walkCB2(target, patterns, processor, cb))
+ return
+ }
+ processor.processPatterns(target, patterns)
+
+ // done processing. all of the above is sync, can be abstracted out.
+ // subwalks is a map of paths to the entry filters they need
+ // matches is a map of paths to [absolute, ifDir] tuples.
+ let tasks = 1
+ const next = () => {
+ if (--tasks === 0) cb()
+ }
+
+ for (const [m, absolute, ifDir] of processor.matches.entries()) {
+ if (this.#ignored(m)) continue
+ tasks++
+ this.match(m, absolute, ifDir).then(() => next())
+ }
+
+ for (const t of processor.subwalkTargets()) {
+ if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {
+ continue
+ }
+ tasks++
+ const childrenCached = t.readdirCached()
+ if (t.calledReaddir())
+ this.walkCB3(t, childrenCached, processor, next)
+ else {
+ t.readdirCB(
+ (_, entries) => this.walkCB3(t, entries, processor, next),
+ true
+ )
+ }
+ }
+
+ next()
+ }
+
+ walkCB3(
+ target: Path,
+ entries: Path[],
+ processor: Processor,
+ cb: () => any
+ ) {
+ processor = processor.filterEntries(target, entries)
+
+ let tasks = 1
+ const next = () => {
+ if (--tasks === 0) cb()
+ }
+
+ for (const [m, absolute, ifDir] of processor.matches.entries()) {
+ if (this.#ignored(m)) continue
+ tasks++
+ this.match(m, absolute, ifDir).then(() => next())
+ }
+ for (const [target, patterns] of processor.subwalks.entries()) {
+ tasks++
+ this.walkCB2(target, patterns, processor.child(), next)
+ }
+
+ next()
+ }
+
+ walkCBSync(target: Path, patterns: Pattern[], cb: () => any) {
+ /* c8 ignore start */
+ if (this.signal?.aborted) cb()
+ /* c8 ignore stop */
+ this.walkCB2Sync(target, patterns, new Processor(this.opts), cb)
+ }
+
+ walkCB2Sync(
+ target: Path,
+ patterns: Pattern[],
+ processor: Processor,
+ cb: () => any
+ ) {
+ if (this.#childrenIgnored(target)) return cb()
+ if (this.signal?.aborted) cb()
+ if (this.paused) {
+ this.onResume(() =>
+ this.walkCB2Sync(target, patterns, processor, cb)
+ )
+ return
+ }
+ processor.processPatterns(target, patterns)
+
+ // done processing. all of the above is sync, can be abstracted out.
+ // subwalks is a map of paths to the entry filters they need
+ // matches is a map of paths to [absolute, ifDir] tuples.
+ let tasks = 1
+ const next = () => {
+ if (--tasks === 0) cb()
+ }
+
+ for (const [m, absolute, ifDir] of processor.matches.entries()) {
+ if (this.#ignored(m)) continue
+ this.matchSync(m, absolute, ifDir)
+ }
+
+ for (const t of processor.subwalkTargets()) {
+ if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {
+ continue
+ }
+ tasks++
+ const children = t.readdirSync()
+ this.walkCB3Sync(t, children, processor, next)
+ }
+
+ next()
+ }
+
+ walkCB3Sync(
+ target: Path,
+ entries: Path[],
+ processor: Processor,
+ cb: () => any
+ ) {
+ processor = processor.filterEntries(target, entries)
+
+ let tasks = 1
+ const next = () => {
+ if (--tasks === 0) cb()
+ }
+
+ for (const [m, absolute, ifDir] of processor.matches.entries()) {
+ if (this.#ignored(m)) continue
+ this.matchSync(m, absolute, ifDir)
+ }
+ for (const [target, patterns] of processor.subwalks.entries()) {
+ tasks++
+ this.walkCB2Sync(target, patterns, processor.child(), next)
+ }
+
+ next()
+ }
+}
+
+export class GlobWalker<
+ O extends GlobWalkerOpts = GlobWalkerOpts
+> extends GlobUtil {
+ matches: O extends GWOFileTypesTrue
+ ? Set
+ : O extends GWOFileTypesFalse
+ ? Set
+ : O extends GWOFileTypesUnset
+ ? Set
+ : Set
+
+ constructor(patterns: Pattern[], path: Path, opts: O) {
+ super(patterns, path, opts)
+ this.matches = new Set() as Matches
+ }
+
+ matchEmit(e: Result): void
+ matchEmit(e: Path | string): void {
+ this.matches.add(e)
+ }
+
+ async walk(): Promise> {
+ if (this.signal?.aborted) throw this.signal.reason
+ if (this.path.isUnknown()) {
+ await this.path.lstat()
+ }
+ await new Promise((res, rej) => {
+ this.walkCB(this.path, this.patterns, () => {
+ if (this.signal?.aborted) {
+ rej(this.signal.reason)
+ } else {
+ res(this.matches)
+ }
+ })
+ })
+ return this.matches
+ }
+
+ walkSync(): Matches {
+ if (this.signal?.aborted) throw this.signal.reason
+ if (this.path.isUnknown()) {
+ this.path.lstatSync()
+ }
+ // nothing for the callback to do, because this never pauses
+ this.walkCBSync(this.path, this.patterns, () => {
+ if (this.signal?.aborted) throw this.signal.reason
+ })
+ return this.matches
+ }
+}
+
+export class GlobStream<
+ O extends GlobWalkerOpts = GlobWalkerOpts
+> extends GlobUtil {
+ results: O extends GWOFileTypesTrue
+ ? Minipass
+ : O extends GWOFileTypesFalse
+ ? Minipass
+ : O extends GWOFileTypesUnset
+ ? Minipass
+ : Minipass
+
+ constructor(patterns: Pattern[], path: Path, opts: O) {
+ super(patterns, path, opts)
+ this.results = new Minipass({
+ signal: this.signal,
+ objectMode: true,
+ }) as MatchStream
+ this.results.on('drain', () => this.resume())
+ this.results.on('resume', () => this.resume())
+ }
+
+ matchEmit(e: Result): void
+ matchEmit(e: Path | string): void {
+ this.results.write(e)
+ if (!this.results.flowing) this.pause()
+ }
+
+ stream(): MatchStream {
+ const target = this.path
+ if (target.isUnknown()) {
+ target.lstat().then(() => {
+ this.walkCB(target, this.patterns, () => this.results.end())
+ })
+ } else {
+ this.walkCB(target, this.patterns, () => this.results.end())
+ }
+ return this.results
+ }
+
+ streamSync(): MatchStream {
+ if (this.path.isUnknown()) {
+ this.path.lstatSync()
+ }
+ this.walkCBSync(this.path, this.patterns, () => this.results.end())
+ return this.results
+ }
+}
diff --git a/sync.js b/sync.js
deleted file mode 100644
index c952134b..00000000
--- a/sync.js
+++ /dev/null
@@ -1,486 +0,0 @@
-module.exports = globSync
-globSync.GlobSync = GlobSync
-
-var fs = require('fs')
-var rp = require('fs.realpath')
-var minimatch = require('minimatch')
-var Minimatch = minimatch.Minimatch
-var Glob = require('./glob.js').Glob
-var util = require('util')
-var path = require('path')
-var assert = require('assert')
-var isAbsolute = require('path-is-absolute')
-var common = require('./common.js')
-var alphasort = common.alphasort
-var alphasorti = common.alphasorti
-var setopts = common.setopts
-var ownProp = common.ownProp
-var childrenIgnored = common.childrenIgnored
-var isIgnored = common.isIgnored
-
-function globSync (pattern, options) {
- if (typeof options === 'function' || arguments.length === 3)
- throw new TypeError('callback provided to sync glob\n'+
- 'See: https://github.com/isaacs/node-glob/issues/167')
-
- return new GlobSync(pattern, options).found
-}
-
-function GlobSync (pattern, options) {
- if (!pattern)
- throw new Error('must provide pattern')
-
- if (typeof options === 'function' || arguments.length === 3)
- throw new TypeError('callback provided to sync glob\n'+
- 'See: https://github.com/isaacs/node-glob/issues/167')
-
- if (!(this instanceof GlobSync))
- return new GlobSync(pattern, options)
-
- setopts(this, pattern, options)
-
- if (this.noprocess)
- return this
-
- var n = this.minimatch.set.length
- this.matches = new Array(n)
- for (var i = 0; i < n; i ++) {
- this._process(this.minimatch.set[i], i, false)
- }
- this._finish()
-}
-
-GlobSync.prototype._finish = function () {
- assert(this instanceof GlobSync)
- if (this.realpath) {
- var self = this
- this.matches.forEach(function (matchset, index) {
- var set = self.matches[index] = Object.create(null)
- for (var p in matchset) {
- try {
- p = self._makeAbs(p)
- var real = rp.realpathSync(p, self.realpathCache)
- set[real] = true
- } catch (er) {
- if (er.syscall === 'stat')
- set[self._makeAbs(p)] = true
- else
- throw er
- }
- }
- })
- }
- common.finish(this)
-}
-
-
-GlobSync.prototype._process = function (pattern, index, inGlobStar) {
- assert(this instanceof GlobSync)
-
- // Get the first [n] parts of pattern that are all strings.
- var n = 0
- while (typeof pattern[n] === 'string') {
- n ++
- }
- // now n is the index of the first one that is *not* a string.
-
- // See if there's anything else
- var prefix
- switch (n) {
- // if not, then this is rather simple
- case pattern.length:
- this._processSimple(pattern.join('/'), index)
- return
-
- case 0:
- // pattern *starts* with some non-trivial item.
- // going to readdir(cwd), but not include the prefix in matches.
- prefix = null
- break
-
- default:
- // pattern has some string bits in the front.
- // whatever it starts with, whether that's 'absolute' like /foo/bar,
- // or 'relative' like '../baz'
- prefix = pattern.slice(0, n).join('/')
- break
- }
-
- var remain = pattern.slice(n)
-
- // get the list of entries.
- var read
- if (prefix === null)
- read = '.'
- else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
- if (!prefix || !isAbsolute(prefix))
- prefix = '/' + prefix
- read = prefix
- } else
- read = prefix
-
- var abs = this._makeAbs(read)
-
- //if ignored, skip processing
- if (childrenIgnored(this, read))
- return
-
- var isGlobStar = remain[0] === minimatch.GLOBSTAR
- if (isGlobStar)
- this._processGlobStar(prefix, read, abs, remain, index, inGlobStar)
- else
- this._processReaddir(prefix, read, abs, remain, index, inGlobStar)
-}
-
-
-GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) {
- var entries = this._readdir(abs, inGlobStar)
-
- // if the abs isn't a dir, then nothing can match!
- if (!entries)
- return
-
- // It will only match dot entries if it starts with a dot, or if
- // dot is set. Stuff like @(.foo|.bar) isn't allowed.
- var pn = remain[0]
- var negate = !!this.minimatch.negate
- var rawGlob = pn._glob
- var dotOk = this.dot || rawGlob.charAt(0) === '.'
-
- var matchedEntries = []
- for (var i = 0; i < entries.length; i++) {
- var e = entries[i]
- if (e.charAt(0) !== '.' || dotOk) {
- var m
- if (negate && !prefix) {
- m = !e.match(pn)
- } else {
- m = e.match(pn)
- }
- if (m)
- matchedEntries.push(e)
- }
- }
-
- var len = matchedEntries.length
- // If there are no matched entries, then nothing matches.
- if (len === 0)
- return
-
- // if this is the last remaining pattern bit, then no need for
- // an additional stat *unless* the user has specified mark or
- // stat explicitly. We know they exist, since readdir returned
- // them.
-
- if (remain.length === 1 && !this.mark && !this.stat) {
- if (!this.matches[index])
- this.matches[index] = Object.create(null)
-
- for (var i = 0; i < len; i ++) {
- var e = matchedEntries[i]
- if (prefix) {
- if (prefix.slice(-1) !== '/')
- e = prefix + '/' + e
- else
- e = prefix + e
- }
-
- if (e.charAt(0) === '/' && !this.nomount) {
- e = path.join(this.root, e)
- }
- this._emitMatch(index, e)
- }
- // This was the last one, and no stats were needed
- return
- }
-
- // now test all matched entries as stand-ins for that part
- // of the pattern.
- remain.shift()
- for (var i = 0; i < len; i ++) {
- var e = matchedEntries[i]
- var newPattern
- if (prefix)
- newPattern = [prefix, e]
- else
- newPattern = [e]
- this._process(newPattern.concat(remain), index, inGlobStar)
- }
-}
-
-
-GlobSync.prototype._emitMatch = function (index, e) {
- if (isIgnored(this, e))
- return
-
- var abs = this._makeAbs(e)
-
- if (this.mark)
- e = this._mark(e)
-
- if (this.absolute) {
- e = abs
- }
-
- if (this.matches[index][e])
- return
-
- if (this.nodir) {
- var c = this.cache[abs]
- if (c === 'DIR' || Array.isArray(c))
- return
- }
-
- this.matches[index][e] = true
-
- if (this.stat)
- this._stat(e)
-}
-
-
-GlobSync.prototype._readdirInGlobStar = function (abs) {
- // follow all symlinked directories forever
- // just proceed as if this is a non-globstar situation
- if (this.follow)
- return this._readdir(abs, false)
-
- var entries
- var lstat
- var stat
- try {
- lstat = fs.lstatSync(abs)
- } catch (er) {
- if (er.code === 'ENOENT') {
- // lstat failed, doesn't exist
- return null
- }
- }
-
- var isSym = lstat && lstat.isSymbolicLink()
- this.symlinks[abs] = isSym
-
- // If it's not a symlink or a dir, then it's definitely a regular file.
- // don't bother doing a readdir in that case.
- if (!isSym && lstat && !lstat.isDirectory())
- this.cache[abs] = 'FILE'
- else
- entries = this._readdir(abs, false)
-
- return entries
-}
-
-GlobSync.prototype._readdir = function (abs, inGlobStar) {
- var entries
-
- if (inGlobStar && !ownProp(this.symlinks, abs))
- return this._readdirInGlobStar(abs)
-
- if (ownProp(this.cache, abs)) {
- var c = this.cache[abs]
- if (!c || c === 'FILE')
- return null
-
- if (Array.isArray(c))
- return c
- }
-
- try {
- return this._readdirEntries(abs, fs.readdirSync(abs))
- } catch (er) {
- this._readdirError(abs, er)
- return null
- }
-}
-
-GlobSync.prototype._readdirEntries = function (abs, entries) {
- // if we haven't asked to stat everything, then just
- // assume that everything in there exists, so we can avoid
- // having to stat it a second time.
- if (!this.mark && !this.stat) {
- for (var i = 0; i < entries.length; i ++) {
- var e = entries[i]
- if (abs === '/')
- e = abs + e
- else
- e = abs + '/' + e
- this.cache[e] = true
- }
- }
-
- this.cache[abs] = entries
-
- // mark and cache dir-ness
- return entries
-}
-
-GlobSync.prototype._readdirError = function (f, er) {
- // handle errors, and cache the information
- switch (er.code) {
- case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205
- case 'ENOTDIR': // totally normal. means it *does* exist.
- var abs = this._makeAbs(f)
- this.cache[abs] = 'FILE'
- if (abs === this.cwdAbs) {
- var error = new Error(er.code + ' invalid cwd ' + this.cwd)
- error.path = this.cwd
- error.code = er.code
- throw error
- }
- break
-
- case 'ENOENT': // not terribly unusual
- case 'ELOOP':
- case 'ENAMETOOLONG':
- case 'UNKNOWN':
- this.cache[this._makeAbs(f)] = false
- break
-
- default: // some unusual error. Treat as failure.
- this.cache[this._makeAbs(f)] = false
- if (this.strict)
- throw er
- if (!this.silent)
- console.error('glob error', er)
- break
- }
-}
-
-GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) {
-
- var entries = this._readdir(abs, inGlobStar)
-
- // no entries means not a dir, so it can never have matches
- // foo.txt/** doesn't match foo.txt
- if (!entries)
- return
-
- // test without the globstar, and with every child both below
- // and replacing the globstar.
- var remainWithoutGlobStar = remain.slice(1)
- var gspref = prefix ? [ prefix ] : []
- var noGlobStar = gspref.concat(remainWithoutGlobStar)
-
- // the noGlobStar pattern exits the inGlobStar state
- this._process(noGlobStar, index, false)
-
- var len = entries.length
- var isSym = this.symlinks[abs]
-
- // If it's a symlink, and we're in a globstar, then stop
- if (isSym && inGlobStar)
- return
-
- for (var i = 0; i < len; i++) {
- var e = entries[i]
- if (e.charAt(0) === '.' && !this.dot)
- continue
-
- // these two cases enter the inGlobStar state
- var instead = gspref.concat(entries[i], remainWithoutGlobStar)
- this._process(instead, index, true)
-
- var below = gspref.concat(entries[i], remain)
- this._process(below, index, true)
- }
-}
-
-GlobSync.prototype._processSimple = function (prefix, index) {
- // XXX review this. Shouldn't it be doing the mounting etc
- // before doing stat? kinda weird?
- var exists = this._stat(prefix)
-
- if (!this.matches[index])
- this.matches[index] = Object.create(null)
-
- // If it doesn't exist, then just mark the lack of results
- if (!exists)
- return
-
- if (prefix && isAbsolute(prefix) && !this.nomount) {
- var trail = /[\/\\]$/.test(prefix)
- if (prefix.charAt(0) === '/') {
- prefix = path.join(this.root, prefix)
- } else {
- prefix = path.resolve(this.root, prefix)
- if (trail)
- prefix += '/'
- }
- }
-
- if (process.platform === 'win32')
- prefix = prefix.replace(/\\/g, '/')
-
- // Mark this as a match
- this._emitMatch(index, prefix)
-}
-
-// Returns either 'DIR', 'FILE', or false
-GlobSync.prototype._stat = function (f) {
- var abs = this._makeAbs(f)
- var needDir = f.slice(-1) === '/'
-
- if (f.length > this.maxLength)
- return false
-
- if (!this.stat && ownProp(this.cache, abs)) {
- var c = this.cache[abs]
-
- if (Array.isArray(c))
- c = 'DIR'
-
- // It exists, but maybe not how we need it
- if (!needDir || c === 'DIR')
- return c
-
- if (needDir && c === 'FILE')
- return false
-
- // otherwise we have to stat, because maybe c=true
- // if we know it exists, but not what it is.
- }
-
- var exists
- var stat = this.statCache[abs]
- if (!stat) {
- var lstat
- try {
- lstat = fs.lstatSync(abs)
- } catch (er) {
- if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {
- this.statCache[abs] = false
- return false
- }
- }
-
- if (lstat && lstat.isSymbolicLink()) {
- try {
- stat = fs.statSync(abs)
- } catch (er) {
- stat = lstat
- }
- } else {
- stat = lstat
- }
- }
-
- this.statCache[abs] = stat
-
- var c = true
- if (stat)
- c = stat.isDirectory() ? 'DIR' : 'FILE'
-
- this.cache[abs] = this.cache[abs] || c
-
- if (needDir && c === 'FILE')
- return false
-
- return c
-}
-
-GlobSync.prototype._mark = function (p) {
- return common.mark(this, p)
-}
-
-GlobSync.prototype._makeAbs = function (f) {
- return common.makeAbs(this, f)
-}
diff --git a/tap-snapshots/test/root.ts.test.cjs b/tap-snapshots/test/root.ts.test.cjs
new file mode 100644
index 00000000..bd6187a7
--- /dev/null
+++ b/tap-snapshots/test/root.ts.test.cjs
@@ -0,0 +1,90 @@
+/* IMPORTANT
+ * This snapshot file is auto-generated, but designed for humans.
+ * It should be checked into source control and tracked carefully.
+ * Re-generate by setting TAP_SNAPSHOT=1 and running tests.
+ * Make sure to inspect the output below. Do not ignore changes!
+ */
+'use strict'
+exports[`test/root.ts TAP set root option absolute=false > async 1`] = `
+Array [
+ "x/x/a",
+ "x/x/x/a",
+ "x/x/x/y",
+ "x/x/x/y/r",
+ "x/x/y",
+ "x/x/y/r",
+ "x/y",
+ "x/y/r",
+ "y/r",
+]
+`
+
+exports[`test/root.ts TAP set root option absolute=false > sync 1`] = `
+Array [
+ "x/x/a",
+ "x/x/x/a",
+ "x/x/x/y",
+ "x/x/x/y/r",
+ "x/x/y",
+ "x/x/y/r",
+ "x/y",
+ "x/y/r",
+ "y/r",
+]
+`
+
+exports[`test/root.ts TAP set root option absolute=true > async 1`] = `
+Array [
+ "{CWD}/test/tap-testdir-root-set-root-option/x/x/a",
+ "{CWD}/test/tap-testdir-root-set-root-option/x/x/x/a",
+ "{CWD}/test/tap-testdir-root-set-root-option/x/x/x/y",
+ "{CWD}/test/tap-testdir-root-set-root-option/x/x/x/y/r",
+ "{CWD}/test/tap-testdir-root-set-root-option/x/x/y",
+ "{CWD}/test/tap-testdir-root-set-root-option/x/x/y/r",
+ "{CWD}/test/tap-testdir-root-set-root-option/x/y",
+ "{CWD}/test/tap-testdir-root-set-root-option/x/y/r",
+ "{CWD}/test/tap-testdir-root-set-root-option/y/r",
+]
+`
+
+exports[`test/root.ts TAP set root option absolute=true > sync 1`] = `
+Array [
+ "{CWD}/test/tap-testdir-root-set-root-option/x/x/a",
+ "{CWD}/test/tap-testdir-root-set-root-option/x/x/x/a",
+ "{CWD}/test/tap-testdir-root-set-root-option/x/x/x/y",
+ "{CWD}/test/tap-testdir-root-set-root-option/x/x/x/y/r",
+ "{CWD}/test/tap-testdir-root-set-root-option/x/x/y",
+ "{CWD}/test/tap-testdir-root-set-root-option/x/x/y/r",
+ "{CWD}/test/tap-testdir-root-set-root-option/x/y",
+ "{CWD}/test/tap-testdir-root-set-root-option/x/y/r",
+ "{CWD}/test/tap-testdir-root-set-root-option/y/r",
+]
+`
+
+exports[`test/root.ts TAP set root option absolute=undefined > async 1`] = `
+Array [
+ "{CWD}/test/tap-testdir-root-set-root-option/x/x/a",
+ "{CWD}/test/tap-testdir-root-set-root-option/x/x/x/a",
+ "{CWD}/test/tap-testdir-root-set-root-option/x/x/x/y",
+ "{CWD}/test/tap-testdir-root-set-root-option/x/x/y",
+ "{CWD}/test/tap-testdir-root-set-root-option/x/y",
+ "x/x/x/y/r",
+ "x/x/y/r",
+ "x/y/r",
+ "y/r",
+]
+`
+
+exports[`test/root.ts TAP set root option absolute=undefined > sync 1`] = `
+Array [
+ "{CWD}/test/tap-testdir-root-set-root-option/x/x/a",
+ "{CWD}/test/tap-testdir-root-set-root-option/x/x/x/a",
+ "{CWD}/test/tap-testdir-root-set-root-option/x/x/x/y",
+ "{CWD}/test/tap-testdir-root-set-root-option/x/x/y",
+ "{CWD}/test/tap-testdir-root-set-root-option/x/y",
+ "x/x/x/y/r",
+ "x/x/y/r",
+ "x/y/r",
+ "y/r",
+]
+`
diff --git a/test/00-setup.js b/test/00-setup.js
deleted file mode 100644
index df9d523c..00000000
--- a/test/00-setup.js
+++ /dev/null
@@ -1,180 +0,0 @@
-// just a little pre-run script to set up the fixtures.
-// zz-finish cleans it up
-
-require("./global-leakage.js")
-var mkdirp = require("mkdirp")
-var path = require("path")
-var i = 0
-var tap = require("tap")
-var fs = require("fs")
-var rimraf = require("rimraf")
-
-var fixtureDir = path.resolve(__dirname, 'fixtures')
-
-var files =
-[ "a/.abcdef/x/y/z/a"
-, "a/abcdef/g/h"
-, "a/abcfed/g/h"
-, "a/b/c/d"
-, "a/bc/e/f"
-, "a/c/d/c/b"
-, "a/cb/e/f"
-, "a/x/.y/b"
-, "a/z/.y/b"
-]
-
-var symlinkTo = path.resolve(fixtureDir, "a/symlink/a/b/c")
-var symlinkFrom = "../.."
-
-files = files.map(function (f) {
- return path.resolve(fixtureDir, f)
-})
-
-tap.test("remove fixtures", function (t) {
- rimraf.sync(fixtureDir)
- t.end()
-})
-
-files.forEach(function (f) {
- tap.test(f, function (t) {
- f = path.resolve(fixtureDir, f)
- var d = path.dirname(f)
- mkdirp(d, '0755', function (er) {
- if (er) {
- t.fail(er)
- return t.bailout()
- }
- fs.writeFile(f, "i like tests", function (er) {
- t.ifError(er, "make file")
- t.end()
- })
- })
- })
-})
-
-if (process.platform !== "win32") {
- tap.test("symlinky", function (t) {
- var d = path.dirname(symlinkTo)
- mkdirp(d, '0755', function (er) {
- if (er)
- throw er
- fs.symlinkSync(symlinkFrom, symlinkTo, "dir")
- t.end()
- })
- })
-}
-
-;["foo","bar","baz","asdf","quux","qwer","rewq"].forEach(function (w) {
- w = "/tmp/glob-test/" + w
- tap.test("create " + w, function (t) {
- mkdirp(w, function (er) {
- if (er)
- throw er
- t.pass(w)
- t.end()
- })
- })
-})
-
-// generate the bash pattern test-fixtures if possible
-if (process.platform === "win32" || !process.env.TEST_REGEN) {
- console.error("Windows, or TEST_REGEN unset. Using cached fixtures.")
- return
-}
-
-var spawn = require("child_process").spawn;
-var globs =
- // put more patterns here.
- // anything that would be directly in / should be in /tmp/glob-test
- ["a/*/+(c|g)/./d"
- ,"a/**/[cg]/../[cg]"
- ,"a/{b,c,d,e,f}/**/g"
- ,"a/b/**"
- ,"**/g"
- ,"a/abc{fed,def}/g/h"
- ,"a/abc{fed/g,def}/**/"
- ,"a/abc{fed/g,def}/**///**/"
- ,"**/a/**/"
- ,"+(a|b|c)/a{/,bc*}/**"
- ,"*/*/*/f"
- ,"**/f"
- ,"a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**"
- ,"{./*/*,/tmp/glob-test/*}"
- ,"{/tmp/glob-test/*,*}" // evil owl face! how you taunt me!
- ,"a/!(symlink)/**"
- ,"a/symlink/a/**/*"
- ]
-var bashOutput = {}
-var fs = require("fs")
-
-globs.forEach(function (pattern) {
- tap.test("generate fixture " + pattern, function (t) {
- var opts = [
- "-O", "globstar",
- "-O", "extglob",
- "-O", "nullglob",
- "-c",
- "for i in " + pattern + "; do echo $i; done"
- ]
- var cp = spawn("bash", opts, { cwd: fixtureDir })
- var out = []
- cp.stdout.on("data", function (c) {
- out.push(c)
- })
- cp.stderr.pipe(process.stderr)
- cp.on("close", function (code) {
- out = flatten(out)
- if (!out)
- out = []
- else
- out = cleanResults(out.split(/\r*\n/))
-
- bashOutput[pattern] = out
- t.notOk(code, "bash test should finish nicely")
- t.end()
- })
- })
-})
-
-tap.test("save fixtures", function (t) {
- var fname = path.resolve(__dirname, "bash-results.json")
- var data = JSON.stringify(bashOutput, null, 2) + "\n"
- fs.writeFile(fname, data, function (er) {
- t.ifError(er)
- t.end()
- })
-})
-
-function cleanResults (m) {
- // normalize discrepancies in ordering, duplication,
- // and ending slashes.
- return m.map(function (m) {
- return m.replace(/\/+/g, "/").replace(/\/$/, "")
- }).sort(alphasort).reduce(function (set, f) {
- if (f !== set[set.length - 1]) set.push(f)
- return set
- }, []).sort(alphasort).map(function (f) {
- // de-windows
- return (process.platform !== 'win32') ? f
- : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/')
- })
-}
-
-function flatten (chunks) {
- var s = 0
- chunks.forEach(function (c) { s += c.length })
- var out = new Buffer(s)
- s = 0
- chunks.forEach(function (c) {
- c.copy(out, s)
- s += c.length
- })
-
- return out.toString().trim()
-}
-
-function alphasort (a, b) {
- a = a.toLowerCase()
- b = b.toLowerCase()
- return a > b ? 1 : a < b ? -1 : 0
-}
diff --git a/test/00-setup.ts b/test/00-setup.ts
new file mode 100644
index 00000000..e8e91947
--- /dev/null
+++ b/test/00-setup.ts
@@ -0,0 +1,185 @@
+// just a little pre-run script to set up the fixtures.
+// zz-finish cleans it up
+
+import { spawn } from 'child_process'
+import { createWriteStream, promises } from 'fs'
+import mkdirp from 'mkdirp'
+import { join, dirname, resolve } from 'path'
+import t from 'tap'
+
+const { writeFile, symlink } = promises
+//@ts-ignore
+t.pipe(createWriteStream('00-setup.tap'))
+process.env.TAP_BAIL = '1'
+
+const fixtureDir = resolve(__dirname, 'fixtures')
+
+const filesUnresolved = [
+ 'a/.abcdef/x/y/z/a',
+ 'a/abcdef/g/h',
+ 'a/abcfed/g/h',
+ 'a/b/c/d',
+ 'a/bc/e/f',
+ 'a/c/d/c/b',
+ 'a/cb/e/f',
+ 'a/x/.y/b',
+ 'a/z/.y/b',
+]
+
+const symlinkTo = resolve(fixtureDir, 'a/symlink/a/b/c')
+const symlinkFrom = '../..'
+
+const files = filesUnresolved.map(f => resolve(fixtureDir, f))
+
+for (const file of files) {
+ t.test(file, { bail: true }, async () => {
+ const f = resolve(fixtureDir, file)
+ const d = dirname(f)
+ await mkdirp(d)
+ await writeFile(f, 'i like tests')
+ })
+}
+
+if (process.platform !== 'win32') {
+ t.test('symlinky', async () => {
+ const d = dirname(symlinkTo)
+ await mkdirp(d)
+ await symlink(symlinkFrom, symlinkTo, 'dir')
+ })
+}
+
+;['foo', 'bar', 'baz', 'asdf', 'quux', 'qwer', 'rewq'].forEach(function (
+ w
+) {
+ w = '/tmp/glob-test/' + w
+ t.test('create ' + w, async t => {
+ await mkdirp(w)
+ t.pass(w)
+ })
+})
+
+// generate the bash pattern test-fixtures if possible
+if (process.platform === 'win32' || !process.env.TEST_REGEN) {
+ console.error('Windows, or TEST_REGEN unset. Using cached fixtures.')
+} else {
+ const globs =
+ // put more patterns here.
+ // anything that would be directly in / should be in /tmp/glob-test
+ [
+ 'a/c/d/*/b',
+ 'a//c//d//*//b',
+ 'a/*/d/*/b',
+ 'a/*/+(c|g)/./d',
+ 'a/**/[cg]/../[cg]',
+ 'a/{b,c,d,e,f}/**/g',
+ 'a/b/**',
+ './**/g',
+ 'a/abc{fed,def}/g/h',
+ 'a/abc{fed/g,def}/**/',
+ 'a/abc{fed/g,def}/**///**/',
+ // When a ** is the FIRST item in a pattern, it has
+ // more restrictive symbolic link handling behavior.
+ '**/a',
+ '**/a/**',
+ './**/a',
+ './**/a/**/',
+ './**/a/**',
+ './**/a/**/a/**/',
+ '+(a|b|c)/a{/,bc*}/**',
+ '*/*/*/f',
+ './**/f',
+ 'a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**',
+ '{./*/*,/tmp/glob-test/*}',
+ '{/tmp/glob-test/*,*}', // evil owl face! how you taunt me!
+ 'a/!(symlink)/**',
+ 'a/symlink/a/**/*',
+ // this one we don't quite match bash, because when bash
+ // applies the .. to the symlink walked by **, it effectively
+ // resets the symlink walk limit, and that is just a step too
+ // far for an edge case no one knows or cares about, even for
+ // an obsessive perfectionist like me.
+ // './a/**/../*/**',
+ 'a/!(symlink)/**/..',
+ 'a/!(symlink)/**/../',
+ 'a/!(symlink)/**/../*',
+ 'a/!(symlink)/**/../*/*',
+ ]
+
+ const bashOutput: { [k: string]: string[] } = {}
+
+ for (const pattern of globs) {
+ t.test('generate fixture ' + pattern, t => {
+ const opts = [
+ '-O',
+ 'globstar',
+ '-O',
+ 'extglob',
+ '-O',
+ 'nullglob',
+ '-c',
+ 'for i in ' + pattern + '; do echo $i; done',
+ ]
+ const cp = spawn('bash', opts, { cwd: fixtureDir })
+ const out: Buffer[] = []
+ cp.stdout.on('data', c => out.push(c))
+ cp.stderr.pipe(process.stderr)
+ cp.on('close', function (code) {
+ const o = flatten(out)
+ bashOutput[pattern] = !o ? [] : cleanResults(o.split(/\r*\n/))
+ t.notOk(code, 'bash test should finish nicely')
+ t.end()
+ })
+ })
+ }
+
+ t.test('save fixtures', async () => {
+ const fname = resolve(__dirname, 'bash-results.ts')
+ const data = `// generated via 'npm run test-regen'
+if (module === require.main) {
+ console.log('TAP version 13\\n1..1\\nok\\n')
+}
+export const bashResults:{ [path: string]: string[] } = ${
+ JSON.stringify(bashOutput, null, 2) + '\n'
+ }
+`
+ await writeFile(fname, data)
+ })
+
+ t.test('formatting', t => {
+ const c = spawn(
+ 'prettier',
+ ['--write', resolve(__dirname, 'bash-results.ts')],
+ { stdio: ['ignore', 2, 2] }
+ )
+ c.on('close', (code, signal) => {
+ t.equal(code, 0, 'code')
+ t.equal(signal, null, 'signal')
+ t.end()
+ })
+ })
+
+ function cleanResults(m: string[]) {
+ // normalize discrepancies in ordering, duplication,
+ // and ending slashes.
+ return m
+ .map(m => join(m.replace(/\/$/, '').replace(/\/+/g, '/')))
+ .sort(alphasort)
+ .reduce(function (set: string[], f) {
+ if (f !== set[set.length - 1]) set.push(f)
+ return set
+ }, [])
+ .sort(alphasort)
+ .map(function (f) {
+ // de-windows
+ return process.platform !== 'win32'
+ ? f
+ : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/')
+ })
+ }
+
+ const flatten = (chunks: Buffer[]) =>
+ Buffer.concat(chunks).toString().trim()
+
+ const alphasort = (a: string, b: string) =>
+ a.toLowerCase().localeCompare(b.toLowerCase(), 'en')
+}
diff --git a/test/abort.js b/test/abort.js
deleted file mode 100644
index 1aeb58f4..00000000
--- a/test/abort.js
+++ /dev/null
@@ -1,19 +0,0 @@
-require("./global-leakage.js")
-var test = require("tap").test
-var glob = require('../')
-var assert = require("assert")
-var fs = require("fs")
-process.chdir(__dirname)
-
-test("abort prevents any action", function (t) {
- glob("a/**").abort()
- glob("a/").abort()
- glob("a/b/*").abort()
-
- glob.Glob.prototype.emit = fs.readdir = fs.stat = fs.lstat = assert.fail
-
- setTimeout(function () {
- t.pass("if it gets here then it worked")
- t.end()
- }, 100)
-})
diff --git a/test/absolute-must-be-strings.ts b/test/absolute-must-be-strings.ts
new file mode 100644
index 00000000..cc18e034
--- /dev/null
+++ b/test/absolute-must-be-strings.ts
@@ -0,0 +1,8 @@
+import { Glob } from '../'
+import t from 'tap'
+t.throws(() => {
+ new Glob('.', {
+ withFileTypes: true,
+ absolute: true,
+ })
+})
diff --git a/test/absolute.js b/test/absolute.js
deleted file mode 100644
index 704caa90..00000000
--- a/test/absolute.js
+++ /dev/null
@@ -1,49 +0,0 @@
-require('./global-leakage.js')
-var t = require('tap')
-var glob = require('../')
-var common = require('../common.js')
-var pattern = 'a/b/**';
-var bashResults = require('./bash-results.json')
-var isAbsolute = require('path-is-absolute')
-process.chdir(__dirname + '/fixtures')
-
-t.Test.prototype.addAssert('isAbsolute', 1, function (file, message, extra) {
- extra.found = file
- return this.ok(isAbsolute(file), message || 'must be absolute', extra)
-})
-
-var marks = [ true, false ]
-marks.forEach(function (mark) {
- t.test('mark=' + mark, function (t) {
- t.plan(2)
-
- t.test('Emits absolute matches if option set', function (t) {
- var g = new glob.Glob(pattern, { absolute: true })
-
- var matchCount = 0
- g.on('match', function (m) {
- t.isAbsolute(m)
- matchCount++
- })
-
- g.on('end', function (results) {
- t.equal(matchCount, bashResults[pattern].length, 'must match all files')
- t.equal(results.length, bashResults[pattern].length, 'must match all files')
- results.forEach(function (m) {
- t.isAbsolute(m)
- })
- t.end()
- })
- })
-
- t.test('returns absolute results synchronously', function (t) {
- var results = glob.sync(pattern, { absolute: true })
-
- t.equal(results.length, bashResults[pattern].length, 'must match all files')
- results.forEach(function (m) {
- t.ok(isAbsolute(m), 'must be absolute', { found: m })
- })
- t.end()
- })
- })
-})
diff --git a/test/absolute.ts b/test/absolute.ts
new file mode 100644
index 00000000..ec632326
--- /dev/null
+++ b/test/absolute.ts
@@ -0,0 +1,45 @@
+import { isAbsolute } from 'path'
+import t from 'tap'
+import { Glob } from '../'
+import { bashResults } from './bash-results'
+
+const pattern = 'a/b/**'
+process.chdir(__dirname + '/fixtures')
+
+const ok = (t: Tap.Test, file: string) =>
+ t.ok(isAbsolute(file), 'must be absolute', { found: file })
+
+var marks = [true, false]
+for (const mark of marks) {
+ t.test('mark=' + mark, t => {
+ t.plan(2)
+
+ t.test('Emits absolute matches if option set', async t => {
+ var g = new Glob(pattern, { absolute: true })
+ const results = await g.walk()
+
+ t.equal(
+ results.length,
+ bashResults[pattern].length,
+ 'must match all files'
+ )
+ for (const m of results) {
+ ok(t, m)
+ }
+ })
+
+ t.test('returns absolute results synchronously', async t => {
+ var g = new Glob(pattern, { absolute: true })
+ const results = g.walkSync()
+
+ t.equal(
+ results.length,
+ bashResults[pattern].length,
+ 'must match all files'
+ )
+ for (const m of results) {
+ ok(t, m)
+ }
+ })
+ })
+}
diff --git a/test/bash-comparison.js b/test/bash-comparison.js
deleted file mode 100644
index 296cc514..00000000
--- a/test/bash-comparison.js
+++ /dev/null
@@ -1,79 +0,0 @@
-// basic test
-// show that it does the same thing by default as the shell.
-require("./global-leakage.js")
-var tap = require("tap")
-var child_process = require("child_process")
-var bashResults = require("./bash-results.json")
-var globs = Object.keys(bashResults)
-var glob = require("../")
-var path = require("path")
-var isAbsolute = require("path-is-absolute")
-
-// run from the root of the project
-// this is usually where you're at anyway, but be sure.
-var root = path.dirname(__dirname)
-var fixtures = path.resolve(__dirname, 'fixtures')
-process.chdir(fixtures)
-
-function cacheCheck(g, t) {
- // verify that path cache keys are all absolute
- var caches = [ 'cache', 'statCache', 'symlinks' ]
- caches.forEach(function (c) {
- Object.keys(g[c]).forEach(function (p) {
- t.ok(isAbsolute(p), p + ' should be absolute')
- })
- })
-}
-
-function alphasort (a, b) {
- a = a.toLowerCase()
- b = b.toLowerCase()
- return a > b ? 1 : a < b ? -1 : 0
-}
-
-globs.forEach(function (pattern) {
- var expect = bashResults[pattern]
- // anything regarding the symlink thing will fail on windows, so just skip it
- if (process.platform === "win32" &&
- expect.some(function (m) {
- return /\bsymlink\b/.test(m)
- }))
- return
-
- tap.test(pattern, function (t) {
- var g = glob(pattern, function (er, matches) {
- if (er)
- throw er
-
- // sort and unmark, just to match the shell results
- matches = cleanResults(matches)
- t.deepEqual(matches, expect, pattern)
-
- // verify that path cache keys are all absolute
- cacheCheck(g, t)
- t.end()
- })
- })
-
- tap.test(pattern + " sync", function (t) {
- var matches = cleanResults(glob.sync(pattern))
-
- t.deepEqual(matches, expect, "should match shell (sync)")
- t.end()
- })
-})
-
-function cleanResults (m) {
- // normalize discrepancies in ordering, duplication,
- // and ending slashes.
- return m.map(function (m) {
- return m.replace(/\/+/g, "/").replace(/\/$/, "")
- }).sort(alphasort).reduce(function (set, f) {
- if (f !== set[set.length - 1]) set.push(f)
- return set
- }, []).map(function (f) {
- // de-windows
- return (process.platform !== 'win32') ? f
- : f.replace(/^[a-zA-Z]:[\/\\]+/, '/').replace(/[\\\/]+/g, '/')
- }).sort(alphasort)
-}
diff --git a/test/bash-comparison.ts b/test/bash-comparison.ts
new file mode 100644
index 00000000..6dc97407
--- /dev/null
+++ b/test/bash-comparison.ts
@@ -0,0 +1,56 @@
+// basic test
+// show that it does the same thing by default as the shell.
+import { resolve } from 'path'
+import t from 'tap'
+import glob from '../'
+import { bashResults } from './bash-results'
+const globs = Object.keys(bashResults)
+
+// run from the root of the project
+// this is usually where you're at anyway, but be sure.
+const fixtures = resolve(__dirname, 'fixtures')
+process.chdir(fixtures)
+
+const alphasort = (a: string, b: string) =>
+ a.toLowerCase().localeCompare(b.toLowerCase(), 'en')
+
+const cleanResults = (m: string[]) => {
+ // normalize discrepancies in ordering, duplication,
+ // and ending slashes.
+ return m
+ .map(m => m.replace(/\/$/, ''))
+ .sort(alphasort)
+ .reduce((set: string[], f) => {
+ if (f !== set[set.length - 1]) set.push(f)
+ return set
+ }, [])
+ .map(f => {
+ // de-windows
+ return process.platform !== 'win32'
+ ? f
+ : f.replace(/^[a-zA-Z]:[\/\\]+/, '/').replace(/[\\\/]+/g, '/')
+ })
+ .sort(alphasort)
+}
+
+globs.forEach(function (pattern) {
+ var expect = bashResults[pattern]
+ // anything regarding the symlink thing will fail on windows, so just skip it
+ if (
+ process.platform === 'win32' &&
+ expect.some((m: string) => /\bsymlink\b/.test(m))
+ ) {
+ return
+ }
+
+ t.test(pattern, async t => {
+ // sort and unmark, just to match the shell results
+ const matches = cleanResults(await glob(pattern))
+ t.same(matches, expect, pattern)
+ })
+
+ t.test(pattern + ' sync', async t => {
+ const matches = cleanResults(glob.globSync(pattern))
+ t.same(matches, expect, 'should match shell (sync)')
+ })
+})
diff --git a/test/bash-results.json b/test/bash-results.json
deleted file mode 100644
index a833af76..00000000
--- a/test/bash-results.json
+++ /dev/null
@@ -1,140 +0,0 @@
-{
- "a/*/+(c|g)/./d": [
- "a/b/c/./d"
- ],
- "a/**/[cg]/../[cg]": [
- "a/abcdef/g/../g",
- "a/abcfed/g/../g",
- "a/b/c/../c",
- "a/c/../c",
- "a/c/d/c/../c",
- "a/symlink/a/b/c/../c"
- ],
- "a/{b,c,d,e,f}/**/g": [],
- "a/b/**": [
- "a/b",
- "a/b/c",
- "a/b/c/d"
- ],
- "**/g": [
- "a/abcdef/g",
- "a/abcfed/g"
- ],
- "a/abc{fed,def}/g/h": [
- "a/abcdef/g/h",
- "a/abcfed/g/h"
- ],
- "a/abc{fed/g,def}/**/": [
- "a/abcdef",
- "a/abcdef/g",
- "a/abcfed/g"
- ],
- "a/abc{fed/g,def}/**///**/": [
- "a/abcdef",
- "a/abcdef/g",
- "a/abcfed/g"
- ],
- "**/a/**/": [
- "a",
- "a/abcdef",
- "a/abcdef/g",
- "a/abcfed",
- "a/abcfed/g",
- "a/b",
- "a/b/c",
- "a/bc",
- "a/bc/e",
- "a/c",
- "a/c/d",
- "a/c/d/c",
- "a/cb",
- "a/cb/e",
- "a/symlink",
- "a/symlink/a",
- "a/symlink/a/b",
- "a/symlink/a/b/c",
- "a/symlink/a/b/c/a",
- "a/symlink/a/b/c/a/b",
- "a/symlink/a/b/c/a/b/c",
- "a/x",
- "a/z"
- ],
- "+(a|b|c)/a{/,bc*}/**": [
- "a/abcdef",
- "a/abcdef/g",
- "a/abcdef/g/h",
- "a/abcfed",
- "a/abcfed/g",
- "a/abcfed/g/h"
- ],
- "*/*/*/f": [
- "a/bc/e/f",
- "a/cb/e/f"
- ],
- "**/f": [
- "a/bc/e/f",
- "a/cb/e/f"
- ],
- "a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**": [
- "a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
- "a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
- "a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
- "a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c"
- ],
- "{./*/*,/tmp/glob-test/*}": [
- "./a/abcdef",
- "./a/abcfed",
- "./a/b",
- "./a/bc",
- "./a/c",
- "./a/cb",
- "./a/symlink",
- "./a/x",
- "./a/z",
- "/tmp/glob-test/asdf",
- "/tmp/glob-test/bar",
- "/tmp/glob-test/baz",
- "/tmp/glob-test/foo",
- "/tmp/glob-test/quux",
- "/tmp/glob-test/qwer",
- "/tmp/glob-test/rewq"
- ],
- "{/tmp/glob-test/*,*}": [
- "/tmp/glob-test/asdf",
- "/tmp/glob-test/bar",
- "/tmp/glob-test/baz",
- "/tmp/glob-test/foo",
- "/tmp/glob-test/quux",
- "/tmp/glob-test/qwer",
- "/tmp/glob-test/rewq",
- "a"
- ],
- "a/!(symlink)/**": [
- "a/abcdef",
- "a/abcdef/g",
- "a/abcdef/g/h",
- "a/abcfed",
- "a/abcfed/g",
- "a/abcfed/g/h",
- "a/b",
- "a/b/c",
- "a/b/c/d",
- "a/bc",
- "a/bc/e",
- "a/bc/e/f",
- "a/c",
- "a/c/d",
- "a/c/d/c",
- "a/c/d/c/b",
- "a/cb",
- "a/cb/e",
- "a/cb/e/f",
- "a/x",
- "a/z"
- ],
- "a/symlink/a/**/*": [
- "a/symlink/a/b",
- "a/symlink/a/b/c",
- "a/symlink/a/b/c/a"
- ]
-}
diff --git a/test/bash-results.ts b/test/bash-results.ts
new file mode 100644
index 00000000..76d5641e
--- /dev/null
+++ b/test/bash-results.ts
@@ -0,0 +1,247 @@
+// generated via 'npm run test-regen'
+if (module === require.main) {
+ console.log('TAP version 13\n1..1\nok\n')
+}
+export const bashResults: { [path: string]: string[] } = {
+ 'a/c/d/*/b': ['a/c/d/c/b'],
+ 'a//c//d//*//b': ['a/c/d/c/b'],
+ 'a/*/d/*/b': ['a/c/d/c/b'],
+ 'a/*/+(c|g)/./d': ['a/b/c/d'],
+ 'a/**/[cg]/../[cg]': [
+ 'a/abcdef/g',
+ 'a/abcfed/g',
+ 'a/b/c',
+ 'a/c',
+ 'a/c/d/c',
+ 'a/symlink/a/b/c',
+ ],
+ 'a/{b,c,d,e,f}/**/g': [],
+ 'a/b/**': ['a/b', 'a/b/c', 'a/b/c/d'],
+ './**/g': ['a/abcdef/g', 'a/abcfed/g'],
+ 'a/abc{fed,def}/g/h': ['a/abcdef/g/h', 'a/abcfed/g/h'],
+ 'a/abc{fed/g,def}/**/': ['a/abcdef', 'a/abcdef/g', 'a/abcfed/g'],
+ 'a/abc{fed/g,def}/**///**/': ['a/abcdef', 'a/abcdef/g', 'a/abcfed/g'],
+ '**/a': ['a', 'a/symlink/a'],
+ '**/a/**': [
+ 'a',
+ 'a/abcdef',
+ 'a/abcdef/g',
+ 'a/abcdef/g/h',
+ 'a/abcfed',
+ 'a/abcfed/g',
+ 'a/abcfed/g/h',
+ 'a/b',
+ 'a/b/c',
+ 'a/b/c/d',
+ 'a/bc',
+ 'a/bc/e',
+ 'a/bc/e/f',
+ 'a/c',
+ 'a/c/d',
+ 'a/c/d/c',
+ 'a/c/d/c/b',
+ 'a/cb',
+ 'a/cb/e',
+ 'a/cb/e/f',
+ 'a/symlink',
+ 'a/symlink/a',
+ 'a/symlink/a/b',
+ 'a/symlink/a/b/c',
+ 'a/x',
+ 'a/z',
+ ],
+ './**/a': ['a', 'a/symlink/a', 'a/symlink/a/b/c/a'],
+ './**/a/**/': [
+ 'a',
+ 'a/abcdef',
+ 'a/abcdef/g',
+ 'a/abcfed',
+ 'a/abcfed/g',
+ 'a/b',
+ 'a/b/c',
+ 'a/bc',
+ 'a/bc/e',
+ 'a/c',
+ 'a/c/d',
+ 'a/c/d/c',
+ 'a/cb',
+ 'a/cb/e',
+ 'a/symlink',
+ 'a/symlink/a',
+ 'a/symlink/a/b',
+ 'a/symlink/a/b/c',
+ 'a/symlink/a/b/c/a',
+ 'a/symlink/a/b/c/a/b',
+ 'a/symlink/a/b/c/a/b/c',
+ 'a/x',
+ 'a/z',
+ ],
+ './**/a/**': [
+ 'a',
+ 'a/abcdef',
+ 'a/abcdef/g',
+ 'a/abcdef/g/h',
+ 'a/abcfed',
+ 'a/abcfed/g',
+ 'a/abcfed/g/h',
+ 'a/b',
+ 'a/b/c',
+ 'a/b/c/d',
+ 'a/bc',
+ 'a/bc/e',
+ 'a/bc/e/f',
+ 'a/c',
+ 'a/c/d',
+ 'a/c/d/c',
+ 'a/c/d/c/b',
+ 'a/cb',
+ 'a/cb/e',
+ 'a/cb/e/f',
+ 'a/symlink',
+ 'a/symlink/a',
+ 'a/symlink/a/b',
+ 'a/symlink/a/b/c',
+ 'a/symlink/a/b/c/a',
+ 'a/symlink/a/b/c/a/b',
+ 'a/symlink/a/b/c/a/b/c',
+ 'a/x',
+ 'a/z',
+ ],
+ './**/a/**/a/**/': [
+ 'a/symlink/a',
+ 'a/symlink/a/b',
+ 'a/symlink/a/b/c',
+ 'a/symlink/a/b/c/a',
+ 'a/symlink/a/b/c/a/b',
+ 'a/symlink/a/b/c/a/b/c',
+ 'a/symlink/a/b/c/a/b/c/a',
+ 'a/symlink/a/b/c/a/b/c/a/b',
+ 'a/symlink/a/b/c/a/b/c/a/b/c',
+ ],
+ '+(a|b|c)/a{/,bc*}/**': [
+ 'a/abcdef',
+ 'a/abcdef/g',
+ 'a/abcdef/g/h',
+ 'a/abcfed',
+ 'a/abcfed/g',
+ 'a/abcfed/g/h',
+ ],
+ '*/*/*/f': ['a/bc/e/f', 'a/cb/e/f'],
+ './**/f': ['a/bc/e/f', 'a/cb/e/f'],
+ 'a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**': [
+ 'a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c',
+ 'a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a',
+ 'a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b',
+ 'a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c',
+ ],
+ '{./*/*,/tmp/glob-test/*}': [
+ '/tmp/glob-test/asdf',
+ '/tmp/glob-test/bar',
+ '/tmp/glob-test/baz',
+ '/tmp/glob-test/foo',
+ '/tmp/glob-test/quux',
+ '/tmp/glob-test/qwer',
+ '/tmp/glob-test/rewq',
+ 'a/abcdef',
+ 'a/abcfed',
+ 'a/b',
+ 'a/bc',
+ 'a/c',
+ 'a/cb',
+ 'a/symlink',
+ 'a/x',
+ 'a/z',
+ ],
+ '{/tmp/glob-test/*,*}': [
+ '/tmp/glob-test/asdf',
+ '/tmp/glob-test/bar',
+ '/tmp/glob-test/baz',
+ '/tmp/glob-test/foo',
+ '/tmp/glob-test/quux',
+ '/tmp/glob-test/qwer',
+ '/tmp/glob-test/rewq',
+ 'a',
+ ],
+ 'a/!(symlink)/**': [
+ 'a/abcdef',
+ 'a/abcdef/g',
+ 'a/abcdef/g/h',
+ 'a/abcfed',
+ 'a/abcfed/g',
+ 'a/abcfed/g/h',
+ 'a/b',
+ 'a/b/c',
+ 'a/b/c/d',
+ 'a/bc',
+ 'a/bc/e',
+ 'a/bc/e/f',
+ 'a/c',
+ 'a/c/d',
+ 'a/c/d/c',
+ 'a/c/d/c/b',
+ 'a/cb',
+ 'a/cb/e',
+ 'a/cb/e/f',
+ 'a/x',
+ 'a/z',
+ ],
+ 'a/symlink/a/**/*': [
+ 'a/symlink/a/b',
+ 'a/symlink/a/b/c',
+ 'a/symlink/a/b/c/a',
+ ],
+ 'a/!(symlink)/**/..': [
+ 'a',
+ 'a/abcdef',
+ 'a/abcfed',
+ 'a/b',
+ 'a/bc',
+ 'a/c',
+ 'a/c/d',
+ 'a/cb',
+ ],
+ 'a/!(symlink)/**/../': [
+ 'a',
+ 'a/abcdef',
+ 'a/abcfed',
+ 'a/b',
+ 'a/bc',
+ 'a/c',
+ 'a/c/d',
+ 'a/cb',
+ ],
+ 'a/!(symlink)/**/../*': [
+ 'a/abcdef',
+ 'a/abcdef/g',
+ 'a/abcfed',
+ 'a/abcfed/g',
+ 'a/b',
+ 'a/b/c',
+ 'a/bc',
+ 'a/bc/e',
+ 'a/c',
+ 'a/c/d',
+ 'a/c/d/c',
+ 'a/cb',
+ 'a/cb/e',
+ 'a/symlink',
+ 'a/x',
+ 'a/z',
+ ],
+ 'a/!(symlink)/**/../*/*': [
+ 'a/abcdef/g',
+ 'a/abcdef/g/h',
+ 'a/abcfed/g',
+ 'a/abcfed/g/h',
+ 'a/b/c',
+ 'a/b/c/d',
+ 'a/bc/e',
+ 'a/bc/e/f',
+ 'a/c/d',
+ 'a/c/d/c',
+ 'a/c/d/c/b',
+ 'a/cb/e',
+ 'a/cb/e/f',
+ 'a/symlink/a',
+ ],
+}
diff --git a/test/broken-symlink.js b/test/broken-symlink.js
deleted file mode 100644
index 4648d38e..00000000
--- a/test/broken-symlink.js
+++ /dev/null
@@ -1,82 +0,0 @@
-var fs = require('fs')
-var test = require('tap').test
-var glob = require('../')
-var mkdirp = require('mkdirp')
-
-if (process.platform === 'win32')
- return require('tap').plan(0, 'skip on windows')
-
-process.chdir(__dirname)
-
-var link = 'fixtures/a/broken-link/link'
-
-var patterns = [
- 'fixtures/a/broken-link/*',
- 'fixtures/a/broken-link/**',
- 'fixtures/a/broken-link/**/link',
- 'fixtures/a/broken-link/**/*',
- 'fixtures/a/broken-link/link',
- 'fixtures/a/broken-link/{link,asdf}',
- 'fixtures/a/broken-link/+(link|asdf)',
- 'fixtures/a/broken-link/!(asdf)'
-]
-
-var opts = [
- null,
- { nonull: true },
- { mark: true },
- { stat: true },
- { follow: true }
-]
-
-test('set up broken symlink', function (t) {
- cleanup()
- mkdirp.sync('fixtures/a/broken-link')
- fs.symlinkSync('this-does-not-exist', 'fixtures/a/broken-link/link')
- t.end()
-})
-
-test('async test', function (t) {
- var count = patterns.length * opts.length
- t.plan(patterns.length)
- patterns.forEach(function (pattern) {
- t.test(pattern, function (t) {
- t.plan(opts.length)
-
- opts.forEach(function (opt) {
- glob(pattern, opt, cb(opt))
- })
-
- function cb (opt) { return function (er, res) {
- if (er)
- throw er
- var msg = pattern + ' ' + JSON.stringify(opt)
- t.notEqual(res.indexOf(link), -1, msg)
- }}
- })
- })
-})
-
-test('sync test', function (t) {
- t.plan(patterns.length)
- patterns.forEach(function (pattern) {
- t.test(pattern, function (t) {
- t.plan(opts.length)
-
- opts.forEach(function (opt) {
- var res = glob.sync(pattern, opt)
- t.notEqual(res.indexOf(link), -1, 'opt=' + JSON.stringify(opt))
- })
- })
- })
-})
-
-test('cleanup', function (t) {
- cleanup()
- t.end()
-})
-
-function cleanup () {
- try { fs.unlinkSync('fixtures/a/broken-link/link') } catch (e) {}
- try { fs.rmdirSync('fixtures/a/broken-link') } catch (e) {}
-}
diff --git a/test/broken-symlink.ts b/test/broken-symlink.ts
new file mode 100644
index 00000000..fc30f391
--- /dev/null
+++ b/test/broken-symlink.ts
@@ -0,0 +1,66 @@
+import { relative } from 'path'
+import t from 'tap'
+import glob from '../'
+import { GlobOptionsWithFileTypesUnset } from '../src/glob.js'
+
+if (process.platform === 'win32') {
+ t.plan(0, 'skip on windows')
+ process.exit(0)
+}
+
+const dir = relative(
+ process.cwd(),
+ t.testdir({
+ a: {
+ 'broken-link': {
+ link: t.fixture('symlink', 'this-does-not-exist'),
+ },
+ },
+ })
+)
+
+const link = `${dir}/a/broken-link/link`
+
+const patterns = [
+ `${dir}/a/broken-link/*`,
+ `${dir}/a/broken-link/**`,
+ `${dir}/a/broken-link/**/link`,
+ `${dir}/a/broken-link/**/*`,
+ `${dir}/a/broken-link/link`,
+ `${dir}/a/broken-link/{link,asdf}`,
+ `${dir}/a/broken-link/+(link|asdf)`,
+ `${dir}/a/broken-link/!(asdf)`,
+]
+
+const opts: (GlobOptionsWithFileTypesUnset | undefined)[] = [
+ undefined,
+ { mark: true },
+ { follow: true },
+]
+
+t.test('async test', t => {
+ t.plan(patterns.length)
+ for (const pattern of patterns) {
+ t.test(pattern, async t => {
+ t.plan(opts.length)
+ for (const opt of opts) {
+ const res = await glob(pattern, opt)
+ const msg = pattern + ' ' + JSON.stringify(opt)
+ t.not(res.indexOf(link), -1, msg)
+ }
+ })
+ }
+})
+
+t.test('sync test', t => {
+ t.plan(patterns.length)
+ for (const pattern of patterns) {
+ t.test(pattern, t => {
+ t.plan(opts.length)
+ for (const opt of opts) {
+ const res = glob.globSync(pattern, opt)
+ t.not(res.indexOf(link), -1, 'opt=' + JSON.stringify(opt))
+ }
+ })
+ }
+})
diff --git a/test/custom-fs.ts b/test/custom-fs.ts
new file mode 100644
index 00000000..c8470832
--- /dev/null
+++ b/test/custom-fs.ts
@@ -0,0 +1,30 @@
+import t from 'tap'
+import { globSync } from '../'
+
+// just a rudimentary test, since PathScurry tests it more anyway
+import { readdirSync } from 'fs'
+let readdirCalled = 0
+const myReaddirSync = (path: string, options: { withFileTypes: true }) => {
+ readdirCalled++
+ return readdirSync(path, options)
+}
+
+const cwd = t.testdir({
+ a: '',
+ b: '',
+ c: {},
+})
+
+t.same(
+ new Set(['a', 'b', 'c', '']),
+ new Set(
+ globSync('**', {
+ fs: {
+ readdirSync: myReaddirSync,
+ },
+ cwd,
+ })
+ )
+)
+
+t.equal(readdirCalled, 2)
diff --git a/test/custom-ignore.ts b/test/custom-ignore.ts
new file mode 100644
index 00000000..cdc8db16
--- /dev/null
+++ b/test/custom-ignore.ts
@@ -0,0 +1,46 @@
+import { basename, resolve } from 'path'
+import { Path } from 'path-scurry'
+import t from 'tap'
+import { glob, globSync, IgnoreLike } from '../'
+const cwd = resolve(__dirname, 'fixtures')
+
+const j = (a: string[]) =>
+ a
+ .map(s => s.replace(/\\/g, '/'))
+ .sort((a, b) => a.localeCompare(b, 'en'))
+
+t.test('ignore files with long names', async t => {
+ const ignore: IgnoreLike = {
+ ignored: (p: Path) => p.name.length > 1,
+ }
+ const syncRes = globSync('**', { cwd, ignore })
+ const asyncRes = await glob('**', { cwd, ignore })
+ const expect = j(
+ globSync('**', { cwd }).filter(p => basename(p).length === 1)
+ )
+ t.same(j(syncRes), expect)
+ t.same(j(asyncRes), expect)
+ for (const r of syncRes) {
+ if (basename(r).length > 1) t.fail(r)
+ }
+})
+
+t.test('ignore symlink and abcdef directories', async t => {
+ const ignore: IgnoreLike = {
+ childrenIgnored: (p: Path) => {
+ return p.isNamed('symlink') || p.isNamed('abcdef')
+ },
+ }
+ const syncRes = globSync('**', { cwd, ignore, nodir: true })
+ const asyncRes = await glob('**', { cwd, ignore, nodir: true })
+ const expect = j(
+ globSync('**', { nodir: true, cwd }).filter(p => {
+ return !/\bsymlink\b|\babcdef\b/.test(p)
+ })
+ )
+ t.same(j(syncRes), expect)
+ t.same(j(asyncRes), expect)
+ for (const r of syncRes) {
+ if (r === 'symlink' || r === 'basename') t.fail(r)
+ }
+})
diff --git a/test/cwd-noent.ts b/test/cwd-noent.ts
new file mode 100644
index 00000000..7438b117
--- /dev/null
+++ b/test/cwd-noent.ts
@@ -0,0 +1,80 @@
+import { resolve } from 'path'
+import t from 'tap'
+import { Glob } from '../'
+const cwd = resolve(__dirname, 'fixtures/does-not-exist')
+
+t.test('walk', async t => {
+ const g = new Glob('**', { cwd })
+ t.same(await g.walk(), [])
+})
+
+t.test('walkSync', t => {
+ const g = new Glob('**', { cwd })
+ t.same(g.walkSync(), [])
+ t.end()
+})
+
+t.test('stream', async t => {
+ const g = new Glob('**', { cwd })
+ const s = g.stream()
+ s.on('data', () => t.fail('should not get entries'))
+ t.same(await s.collect(), [])
+})
+
+t.test('streamSync', t => {
+ const g = new Glob('**', { cwd })
+ const s = g.streamSync()
+ const c: string[] = []
+ s.on('data', p => {
+ t.fail('should not get entries')
+ c.push(p)
+ })
+ s.on('end', () => {
+ t.same(c, [])
+ t.end()
+ })
+})
+
+t.test('iterate', async t => {
+ const g = new Glob('**', { cwd })
+ const s = g.iterate()
+ const c: string[] = []
+ for await (const p of s) {
+ c.push(p)
+ t.fail('should not get entries')
+ }
+ t.same(c, [])
+})
+
+t.test('iterateSync', async t => {
+ const g = new Glob('**', { cwd })
+ const s = g.iterateSync()
+ const c: string[] = []
+ for (const p of s) {
+ c.push(p)
+ t.fail('should not get entries')
+ }
+ t.same(c, [])
+ t.end()
+})
+
+t.test('for await', async t => {
+ const g = new Glob('**', { cwd })
+ const c: string[] = []
+ for await (const p of g) {
+ c.push(p)
+ t.fail('should not get entries')
+ }
+ t.same(c, [])
+})
+
+t.test('iterateSync', async t => {
+ const g = new Glob('**', { cwd })
+ const c: string[] = []
+ for (const p of g) {
+ c.push(p)
+ t.fail('should not get entries')
+ }
+ t.same(c, [])
+ t.end()
+})
diff --git a/test/cwd-test.js b/test/cwd-test.js
deleted file mode 100644
index a57ddd0f..00000000
--- a/test/cwd-test.js
+++ /dev/null
@@ -1,91 +0,0 @@
-require("./global-leakage.js")
-var tap = require("tap")
-
-var origCwd = process.cwd()
-process.chdir(__dirname + '/fixtures')
-var path = require('path')
-var isAbsolute = require('path-is-absolute')
-var glob = require('../')
-
-function cacheCheck(g, t) {
- // verify that path cache keys are all absolute
- var caches = [ 'cache', 'statCache', 'symlinks' ]
- caches.forEach(function (c) {
- Object.keys(g[c]).forEach(function (p) {
- t.ok(isAbsolute(p), p + ' should be absolute')
- })
- })
-}
-
-tap.test("changing cwd and searching for **/d", function (t) {
- t.test('.', function (t) {
- var g = glob('**/d', function (er, matches) {
- t.ifError(er)
- t.like(matches, [ 'a/b/c/d', 'a/c/d' ])
- cacheCheck(g, t)
- t.end()
- })
- })
-
- t.test('a', function (t) {
- var g = glob('**/d', {cwd:path.resolve('a')}, function (er, matches) {
- t.ifError(er)
- t.like(matches, [ 'b/c/d', 'c/d' ])
- cacheCheck(g, t)
- t.end()
- })
- })
-
- t.test('a/b', function (t) {
- var g = glob('**/d', {cwd:path.resolve('a/b')}, function (er, matches) {
- t.ifError(er)
- t.like(matches, [ 'c/d' ])
- cacheCheck(g, t)
- t.end()
- })
- })
-
- t.test('a/b/', function (t) {
- var g = glob('**/d', {cwd:path.resolve('a/b/')}, function (er, matches) {
- t.ifError(er)
- t.like(matches, [ 'c/d' ])
- cacheCheck(g, t)
- t.end()
- })
- })
-
- t.test('.', function (t) {
- var g = glob('**/d', {cwd: process.cwd()}, function (er, matches) {
- t.ifError(er)
- t.like(matches, [ 'a/b/c/d', 'a/c/d' ])
- cacheCheck(g, t)
- t.end()
- })
- })
-
- t.end()
-})
-
-tap.test('non-dir cwd should raise error', function (t) {
- var notdir = 'a/b/c/d'
- var notdirRE = /a[\\\/]b[\\\/]c[\\\/]d/
- var abs = path.resolve(notdir)
- var expect = new Error('ENOTDIR invalid cwd ' + abs)
- expect.code = 'ENOTDIR'
- expect.path = notdirRE
- expect.stack = undefined
- var msg = 'raise error when cwd is not a dir'
-
- t.throws(function () {
- glob.sync('*', { cwd: notdir })
- }, expect)
- glob('*', { cwd: notdir }, function (er, results) {
- t.match(er, expect)
- t.end()
- })
-})
-
-tap.test('cd -', function (t) {
- process.chdir(origCwd)
- t.end()
-})
diff --git a/test/cwd-test.ts b/test/cwd-test.ts
new file mode 100644
index 00000000..369f1096
--- /dev/null
+++ b/test/cwd-test.ts
@@ -0,0 +1,44 @@
+import { resolve } from 'path'
+import t from 'tap'
+import { glob } from '../'
+import { sep } from 'path'
+const j = (a: string[]) => a.map(s => s.split('/').join(sep))
+
+const origCwd = process.cwd()
+process.chdir(__dirname + '/fixtures')
+t.teardown(() => process.chdir(origCwd))
+
+t.test('changing cwd and searching for **/d', t => {
+ const expect = Object.entries({
+ a: new Set(j(['c/d', 'b/c/d'])),
+ 'a/b': new Set(j(['c/d'])),
+ '': new Set(j(['a/b/c/d', 'a/c/d'])),
+ })
+ t.plan(expect.length)
+ for (const [cwd, matches] of expect) {
+ t.test(cwd || '(empty string)', async t => {
+ t.same(new Set(await glob('**/d', { cwd })), matches)
+ if (cwd) {
+ t.same(new Set(await glob('**/d', { cwd: cwd + '/' })), matches)
+ t.same(new Set(await glob('**/d', { cwd: cwd + '/.' })), matches)
+ t.same(new Set(await glob('**/d', { cwd: cwd + '/./' })), matches)
+ } else {
+ t.same(new Set(await glob('**/d', { cwd: '.' })), matches)
+ t.same(new Set(await glob('**/d', { cwd: './' })), matches)
+ }
+ t.same(new Set(await glob('**/d', { cwd: resolve(cwd) })), matches)
+ t.same(
+ new Set(await glob('**/d', { cwd: resolve(cwd) + '/' })),
+ matches
+ )
+ t.same(
+ new Set(await glob('**/d', { cwd: resolve(cwd) + '/.' })),
+ matches
+ )
+ t.same(
+ new Set(await glob('**/d', { cwd: resolve(cwd) + '/./' })),
+ matches
+ )
+ })
+ }
+})
diff --git a/test/dot-relative.ts b/test/dot-relative.ts
new file mode 100644
index 00000000..5a27027a
--- /dev/null
+++ b/test/dot-relative.ts
@@ -0,0 +1,78 @@
+import t from 'tap'
+import { Glob } from '../'
+import { bashResults } from './bash-results'
+import { resolve, sep } from 'path'
+
+const pattern = 'a/b/**'
+process.chdir(__dirname + '/fixtures')
+
+const marks = [true, false]
+for (const mark of marks) {
+ t.test('mark=' + mark, t => {
+ t.plan(3)
+
+ t.test('Emits relative matches prefixed with ./', async t => {
+ const g = new Glob(pattern, { dotRelative: true })
+ const results = await g.walk()
+
+ t.equal(
+ results.length,
+ bashResults[pattern].length,
+ 'must match all files'
+ )
+ for (const m of results) {
+ t.ok(m.startsWith('.' + sep))
+ }
+ })
+
+ t.test('returns ./ prefixed matches synchronously', async t => {
+ const g = new Glob(pattern, { dotRelative: true })
+ const results = g.walkSync()
+
+ t.equal(
+ results.length,
+ bashResults[pattern].length,
+ 'must match all files'
+ )
+ for (const m of results) {
+ t.ok(m.startsWith('.' + sep))
+ }
+ })
+
+ t.test(
+ 'does not prefix with ./ unless dotRelative is true',
+ async t => {
+ const g = new Glob(pattern, {})
+ const results = await g.walk()
+
+ t.equal(
+ results.length,
+ bashResults[pattern].length,
+ 'must match all files'
+ )
+ for (const m of results) {
+ t.ok((mark && m === '.' + sep) || !m.startsWith('.' + sep))
+ }
+ }
+ )
+ })
+}
+
+t.test('does not add ./ for patterns starting in ../', async t => {
+ t.plan(2)
+ const pattern = '../a/b/**'
+ const cwd = resolve(__dirname, 'fixtures/a')
+ t.test('async', async t => {
+ const g = new Glob(pattern, { dotRelative: true, cwd })
+ for await (const m of g) {
+ t.ok(!m.startsWith('.' + sep + '..' + sep))
+ }
+ })
+ t.test('sync', t => {
+ const g = new Glob(pattern, { dotRelative: true, cwd })
+ for (const m of g) {
+ t.ok(!m.startsWith('.' + sep + '..' + sep))
+ }
+ t.end()
+ })
+})
diff --git a/test/empty-set.js b/test/empty-set.js
deleted file mode 100644
index 75956fb6..00000000
--- a/test/empty-set.js
+++ /dev/null
@@ -1,21 +0,0 @@
-require("./global-leakage.js")
-var test = require('tap').test
-var glob = require("../glob.js")
-
-// Patterns that cannot match anything
-var patterns = [
- '# comment',
- ' ',
- '\n',
- 'just doesnt happen to match anything so this is a control'
-]
-
-patterns.forEach(function (p) {
- test(JSON.stringify(p), function (t) {
- glob(p, function (e, f) {
- t.equal(e, null, 'no error')
- t.same(f, [], 'no returned values')
- t.end()
- })
- })
-})
diff --git a/test/empty-set.ts b/test/empty-set.ts
new file mode 100644
index 00000000..e6abe330
--- /dev/null
+++ b/test/empty-set.ts
@@ -0,0 +1,18 @@
+import t from 'tap'
+import { glob } from '../'
+
+// Patterns that cannot match anything
+const patterns = [
+ '# comment',
+ ' ',
+ '\n',
+ 'just doesnt happen to match anything so this is a control',
+]
+
+t.plan(patterns.length)
+for (const p of patterns) {
+ t.test(JSON.stringify(p), async t => {
+ const f = await glob(p)
+ t.same(f, [], 'no returned values')
+ })
+}
diff --git a/test/enotsup.js b/test/enotsup.js
deleted file mode 100644
index 5de3b625..00000000
--- a/test/enotsup.js
+++ /dev/null
@@ -1,65 +0,0 @@
-var fs = require('fs')
-var readdir = fs.readdir
-var readdirSync = fs.readdirSync
-var sawAsyncENOTSUP = false
-var sawSyncENOTSUP = false
-
-var path = require('path')
-var fixtureDir = path.resolve(__dirname, 'fixtures')
-var allowedDirs = [
- path.resolve(fixtureDir, 'a'),
- path.resolve(fixtureDir, 'a', 'abcdef'),
- path.resolve(fixtureDir, 'a', 'abcfed')
-]
-
-fs.readdirSync = function (p) {
- if (allowedDirs.indexOf(path.resolve(p)) === -1 &&
- !p.match(/[\\\/]node_modules[\\\/]/)) {
- sawSyncENOTSUP = true
- var er = new Error('ENOTSUP: Operation not supported')
- er.path = path
- er.code = 'ENOTSUP'
- throw er
- }
- return readdirSync.call(fs, p)
-}
-
-fs.readdir = function (p, cb) {
- if (allowedDirs.indexOf(path.resolve(p)) === -1 &&
- !p.match(/[\\\/]node_modules[\\\/]/)) {
- setTimeout(function () {
- sawAsyncENOTSUP = true
- er = new Error('ENOTSUP: Operation not supported')
- er.path = path
- er.code = 'ENOTSUP'
- return cb(er)
- })
- } else {
- readdir.call(fs, p, cb)
- }
-}
-
-var glob = require('../')
-var test = require('tap').test
-var common = require('../common.js')
-process.chdir(__dirname + '/fixtures')
-
-var pattern = 'a/**/h'
-var expect = [ 'a/abcdef/g/h', 'a/abcfed/g/h' ]
-
-var options = { strict: true, silent: false }
-
-test(pattern + ' ' + JSON.stringify(options), function (t) {
- var res = glob.sync(pattern, options).sort()
- t.same(res, expect, 'sync results')
- t.ok(sawSyncENOTSUP, 'saw sync ENOTSUP')
-
- var g = glob(pattern, options, function (er, res) {
- if (er)
- throw er
- t.ok(sawAsyncENOTSUP, 'saw async ENOTSUP')
- res = res.sort()
- t.same(res, expect, 'async results')
- t.end()
- })
-})
diff --git a/test/eperm-stat.js b/test/eperm-stat.js
deleted file mode 100644
index 5eecd6bc..00000000
--- a/test/eperm-stat.js
+++ /dev/null
@@ -1,112 +0,0 @@
-require("./global-leakage.js")
-var dir = __dirname + '/fixtures'
-
-var fs = require('fs')
-var expect = [
- 'a/abcdef',
- 'a/abcdef/g',
- 'a/abcdef/g/h',
- 'a/abcfed',
- 'a/abcfed/g',
- 'a/abcfed/g/h'
-]
-
-var lstat = fs.lstat
-var lstatSync = fs.lstatSync
-var badPaths = /\ba[\\\/]?$|\babcdef\b/
-
-fs.lstat = function (path, cb) {
- // synthetically generate a non-ENOENT error
- if (badPaths.test(path)) {
- var er = new Error('synthetic')
- er.code = 'EPERM'
- return process.nextTick(cb.bind(null, er))
- }
-
- return lstat.call(fs, path, cb)
-}
-
-fs.lstatSync = function (path) {
- // synthetically generate a non-ENOENT error
- if (badPaths.test(path)) {
- var er = new Error('synthetic')
- er.code = 'EPERM'
- throw er
- }
-
- return lstatSync.call(fs, path)
-}
-
-var glob = require('../')
-var t = require('tap')
-
-t.test('stat errors other than ENOENT are ok', function (t) {
- t.plan(2)
- t.test('async', function (t) {
- glob('a/*abc*/**', { stat: true, cwd: dir }, function (er, matches) {
- if (er)
- throw er
- t.same(matches, expect)
- t.end()
- })
- })
-
- t.test('sync', function (t) {
- var matches = glob.sync('a/*abc*/**', { stat: true, cwd: dir })
- t.same(matches, expect)
- t.end()
- })
-})
-
-t.test('globstar with error in root', function (t) {
- var expect = [
- 'a',
- 'a/abcdef',
- 'a/abcdef/g',
- 'a/abcdef/g/h',
- 'a/abcfed',
- 'a/abcfed/g',
- 'a/abcfed/g/h',
- 'a/b',
- 'a/b/c',
- 'a/b/c/d',
- 'a/bc',
- 'a/bc/e',
- 'a/bc/e/f',
- 'a/c',
- 'a/c/d',
- 'a/c/d/c',
- 'a/c/d/c/b',
- 'a/cb',
- 'a/cb/e',
- 'a/cb/e/f',
- 'a/symlink',
- 'a/symlink/a',
- 'a/symlink/a/b',
- 'a/symlink/a/b/c',
- 'a/x',
- 'a/z'
- ]
- if (process.platform === 'win32') {
- expect = expect.filter(function(path) {
- return path.indexOf('/symlink') === -1
- })
- }
-
- var pattern = 'a/**'
- t.plan(2)
- t.test('async', function (t) {
- glob(pattern, { cwd: dir }, function (er, matches) {
- if (er)
- throw er
- t.same(matches, expect)
- t.end()
- })
- })
-
- t.test('sync', function (t) {
- var matches = glob.sync(pattern, { cwd: dir })
- t.same(matches, expect)
- t.end()
- })
-})
diff --git a/test/error-callback.js b/test/error-callback.js
deleted file mode 100644
index b60c2956..00000000
--- a/test/error-callback.js
+++ /dev/null
@@ -1,38 +0,0 @@
-require("./global-leakage.js")
-var logCalled
-var console_error = console.error
-console.error = function () {
- logCalled = [].slice.call(arguments, 0)
- console.error = console_error
-}
-
-var fs = require('fs')
-var test = require('tap').test
-var glob = require('../')
-
-test('mock fs', function(t) {
- fs.readdir = function(path, cb) {
- process.nextTick(function() {
- cb(new Error('mock fs.readdir error'))
- })
- }
- t.pass('mocked')
- t.end()
-})
-
-test('error callback', function(t) {
- glob('*', function(err, res) {
- t.ok(err, 'expecting mock error')
- t.end()
- })
-})
-
-test('called console.error for weird error', function (t) {
- // Need a setTimeout, since the console.error happens directly AFTER
- // the emit('error') with the error.
- setTimeout(function () {
- t.has(logCalled, [ 'glob error', { message: 'mock fs.readdir error' } ],
- 'got expected error printed to console.error')
- t.end()
- })
-})
diff --git a/test/escape.ts b/test/escape.ts
new file mode 100644
index 00000000..5e1ac085
--- /dev/null
+++ b/test/escape.ts
@@ -0,0 +1,23 @@
+import t from 'tap'
+import { unescape, escape, hasMagic } from '../'
+import { bashResults } from './bash-results'
+
+for (const pattern of Object.keys(bashResults)) {
+ t.notOk(hasMagic(escape(pattern)), `escape(${pattern})`)
+ const pp = escape(pattern)
+ const pw = escape(pattern, {
+ windowsPathsNoEscape: true,
+ })
+ t.notOk(
+ hasMagic(pp, { platform: 'linux' }),
+ 'no magic after posix escape'
+ )
+ t.notOk(
+ hasMagic(pw, { platform: 'win32', windowsPathsNoEscape: true }),
+ 'no magic after windows escape'
+ )
+ const up = unescape(pp)
+ const uw = unescape(pw, { windowsPathsNoEscape: true })
+ t.equal(up, pattern, 'unescaped posix pattern returned')
+ t.equal(uw, pattern, 'unescaped windows pattern returned')
+}
diff --git a/test/follow.js b/test/follow.js
deleted file mode 100644
index 5e1d0130..00000000
--- a/test/follow.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var glob = require('../')
-var test = require('tap').test
-
-process.chdir(__dirname + '/fixtures')
-
-if (process.platform === 'win32') {
- require('tap').plan(0, 'skip on windows')
- return
-}
-
-test('follow symlinks', function (t) {
- var pattern = 'a/symlink/**'
- var syncNoFollow = glob.sync(pattern).sort()
- var syncFollow = glob.sync(pattern, { follow: true }).sort()
- glob(pattern, function (er, res) {
- if (er)
- throw er
- var noFollow = res.sort()
- glob(pattern, { follow: true }, function (er, res) {
- if (er)
- throw er
- var follow = res.sort()
-
- t.same(follow, syncFollow, 'sync and async follow should match')
- t.same(noFollow, syncNoFollow, 'sync and async noFollow should match')
- var long = 'a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c'
- t.notEqual(follow.indexOf(long), -1, 'follow should have long entry')
- t.notEqual(syncFollow.indexOf(long), -1, 'syncFollow should have long entry')
- t.end()
- })
- })
-})
diff --git a/test/follow.ts b/test/follow.ts
new file mode 100644
index 00000000..c917191c
--- /dev/null
+++ b/test/follow.ts
@@ -0,0 +1,25 @@
+import t from 'tap'
+import glob from '../'
+
+if (process.platform === 'win32') {
+ t.plan(0, 'skip on windows')
+ process.exit(0)
+}
+
+process.chdir(__dirname + '/fixtures')
+
+t.test('follow symlinks', async t => {
+ const pattern = 'a/symlink/**'
+ const syncNoFollow = glob.globSync(pattern)
+ const syncFollow = glob.globSync(pattern, { follow: true })
+ const [noFollow, follow] = await Promise.all([
+ glob(pattern),
+ glob(pattern, { follow: true }),
+ ])
+ t.same(follow, syncFollow, 'sync and async follow should match')
+ t.same(noFollow, syncNoFollow, 'sync and async noFollow should match')
+ var long = 'a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c'
+ t.ok(follow.includes(long), 'follow should have long entry')
+ t.ok(syncFollow.includes(long), 'syncFollow should have long entry')
+ t.end()
+})
diff --git a/test/global-leakage.js b/test/global-leakage.js
deleted file mode 100644
index 8cd3a5c8..00000000
--- a/test/global-leakage.js
+++ /dev/null
@@ -1,20 +0,0 @@
-if (require.main === module)
- return require('tap').pass('ok')
-
-var before = Object.keys(global).sort().filter(function (t) {
- return t !== '__coverage__' && t !== '__core-js_shared__'
-}).join(':')
-var assert = require('assert')
-var glob = require('../')
-
-process.on('exit', function() {
- delete global.TAP_Global_Harness
- var after = Object.keys(global).sort().filter(function (t) {
- return t !== '__coverage__' && t !== '__core-js_shared__'
- }).join(':')
- if (after !== before) {
- console.log('- ' + before)
- console.log('+ ' + after)
- }
- assert.equal(before, after)
-})
diff --git a/test/globstar-match.js b/test/globstar-match.js
deleted file mode 100644
index 68f391be..00000000
--- a/test/globstar-match.js
+++ /dev/null
@@ -1,18 +0,0 @@
-require("./global-leakage.js")
-var Glob = require("../glob.js").Glob
-var test = require('tap').test
-
-test('globstar should not have dupe matches', function(t) {
- var pattern = 'a/**/[gh]'
- var g = new Glob(pattern, { cwd: __dirname })
- var matches = []
- g.on('match', function(m) {
- matches.push(m)
- })
- g.on('end', function(set) {
- matches = matches.sort()
- set = set.sort()
- t.same(matches, set, 'should have same set of matches')
- t.end()
- })
-})
diff --git a/test/has-magic.js b/test/has-magic.js
deleted file mode 100644
index 45650901..00000000
--- a/test/has-magic.js
+++ /dev/null
@@ -1,34 +0,0 @@
-require("./global-leakage.js")
-var test = require("tap").test
-var glob = require('../')
-process.chdir(__dirname)
-
-glob.GlobSync.prototype._process = glob.Glob.prototype._process = function () {
- throw new Error('should not call _process() in these tests')
-}
-
-test("create glob object without processing", function (t) {
- t.ok(glob('a', {noprocess:true}) instanceof glob.Glob)
- t.ok(glob.GlobSync('a', {noprocess:true}) instanceof glob.GlobSync)
- t.end()
-})
-
-test("non-string pattern is evil magic", function (t) {
- var patterns = [ 0, null, 12, {x:1}, undefined, /x/, NaN ]
- patterns.forEach(function (p) {
- t.throws('' + p, function () { glob.hasMagic(p) })
- })
- t.end()
-})
-
-test("detect magic in glob patterns", function (t) {
- t.notOk(glob.hasMagic(""), "no magic in ''")
- t.notOk(glob.hasMagic("a/b/c/"), "no magic a/b/c/")
- t.ok(glob.hasMagic("a/b/**/"), "magic in a/b/**/")
- t.ok(glob.hasMagic("a/b/?/"), "magic in a/b/?/")
- t.ok(glob.hasMagic("a/b/+(x|y)"), "magic in a/b/+(x|y)")
- t.notOk(glob.hasMagic("a/b/+(x|y)", {noext:true}), "no magic in a/b/+(x|y) noext")
- t.ok(glob.hasMagic('{a,b}'), 'magic in {a,b}')
- t.notOk(glob.hasMagic('{a,b}', {nobrace:true}), 'magic in {a,b} nobrace:true')
- t.end()
-})
diff --git a/test/has-magic.ts b/test/has-magic.ts
new file mode 100644
index 00000000..47d104f4
--- /dev/null
+++ b/test/has-magic.ts
@@ -0,0 +1,38 @@
+import t from 'tap'
+import glob from '../'
+process.chdir(__dirname)
+
+t.test('non-string pattern is evil magic', async t => {
+ const patterns = [0, null, 12, { x: 1 }, undefined, /x/, NaN]
+ patterns.forEach(function (p) {
+ t.throws(function () {
+ // @ts-expect-error
+ glob.hasMagic(p)
+ })
+ })
+})
+
+t.test('detect magic in glob patterns', async t => {
+ t.notOk(glob.hasMagic(''), "no magic in ''")
+ t.notOk(glob.hasMagic('a/b/c/'), 'no magic a/b/c/')
+ t.ok(glob.hasMagic('a/b/**/'), 'magic in a/b/**/')
+ t.ok(glob.hasMagic('a/b/?/'), 'magic in a/b/?/')
+ t.ok(glob.hasMagic('a/b/+(x|y)'), 'magic in a/b/+(x|y)')
+ t.notOk(
+ glob.hasMagic('a/b/+(x|y)', { noext: true }),
+ 'no magic in a/b/+(x|y) noext'
+ )
+ t.notOk(glob.hasMagic('{a,b}'), 'no magic in {a,b}')
+ t.ok(
+ glob.hasMagic('{a,b}', { magicalBraces: true }),
+ 'magical braces are magic in {a,b}'
+ )
+ t.notOk(
+ glob.hasMagic('{a,b}', { nobrace: true }),
+ 'no magic in {a,b} nobrace:true'
+ )
+ t.notOk(
+ glob.hasMagic('{a,b}', { nobrace: true, magicalBraces: true }),
+ 'magical braces not magic in {a,b} nobrace:true'
+ )
+})
diff --git a/test/ignore.js b/test/ignore.js
deleted file mode 100644
index d391753b..00000000
--- a/test/ignore.js
+++ /dev/null
@@ -1,111 +0,0 @@
-require('./global-leakage.js')
-// Ignore option test
-// Show that glob ignores results matching pattern on ignore option
-
-var glob = require('../glob.js')
-var test = require('tap').test
-
-// [pattern, ignore, expect, opt (object) or cwd (string)]
-var cases = [
- [ '*', null, ['abcdef', 'abcfed', 'b', 'bc', 'c', 'cb', 'symlink', 'x', 'z'], 'a'],
- [ '*', 'b', ['abcdef', 'abcfed', 'bc', 'c', 'cb', 'symlink', 'x', 'z'], 'a'],
- [ '*', 'b*', ['abcdef', 'abcfed', 'c', 'cb', 'symlink', 'x', 'z'], 'a'],
- [ 'b/**', 'b/c/d', ['b', 'b/c'], 'a'],
- [ 'b/**', 'd', ['b', 'b/c', 'b/c/d'], 'a'],
- [ 'b/**', 'b/c/**', ['b'], 'a'],
- [ '**/d', 'b/c/d', ['c/d'], 'a'],
- [ 'a/**/[gh]', ['a/abcfed/g/h'], ['a/abcdef/g', 'a/abcdef/g/h', 'a/abcfed/g']],
- [ '*', ['c', 'bc', 'symlink', 'abcdef'], ['abcfed', 'b', 'cb', 'x', 'z'], 'a'],
- [ '**', ['c/**', 'bc/**', 'symlink/**', 'abcdef/**'], ['abcfed', 'abcfed/g', 'abcfed/g/h', 'b', 'b/c', 'b/c/d', 'cb', 'cb/e', 'cb/e/f', 'x', 'z'], 'a'],
- [ 'a/**', ['a/**'], []],
- [ 'a/**', ['a/**/**'], []],
- [ 'a/b/**', ['a/b'], ['a/b/c', 'a/b/c/d']],
- [ '**', ['b'], ['abcdef', 'abcdef/g', 'abcdef/g/h', 'abcfed', 'abcfed/g', 'abcfed/g/h', 'b/c', 'b/c/d', 'bc', 'bc/e', 'bc/e/f', 'c', 'c/d', 'c/d/c', 'c/d/c/b', 'cb', 'cb/e', 'cb/e/f', 'symlink', 'symlink/a', 'symlink/a/b', 'symlink/a/b/c', 'x', 'z'], 'a'],
- [ '**', ['b', 'c'], ['abcdef', 'abcdef/g', 'abcdef/g/h', 'abcfed', 'abcfed/g', 'abcfed/g/h', 'b/c', 'b/c/d', 'bc', 'bc/e', 'bc/e/f', 'c/d', 'c/d/c', 'c/d/c/b', 'cb', 'cb/e', 'cb/e/f', 'symlink', 'symlink/a', 'symlink/a/b', 'symlink/a/b/c', 'x', 'z'], 'a'],
- [ '**', ['b**'], ['abcdef', 'abcdef/g', 'abcdef/g/h', 'abcfed', 'abcfed/g', 'abcfed/g/h', 'b/c', 'b/c/d', 'bc/e', 'bc/e/f', 'c', 'c/d', 'c/d/c', 'c/d/c/b', 'cb', 'cb/e', 'cb/e/f', 'symlink', 'symlink/a', 'symlink/a/b', 'symlink/a/b/c', 'x', 'z'], 'a'],
- [ '**', ['b/**'], ['abcdef', 'abcdef/g', 'abcdef/g/h', 'abcfed', 'abcfed/g', 'abcfed/g/h', 'bc', 'bc/e', 'bc/e/f', 'c', 'c/d', 'c/d/c', 'c/d/c/b', 'cb', 'cb/e', 'cb/e/f', 'symlink', 'symlink/a', 'symlink/a/b', 'symlink/a/b/c', 'x', 'z'], 'a'],
- [ '**', ['b**/**'], ['abcdef', 'abcdef/g', 'abcdef/g/h', 'abcfed', 'abcfed/g', 'abcfed/g/h', 'c', 'c/d', 'c/d/c', 'c/d/c/b', 'cb', 'cb/e', 'cb/e/f', 'symlink', 'symlink/a', 'symlink/a/b', 'symlink/a/b/c', 'x', 'z'], 'a'],
- [ '**', ['ab**ef/**'], ['abcfed', 'abcfed/g', 'abcfed/g/h', 'b', 'b/c', 'b/c/d', 'bc', 'bc/e', 'bc/e/f', 'c', 'c/d', 'c/d/c', 'c/d/c/b', 'cb', 'cb/e', 'cb/e/f', 'symlink', 'symlink/a', 'symlink/a/b', 'symlink/a/b/c', 'x', 'z'], 'a'],
- [ '**', ['abc{def,fed}/**'], ['b', 'b/c', 'b/c/d', 'bc', 'bc/e', 'bc/e/f', 'c', 'c/d', 'c/d/c', 'c/d/c/b', 'cb', 'cb/e', 'cb/e/f', 'symlink', 'symlink/a', 'symlink/a/b', 'symlink/a/b/c', 'x', 'z'], 'a'],
- [ '**', ['abc{def,fed}/*'], ['abcdef', 'abcdef/g/h', 'abcfed', 'abcfed/g/h', 'b', 'b/c', 'b/c/d', 'bc', 'bc/e', 'bc/e/f', 'c', 'c/d', 'c/d/c', 'c/d/c/b', 'cb', 'cb/e', 'cb/e/f', 'symlink', 'symlink/a', 'symlink/a/b', 'symlink/a/b/c', 'x', 'z'], 'a'],
- [ 'c/**', ['c/*'], ['c', 'c/d/c', 'c/d/c/b'], 'a'],
- [ 'a/c/**', ['a/c/*'], ['a/c', 'a/c/d/c', 'a/c/d/c/b']],
- [ 'a/c/**', ['a/c/**', 'a/c/*', 'a/c/*/c'], []],
- [ 'a/**/.y', ['a/x/**'], ['a/z/.y']],
- [ 'a/**/.y', ['a/x/**'], ['a/z/.y'], { dot: true }],
- [ 'a/**/b', ['a/x/**'], ['a/b', 'a/c/d/c/b', 'a/symlink/a/b']],
- [ 'a/**/b', ['a/x/**'], ['a/b', 'a/c/d/c/b', 'a/symlink/a/b', 'a/z/.y/b'], { dot: true }],
- [ '*/.abcdef', 'a/**', [] ],
- [ 'a/*/.y/b', 'a/x/**', [ 'a/z/.y/b' ] ]
-]
-
-process.chdir(__dirname + '/fixtures')
-
-cases.forEach(function (c, i) {
- var pattern = c[0]
- var ignore = c[1]
- var expect = c[2].sort()
- var opt = c[3]
- var name = i + ' ' + pattern + ' ' + JSON.stringify(ignore)
- if (typeof opt === 'string')
- opt = { cwd: opt }
-
- if (opt)
- name += ' ' + JSON.stringify(opt)
- else
- opt = {}
-
- var matches = []
-
- opt.ignore = ignore
-
- test(name, function (t) {
- glob(pattern, opt, function (er, res) {
- if (er)
- throw er
-
- if (process.platform === 'win32') {
- expect = expect.filter(function (f) {
- return !/\bsymlink\b/.test(f)
- })
- }
-
- t.same(res.sort(), expect, 'async')
- t.same(matches.sort(), expect, 'match events')
- res = glob.sync(pattern, opt)
- t.same(res.sort(), expect, 'sync')
- t.end()
- }).on('match', function (p) {
- matches.push(p)
- })
- })
-})
-
-test('race condition', function (t) {
- process.chdir(__dirname)
- var pattern = 'fixtures/*'
- ;[true, false].forEach(function (dot) {
- ;['fixtures/**', null].forEach(function (ignore) {
- ;[false, true].forEach(function (nonull) {
- ;[false, process.cwd(), '.'].forEach(function (cwd) {
- var opt = {
- dot: dot,
- ignore: ignore,
- nonull: nonull,
- }
- if (cwd)
- opt.cwd = cwd
- var expect = ignore ? [] : [ 'fixtures/a' ]
- t.test(JSON.stringify(opt), function (t) {
- t.plan(2)
- t.same(glob.sync(pattern, opt), expect)
- glob(pattern, opt).on('end', function (res) {
- t.same(res, expect)
- })
- })
- })
- })
- })
- })
- t.end()
-})
diff --git a/test/ignore.ts b/test/ignore.ts
new file mode 100644
index 00000000..86381a0f
--- /dev/null
+++ b/test/ignore.ts
@@ -0,0 +1,386 @@
+// Ignore option test
+// Show that glob ignores results matching pattern on ignore option
+
+import t from 'tap'
+import glob from '../'
+import type { GlobOptions } from '../src/index.js'
+
+import { sep } from 'path'
+const alphasort = (a: string, b: string) => a.localeCompare(b, 'en')
+const j = (a: string[]) =>
+ a.map(s => s.split('/').join(sep)).sort(alphasort)
+
+process.chdir(__dirname + '/fixtures')
+
+// [pattern, ignore, expect, opt (object) or cwd (string)]
+type Case = [
+ pattern: string,
+ ignore: null | string | string[],
+ expect: string[],
+ optOrCwd?: GlobOptions | string | undefined
+]
+const cases: Case[] = [
+ [
+ '*',
+ null,
+ j(['abcdef', 'abcfed', 'b', 'bc', 'c', 'cb', 'symlink', 'x', 'z']),
+ 'a',
+ ],
+ [
+ '*',
+ 'b',
+ j(['abcdef', 'abcfed', 'bc', 'c', 'cb', 'symlink', 'x', 'z']),
+ 'a',
+ ],
+ [
+ '*',
+ 'b*',
+ j(['abcdef', 'abcfed', 'c', 'cb', 'symlink', 'x', 'z']),
+ 'a',
+ ],
+ ['b/**', 'b/c/d', j(['b', 'b/c']), 'a'],
+ ['b/**', 'd', j(['b', 'b/c', 'b/c/d']), 'a'],
+ ['b/**', 'b/c/**', ['b'], 'a'],
+ ['b/**', (process.cwd() + '/a/b/c/**').split(sep).join('/'), ['b'], 'a'],
+ ['**/d', 'b/c/d', j(['c/d']), 'a'],
+ [
+ 'a/**/[gh]',
+ ['a/abcfed/g/h'],
+ j(['a/abcdef/g', 'a/abcdef/g/h', 'a/abcfed/g']),
+ ],
+ [
+ '*',
+ ['c', 'bc', 'symlink', 'abcdef'],
+ ['abcfed', 'b', 'cb', 'x', 'z'],
+ 'a',
+ ],
+ [
+ '**',
+ ['c/**', 'bc/**', 'symlink/**', 'abcdef/**'],
+ j([
+ '',
+ 'abcfed',
+ 'abcfed/g',
+ 'abcfed/g/h',
+ 'b',
+ 'b/c',
+ 'b/c/d',
+ 'cb',
+ 'cb/e',
+ 'cb/e/f',
+ 'x',
+ 'z',
+ ]),
+ 'a',
+ ],
+ ['a/**', ['a/**'], []],
+ ['a/**', ['a/**/**'], []],
+ ['a/b/**', ['a/b'], j(['a/b/c', 'a/b/c/d'])],
+ [
+ '**',
+ ['b'],
+ j([
+ '',
+ 'abcdef',
+ 'abcdef/g',
+ 'abcdef/g/h',
+ 'abcfed',
+ 'abcfed/g',
+ 'abcfed/g/h',
+ 'b/c',
+ 'b/c/d',
+ 'bc',
+ 'bc/e',
+ 'bc/e/f',
+ 'c',
+ 'c/d',
+ 'c/d/c',
+ 'c/d/c/b',
+ 'cb',
+ 'cb/e',
+ 'cb/e/f',
+ 'symlink',
+ 'symlink/a',
+ 'symlink/a/b',
+ 'symlink/a/b/c',
+ 'x',
+ 'z',
+ ]),
+ 'a',
+ ],
+ [
+ '**',
+ ['b', 'c'],
+ j([
+ '',
+ 'abcdef',
+ 'abcdef/g',
+ 'abcdef/g/h',
+ 'abcfed',
+ 'abcfed/g',
+ 'abcfed/g/h',
+ 'b/c',
+ 'b/c/d',
+ 'bc',
+ 'bc/e',
+ 'bc/e/f',
+ 'c/d',
+ 'c/d/c',
+ 'c/d/c/b',
+ 'cb',
+ 'cb/e',
+ 'cb/e/f',
+ 'symlink',
+ 'symlink/a',
+ 'symlink/a/b',
+ 'symlink/a/b/c',
+ 'x',
+ 'z',
+ ]),
+ 'a',
+ ],
+ [
+ '**',
+ ['b**'],
+ j([
+ '',
+ 'abcdef',
+ 'abcdef/g',
+ 'abcdef/g/h',
+ 'abcfed',
+ 'abcfed/g',
+ 'abcfed/g/h',
+ 'b/c',
+ 'b/c/d',
+ 'bc/e',
+ 'bc/e/f',
+ 'c',
+ 'c/d',
+ 'c/d/c',
+ 'c/d/c/b',
+ 'cb',
+ 'cb/e',
+ 'cb/e/f',
+ 'symlink',
+ 'symlink/a',
+ 'symlink/a/b',
+ 'symlink/a/b/c',
+ 'x',
+ 'z',
+ ]),
+ 'a',
+ ],
+ [
+ '**',
+ ['b/**'],
+ j([
+ '',
+ 'abcdef',
+ 'abcdef/g',
+ 'abcdef/g/h',
+ 'abcfed',
+ 'abcfed/g',
+ 'abcfed/g/h',
+ 'bc',
+ 'bc/e',
+ 'bc/e/f',
+ 'c',
+ 'c/d',
+ 'c/d/c',
+ 'c/d/c/b',
+ 'cb',
+ 'cb/e',
+ 'cb/e/f',
+ 'symlink',
+ 'symlink/a',
+ 'symlink/a/b',
+ 'symlink/a/b/c',
+ 'x',
+ 'z',
+ ]),
+ 'a',
+ ],
+ [
+ '**',
+ ['b**/**'],
+ j([
+ '',
+ 'abcdef',
+ 'abcdef/g',
+ 'abcdef/g/h',
+ 'abcfed',
+ 'abcfed/g',
+ 'abcfed/g/h',
+ 'c',
+ 'c/d',
+ 'c/d/c',
+ 'c/d/c/b',
+ 'cb',
+ 'cb/e',
+ 'cb/e/f',
+ 'symlink',
+ 'symlink/a',
+ 'symlink/a/b',
+ 'symlink/a/b/c',
+ 'x',
+ 'z',
+ ]),
+ 'a',
+ ],
+ [
+ '**',
+ ['ab**ef/**'],
+ j([
+ '',
+ 'abcfed',
+ 'abcfed/g',
+ 'abcfed/g/h',
+ 'b',
+ 'b/c',
+ 'b/c/d',
+ 'bc',
+ 'bc/e',
+ 'bc/e/f',
+ 'c',
+ 'c/d',
+ 'c/d/c',
+ 'c/d/c/b',
+ 'cb',
+ 'cb/e',
+ 'cb/e/f',
+ 'symlink',
+ 'symlink/a',
+ 'symlink/a/b',
+ 'symlink/a/b/c',
+ 'x',
+ 'z',
+ ]),
+ 'a',
+ ],
+ [
+ '**',
+ ['abc{def,fed}/**'],
+ j([
+ '',
+ 'b',
+ 'b/c',
+ 'b/c/d',
+ 'bc',
+ 'bc/e',
+ 'bc/e/f',
+ 'c',
+ 'c/d',
+ 'c/d/c',
+ 'c/d/c/b',
+ 'cb',
+ 'cb/e',
+ 'cb/e/f',
+ 'symlink',
+ 'symlink/a',
+ 'symlink/a/b',
+ 'symlink/a/b/c',
+ 'x',
+ 'z',
+ ]),
+ 'a',
+ ],
+ [
+ '**',
+ ['abc{def,fed}/*'],
+ j([
+ '',
+ 'abcdef',
+ 'abcdef/g/h',
+ 'abcfed',
+ 'abcfed/g/h',
+ 'b',
+ 'b/c',
+ 'b/c/d',
+ 'bc',
+ 'bc/e',
+ 'bc/e/f',
+ 'c',
+ 'c/d',
+ 'c/d/c',
+ 'c/d/c/b',
+ 'cb',
+ 'cb/e',
+ 'cb/e/f',
+ 'symlink',
+ 'symlink/a',
+ 'symlink/a/b',
+ 'symlink/a/b/c',
+ 'x',
+ 'z',
+ ]),
+ 'a',
+ ],
+ ['c/**', ['c/*'], j(['c', 'c/d/c', 'c/d/c/b']), 'a'],
+ ['a/c/**', ['a/c/*'], j(['a/c', 'a/c/d/c', 'a/c/d/c/b'])],
+ ['a/c/**', ['a/c/**', 'a/c/*', 'a/c/*/c'], []],
+ ['a/**/.y', ['a/x/**'], j(['a/z/.y'])],
+ ['a/**/.y', ['a/x/**'], j(['a/z/.y']), { dot: true }],
+ ['a/**/b', ['a/x/**'], j(['a/b', 'a/c/d/c/b', 'a/symlink/a/b'])],
+ [
+ 'a/**/b',
+ ['a/x/**'],
+ j(['a/b', 'a/c/d/c/b', 'a/symlink/a/b', 'a/z/.y/b']),
+ { dot: true },
+ ],
+ ['*/.abcdef', 'a/**', []],
+ ['a/*/.y/b', 'a/x/**', j(['a/z/.y/b'])],
+ [
+ 'a/*/.y/b',
+ (process.cwd() + '/a/x/**').split(sep).join('/'),
+ j(['a/z/.y/b']),
+ ],
+]
+
+for (const c of cases) {
+ const [pattern, ignore, ex, optCwd] = c
+ const expect = (
+ process.platform === 'win32'
+ ? ex.filter(e => !/\bsymlink\b/.test(e))
+ : ex
+ ).sort()
+ expect.sort()
+ const opt: GlobOptions =
+ (typeof optCwd === 'string' ? { cwd: optCwd } : optCwd) || {}
+ const name = `p=${pattern} i=${JSON.stringify(ignore)} ${JSON.stringify(
+ opt
+ )}`
+
+ if (ignore) {
+ opt.ignore = ignore
+ }
+
+ t.test(name, async t => {
+ const res = await glob(pattern, opt)
+ t.same(res.sort(), expect, 'async')
+ const resSync = glob.globSync(pattern, opt)
+ t.same(resSync.sort(), expect, 'sync')
+ })
+}
+
+t.test('race condition', async t => {
+ process.chdir(__dirname)
+ var pattern = 'fixtures/*'
+ t.jobs = 64
+ for (const dot of [true, false]) {
+ for (const ignore of ['fixtures/**', undefined]) {
+ for (const cwd of [undefined, process.cwd(), '.']) {
+ const opt: GlobOptions = {
+ dot,
+ ignore,
+ }
+ if (cwd) opt.cwd = cwd
+ const expect = ignore ? [] : j(['fixtures/a'])
+ t.test(JSON.stringify(opt), async t => {
+ t.plan(2)
+ t.same(glob.globSync(pattern, opt).sort(), expect)
+ t.same((await glob(pattern, opt)).sort(), expect)
+ })
+ }
+ }
+ }
+})
diff --git a/test/mark.js b/test/mark.js
deleted file mode 100644
index 764c332b..00000000
--- a/test/mark.js
+++ /dev/null
@@ -1,200 +0,0 @@
-require("./global-leakage.js")
-var test = require("tap").test
-var glob = require('../')
-process.chdir(__dirname + '/fixtures')
-
-// expose timing issues
-var lag = 5
-glob.Glob.prototype._stat = function(o) { return function(f, cb) {
- var args = arguments
- setTimeout(function() {
- o.call(this, f, cb)
- }.bind(this), lag += 5)
-}}(glob.Glob.prototype._stat)
-
-test('mark with cwd', function (t) {
- var pattern = '*/*'
- var opt = { mark: true, cwd: 'a' }
- glob(pattern, opt, function (er, res) {
- if (er)
- throw er
-
- var expect = [
- 'abcdef/g/',
- 'abcfed/g/',
- 'b/c/',
- 'bc/e/',
- 'c/d/',
- 'cb/e/',
- ].sort()
-
- if (process.platform !== 'win32')
- expect.push('symlink/a/')
-
- t.same(res.sort(), expect)
- t.same(glob.sync(pattern, opt).sort(), expect)
- t.end()
- })
-})
-
-test("mark, with **", function (t) {
- var pattern = 'a/*b*/**'
- var opt = { mark: true }
- glob(pattern, opt, function (er, results) {
- if (er)
- throw er
- var expect =
- [ 'a/abcdef/',
- 'a/abcdef/g/',
- 'a/abcdef/g/h',
- 'a/abcfed/',
- 'a/abcfed/g/',
- 'a/abcfed/g/h',
- 'a/b/',
- 'a/b/c/',
- 'a/b/c/d',
- 'a/bc/',
- 'a/bc/e/',
- 'a/bc/e/f',
- 'a/cb/',
- 'a/cb/e/',
- 'a/cb/e/f' ]
-
- t.same(results, expect)
- t.same(glob.sync(pattern, opt), expect)
- t.end()
- })
-})
-
-test("mark, no / on pattern", function (t) {
- var pattern = 'a/*'
- var opt = { mark: true }
- glob(pattern, opt, function (er, results) {
- if (er)
- throw er
- var expect = [ 'a/abcdef/',
- 'a/abcfed/',
- 'a/b/',
- 'a/bc/',
- 'a/c/',
- 'a/cb/',
- 'a/x/',
- 'a/z/' ]
-
- if (process.platform !== "win32")
- expect.push('a/symlink/')
-
- expect = expect.sort()
-
- t.same(results, expect)
- t.same(glob.sync(pattern, opt), expect)
- t.end()
- }).on('match', function(m) {
- t.similar(m, /\/$/)
- })
-})
-
-test("mark=false, no / on pattern", function (t) {
- var pattern = 'a/*'
- var opt = null
- glob(pattern, opt, function (er, results) {
- if (er)
- throw er
- var expect = [ 'a/abcdef',
- 'a/abcfed',
- 'a/b',
- 'a/bc',
- 'a/c',
- 'a/cb',
- 'a/x',
- 'a/z' ]
-
- if (process.platform !== "win32")
- expect.push('a/symlink')
-
- expect = expect.sort()
-
- t.same(results, expect)
- t.same(glob.sync(pattern, opt), expect)
- t.end()
- }).on('match', function(m) {
- t.similar(m, /[^\/]$/)
- })
-})
-
-test("mark=true, / on pattern", function (t) {
- var pattern = 'a/*/'
- var opt = { mark: true }
- glob(pattern, opt, function (er, results) {
- if (er)
- throw er
- var expect = [ 'a/abcdef/',
- 'a/abcfed/',
- 'a/b/',
- 'a/bc/',
- 'a/c/',
- 'a/cb/',
- 'a/x/',
- 'a/z/' ]
-
- if (process.platform !== "win32")
- expect.push('a/symlink/')
-
- expect = expect.sort()
-
- t.same(results, expect)
- t.same(glob.sync(pattern, opt), expect)
- t.end()
- }).on('match', function(m) {
- t.similar(m, /\/$/)
- })
-})
-
-test("mark=false, / on pattern", function (t) {
- var pattern = "a/*/"
- var opt = null
- glob(pattern, opt, function (er, results) {
- if (er)
- throw er
- var expect = [ 'a/abcdef/',
- 'a/abcfed/',
- 'a/b/',
- 'a/bc/',
- 'a/c/',
- 'a/cb/',
- 'a/x/',
- 'a/z/' ]
- if (process.platform !== "win32")
- expect.push('a/symlink/')
-
- expect = expect.sort()
-
- t.same(results, expect)
- t.same(glob.sync(pattern, opt), expect)
- t.end()
- }).on('match', function(m) {
- t.similar(m, /\/$/)
- })
-})
-
-var cwd = process.cwd().replace(/[\/\\]+$/, '').replace(/\\/g, '/')
-;[true,false].forEach(function (mark) {
- ;[true,false].forEach(function (slash) {
- test("cwd mark:" + mark + " slash:" + slash, function (t) {
- var pattern = cwd + (slash ? '/' : '')
- glob(pattern, {mark:mark}, function (er, results) {
- t.equal(results.length, 1)
- var res = results[0].replace(/\\/g, '/')
- var syncRes = glob.sync(pattern, {mark:mark})
- syncRes = syncRes[0].replace(/\\/g, '/')
- if (slash || mark)
- t.equal(res, cwd + '/')
- else
- t.equal(res.indexOf(cwd), 0)
- t.equal(syncRes, res, 'sync should match async')
- t.end()
- })
- })
- })
-})
-
diff --git a/test/mark.ts b/test/mark.ts
new file mode 100644
index 00000000..620aa2f3
--- /dev/null
+++ b/test/mark.ts
@@ -0,0 +1,181 @@
+import t from 'tap'
+import glob from '../'
+process.chdir(__dirname + '/fixtures')
+
+const alphasort = (a: string, b: string) => a.localeCompare(b, 'en')
+import { sep } from 'path'
+const j = (a: string[]) =>
+ a.map(s => s.split('/').join(sep)).sort(alphasort)
+
+t.test('mark with cwd', async t => {
+ const pattern = '*/*'
+ const opt = { mark: true, cwd: 'a' }
+ const expect = [
+ 'abcdef/g/',
+ 'abcfed/g/',
+ 'b/c/',
+ 'bc/e/',
+ 'c/d/',
+ 'cb/e/',
+ ]
+
+ const res = await glob(pattern, opt)
+ if (process.platform !== 'win32') {
+ expect.push('symlink/a/')
+ }
+
+ t.same(res.sort(alphasort), j(expect))
+ t.same(glob.globSync(pattern, opt).sort(alphasort), j(expect))
+})
+
+t.test('mark, with **', async t => {
+ const pattern = 'a/*b*/**'
+ const opt = { mark: true }
+ const expect = [
+ 'a/abcdef/',
+ 'a/abcdef/g/',
+ 'a/abcdef/g/h',
+ 'a/abcfed/',
+ 'a/abcfed/g/',
+ 'a/abcfed/g/h',
+ 'a/b/',
+ 'a/b/c/',
+ 'a/b/c/d',
+ 'a/bc/',
+ 'a/bc/e/',
+ 'a/bc/e/f',
+ 'a/cb/',
+ 'a/cb/e/',
+ 'a/cb/e/f',
+ ].sort(alphasort)
+
+ t.same((await glob(pattern, opt)).sort(alphasort), j(expect), 'async')
+ t.same(glob.globSync(pattern, opt).sort(alphasort), j(expect), 'sync')
+})
+
+t.test('mark, no / on pattern', async t => {
+ const pattern = 'a/*'
+ const opt = { mark: true }
+ const expect = [
+ 'a/abcdef/',
+ 'a/abcfed/',
+ 'a/b/',
+ 'a/bc/',
+ 'a/c/',
+ 'a/cb/',
+ 'a/x/',
+ 'a/z/',
+ ]
+ if (process.platform !== 'win32') {
+ expect.push('a/symlink/')
+ }
+ const results = (await glob(pattern, opt)).sort(alphasort)
+ t.same(results, j(expect))
+ t.same(glob.globSync(pattern, opt).sort(alphasort), j(expect))
+})
+
+t.test('mark=false, no / on pattern', async t => {
+ const pattern = 'a/*'
+ const expect = [
+ 'a/abcdef',
+ 'a/abcfed',
+ 'a/b',
+ 'a/bc',
+ 'a/c',
+ 'a/cb',
+ 'a/x',
+ 'a/z',
+ ]
+ if (process.platform !== 'win32') {
+ expect.push('a/symlink')
+ }
+ const results = (await glob(pattern)).sort(alphasort)
+
+ t.same(results, j(expect))
+ t.same(glob.globSync(pattern).sort(alphasort), j(expect))
+})
+
+t.test('mark=true, / on pattern', async t => {
+ const pattern = 'a/*/'
+ const opt = { mark: true }
+ const expect = [
+ 'a/abcdef/',
+ 'a/abcfed/',
+ 'a/b/',
+ 'a/bc/',
+ 'a/c/',
+ 'a/cb/',
+ 'a/x/',
+ 'a/z/',
+ ]
+
+ if (process.platform !== 'win32') {
+ expect.push('a/symlink/')
+ }
+ const results = (await glob(pattern, opt)).sort(alphasort)
+ t.same(results, j(expect))
+ t.same(glob.globSync(pattern, opt).sort(alphasort), j(expect))
+})
+
+t.test('mark=false, / on pattern', async t => {
+ const pattern = 'a/*/'
+ const expect = [
+ 'a/abcdef',
+ 'a/abcfed',
+ 'a/b',
+ 'a/bc',
+ 'a/c',
+ 'a/cb',
+ 'a/x',
+ 'a/z',
+ ]
+ if (process.platform !== 'win32') {
+ expect.push('a/symlink')
+ }
+
+ const results = (await glob(pattern)).sort(alphasort)
+ t.same(results, j(expect))
+ t.same(glob.globSync(pattern).sort(alphasort), j(expect))
+})
+
+const cwd = process
+ .cwd()
+ .replace(/[\/\\]+$/, '')
+ .replace(/\\/g, '/')
+for (const mark of [true, false]) {
+ for (const slash of [true, false]) {
+ t.test('cwd mark:' + mark + ' slash:' + slash, async t => {
+ const pattern = cwd + (slash ? '/' : '')
+ const results = await glob(pattern, { mark })
+ t.equal(results.length, 1)
+ const res = results[0].replace(/\\/g, '/')
+ const syncResults = glob.globSync(pattern, { mark: mark })
+ const syncRes = syncResults[0].replace(/\\/g, '/')
+ if (mark) {
+ t.equal(res, cwd + '/')
+ } else {
+ t.equal(res.indexOf(cwd), 0)
+ }
+ t.equal(syncRes, res, 'sync should match async')
+ })
+ }
+}
+
+for (const mark of [true, false]) {
+ for (const slash of [true, false]) {
+ t.test('. mark:' + mark + ' slash:' + slash, async t => {
+ const pattern = '.' + (slash ? '/' : '')
+ const results = await glob(pattern, { mark })
+ t.equal(results.length, 1)
+ const res = results[0].replace(/\\/g, '/')
+ const syncResults = glob.globSync(pattern, { mark: mark })
+ const syncRes = syncResults[0].replace(/\\/g, '/')
+ if (mark) {
+ t.equal(res, './')
+ } else {
+ t.equal(res, '')
+ }
+ t.equal(syncRes, res, 'sync should match async')
+ })
+ }
+}
diff --git a/test/match-base.js b/test/match-base.js
deleted file mode 100644
index 051b5847..00000000
--- a/test/match-base.js
+++ /dev/null
@@ -1,49 +0,0 @@
-var t = require('tap')
-var glob = require('../')
-var path = require('path')
-var fixtureDir = path.resolve(__dirname, 'fixtures')
-
-var pattern = 'a*'
-var expect = [
- 'a',
- 'a/abcdef',
- 'a/abcfed',
-]
-
-if (process.platform !== 'win32')
- expect.push('a/symlink/a', 'a/symlink/a/b/c/a')
-
-t.test('chdir', function (t) {
- var origCwd = process.cwd()
- process.chdir(fixtureDir)
- t.same(glob.sync(pattern, { matchBase: true }), expect)
- t.same(glob(pattern, { matchBase: true, sync: true }), expect)
- glob(pattern, { matchBase: true }, function (er, res) {
- if (er)
- throw er
- t.same(res, expect)
- process.chdir(origCwd)
- t.end()
- })
-})
-
-t.test('cwd', function (t) {
- t.same(glob.sync(pattern, { matchBase: true, cwd: fixtureDir }), expect)
- t.same(glob(pattern, { matchBase: true, sync: true, cwd: fixtureDir }), expect)
- glob(pattern, { matchBase: true, cwd: fixtureDir }, function (er, res) {
- if (er)
- throw er
- t.same(res, expect)
- t.end()
- })
-})
-
-t.test('noglobstar', function (t) {
- t.throws(function () {
- glob(pattern, { matchBase:true, noglobstar: true })
- })
- t.throws(function () {
- glob.sync(pattern, { matchBase:true, noglobstar: true })
- })
- t.end()
-})
diff --git a/test/match-base.ts b/test/match-base.ts
new file mode 100644
index 00000000..ccfd5b16
--- /dev/null
+++ b/test/match-base.ts
@@ -0,0 +1,105 @@
+import t from 'tap'
+import glob from '../'
+
+import { resolve } from 'path'
+import { sep } from 'path'
+const alphasort = (a: string, b: string) => a.localeCompare(b, 'en')
+const j = (a: string[]) =>
+ a.map(s => s.split('/').join(sep)).sort(alphasort)
+
+const fixtureDir = resolve(__dirname, 'fixtures')
+
+const pattern = 'a*'
+const expect = ['a', 'a/abcdef', 'a/abcfed']
+
+if (process.platform !== 'win32') {
+ expect.push('a/symlink/a', 'a/symlink/a/b/c/a')
+}
+
+t.test('chdir', async t => {
+ const origCwd = process.cwd()
+ process.chdir(fixtureDir)
+ t.teardown(() => process.chdir(origCwd))
+ t.same(
+ glob.globSync(pattern, { matchBase: true }).sort(alphasort),
+ j(expect)
+ )
+ t.same(
+ (await glob(pattern, { matchBase: true })).sort(alphasort),
+ j(expect)
+ )
+})
+
+t.test('cwd', async t => {
+ t.same(
+ glob
+ .globSync(pattern, { matchBase: true, cwd: fixtureDir })
+ .sort(alphasort),
+ j(expect)
+ )
+ t.same(
+ (await glob(pattern, { matchBase: true, cwd: fixtureDir })).sort(
+ alphasort
+ ),
+ j(expect)
+ )
+})
+
+t.test('noglobstar', async t => {
+ t.rejects(glob(pattern, { matchBase: true, noglobstar: true }))
+ t.throws(() =>
+ glob.globSync(pattern, { matchBase: true, noglobstar: true })
+ )
+ t.end()
+})
+
+t.test('pattern includes /', async t => {
+ const pattern = 'a/b*'
+ const expect = ['a/b', 'a/bc']
+ t.same(
+ glob
+ .globSync(pattern, { matchBase: true, cwd: fixtureDir })
+ .sort(alphasort),
+ j(expect)
+ )
+ t.same(
+ (await glob(pattern, { matchBase: true, cwd: fixtureDir })).sort(
+ alphasort
+ ),
+ j(expect)
+ )
+})
+
+t.test('one brace section of pattern includes /', async t => {
+ const pattern = 'a{*,/b*}'
+ const exp = ['a', 'a/b', 'a/bc']
+ t.same(
+ glob
+ .globSync(pattern, { matchBase: true, cwd: fixtureDir })
+ .sort(alphasort),
+ j(exp)
+ )
+ t.same(
+ (await glob(pattern, { matchBase: true, cwd: fixtureDir })).sort(
+ alphasort
+ ),
+ j(exp)
+ )
+})
+
+t.test('one array member of pattern includes /', async t => {
+ const pattern = ['a*', 'a/b*']
+ const exp = expect.concat(['a/b', 'a/bc']).sort()
+ t.same(
+ glob
+ .globSync(pattern, { matchBase: true, cwd: fixtureDir })
+ .sort(alphasort),
+ j(exp)
+ )
+ t.same(
+ (await glob(pattern, { matchBase: true, cwd: fixtureDir })).sort(
+ alphasort
+ ),
+ j(exp)
+ )
+})
diff --git a/test/match-parent.ts b/test/match-parent.ts
new file mode 100644
index 00000000..f49db67b
--- /dev/null
+++ b/test/match-parent.ts
@@ -0,0 +1,25 @@
+import t from 'tap'
+import { PathScurry } from 'path-scurry'
+import { Glob } from '../'
+const scurry = new PathScurry()
+t.test('/', t => {
+ const g = new Glob('/', { withFileTypes: true, scurry })
+ const m = g.walkSync()
+ t.equal(m.length, 1)
+ t.equal(m[0], scurry.cwd.resolve('/'))
+ t.end()
+})
+t.test('/..', t => {
+ const g = new Glob('/..', { withFileTypes: true, scurry })
+ const m = g.walkSync()
+ t.equal(m.length, 1)
+ t.equal(m[0], scurry.cwd.resolve('/'))
+ t.end()
+})
+t.test('/../../../../../', t => {
+ const g = new Glob('/../../../../../', { withFileTypes: true, scurry })
+ const m = g.walkSync()
+ t.equal(m.length, 1)
+ t.equal(m[0], scurry.cwd.resolve('/'))
+ t.end()
+})
diff --git a/test/match-root.ts b/test/match-root.ts
new file mode 100644
index 00000000..df8a5ef8
--- /dev/null
+++ b/test/match-root.ts
@@ -0,0 +1,8 @@
+import t from 'tap'
+import { PathScurry } from 'path-scurry'
+import { Glob } from '../'
+const scurry = new PathScurry()
+const g = new Glob('/', { withFileTypes: true, scurry })
+const m = g.walkSync()
+t.equal(m.length, 1)
+t.equal(m[0], scurry.cwd.resolve('/'))
diff --git a/test/max-depth.ts b/test/max-depth.ts
new file mode 100644
index 00000000..a641ee07
--- /dev/null
+++ b/test/max-depth.ts
@@ -0,0 +1,107 @@
+import { resolve } from 'path'
+import { PathScurry } from 'path-scurry'
+import t from 'tap'
+import { Glob, glob, globStream, globStreamSync, globSync } from '../'
+const j = (a: string[]) =>
+ a
+ .map(s => s.replace(/\\/g, '/'))
+ .sort((a, b) => a.localeCompare(b, 'en'))
+t.test('set maxDepth', async t => {
+ const maxDepth = 2
+ const cwd = resolve(__dirname, 'fixtures')
+ const startDepth = new PathScurry(cwd).cwd.depth()
+ const pattern = '{*/*/*/**,*/*/**,**}'
+ const asyncRes = await glob(pattern, {
+ cwd,
+ maxDepth,
+ follow: true,
+ withFileTypes: true,
+ })
+ const syncRes = globSync(pattern, {
+ cwd,
+ maxDepth,
+ follow: true,
+ withFileTypes: true,
+ })
+ const noMaxDepth = globSync(pattern, {
+ cwd,
+ follow: true,
+ withFileTypes: true,
+ })
+ const expect = j(
+ noMaxDepth
+ .filter(p => p.depth() <= startDepth + maxDepth)
+ .map(p => p.relative())
+ )
+
+ const ssync = j(syncRes.map(p => p.relative()))
+ const sasync = j(asyncRes.map(p => p.relative()))
+ t.same(ssync, expect, 'got all results sync')
+ t.same(sasync, expect, 'got all results async')
+ for (const p of syncRes) {
+ t.ok(p.depth() <= startDepth + maxDepth, 'does not exceed maxDepth', {
+ max: startDepth + maxDepth,
+ actual: p.depth(),
+ file: p.relative(),
+ results: 'sync',
+ })
+ }
+ for (const p of asyncRes) {
+ t.ok(p.depth() <= startDepth + maxDepth, 'does not exceed maxDepth', {
+ max: startDepth + maxDepth,
+ actual: p.depth(),
+ file: p.relative(),
+ results: 'async',
+ })
+ }
+
+ t.same(
+ j(
+ await globStream(pattern, { cwd, maxDepth, follow: true }).collect()
+ ),
+ expect,
+ 'maxDepth with stream'
+ )
+ t.same(
+ j(
+ await globStreamSync(pattern, {
+ cwd,
+ maxDepth,
+ follow: true,
+ }).collect()
+ ),
+ expect,
+ 'maxDepth with streamSync'
+ )
+
+ t.same(
+ await glob(pattern, { cwd, maxDepth: -1, follow: true }),
+ [],
+ 'async maxDepth -1'
+ )
+ t.same(
+ globSync(pattern, { cwd, maxDepth: -1, follow: true }),
+ [],
+ 'sync maxDepth -1'
+ )
+
+ t.same(
+ await glob(pattern, { cwd, maxDepth: 0, follow: true }),
+ [''],
+ 'async maxDepth 0'
+ )
+ t.same(
+ globSync(pattern, { cwd, maxDepth: 0, follow: true }),
+ [''],
+ 'async maxDepth 0'
+ )
+
+ const g = new Glob(pattern, { cwd, follow: true, maxDepth })
+ t.same(j([...g]), expect, 'maxDepth with iteration')
+ const ai = new Glob(pattern, g)
+ const aires: string[] = []
+ for await (const res of ai) {
+ aires.push(res)
+ }
+ t.same(j(aires), expect, 'maxDepth with async iteration')
+})
diff --git a/test/memfs.ts b/test/memfs.ts
new file mode 100644
index 00000000..fc97af27
--- /dev/null
+++ b/test/memfs.ts
@@ -0,0 +1,38 @@
+import t from 'tap'
+
+if (process.platform === 'win32') {
+ t.plan(0, 'this test does not work on windows')
+ process.exit(0)
+}
+
+import { fs as memfs, vol } from 'memfs'
+import { glob } from '../'
+t.beforeEach(() => vol.fromJSON({ '/x': 'abc' }))
+
+const fs = memfs as unknown as typeof import('fs')
+
+const mock = {
+ fs: memfs,
+ 'fs/promises': memfs.promises,
+}
+
+const patterns = ['/**/*', '/*', '/x']
+const cwds = ['/', undefined]
+for (const pattern of patterns) {
+ t.test(pattern, async t => {
+ for (const cwd of cwds) {
+ t.test(`cwd=${cwd}`, async t => {
+ t.test('mocking the fs', async t => {
+ const { glob } = t.mock('../', {
+ ...mock,
+ 'path-scurry': t.mock('path-scurry', mock),
+ })
+ t.strictSame(await glob(pattern, { nodir: true, cwd }), ['/x'])
+ })
+ t.test('passing in fs argument', async t => {
+ t.strictSame(await glob(pattern, { nodir: true, cwd, fs }), ['/x'])
+ })
+ })
+ }
+ })
+}
diff --git a/test/multiple-weird-error.js b/test/multiple-weird-error.js
deleted file mode 100644
index 4a9e45ea..00000000
--- a/test/multiple-weird-error.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var t = require('tap')
-var fs = require('fs')
-fs.readdir = function(path, cb) { cb(new Error('expected')) }
-var glob = require('../')
-
-// also test that silent:true is actually silent!
-console.error = function () { throw 'SILENCE, INSECT!' }
-
-t.plan(2)
-glob('*', { silent: true }, function(err, files) {
- t.ok(err, 'got first error')
-})
-glob('*', { silent: true }, function(err, files) {
- t.ok(err, 'got second error')
-})
diff --git a/test/new-glob-optional-options.js b/test/new-glob-optional-options.js
deleted file mode 100644
index 9dc29f54..00000000
--- a/test/new-glob-optional-options.js
+++ /dev/null
@@ -1,12 +0,0 @@
-require("./global-leakage.js")
-var Glob = require('../glob.js').Glob;
-var test = require('tap').test;
-var f = __filename.replace(/\\/g, '/')
-
-test('new glob, with cb, and no options', function (t) {
- new Glob(f, function(er, results) {
- if (er) throw er;
- t.same(results, [f]);
- t.end();
- });
-});
diff --git a/test/nocase-nomagic.js b/test/nocase-nomagic.js
deleted file mode 100644
index 6bd46c60..00000000
--- a/test/nocase-nomagic.js
+++ /dev/null
@@ -1,149 +0,0 @@
-require("./global-leakage.js")
-var fs = require('fs')
-var test = require('tap').test;
-var glob = require('../');
-
-var cwd = process.cwd()
-var drive = 'c'
-if (/^[a-zA-Z]:[\\\/]/.test(cwd)) {
- drive = cwd.charAt(0).toLowerCase()
-}
-
-test('mock fs', function(t) {
- var stat = fs.stat
- var statSync = fs.statSync
- var readdir = fs.readdir
- var readdirSync = fs.readdirSync
-
- function fakeStat(path) {
- var ret
- switch (path.toLowerCase().replace(/\\/g, '/')) {
- case '/tmp': case '/tmp/': case drive+':\\tmp': case drive+':\\tmp\\':
- ret = { isDirectory: function() { return true } }
- break
- case '/tmp/a': case drive+':/tmp/a':
- ret = { isDirectory: function() { return false } }
- break
- }
- return ret
- }
-
- fs.stat = function(path, cb) {
- var f = fakeStat(path);
- if (f) {
- process.nextTick(function() {
- cb(null, f)
- })
- } else {
- stat.call(fs, path, cb)
- }
- }
-
- fs.statSync = function(path) {
- return fakeStat(path) || statSync.call(fs, path)
- }
-
- function fakeReaddir(path) {
- var ret
- switch (path.toLowerCase().replace(/\\/g, '/')) {
- case '/tmp': case '/tmp/': case drive+':/tmp': case drive+':/tmp/':
- ret = [ 'a', 'A' ]
- break
- case '/': case drive+':/':
- ret = ['tmp', 'tMp', 'tMP', 'TMP']
- }
- return ret
- }
-
- fs.readdir = function(path, cb) {
- var f = fakeReaddir(path)
- if (f)
- process.nextTick(function() {
- cb(null, f)
- })
- else
- readdir.call(fs, path, cb)
- }
-
- fs.readdirSync = function(path) {
- return fakeReaddir(path) || readdirSync.call(fs, path)
- }
-
- t.pass('mocked')
- t.end()
-})
-
-test('nocase, nomagic', function(t) {
- var n = 2
- var want = [ '/TMP/A',
- '/TMP/a',
- '/tMP/A',
- '/tMP/a',
- '/tMp/A',
- '/tMp/a',
- '/tmp/A',
- '/tmp/a' ]
- if(process.platform.match(/^win/)) {
- want = want.map(function(p) {
- return drive+':' + p
- })
- }
- glob('/tmp/a', { nocase: true }, function(er, res) {
- if (er)
- throw er
- if (process.platform.match(/^win/))
- res = res.map(function (r) {
- return r.replace(/\\/g, '/').replace(new RegExp('^' + drive + ':', 'i'), drive+':')
- })
- t.same(res.sort(), want)
- if (--n === 0) t.end()
- })
- glob('/tmp/A', { nocase: true }, function(er, res) {
- if (er)
- throw er
- if (process.platform.match(/^win/))
- res = res.map(function (r) {
- return r.replace(/\\/g, '/').replace(new RegExp('^' + drive + ':', 'i'), drive+':')
- })
- t.same(res.sort(), want)
- if (--n === 0) t.end()
- })
-})
-
-test('nocase, with some magic', function(t) {
- t.plan(2)
- var want = [ '/TMP/A',
- '/TMP/a',
- '/tMP/A',
- '/tMP/a',
- '/tMp/A',
- '/tMp/a',
- '/tmp/A',
- '/tmp/a' ]
- if(process.platform.match(/^win/)) {
- want = want.map(function(p) {
- return drive + ':' + p
- })
- }
-
- glob('/tmp/*', { nocase: true }, function(er, res) {
- if (er)
- throw er
- if (process.platform.match(/^win/)) {
- res = res.map(function (r) {
- return r.replace(/\\/g, '/').replace(new RegExp('^' + drive + ':', 'i'), drive+':')
- })
- }
- t.same(res.sort(), want)
- })
- glob('/tmp/*', { nocase: true }, function(er, res) {
- if (er)
- throw er
- if (process.platform.match(/^win/)) {
- res = res.map(function (r) {
- return r.replace(/\\/g, '/').replace(new RegExp('^' + drive + ':', 'i'), drive+':')
- })
- }
- t.same(res.sort(), want)
- })
-})
diff --git a/test/nodir.js b/test/nodir.js
deleted file mode 100644
index 1f095694..00000000
--- a/test/nodir.js
+++ /dev/null
@@ -1,67 +0,0 @@
-require("./global-leakage.js")
-var test = require("tap").test
-var glob = require('../')
-var path = require('path')
-var isAbsolute = require('path-is-absolute')
-process.chdir(__dirname + '/fixtures')
-
-function cacheCheck(g, t) {
- // verify that path cache keys are all absolute
- var caches = [ 'cache', 'statCache', 'symlinks' ]
- caches.forEach(function (c) {
- Object.keys(g[c]).forEach(function (p) {
- t.ok(isAbsolute(p), p + ' should be absolute')
- })
- })
-}
-
-// [pattern, options, expect]
-var root = path.resolve('a')
-var cases = [
- [ '*/**', { cwd: 'a' }, [
- 'abcdef/g/h',
- 'abcfed/g/h',
- 'b/c/d',
- 'bc/e/f',
- 'c/d/c/b',
- 'cb/e/f'
- ]
- ],
- [ 'a/*b*/**', {}, [
- 'a/abcdef/g/h',
- 'a/abcfed/g/h',
- 'a/b/c/d',
- 'a/bc/e/f',
- 'a/cb/e/f'
- ]
- ],
- [ 'a/*b*/**/', {}, [] ],
- [ '*/*', { cwd: 'a' }, [] ],
- [ '/*/*', { root: root }, [] ],
- [ '/b*/**', { root: root }, [
- '/b/c/d',
- '/bc/e/f'
- ].map(function (m) {
- return path.join(root, m).replace(/\\/g, '/')
- })
- ]
-]
-
-cases.forEach(function (c) {
- var pattern = c[0]
- var options = c[1] || {}
- options.nodir = true
- var expect = c[2].sort()
- test(pattern + ' ' + JSON.stringify(options), function (t) {
- var res = glob.sync(pattern, options).sort()
- t.same(res, expect, 'sync results')
- var g = glob(pattern, options, function (er, res) {
- if (er)
- throw er
- res = res.sort()
- t.same(res, expect, 'async results')
- cacheCheck(g, t)
- t.end()
- })
- })
-})
diff --git a/test/nodir.ts b/test/nodir.ts
new file mode 100644
index 00000000..a6616e79
--- /dev/null
+++ b/test/nodir.ts
@@ -0,0 +1,50 @@
+import { resolve, sep } from 'path'
+import t from 'tap'
+import glob from '../'
+import type { GlobOptions } from '../src/index.js'
+process.chdir(__dirname + '/fixtures')
+
+const alphasort = (a: string, b: string) => a.localeCompare(b, 'en')
+const j = (a: string[]) =>
+ a.map(s => s.split('/').join(sep)).sort(alphasort)
+
+// [pattern, options, expect]
+const root = resolve('a')
+const cases: [string, GlobOptions, string[]][] = [
+ [
+ '*/**',
+ { cwd: 'a' },
+ j([
+ 'abcdef/g/h',
+ 'abcfed/g/h',
+ 'b/c/d',
+ 'bc/e/f',
+ 'c/d/c/b',
+ 'cb/e/f',
+ 'symlink/a/b/c',
+ ]),
+ ],
+ [
+ 'a/*b*/**',
+ {},
+ j(['a/abcdef/g/h', 'a/abcfed/g/h', 'a/b/c/d', 'a/bc/e/f', 'a/cb/e/f']),
+ ],
+ ['a/*b*/**/', {}, []],
+ ['*/*', { cwd: 'a' }, []],
+ ['*/*', { cwd: root }, []],
+]
+
+for (const [pattern, options, expectRaw] of cases) {
+ options.nodir = true
+ const expect =
+ process.platform === 'win32'
+ ? expectRaw.filter(e => !/\bsymlink\b/.test(e))
+ : expectRaw
+ expect.sort()
+ if (process.platform !== 'win32') {
+ }
+ t.test(pattern + ' ' + JSON.stringify(options), async t => {
+ t.same(glob.globSync(pattern, options).sort(), expect, 'sync results')
+ t.same((await glob(pattern, options)).sort(), expect, 'async results')
+ })
+}
diff --git a/test/nonull.js b/test/nonull.js
deleted file mode 100644
index 5f744e36..00000000
--- a/test/nonull.js
+++ /dev/null
@@ -1,31 +0,0 @@
-require("./global-leakage.js")
-var test = require("tap").test
-var glob = require('../')
-var common = require('../common.js')
-process.chdir(__dirname)
-
-// [pattern, options, expect]
-var cases = [
- [ 'a/*NOFILE*/**/', {}, [ 'a/*NOFILE*/**/' ] ],
- [ '*/*', { cwd: 'NODIR' }, [ '*/*' ] ],
- [ 'NOFILE', {}, [ 'NOFILE' ] ],
- [ 'NOFILE', { cwd: 'NODIR' }, [ 'NOFILE' ] ]
-]
-
-cases.forEach(function (c) {
- var pattern = c[0]
- var options = c[1] || {}
- options.nonull = true
- var expect = c[2].sort()
- test(pattern + ' ' + JSON.stringify(options), function (t) {
- var res = glob.sync(pattern, options).sort()
- t.same(res, expect, 'sync results')
- var g = glob(pattern, options, function (er, res) {
- if (er)
- throw er
- res = res.sort()
- t.same(res, expect, 'async results')
- t.end()
- })
- })
-})
diff --git a/test/pattern.ts b/test/pattern.ts
new file mode 100644
index 00000000..6b3cb22d
--- /dev/null
+++ b/test/pattern.ts
@@ -0,0 +1,64 @@
+import { GLOBSTAR } from 'minimatch'
+import t from 'tap'
+import { Glob } from '../'
+import { Pattern } from '../dist/cjs/pattern'
+
+t.same(
+ new Glob(
+ [
+ '//host/share///x/*',
+ '//host/share/',
+ '//host/share',
+ '//?/z:/x/*',
+ '//?/z:/',
+ '//?/z:',
+ 'c:/x/*',
+ 'c:/',
+ ],
+ { platform: 'win32' }
+ ).patterns.map(p => [p.globString(), p.root()]),
+ [
+ ['//host/share/x/*', '//host/share/'],
+ ['//host/share/', '//host/share/'],
+ ['//host/share/', '//host/share/'],
+ ['//?/z:/x/*', '//?/z:/'],
+ ['//?/z:/', '//?/z:/'],
+ ['//?/z:/', '//?/z:/'],
+ ['c:/x/*', 'c:/'],
+ ['c:/', 'c:/'],
+ ]
+)
+t.throws(() => {
+ new Pattern([], ['x'], 0, process.platform)
+})
+
+t.throws(() => {
+ new Pattern(['x'], [], 0, process.platform)
+})
+
+t.throws(() => {
+ new Pattern(['x'], ['x'], 2, process.platform)
+})
+
+t.throws(() => {
+ new Pattern(['x'], ['x'], -1, process.platform)
+})
+
+t.throws(() => {
+ new Pattern(['x', 'x'], ['x', 'x', 'x'], 0, process.platform)
+})
+
+const s = new Pattern(['x'], ['x'], 0, process.platform)
+const g = new Pattern([GLOBSTAR], ['**'], 0, process.platform)
+const r = new Pattern([/./], ['?'], 0, process.platform)
+t.equal(s.isString(), true)
+t.equal(g.isString(), false)
+t.equal(r.isString(), false)
+
+t.equal(s.isGlobstar(), false)
+t.equal(g.isGlobstar(), true)
+t.equal(r.isGlobstar(), false)
+
+t.equal(s.isRegExp(), false)
+t.equal(g.isRegExp(), false)
+t.equal(r.isRegExp(), true)
diff --git a/test/pause-resume.js b/test/pause-resume.js
deleted file mode 100644
index d6fb8072..00000000
--- a/test/pause-resume.js
+++ /dev/null
@@ -1,63 +0,0 @@
-require("./global-leakage.js")
-// show that no match events happen while paused.
-var tap = require("tap")
-var child_process = require("child_process")
-// just some gnarly pattern with lots of matches
-var pattern = "a/!(symlink)/**"
-var bashResults = require("./bash-results.json")
-var glob = require("../")
-var Glob = glob.Glob
-var path = require("path")
-
-process.chdir(__dirname + '/fixtures')
-
-function alphasort (a, b) {
- a = a.toLowerCase()
- b = b.toLowerCase()
- return a > b ? 1 : a < b ? -1 : 0
-}
-
-function cleanResults (m) {
- // normalize discrepancies in ordering, duplication,
- // and ending slashes.
- return m.map(function (m) {
- return m.replace(/\/+/g, "/").replace(/\/$/, "")
- }).sort(alphasort).reduce(function (set, f) {
- if (f !== set[set.length - 1]) set.push(f)
- return set
- }, []).sort(alphasort).map(function (f) {
- // de-windows
- return (process.platform !== 'win32') ? f
- : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/')
- })
-}
-
-var globResults = []
-tap.test("use a Glob object, and pause/resume it", function (t) {
- var g = new Glob(pattern)
- var paused = false
- var res = []
- var expect = bashResults[pattern]
-
- g.on("match", function (m) {
- t.notOk(g.paused, "must not be paused")
- globResults.push(m)
- g.pause()
- t.ok(g.paused, "must be paused")
- setTimeout(g.resume.bind(g), 10)
- })
-
- g.on("end", function (matches) {
- t.pass("reached glob end")
- globResults = cleanResults(globResults)
- matches = cleanResults(matches)
- t.deepEqual(matches, globResults,
- "end event matches should be the same as match events")
-
- t.deepEqual(matches, expect,
- "glob matches should be the same as bash results")
-
- t.end()
- })
-})
-
diff --git a/test/platform.ts b/test/platform.ts
new file mode 100644
index 00000000..037fc55d
--- /dev/null
+++ b/test/platform.ts
@@ -0,0 +1,73 @@
+import { resolve } from 'path'
+import t from 'tap'
+
+import {
+ PathScurry,
+ PathScurryDarwin,
+ PathScurryPosix,
+ PathScurryWin32,
+} from 'path-scurry'
+import { Glob } from '../'
+import { glob } from '../dist/cjs'
+import { GlobWalker } from '../dist/cjs/walker'
+import { Pattern } from '../dist/cjs/pattern'
+
+t.test('default platform is process.platform', t => {
+ const g = new Glob('.', {})
+ t.equal(g.platform, process.platform)
+ t.end()
+})
+
+t.test('default linux when not found', async t => {
+ const prop = Object.getOwnPropertyDescriptor(process, 'platform')
+ if (!prop) throw new Error('no platform?')
+ t.teardown(() => {
+ Object.defineProperty(process, 'platform', prop)
+ })
+ Object.defineProperty(process, 'platform', {
+ value: null,
+ configurable: true,
+ })
+ const { Glob } = t.mock('../', {})
+ const g = new Glob('.', {})
+ t.equal(g.platform, 'linux')
+ t.end()
+})
+
+t.test('set platform, get appropriate scurry object', t => {
+ t.equal(
+ new Glob('.', { platform: 'darwin' }).scurry.constructor,
+ PathScurryDarwin
+ )
+ t.equal(
+ new Glob('.', { platform: 'linux' }).scurry.constructor,
+ PathScurryPosix
+ )
+ t.equal(
+ new Glob('.', { platform: 'win32' }).scurry.constructor,
+ PathScurryWin32
+ )
+ t.equal(new Glob('.', {}).scurry.constructor, PathScurry)
+ t.end()
+})
+
+t.test('set scurry, sets nocase and scurry', t => {
+ const scurry = new PathScurryWin32('.')
+ t.throws(() => new Glob('.', { scurry, nocase: false }))
+ const g = new Glob('.', { scurry })
+ t.equal(g.scurry, scurry)
+ t.equal(g.nocase, true)
+ t.end()
+})
+
+t.test('instantiate to hit a coverage line', async t => {
+ const s = new PathScurry(resolve(__dirname, 'fixtures/a/b'))
+ const p = new Pattern([/./, /./], ['?', '?'], 0, process.platform)
+ new GlobWalker([p], s.cwd, {
+ platform: 'win32',
+ })
+ new GlobWalker([p], s.cwd, {
+ platform: 'linux',
+ })
+ t.pass('this is fine')
+})
diff --git a/test/readme-issue.js b/test/readme-issue.js
deleted file mode 100644
index 1c35ecb9..00000000
--- a/test/readme-issue.js
+++ /dev/null
@@ -1,37 +0,0 @@
-require("./global-leakage.js")
-var test = require("tap").test
-var glob = require("../")
-
-var mkdirp = require("mkdirp")
-var fs = require("fs")
-var rimraf = require("rimraf")
-var dir = __dirname + "/package"
-
-test("setup", function (t) {
- mkdirp.sync(dir)
- fs.writeFileSync(dir + "/package.json", "{}", "ascii")
- fs.writeFileSync(dir + "/README", "x", "ascii")
- t.pass("setup done")
- t.end()
-})
-
-test("glob", function (t) {
- var opt = {
- cwd: dir,
- nocase: true,
- mark: true
- }
-
- glob("README?(.*)", opt, function (er, files) {
- if (er)
- throw er
- t.same(files, ["README"])
- t.end()
- })
-})
-
-test("cleanup", function (t) {
- rimraf.sync(dir)
- t.pass("clean")
- t.end()
-})
diff --git a/test/readme-issue.ts b/test/readme-issue.ts
new file mode 100644
index 00000000..28a72cf7
--- /dev/null
+++ b/test/readme-issue.ts
@@ -0,0 +1,17 @@
+import t from 'tap'
+import glob from '../'
+
+const dir = t.testdir({
+ 'package.json': '{}',
+ README: 'x',
+})
+
+t.test('glob', async t => {
+ var opt = {
+ cwd: dir,
+ nocase: true,
+ mark: true,
+ }
+
+ t.same(await glob('README?(.*)', opt), ['README'])
+})
diff --git a/test/realpath.js b/test/realpath.js
deleted file mode 100644
index 3be55569..00000000
--- a/test/realpath.js
+++ /dev/null
@@ -1,93 +0,0 @@
-var glob = require('../')
-var test = require('tap').test
-// pattern to find a bunch of duplicates
-var pattern = 'a/symlink/{*,**/*/*/*,*/*/**,*/*/*/*/*/*}'
-var path = require('path')
-var fixtureDir = path.resolve(__dirname, 'fixtures')
-process.chdir(fixtureDir)
-
-if (process.platform === 'win32')
- return require('tap').plan(0, 'skip on windows')
-
-// options, results
-// realpath:true set on each option
-var cases = [
- [ {},
- [ 'a/symlink', 'a/symlink/a', 'a/symlink/a/b' ] ],
-
- [ { mark: true },
- [ 'a/symlink/', 'a/symlink/a/', 'a/symlink/a/b/' ] ],
-
- [ { stat: true },
- [ 'a/symlink', 'a/symlink/a', 'a/symlink/a/b' ] ],
-
- [ { follow: true },
- [ 'a/symlink', 'a/symlink/a', 'a/symlink/a/b' ] ],
-
- [ { cwd: 'a' },
- [ 'symlink', 'symlink/a', 'symlink/a/b' ],
- pattern.substr(2) ],
-
- [ { cwd: 'a' },
- [],
- 'no one here but us chickens' ],
-
- [ { nonull: true },
- [ 'no one here but us chickens',
- 'no one here but us sheep' ],
- 'no one here but us {chickens,sheep}' ],
-
- [ { nounique: true },
- [ 'a/symlink',
- 'a/symlink',
- 'a/symlink',
- 'a/symlink/a',
- 'a/symlink/a',
- 'a/symlink/a/b',
- 'a/symlink/a/b' ] ],
-
- [ { nounique: true, mark: true },
- [ 'a/symlink/',
- 'a/symlink/',
- 'a/symlink/',
- 'a/symlink/a/',
- 'a/symlink/a/',
- 'a/symlink/a/b/',
- 'a/symlink/a/b/' ] ],
-
- [ { nounique: true, mark: true, follow: true },
- [ 'a/symlink/',
- 'a/symlink/',
- 'a/symlink/',
- 'a/symlink/a/',
- 'a/symlink/a/',
- 'a/symlink/a/',
- 'a/symlink/a/b/',
- 'a/symlink/a/b/' ] ],
-]
-
-cases.forEach(function (c) {
- var opt = c[0]
- var expect = c[1]
- if (!(opt.nonull && expect[0].match(/^no one here/))) {
- expect = expect.map(function (d) {
- d = (opt.cwd ? path.resolve(opt.cwd) : fixtureDir) + '/' + d
- return d.replace(/\\/g, '/')
- })
- }
- var p = c[2] || pattern
-
- opt.realpath = true
-
- test(JSON.stringify(opt), function (t) {
- opt.realpath = true
- var sync = glob.sync(p, opt)
- t.same(sync, expect, 'sync')
- glob(p, opt, function (er, async) {
- if (er)
- throw er
- t.same(async, expect, 'async')
- t.end()
- })
- })
-})
diff --git a/test/realpath.ts b/test/realpath.ts
new file mode 100644
index 00000000..64a1731d
--- /dev/null
+++ b/test/realpath.ts
@@ -0,0 +1,96 @@
+import * as fs from 'fs'
+import * as fsp from 'fs/promises'
+import { resolve } from 'path'
+import t from 'tap'
+import glob from '../'
+import { GlobOptionsWithFileTypesUnset } from '../src/glob'
+
+const alphasort = (a: string, b: string) => a.localeCompare(b, 'en')
+
+// pattern to find a bunch of duplicates
+const pattern = 'a/symlink/{*,**/*/*/*,*/*/**,*/*/*/*/*/*}'
+const fixtureDir = resolve(__dirname, 'fixtures')
+const origCwd = process.cwd()
+process.chdir(fixtureDir)
+
+if (process.platform === 'win32') {
+ t.plan(0, 'skip on windows')
+} else {
+ // options, results
+ // realpath:true set on each option
+
+ type Case = [
+ options: GlobOptionsWithFileTypesUnset,
+ results: string[],
+ pattern?: string
+ ]
+ const cases: Case[] = [
+ [{}, ['a/symlink', 'a/symlink/a', 'a/symlink/a/b']],
+
+ [{ mark: true }, ['a/symlink/', 'a/symlink/a/', 'a/symlink/a/b/']],
+
+ [{ follow: true }, ['a/symlink', 'a/symlink/a', 'a/symlink/a/b']],
+
+ [
+ { cwd: 'a' },
+ ['symlink', 'symlink/a', 'symlink/a/b'],
+ pattern.substring(2),
+ ],
+
+ [{ cwd: 'a' }, [], 'no one here but us chickens'],
+
+ [
+ { mark: true, follow: true },
+ [
+ // this one actually just has HELLA entries, don't list them all here
+ // plus it differs based on the platform. follow:true is kinda cray.
+ 'a/symlink/',
+ 'a/symlink/a/',
+ 'a/symlink/a/b/',
+ ],
+ ],
+ ]
+
+ for (const [opt, expect, p = pattern] of cases) {
+ expect.sort(alphasort)
+ t.test(p + ' ' + JSON.stringify(opt), async t => {
+ opt.realpath = true
+ t.same(glob.globSync(p, opt).sort(alphasort), expect, 'sync')
+ const a = await glob(p, opt)
+ t.same(a.sort(alphasort), expect, 'async')
+ })
+ }
+
+ t.test('realpath failure', async t => {
+ process.chdir(origCwd)
+ const { glob } = t.mock('../dist/cjs/index.js', {
+ fs: {
+ ...fs,
+ realpathSync: Object.assign(fs.realpathSync, {
+ native: () => {
+ throw new Error('no error for you sync')
+ },
+ }),
+ },
+ 'fs/promises': {
+ ...fsp,
+ realpath: async () => {
+ throw new Error('no error for you async')
+ },
+ },
+ })
+ const pattern = 'a/symlink/a/b/c/a/b/**'
+ const expect = ['a/symlink', 'a/symlink/a/b'].sort(alphasort)
+ t.test('setting cwd explicitly', async t => {
+ const opt = { realpath: true, cwd: fixtureDir }
+ t.same(glob.globSync(pattern, opt).sort(alphasort), expect)
+ t.same((await glob(pattern, opt)).sort(alphasort), expect)
+ })
+ t.test('looking in cwd', async t => {
+ process.chdir(fixtureDir)
+ const opt = { realpath: true }
+ t.same(glob.globSync(pattern, opt).sort(alphasort), expect)
+ t.same((await glob(pattern, opt)).sort(alphasort), expect)
+ })
+ })
+}
diff --git a/test/root-nomount.js b/test/root-nomount.js
deleted file mode 100644
index db2f7214..00000000
--- a/test/root-nomount.js
+++ /dev/null
@@ -1,48 +0,0 @@
-require("./global-leakage.js")
-var tap = require("tap")
-var glob = require('../')
-var path = require('path')
-var isAbsolute = require('path-is-absolute')
-
-function cacheCheck(g, t) {
- // verify that path cache keys are all absolute
- var caches = [ 'cache', 'statCache', 'symlinks' ]
- caches.forEach(function (c) {
- Object.keys(g[c]).forEach(function (p) {
- t.ok(isAbsolute(p), p + ' should be absolute')
- })
- })
-}
-
-process.chdir(__dirname + '/fixtures')
-
-tap.test("changing root and searching for /b*/**", function (t) {
- t.test('.', function (t) {
- var g = glob('/b*/**', { root: '.', nomount: true }, function (er, matches) {
- t.ifError(er)
- t.like(matches, [])
- cacheCheck(g, t)
- t.end()
- })
- })
-
- t.test('a', function (t) {
- var g = glob('/b*/**', { root: path.resolve('a'), nomount: true }, function (er, matches) {
- t.ifError(er)
- t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ])
- cacheCheck(g, t)
- t.end()
- })
- })
-
- t.test('root=a, cwd=a/b', function (t) {
- var g = glob('/b*/**', { root: 'a', cwd: path.resolve('a/b'), nomount: true }, function (er, matches) {
- t.ifError(er)
- t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ])
- cacheCheck(g, t)
- t.end()
- })
- })
-
- t.end()
-})
diff --git a/test/root.js b/test/root.js
deleted file mode 100644
index 14ff15ac..00000000
--- a/test/root.js
+++ /dev/null
@@ -1,81 +0,0 @@
-require("./global-leakage.js")
-var t = require("tap")
-
-process.chdir(__dirname + '/fixtures')
-
-var glob = require('../')
-var path = require('path')
-var isAbsolute = require('path-is-absolute')
-
-function cacheCheck(g, t) {
- // verify that path cache keys are all absolute
- var caches = [ 'cache', 'statCache', 'symlinks' ]
- caches.forEach(function (c) {
- Object.keys(g[c]).forEach(function (p) {
- t.ok(isAbsolute(p), p + ' should be absolute')
- })
- })
-}
-
-t.test('.', function (t) {
- var g = glob('/b*/**', { root: '.' }, function (er, matches) {
- t.ifError(er)
- t.same(matches, [])
- cacheCheck(g, t)
- t.end()
- })
-})
-
-
-t.test('a', function (t) {
- var g = glob('/b*/**', { root: path.resolve('a') }, function (er, matches) {
- t.ifError(er)
- var wanted = [
- '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f'
- ].map(function (m) {
- return path.join(path.resolve('a'), m).replace(/\\/g, '/')
- })
-
- t.same(matches, wanted)
- cacheCheck(g, t)
- t.end()
- })
-})
-
-t.test('root=a, cwd=a/b', function (t) {
- var g = glob('/b*/**', { root: 'a', cwd: path.resolve('a/b') }, function (er, matches) {
- t.ifError(er)
- t.same(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ].map(function (m) {
- return path.join(path.resolve('a'), m).replace(/\\/g, '/')
- }))
- cacheCheck(g, t)
- t.end()
- })
-})
-
-t.test('combined with absolute option', function(t) {
- var g = glob('/b*/**', { root: path.resolve('a'), absolute: true }, function (er, matches) {
- t.ifError(er)
- t.same(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ].map(function (m) {
- return path.join(path.resolve('a'), m).replace(/\\/g, '/')
- }))
- cacheCheck(g, t)
- t.end()
- })
-})
-
-t.test('cwdAbs when root=a, absolute=true', function(t) {
- var g = glob('/b*/**', { root: path.resolve('a'), absolute: true }, function (er, matches) {
- t.ifError(er)
- t.same(g.cwdAbs, process.cwd().replace(/\\/g, '/'))
- t.end()
- })
-})
-
-t.test('cwdAbs when root=a, absolute=true, cwd=__dirname', function(t) {
- var g = glob('/b*/**', { root: path.resolve('a'), absolute: true, cwd: __dirname }, function (er, matches) {
- t.ifError(er)
- t.same(g.cwdAbs, __dirname.replace(/\\/g, '/'))
- t.end()
- })
-})
diff --git a/test/root.ts b/test/root.ts
new file mode 100644
index 00000000..b979c5df
--- /dev/null
+++ b/test/root.ts
@@ -0,0 +1,46 @@
+import { resolve, sep } from 'path'
+import t from 'tap'
+import { Glob } from '../'
+
+const alphasort = (a: string, b: string) => a.localeCompare(b, 'en')
+const j = (a: string[]) =>
+ a
+ .map(s => s.split(process.cwd()).join('{CWD}').split(sep).join('/'))
+ .sort(alphasort)
+
+t.test('set root option', t => {
+ const cwd = t.testdir({
+ x: {
+ a: '',
+ x: {
+ a: '',
+ x: {
+ a: '',
+ y: {
+ r: '',
+ },
+ },
+ y: {
+ r: '',
+ },
+ },
+ y: {
+ r: '',
+ },
+ },
+ y: {
+ r: '',
+ },
+ })
+
+ const pattern = ['**/r', '/**/a', '/**/../y']
+ const root = resolve(cwd, 'x/x')
+ t.plan(3)
+ for (const absolute of [true, false, undefined]) {
+ t.test(`absolute=${absolute}`, async t => {
+ const g = new Glob(pattern, { root, absolute, cwd })
+ t.matchSnapshot(j(await g.walk()), 'async')
+ t.matchSnapshot(j(g.walkSync()), 'sync')
+ })
+ }
+})
diff --git a/test/signal.ts b/test/signal.ts
new file mode 100644
index 00000000..717a45c5
--- /dev/null
+++ b/test/signal.ts
@@ -0,0 +1,89 @@
+import * as fs from 'fs'
+import { resolve } from 'path'
+import t from 'tap'
+import { glob, globStream, globStreamSync, globSync } from '../'
+
+const mocks = (ac: AbortController) => {
+ const fsMock = {
+ ...fs,
+ readdirSync: (path: string, options: any) => {
+ ac.abort(yeet)
+ return fs.readdirSync(path, options)
+ },
+ }
+ return {
+ fs: fsMock,
+ 'path-scurry': t.mock('path-scurry', { fs: fsMock }),
+ }
+}
+
+const cwd = resolve(__dirname, 'fixtures/a')
+
+const yeet = new Error('yeet')
+
+t.test('pre abort walk', async t => {
+ const ac = new AbortController()
+ ac.abort(yeet)
+ await t.rejects(glob('./**', { cwd, signal: ac.signal }), yeet)
+})
+
+t.test('mid-abort walk', async t => {
+ const ac = new AbortController()
+ const res = glob('./**', { cwd, signal: ac.signal })
+ ac.abort(yeet)
+ await t.rejects(res, yeet)
+})
+
+t.test('pre abort sync walk', t => {
+ const ac = new AbortController()
+ ac.abort(yeet)
+ t.throws(() => globSync('./**', { cwd, signal: ac.signal }))
+ t.end()
+})
+
+t.test('mid-abort sync walk', t => {
+ const ac = new AbortController()
+ const { globSync } = t.mock('../', mocks(ac))
+ t.throws(() => globSync('./**', { cwd, signal: ac.signal }))
+ t.end()
+})
+
+t.test('pre abort stream', t => {
+ const ac = new AbortController()
+ ac.abort(yeet)
+ const s = globStream('./**', { cwd, signal: ac.signal })
+ s.on('error', er => {
+ t.equal(er, yeet)
+ t.end()
+ })
+})
+
+t.test('mid-abort stream', t => {
+ const ac = new AbortController()
+ const s = globStream('./**', { cwd, signal: ac.signal })
+ s.on('error', er => {
+ t.equal(er, yeet)
+ t.end()
+ })
+ s.once('data', () => ac.abort(yeet))
+})
+
+t.test('pre abort sync stream', t => {
+ const ac = new AbortController()
+ ac.abort(yeet)
+ const s = globStreamSync('./**', { cwd, signal: ac.signal })
+ s.on('error', er => {
+ t.equal(er, yeet)
+ t.end()
+ })
+})
+
+t.test('mid-abort sync stream', t => {
+ const ac = new AbortController()
+ const s = globStreamSync('./**', { cwd, signal: ac.signal })
+ s.on('error', er => {
+ t.equal(er, yeet)
+ t.end()
+ })
+ s.on('data', () => ac.abort(yeet))
+})
diff --git a/test/slash-cwd.js b/test/slash-cwd.js
deleted file mode 100644
index fc1f1b0e..00000000
--- a/test/slash-cwd.js
+++ /dev/null
@@ -1,20 +0,0 @@
-// regression test to make sure that slash-ended patterns
-// don't match files when using a different cwd.
-var glob = require('../')
-var test = require('tap').test
-var pattern = '../{*.md,test}/'
-var expect = [ '../test/' ]
-var cwd = __dirname
-var opt = { cwd: cwd }
-process.chdir(__dirname + '/..')
-
-test('slashes only match directories', function (t) {
- var sync = glob.sync(pattern, { cwd: cwd })
- t.same(sync, expect, 'sync test')
- glob(pattern, { cwd: cwd }, function (er, async) {
- if (er)
- throw er
- t.same(async, expect, 'async test')
- t.end()
- })
-})
diff --git a/test/slash-cwd.ts b/test/slash-cwd.ts
new file mode 100644
index 00000000..dab9e0d2
--- /dev/null
+++ b/test/slash-cwd.ts
@@ -0,0 +1,16 @@
+// regression test to make sure that slash-ended patterns
+// don't match files when using a different cwd.
+import t from 'tap'
+import glob from '../'
+import type { GlobOptions } from '../src/index.js'
+
+const pattern = '../{*.md,test}/'
+const expect = ['']
+const cwd = __dirname
+const opt: GlobOptions = { cwd }
+process.chdir(__dirname + '/..')
+
+t.test('slashes only match directories', async t => {
+ t.same(glob.globSync(pattern, opt), expect, 'sync test')
+ t.same(await glob(pattern, opt), expect, 'async test')
+})
diff --git a/test/stat.js b/test/stat.js
deleted file mode 100644
index 3e5862a9..00000000
--- a/test/stat.js
+++ /dev/null
@@ -1,36 +0,0 @@
-require("./global-leakage.js")
-var glob = require('../')
-var test = require('tap').test
-var path = require('path')
-var Stats = require('fs').Stats
-var dir = __dirname + '/fixtures'
-
-test('stat all the things', function(t) {
- var g = new glob.Glob('a/*abc*/**', { stat: true, cwd: dir })
- var matches = []
- g.on('match', function(m) {
- matches.push(m)
- })
- var stats = []
- g.on('stat', function(m, st) {
- stats.push(m)
- t.ok(st instanceof Stats)
- })
- g.on('end', function(eof) {
- stats = stats.sort()
- matches = matches.sort()
- eof = eof.sort()
- t.same(stats, matches)
- t.same(eof, matches)
- var cache = Object.keys(this.statCache)
- t.same(cache.map(function (f) {
- return path.relative(dir, f).replace(/\\/g, '/')
- }).sort(), matches)
-
- cache.forEach(function(c) {
- t.equal(typeof this.statCache[c], 'object')
- }, this)
-
- t.end()
- })
-})
diff --git a/test/stat.ts b/test/stat.ts
new file mode 100644
index 00000000..9717fb38
--- /dev/null
+++ b/test/stat.ts
@@ -0,0 +1,23 @@
+import { resolve } from 'path'
+import t from 'tap'
+import { glob, globSync } from '../'
+
+t.test('stat: true', async t => {
+ const cwd = resolve(__dirname, 'fixtures')
+ const pattern = '*'
+ const asyncRes = await glob(pattern, {
+ cwd,
+ withFileTypes: true,
+ stat: true,
+ })
+ const syncRes = globSync(pattern, {
+ cwd,
+ withFileTypes: true,
+ stat: true,
+ })
+ t.type(asyncRes[0].mode, 'number')
+ t.type(syncRes[0].mode, 'number')
+
+ const noStat = await glob(pattern, { cwd, withFileTypes: true })
+ t.equal(noStat[0].mode, undefined)
+})
diff --git a/test/stream.ts b/test/stream.ts
new file mode 100644
index 00000000..d0e7baa3
--- /dev/null
+++ b/test/stream.ts
@@ -0,0 +1,256 @@
+import { resolve, sep } from 'path'
+import t from 'tap'
+import {
+ Glob,
+ globIterate,
+ globIterateSync,
+ globStream,
+ globStreamSync,
+} from '../'
+import { glob, globSync } from '../dist/cjs'
+const cwd = resolve(__dirname, 'fixtures/a')
+const j = (a: string[]) => a.map(a => a.split('/').join(sep))
+const expect = j([
+ '',
+ 'z',
+ 'x',
+ 'cb',
+ 'c',
+ 'bc',
+ 'b',
+ 'abcfed',
+ 'abcdef',
+ 'cb/e',
+ 'cb/e/f',
+ 'c/d',
+ 'c/d/c',
+ 'c/d/c/b',
+ 'bc/e',
+ 'bc/e/f',
+ 'b/c',
+ 'b/c/d',
+ 'abcfed/g',
+ 'abcfed/g/h',
+ 'abcdef/g',
+ 'abcdef/g/h',
+ ...(process.platform !== 'win32'
+ ? ['symlink', 'symlink/a', 'symlink/a/b', 'symlink/a/b/c']
+ : []),
+])
+
+t.test('stream', t => {
+ let sync: boolean = true
+ const s = new Glob('./**', { cwd })
+ const stream = s.stream()
+ const e = new Set(expect)
+ stream.on('data', c => {
+ t.equal(e.has(c), true, JSON.stringify(c))
+ e.delete(c)
+ })
+ stream.on('end', () => {
+ t.equal(e.size, 0, 'saw all entries')
+ t.equal(sync, false, 'did not finish in one tick')
+ const d = new Glob('./**', s)
+ const dream = d.stream()
+ const f = new Set(expect)
+ dream.on('data', c => {
+ t.equal(f.has(c), true, JSON.stringify(c))
+ f.delete(c)
+ })
+ dream.on('end', () => {
+ t.equal(f.size, 0, 'saw all entries')
+ t.end()
+ })
+ })
+ sync = false
+})
+
+t.test('streamSync', t => {
+ let sync: boolean = true
+ const s = new Glob('./**', { cwd })
+ const stream = s.streamSync()
+ const e = new Set(expect)
+ stream.on('data', c => {
+ t.equal(e.has(c), true, JSON.stringify(c))
+ e.delete(c)
+ })
+ stream.on('end', () => {
+ t.equal(e.size, 0, 'saw all entries')
+ const d = new Glob('./**', s)
+ const dream = d.streamSync()
+ const f = new Set(expect)
+ dream.on('data', c => {
+ t.equal(f.has(c), true, JSON.stringify(c))
+ f.delete(c)
+ })
+ dream.on('end', () => {
+ t.equal(f.size, 0, 'saw all entries')
+ t.equal(sync, true, 'finished synchronously')
+ t.end()
+ })
+ })
+ sync = false
+})
+
+t.test('iterate', async t => {
+ const s = new Glob('./**', { cwd })
+ const e = new Set(expect)
+ for await (const c of s.iterate()) {
+ t.equal(e.has(c), true, JSON.stringify(c))
+ e.delete(c)
+ }
+ t.equal(e.size, 0, 'saw all entries')
+
+ const f = new Set(expect)
+ const d = new Glob('./**', s)
+ for await (const c of d.iterate()) {
+ t.equal(f.has(c), true, JSON.stringify(c))
+ f.delete(c)
+ }
+ t.equal(f.size, 0, 'saw all entries')
+})
+
+t.test('iterateSync', t => {
+ const s = new Glob('./**', { cwd })
+ const e = new Set(expect)
+ for (const c of s.iterateSync()) {
+ t.equal(e.has(c), true, JSON.stringify(c))
+ e.delete(c)
+ }
+ t.equal(e.size, 0, 'saw all entries')
+
+ const f = new Set(expect)
+ const d = new Glob('./**', s)
+ for (const c of d.iterateSync()) {
+ t.equal(f.has(c), true, JSON.stringify(c))
+ f.delete(c)
+ }
+ t.equal(f.size, 0, 'saw all entries')
+ t.end()
+})
+
+t.test('walk', async t => {
+ const s = new Glob('./**', { cwd })
+ const e = new Set(expect)
+ const actual = new Set(await s.walk())
+ t.same(actual, e)
+ const d = new Glob('./**', s)
+ const dactual = new Set(await d.walk())
+ t.same(dactual, e)
+})
+
+t.test('walkSync', t => {
+ const s = new Glob('./**', { cwd })
+ const e = new Set(expect)
+ const actual = new Set(s.walkSync())
+ t.same(actual, e)
+ const d = new Glob('./**', s)
+ const dactual = new Set(d.walkSync())
+ t.same(dactual, e)
+ t.end()
+})
+
+t.test('for await', async t => {
+ const s = new Glob('./**', { cwd })
+ const e = new Set(expect)
+ for await (const c of s) {
+ t.equal(e.has(c), true, JSON.stringify(c))
+ e.delete(c)
+ }
+ t.equal(e.size, 0, 'saw all entries')
+
+ const f = new Set(expect)
+ const d = new Glob('./**', s)
+ for await (const c of d) {
+ t.equal(f.has(c), true, JSON.stringify(c))
+ f.delete(c)
+ }
+ t.equal(f.size, 0, 'saw all entries')
+})
+
+t.test('for of', t => {
+ const s = new Glob('./**', { cwd })
+ const e = new Set(expect)
+ for (const c of s) {
+ t.equal(e.has(c), true, JSON.stringify(c))
+ e.delete(c)
+ }
+ t.equal(e.size, 0, 'saw all entries')
+
+ const f = new Set(expect)
+ const d = new Glob('./**', s)
+ for (const c of d) {
+ t.equal(f.has(c), true, JSON.stringify(c))
+ f.delete(c)
+ }
+ t.equal(f.size, 0, 'saw all entries')
+ t.end()
+})
+
+t.test('iterate on main', async t => {
+ const s = globIterate('./**', { cwd })
+ const e = new Set(expect)
+ for await (const c of s) {
+ t.equal(e.has(c), true, JSON.stringify(c))
+ e.delete(c)
+ }
+ t.equal(e.size, 0, 'saw all entries')
+})
+
+t.test('iterateSync on main', t => {
+ const s = globIterateSync('./**', { cwd })
+ const e = new Set(expect)
+ for (const c of s) {
+ t.equal(e.has(c), true, JSON.stringify(c))
+ e.delete(c)
+ }
+ t.equal(e.size, 0, 'saw all entries')
+ t.end()
+})
+
+t.test('stream on main', t => {
+ let sync: boolean = true
+ const stream = globStream('./**', { cwd })
+ const e = new Set(expect)
+ stream.on('data', c => {
+ t.equal(e.has(c), true, JSON.stringify(c))
+ e.delete(c)
+ })
+ stream.on('end', () => {
+ t.equal(e.size, 0, 'saw all entries')
+ t.equal(sync, false, 'did not finish in one tick')
+ t.end()
+ })
+ sync = false
+})
+
+t.test('streamSync on main', t => {
+ let sync: boolean = true
+ const stream = globStreamSync('./**', { cwd })
+ const e = new Set(expect)
+ stream.on('data', c => {
+ t.equal(e.has(c), true, JSON.stringify(c))
+ e.delete(c)
+ })
+ stream.on('end', () => {
+ t.equal(e.size, 0, 'saw all entries')
+ t.equal(sync, true, 'finished synchronously')
+ t.end()
+ })
+ sync = false
+})
+
+t.test('walk on main', async t => {
+ const s = glob('./**', { cwd })
+ const e = new Set(expect)
+ const actual = new Set(await s)
+ t.same(actual, e)
+})
+
+t.test('walkSync', t => {
+ const s = globSync('./**', { cwd })
+ const e = new Set(expect)
+ const actual = new Set(s)
+ t.same(actual, e)
+ t.end()
+})
diff --git a/test/sync-cb-throw.js b/test/sync-cb-throw.js
deleted file mode 100644
index 911eedcc..00000000
--- a/test/sync-cb-throw.js
+++ /dev/null
@@ -1,46 +0,0 @@
-require("./global-leakage.js")
-var test = require('tap').test
-var g = require('../')
-test('sync throws if provided callback', function (t) {
- t.throws(function () {
- g('*', {sync:true}, function() {})
- })
- t.throws(function () {
- g.sync('*', function() {})
- })
- t.throws(function () {
- g.sync('*', {}, function() {})
- })
-
- t.throws(function () {
- g.Glob('*', {sync:true}, function() {})
- })
-
- t.throws(function () {
- g.GlobSync('*', {}, function() {})
- })
-
- t.throws(function () {
- g.GlobSync('*', function() {})
- })
-
- t.throws(function () {
- g.GlobSync()
- })
-
- t.throws(function () {
- g.sync()
- })
-
- t.throws(function () {
- g()
- })
-
- t.throws(function () {
- g.Glob()
- })
-
- t.end()
-})
-
-
diff --git a/test/url-cwd.ts b/test/url-cwd.ts
new file mode 100644
index 00000000..e3c584b2
--- /dev/null
+++ b/test/url-cwd.ts
@@ -0,0 +1,15 @@
+import t from 'tap'
+import { pathToFileURL } from 'url'
+import { Glob } from '../'
+
+t.test('can use file url as cwd option', t => {
+ const fileURL = pathToFileURL(process.cwd())
+ const fileURLString = String(fileURL)
+ const ps = new Glob('.', { cwd: process.cwd() })
+ const pu = new Glob('.', { cwd: fileURL })
+ const pus = new Glob('.', { cwd: fileURLString })
+ t.equal(ps.cwd, process.cwd())
+ t.equal(pu.cwd, process.cwd())
+ t.equal(pus.cwd, process.cwd())
+ t.end()
+})
diff --git a/test/windows-paths-fs.ts b/test/windows-paths-fs.ts
new file mode 100644
index 00000000..45d495db
--- /dev/null
+++ b/test/windows-paths-fs.ts
@@ -0,0 +1,79 @@
+// test that escape chars are handled properly according to configs
+// when found in patterns and paths containing glob magic.
+
+import t from 'tap'
+import glob from '../'
+
+const dir = t.testdir({
+ // treat escapes as path separators
+ a: {
+ '[x': {
+ ']b': {
+ y: '',
+ },
+ },
+ },
+ // escape parent dir name only, not filename
+ 'a[x]b': {
+ y: '',
+ },
+ // no path separators, all escaped
+ 'a[x]by': '',
+})
+
+t.test('treat backslash as escape', t => {
+ const cases = Object.entries({
+ 'a[x]b/y': [],
+ 'a\\[x\\]b/y': ['a[x]b/y'],
+ 'a\\[x\\]b\\y': ['a[x]by'],
+ })
+ t.plan(cases.length)
+ for (const [pattern, expect] of cases) {
+ t.test(pattern, async t => {
+ t.strictSame(
+ glob
+ .globSync(pattern, { cwd: dir })
+ .map(s => s.replace(/\\/g, '/')),
+ expect,
+ 'sync'
+ )
+ t.strictSame(
+ (await glob(pattern, { cwd: dir })).map(s =>
+ s.replace(/\\/g, '/')
+ ),
+ expect,
+ 'async'
+ )
+ })
+ }
+})
+
+t.test('treat backslash as separator', t => {
+ Object.defineProperty(process, 'platform', {
+ value: 'win32',
+ })
+ const cases = Object.entries({
+ 'a[x]b/y': [],
+ 'a\\[x\\]b/y': ['a/[x/]b/y'],
+ 'a\\[x\\]b\\y': ['a/[x/]b/y'],
+ })
+ t.plan(cases.length)
+ for (const [pattern, expect] of cases) {
+ t.test(pattern, async t => {
+ t.strictSame(
+ glob
+ .globSync(pattern, { cwd: dir, windowsPathsNoEscape: true })
+ .map(s => s.replace(/\\/g, '/')),
+ expect,
+ 'sync'
+ )
+ t.strictSame(
+ (
+ await glob(pattern, { cwd: dir, windowsPathsNoEscape: true })
+ ).map(s => s.replace(/\\/g, '/')),
+ expect,
+ 'async'
+ )
+ })
+ }
+})
diff --git a/test/windows-paths-no-escape.ts b/test/windows-paths-no-escape.ts
new file mode 100644
index 00000000..6ed8ceda
--- /dev/null
+++ b/test/windows-paths-no-escape.ts
@@ -0,0 +1,52 @@
+import t from 'tap'
+import { Glob } from '../'
+
+const platforms = ['win32', 'posix']
+const originalPlatform = Object.getOwnPropertyDescriptor(
+ process,
+ 'platform'
+) as PropertyDescriptor
+t.teardown(() => {
+ Object.defineProperty(process, 'platform', originalPlatform)
+})
+
+for (const p of platforms) {
+ t.test(p, t => {
+ Object.defineProperty(process, 'platform', {
+ value: p,
+ enumerable: true,
+ configurable: true,
+ writable: true,
+ })
+ t.equal(process.platform, p, 'gut check: actually set platform')
+ const pattern = '/a/b/c/x\\[a-b\\]y\\*'
+ const def = new Glob(pattern, {})
+ const winpath = new Glob(pattern, {
+ windowsPathsNoEscape: true,
+ })
+ const winpathLegacy = new Glob(pattern, {
+ allowWindowsEscape: false,
+ })
+ const nowinpath = new Glob(pattern, {
+ windowsPathsNoEscape: false,
+ })
+
+ t.strictSame(
+ [
+ def.pattern,
+ nowinpath.pattern,
+ winpath.pattern,
+ winpathLegacy.pattern,
+ ],
+ [
+ ['/a/b/c/x\\[a-b\\]y\\*'],
+ ['/a/b/c/x\\[a-b\\]y\\*'],
+ ['/a/b/c/x/[a-b/]y/*'],
+ ['/a/b/c/x/[a-b/]y/*'],
+ ]
+ )
+ t.end()
+ })
+}
+
+Object.defineProperty(process, 'platform', originalPlatform)
diff --git a/test/zz-cleanup.js b/test/zz-cleanup.js
deleted file mode 100644
index f404df3f..00000000
--- a/test/zz-cleanup.js
+++ /dev/null
@@ -1,12 +0,0 @@
-require("./global-leakage.js")
-// remove the fixtures
-var tap = require("tap")
-, rimraf = require("rimraf")
-, path = require("path")
-
-tap.test("cleanup fixtures", function (t) {
- rimraf(path.resolve(__dirname, "fixtures"), function (er) {
- t.ifError(er, "removed")
- t.end()
- })
-})
diff --git a/tsconfig-base.json b/tsconfig-base.json
new file mode 100644
index 00000000..5af9f89c
--- /dev/null
+++ b/tsconfig-base.json
@@ -0,0 +1,18 @@
+{
+ "exclude": ["./test", "./tap-snapshots"],
+ "include": ["src/**/*.ts"],
+ "compilerOptions": {
+ "allowSyntheticDefaultImports": true,
+ "declaration": true,
+ "declarationMap": true,
+ "inlineSources": true,
+ "esModuleInterop": true,
+ "forceConsistentCasingInFileNames": true,
+ "moduleResolution": "node",
+ "resolveJsonModule": true,
+ "skipLibCheck": true,
+ "sourceMap": true,
+ "strict": true,
+ "target": "es2022"
+ }
+}
diff --git a/tsconfig-esm.json b/tsconfig-esm.json
new file mode 100644
index 00000000..e8ccb836
--- /dev/null
+++ b/tsconfig-esm.json
@@ -0,0 +1,8 @@
+{
+ "extends": "./tsconfig-base.json",
+ "exclude": ["./test", "./tap-snapshots", "src/index-cjs.ts"],
+ "compilerOptions": {
+ "module": "esnext",
+ "outDir": "dist/mjs"
+ }
+}
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 00000000..13690021
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,8 @@
+{
+ "extends": "./tsconfig-base.json",
+ "compilerOptions": {
+ "module": "commonjs",
+ "outDir": "dist/cjs",
+ "moduleResolution": "Node"
+ }
+}
diff --git a/typedoc.json b/typedoc.json
new file mode 100644
index 00000000..74ce9869
--- /dev/null
+++ b/typedoc.json
@@ -0,0 +1,5 @@
+{
+ "navigationLinks": {
+ "isaacs projects": "https://isaacs.github.io/"
+ }
+}