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
2
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 6.0.0 to 6.0.1

15

lib/index.js

@@ -23,19 +23,16 @@ "use strict";

async function _readModulesDir(modulesDir, scope) {
let pkgNames = [];
const pkgNames = [];
const parentDir = scope ? path_1.default.join(modulesDir, scope) : modulesDir;
for (const dir of await readdir(parentDir, { withFileTypes: true })) {
await Promise.all((await readdir(parentDir, { withFileTypes: true })).map(async (dir) => {
if (dir.isFile() || dir.name[0] === '.')
continue;
return;
if (!scope && dir.name[0] === '@') {
pkgNames = [
...pkgNames,
...await _readModulesDir(modulesDir, dir.name),
];
continue;
pkgNames.push(...await _readModulesDir(modulesDir, dir.name));
return;
}
const pkgName = scope ? `${scope}/${dir.name}` : dir.name;
pkgNames.push(pkgName);
}
}));
return pkgNames;
}
//# sourceMappingURL=index.js.map

4

package.json
{
"name": "@pnpm/read-modules-dir",
"version": "6.0.0",
"version": "6.0.1",
"description": "Finds all direct packages in node_modules",

@@ -29,3 +29,3 @@ "main": "lib/index.js",

"@types/graceful-fs": "^4.1.6",
"@pnpm/read-modules-dir": "6.0.0"
"@pnpm/read-modules-dir": "6.0.1"
},

@@ -32,0 +32,0 @@ "exports": {

Sorry, the diff of this file is not supported yet

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