Socket
Socket
Sign inDemoInstall

@nodelib/fs.scandir

Package Overview
Dependencies
3
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.0.1

4

out/providers/async.js

@@ -23,3 +23,3 @@ "use strict";

name: dirent.name,
path: path.join(dir, dirent.name)
path: `${dir}${path.sep}${dirent.name}`
}));

@@ -61,3 +61,3 @@ if (!settings.followSymbolicLinks) {

}
const filepaths = names.map((name) => path.join(dir, name));
const filepaths = names.map((name) => `${dir}${path.sep}${name}`);
const tasks = filepaths.map((filepath) => {

@@ -64,0 +64,0 @@ return (done) => fsStat.stat(filepath, settings.fsStatSettings, done);

@@ -20,3 +20,3 @@ "use strict";

name: dirent.name,
path: path.join(dir, dirent.name)
path: `${dir}${path.sep}${dirent.name}`
};

@@ -41,3 +41,3 @@ if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {

return names.map((name) => {
const entryPath = path.join(dir, name);
const entryPath = `${dir}${path.sep}${name}`;
const stats = fsStat.statSync(entryPath, settings.fsStatSettings);

@@ -44,0 +44,0 @@ const entry = {

@@ -11,8 +11,2 @@ import * as fsStat from '@nodelib/fs.stat';

private readonly _options;
private readonly _followSymbolicLinks;
private readonly _fs;
private readonly _stats;
private readonly _throwErrorOnBrokenSymbolicLink;
private readonly _fsStatSettings;
constructor(_options?: Options);
readonly followSymbolicLinks: boolean;

@@ -23,4 +17,5 @@ readonly fs: fs.FileSystemAdapter;

readonly fsStatSettings: fsStat.Settings;
private _setDefaultValue;
constructor(_options?: Options);
private _getValue;
}
//# sourceMappingURL=settings.d.ts.map

@@ -8,28 +8,13 @@ "use strict";

this._options = _options;
this._followSymbolicLinks = this._setDefaultValue(this._options.followSymbolicLinks, false);
this._fs = fs.createFileSystemAdapter(this._options.fs);
this._stats = this._setDefaultValue(this._options.stats, false);
this._throwErrorOnBrokenSymbolicLink = this._setDefaultValue(this._options.throwErrorOnBrokenSymbolicLink, true);
this._fsStatSettings = new fsStat.Settings({
followSymbolicLink: this._followSymbolicLinks,
fs: this._fs,
throwErrorOnBrokenSymbolicLink: this._throwErrorOnBrokenSymbolicLink
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
this.fs = fs.createFileSystemAdapter(this._options.fs);
this.stats = this._getValue(this._options.stats, false);
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
this.fsStatSettings = new fsStat.Settings({
followSymbolicLink: this.followSymbolicLinks,
fs: this.fs,
throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink
});
}
get followSymbolicLinks() {
return this._followSymbolicLinks;
}
get fs() {
return this._fs;
}
get stats() {
return this._stats;
}
get throwErrorOnBrokenSymbolicLink() {
return this._throwErrorOnBrokenSymbolicLink;
}
get fsStatSettings() {
return this._fsStatSettings;
}
_setDefaultValue(option, value) {
_getValue(option, value) {
return option === undefined ? value : option;

@@ -36,0 +21,0 @@ }

{
"name": "@nodelib/fs.scandir",
"version": "2.0.0",
"version": "2.0.1",
"description": "List files and directories inside the specified directory",

@@ -31,5 +31,6 @@ "license": "MIT",

"dependencies": {
"@nodelib/fs.stat": "2.0.0",
"@nodelib/fs.stat": "2.0.1",
"run-parallel": "^1.1.9"
}
},
"gitHead": "14a421c7401f269bf868e1a53fac0c3624247518"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc