Updated to v1.9.9

This commit is contained in:
Henry Whitaker
2020-11-07 15:27:50 +00:00
parent 15d3583423
commit 8d811862a0
6349 changed files with 338454 additions and 213438 deletions

View File

@@ -1,33 +1,33 @@
{
"_args": [
[
"chokidar@3.4.2",
"chokidar@3.4.3",
"/home/henry/Documents/git/Speedtest-tracker-docker/conf/site"
]
],
"_development": true,
"_from": "chokidar@3.4.2",
"_id": "chokidar@3.4.2",
"_from": "chokidar@3.4.3",
"_id": "chokidar@3.4.3",
"_inBundle": false,
"_integrity": "sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A==",
"_integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==",
"_location": "/watchpack/chokidar",
"_optional": true,
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "chokidar@3.4.2",
"raw": "chokidar@3.4.3",
"name": "chokidar",
"escapedName": "chokidar",
"rawSpec": "3.4.2",
"rawSpec": "3.4.3",
"saveSpec": null,
"fetchSpec": "3.4.2"
"fetchSpec": "3.4.3"
},
"_requiredBy": [
"/watchpack"
],
"_resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.2.tgz",
"_spec": "3.4.2",
"_resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz",
"_spec": "3.4.3",
"_where": "/home/henry/Documents/git/Speedtest-tracker-docker/conf/site",
"author": {
"name": "Paul Miller",
@@ -53,7 +53,7 @@
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
"readdirp": "~3.4.0"
"readdirp": "~3.5.0"
},
"description": "A neat wrapper around node.js fs.watch / fs.watchFile / fsevents.",
"devDependencies": {
@@ -163,5 +163,5 @@
"test": "npm run lint && npm run mocha"
},
"types": "./types/index.d.ts",
"version": "3.4.2"
"version": "3.4.3"
}

View File

@@ -1,8 +1,7 @@
# readdirp [![Weekly downloads](https://img.shields.io/npm/dw/readdirp.svg)](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**.
[![NPM](https://nodei.co/npm/readdirp.png)](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".

View File

@@ -204,13 +204,20 @@ 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) {
return this._onError(new Error(
`Circular symlink detected: "${full}" points to "${entryRealPath}"`
));
}
return 'directory';
}
} catch (error) {

View File

@@ -1,33 +1,33 @@
{
"_args": [
[
"readdirp@3.4.0",
"readdirp@3.5.0",
"/home/henry/Documents/git/Speedtest-tracker-docker/conf/site"
]
],
"_development": true,
"_from": "readdirp@3.4.0",
"_id": "readdirp@3.4.0",
"_from": "readdirp@3.5.0",
"_id": "readdirp@3.5.0",
"_inBundle": false,
"_integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==",
"_integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==",
"_location": "/watchpack/readdirp",
"_optional": true,
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "readdirp@3.4.0",
"raw": "readdirp@3.5.0",
"name": "readdirp",
"escapedName": "readdirp",
"rawSpec": "3.4.0",
"rawSpec": "3.5.0",
"saveSpec": null,
"fetchSpec": "3.4.0"
"fetchSpec": "3.5.0"
},
"_requiredBy": [
"/watchpack/chokidar"
],
"_resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz",
"_spec": "3.4.0",
"_resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz",
"_spec": "3.5.0",
"_where": "/home/henry/Documents/git/Speedtest-tracker-docker/conf/site",
"author": {
"name": "Thorsten Lorenz",
@@ -53,14 +53,15 @@
},
"description": "Recursive version of fs.readdir with streaming API.",
"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"
},
"engines": {
"node": ">=8.10.0"
@@ -158,5 +159,5 @@
"nyc": "nyc",
"test": "npm run lint && nyc npm run mocha"
},
"version": "3.4.0"
"version": "3.5.0"
}