Fix dependabot issues
This commit is contained in:
parent
c89d9bd8b0
commit
531c6ba7c8
705 changed files with 53406 additions and 20466 deletions
8
node_modules/readdirp/README.md
generated
vendored
8
node_modules/readdirp/README.md
generated
vendored
|
|
@ -1,8 +1,7 @@
|
|||
# readdirp [](https://github.com/paulmillr/readdirp)
|
||||
|
||||
> Recursive version of [fs.readdir](https://nodejs.org/api/fs.html#fs_fs_readdir_path_options_callback). Exposes a **stream API** and a **promise API**.
|
||||
Recursive version of [fs.readdir](https://nodejs.org/api/fs.html#fs_fs_readdir_path_options_callback). Exposes a **stream API** and a **promise API**.
|
||||
|
||||
[](https://www.npmjs.com/package/readdirp)
|
||||
|
||||
```sh
|
||||
npm install readdirp
|
||||
|
|
@ -79,7 +78,7 @@ First argument is awalys `root`, path in which to start reading and recursing in
|
|||
- `directoryFilter: ['!.git']`: filter to include/exclude directories found and to recurse into. Directories that do not pass a filter will not be recursed into.
|
||||
- `depth: 5`: depth at which to stop recursing even if more subdirectories are found
|
||||
- `type: 'files'`: determines if data events on the stream should be emitted for `'files'` (default), `'directories'`, `'files_directories'`, or `'all'`. Setting to `'all'` will also include entries for other types of file descriptors like character devices, unix sockets and named pipes.
|
||||
- `alwaysStat: false`: always return `stats` property for every file. Setting it to `true` can double readdir execution time - use it only when you need file `size`, `mtime` etc. Cannot be enabled on node <10.10.0.
|
||||
- `alwaysStat: false`: always return `stats` property for every file. Default is `false`, readdirp will return `Dirent` entries. Setting it to `true` can double readdir execution time - use it only when you need file `size`, `mtime` etc. Cannot be enabled on node <10.10.0.
|
||||
- `lstat: false`: include symlink entries in the stream along with files. When `true`, `fs.lstat` would be used instead of `fs.stat`
|
||||
|
||||
### `EntryInfo`
|
||||
|
|
@ -94,6 +93,9 @@ Has the following properties:
|
|||
|
||||
## Changelog
|
||||
|
||||
- 3.5 (Oct 13, 2020) disallows recursive directory-based symlinks.
|
||||
Before, it could have entered infinite loop.
|
||||
- 3.4 (Mar 19, 2020) adds support for directory-based symlinks.
|
||||
- 3.3 (Dec 6, 2019) stabilizes RAM consumption and enables perf management with `highWaterMark` option. Fixes race conditions related to `for-await` looping.
|
||||
- 3.2 (Oct 14, 2019) improves performance by 250% and makes streams implementation more idiomatic.
|
||||
- 3.1 (Jul 7, 2019) brings `bigint` support to `stat` output on Windows. This is backwards-incompatible for some cases. Be careful. It you use it incorrectly, you'll see "TypeError: Cannot mix BigInt and other types, use explicit conversions".
|
||||
|
|
|
|||
22
node_modules/readdirp/index.js
generated
vendored
22
node_modules/readdirp/index.js
generated
vendored
|
|
@ -21,7 +21,8 @@ const realpath = promisify(fs.realpath);
|
|||
*/
|
||||
|
||||
const BANG = '!';
|
||||
const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP']);
|
||||
const RECURSIVE_ERROR_CODE = 'READDIRP_RECURSIVE_ERROR';
|
||||
const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP', RECURSIVE_ERROR_CODE]);
|
||||
const FILE_TYPE = 'files';
|
||||
const DIR_TYPE = 'directories';
|
||||
const FILE_DIR_TYPE = 'files_directories';
|
||||
|
|
@ -29,6 +30,8 @@ const EVERYTHING_TYPE = 'all';
|
|||
const ALL_TYPES = [FILE_TYPE, DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE];
|
||||
|
||||
const isNormalFlowError = error => NORMAL_FLOW_ERRORS.has(error.code);
|
||||
const [maj, min] = process.versions.node.split('.').slice(0, 2).map(n => Number.parseInt(n, 10));
|
||||
const wantBigintFsStats = process.platform === 'win32' && (maj > 10 || (maj === 10 && min >= 5));
|
||||
|
||||
const normalizeFilter = filter => {
|
||||
if (filter === undefined) return;
|
||||
|
|
@ -91,7 +94,7 @@ class ReaddirpStream extends Readable {
|
|||
|
||||
const statMethod = opts.lstat ? lstat : stat;
|
||||
// Use bigint stats if it's windows and stat() supports options (node 10+).
|
||||
if (process.platform === 'win32' && stat.length === 3) {
|
||||
if (wantBigintFsStats) {
|
||||
this._stat = path => statMethod(path, { bigint: true });
|
||||
} else {
|
||||
this._stat = statMethod;
|
||||
|
|
@ -166,7 +169,7 @@ class ReaddirpStream extends Readable {
|
|||
} catch (error) {
|
||||
this._onError(error);
|
||||
}
|
||||
return {files, depth, path};
|
||||
return { files, depth, path };
|
||||
}
|
||||
|
||||
async _formatEntry(dirent, path) {
|
||||
|
|
@ -174,7 +177,7 @@ class ReaddirpStream extends Readable {
|
|||
try {
|
||||
const basename = this._isDirent ? dirent.name : dirent;
|
||||
const fullPath = sysPath.resolve(sysPath.join(path, basename));
|
||||
entry = {path: sysPath.relative(this._root, fullPath), fullPath, basename};
|
||||
entry = { path: sysPath.relative(this._root, fullPath), fullPath, basename };
|
||||
entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
|
||||
} catch (err) {
|
||||
this._onError(err);
|
||||
|
|
@ -204,13 +207,22 @@ class ReaddirpStream extends Readable {
|
|||
return 'directory';
|
||||
}
|
||||
if (stats && stats.isSymbolicLink()) {
|
||||
const full = entry.fullPath;
|
||||
try {
|
||||
const entryRealPath = await realpath(entry.fullPath);
|
||||
const entryRealPath = await realpath(full);
|
||||
const entryRealPathStats = await lstat(entryRealPath);
|
||||
if (entryRealPathStats.isFile()) {
|
||||
return 'file';
|
||||
}
|
||||
if (entryRealPathStats.isDirectory()) {
|
||||
const len = entryRealPath.length;
|
||||
if (full.startsWith(entryRealPath) && full.substr(len, 1) === sysPath.sep) {
|
||||
const recursiveError = new Error(
|
||||
`Circular symlink detected: "${full}" points to "${entryRealPath}"`
|
||||
);
|
||||
recursiveError.code = RECURSIVE_ERROR_CODE;
|
||||
return this._onError(recursiveError);
|
||||
}
|
||||
return 'directory';
|
||||
}
|
||||
} catch (error) {
|
||||
|
|
|
|||
9
node_modules/readdirp/package.json
generated
vendored
9
node_modules/readdirp/package.json
generated
vendored
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "readdirp",
|
||||
"description": "Recursive version of fs.readdir with streaming API.",
|
||||
"version": "3.4.0",
|
||||
"version": "3.6.0",
|
||||
"homepage": "https://github.com/paulmillr/readdirp",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
@ -45,14 +45,15 @@
|
|||
"picomatch": "^2.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^13",
|
||||
"@types/node": "^14",
|
||||
"chai": "^4.2",
|
||||
"chai-subset": "^1.6",
|
||||
"dtslint": "^3.3.0",
|
||||
"eslint": "^6.6.0",
|
||||
"eslint": "^7.0.0",
|
||||
"mocha": "^7.1.1",
|
||||
"nyc": "^15.0.0",
|
||||
"rimraf": "^3.0.0"
|
||||
"rimraf": "^3.0.0",
|
||||
"typescript": "^4.0.3"
|
||||
},
|
||||
"nyc": {
|
||||
"reporter": [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue