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

@pnpm/read-modules-dir

Package Overview
Dependencies
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/read-modules-dir - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

6

CHANGELOG.md
# @pnpm/read-modules-dir
## 2.0.3
### Patch Changes
- 24af41f20: Ignore files in node_modules.
## 2.0.2

@@ -4,0 +10,0 @@

10

lib/index.js

@@ -19,13 +19,13 @@ "use strict";

const parentDir = scope ? path.join(modulesDir, scope) : modulesDir;
for (const dir of await fs.readdir(parentDir)) {
if (dir[0] === '.')
for (const dir of await fs.readdir(parentDir, { withFileTypes: true })) {
if (dir.isFile() || dir.name[0] === '.')
continue;
if (!scope && dir[0] === '@') {
if (!scope && dir.name[0] === '@') {
pkgNames = [
...pkgNames,
...await _readModulesDir(modulesDir, dir),
...await _readModulesDir(modulesDir, dir.name),
];
continue;
}
const pkgName = scope ? `${scope}/${dir}` : dir;
const pkgName = scope ? `${scope}/${dir.name}` : dir.name;
pkgNames.push(pkgName);

@@ -32,0 +32,0 @@ }

{
"name": "@pnpm/read-modules-dir",
"version": "2.0.2",
"version": "2.0.3",
"author": "Zoltan Kochan <z@kochan.io> (https://www.kochan.io/)",

@@ -5,0 +5,0 @@ "description": "Finds all direct packages in node_modules",

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