@pnpm/read-modules-dir
Advanced tools
Comparing version 6.0.0 to 6.0.1
@@ -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 |
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4913
37