@pnpm/read-modules-dir
Advanced tools
Comparing version 2.0.2 to 2.0.3
# @pnpm/read-modules-dir | ||
## 2.0.3 | ||
### Patch Changes | ||
- 24af41f20: Ignore files in node_modules. | ||
## 2.0.2 | ||
@@ -4,0 +10,0 @@ |
@@ -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", |
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
3555