Cleanup
This commit is contained in:
17
node_modules/readdirp/index.js
generated
vendored
17
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);
|
||||
@@ -214,9 +217,11 @@ class ReaddirpStream extends Readable {
|
||||
if (entryRealPathStats.isDirectory()) {
|
||||
const len = entryRealPath.length;
|
||||
if (full.startsWith(entryRealPath) && full.substr(len, 1) === sysPath.sep) {
|
||||
return this._onError(new Error(
|
||||
const recursiveError = new Error(
|
||||
`Circular symlink detected: "${full}" points to "${entryRealPath}"`
|
||||
));
|
||||
);
|
||||
recursiveError.code = RECURSIVE_ERROR_CODE;
|
||||
return this._onError(recursiveError);
|
||||
}
|
||||
return 'directory';
|
||||
}
|
||||
|
||||
120
node_modules/readdirp/package.json
generated
vendored
120
node_modules/readdirp/package.json
generated
vendored
@@ -1,52 +1,49 @@
|
||||
{
|
||||
"_from": "readdirp@~3.5.0",
|
||||
"_id": "readdirp@3.5.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==",
|
||||
"_location": "/readdirp",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "readdirp@~3.5.0",
|
||||
"name": "readdirp",
|
||||
"escapedName": "readdirp",
|
||||
"rawSpec": "~3.5.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "~3.5.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/chokidar"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz",
|
||||
"_shasum": "9ba74c019b15d365278d2e91bb8c48d7b4d42c9e",
|
||||
"_spec": "readdirp@~3.5.0",
|
||||
"_where": "C:\\Users\\Jonasz\\Desktop\\Menui\\menui_backend\\node_modules\\chokidar",
|
||||
"author": {
|
||||
"name": "Thorsten Lorenz",
|
||||
"email": "thlorenz@gmx.de",
|
||||
"url": "thlorenz.com"
|
||||
"name": "readdirp",
|
||||
"description": "Recursive version of fs.readdir with streaming API.",
|
||||
"version": "3.6.0",
|
||||
"homepage": "https://github.com/paulmillr/readdirp",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/paulmillr/readdirp.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/paulmillr/readdirp/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"author": "Thorsten Lorenz <thlorenz@gmx.de> (thlorenz.com)",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Thorsten Lorenz",
|
||||
"email": "thlorenz@gmx.de",
|
||||
"url": "thlorenz.com"
|
||||
},
|
||||
{
|
||||
"name": "Paul Miller",
|
||||
"url": "https://paulmillr.com"
|
||||
}
|
||||
"Thorsten Lorenz <thlorenz@gmx.de> (thlorenz.com)",
|
||||
"Paul Miller (https://paulmillr.com)"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=8.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"recursive",
|
||||
"fs",
|
||||
"stream",
|
||||
"streams",
|
||||
"readdir",
|
||||
"filesystem",
|
||||
"find",
|
||||
"filter"
|
||||
],
|
||||
"scripts": {
|
||||
"dtslint": "dtslint",
|
||||
"nyc": "nyc",
|
||||
"mocha": "mocha --exit",
|
||||
"lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .",
|
||||
"test": "npm run lint && nyc npm run mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"picomatch": "^2.2.1"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Recursive version of fs.readdir with streaming API.",
|
||||
"devDependencies": {
|
||||
"@types/node": "^14",
|
||||
"chai": "^4.2",
|
||||
@@ -58,8 +55,11 @@
|
||||
"rimraf": "^3.0.0",
|
||||
"typescript": "^4.0.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.10.0"
|
||||
"nyc": {
|
||||
"reporter": [
|
||||
"html",
|
||||
"text"
|
||||
]
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
@@ -118,41 +118,5 @@
|
||||
"single"
|
||||
]
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"homepage": "https://github.com/paulmillr/readdirp",
|
||||
"keywords": [
|
||||
"recursive",
|
||||
"fs",
|
||||
"stream",
|
||||
"streams",
|
||||
"readdir",
|
||||
"filesystem",
|
||||
"find",
|
||||
"filter"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "readdirp",
|
||||
"nyc": {
|
||||
"reporter": [
|
||||
"html",
|
||||
"text"
|
||||
]
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/paulmillr/readdirp.git"
|
||||
},
|
||||
"scripts": {
|
||||
"dtslint": "dtslint",
|
||||
"lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .",
|
||||
"mocha": "mocha --exit",
|
||||
"nyc": "nyc",
|
||||
"test": "npm run lint && nyc npm run mocha"
|
||||
},
|
||||
"version": "3.5.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user