Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rrdir

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rrdir - npm Package Compare versions

Comparing version 10.0.1 to 10.0.2

30

index.js

@@ -59,11 +59,7 @@ import {readdir, stat, lstat} from "fs/promises";

let dirents = [];
try {
dirents = await readdir(dir, {encoding, withFileTypes: true});
} catch (err) {
if (opts.strict) {
throw err;
} else {
yield {path: dir, err};
}
if (opts.strict) throw err;
yield {path: dir, err};
}

@@ -74,3 +70,3 @@ if (!dirents.length) return;

const path = makePath(dirent, dir, encoding);
if (excludeMatcher && excludeMatcher(encoding === "buffer" ? String(path) : path)) continue;
if (excludeMatcher?.(encoding === "buffer" ? String(path) : path)) continue;

@@ -116,11 +112,7 @@ const isSymbolicLink = opts.followSymlinks && dirent.isSymbolicLink();

let dirents = [];
try {
dirents = await readdir(dir, {encoding, withFileTypes: true});
} catch (err) {
if (opts.strict) {
throw err;
} else {
results.push({path: dir, err});
}
if (opts.strict) throw err;
results.push({path: dir, err});
}

@@ -131,3 +123,3 @@ if (!dirents.length) return results;

const path = makePath(dirent, dir, encoding);
if (excludeMatcher && excludeMatcher(encoding === "buffer" ? String(path) : path)) return;
if (excludeMatcher?.(encoding === "buffer" ? String(path) : path)) return;

@@ -175,11 +167,7 @@ const isSymbolicLink = opts.followSymlinks && dirent.isSymbolicLink();

let dirents = [];
try {
dirents = readdirSync(dir, {encoding, withFileTypes: true});
} catch (err) {
if (opts.strict) {
throw err;
} else {
results.push({path: dir, err});
}
if (opts.strict) throw err;
results.push({path: dir, err});
}

@@ -190,3 +178,3 @@ if (!dirents.length) return results;

const path = makePath(dirent, dir, encoding);
if (excludeMatcher && excludeMatcher(encoding === "buffer" ? String(path) : path)) continue;
if (excludeMatcher?.(encoding === "buffer" ? String(path) : path)) continue;

@@ -193,0 +181,0 @@ const isSymbolicLink = opts.followSymlinks && dirent.isSymbolicLink();

{
"name": "rrdir",
"version": "10.0.1",
"version": "10.0.2",
"description": "Recursive directory reader with a delightful API",

@@ -5,0 +5,0 @@ "author": "silverwind <me@silverwind.io>",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc