chore: make 'npm run clean' ignore .DS_Store (#31710)

This commit is contained in:
Max Schmitt 2024-07-16 20:55:12 +02:00 committed by GitHub
parent 6a9e60d6a1
commit bb2e9d1175
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,7 +11,9 @@ for (const pkg of workspace.packages()) {
rmSync(path.join(pkg.path, 'src', 'generated'));
const bundles = path.join(pkg.path, 'bundles');
if (fs.existsSync(bundles) && fs.statSync(bundles).isDirectory()) {
for (const bundle of fs.readdirSync(bundles))
rmSync(path.join(bundles, bundle, 'node_modules'));
for (const bundle of fs.readdirSync(bundles, { withFileTypes: true })) {
if (bundle.isDirectory())
rmSync(path.join(bundles, bundle.name, 'node_modules'));
}
}
}