Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

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

Max Schmittbb2e9d117519
diff --git a/utils/build/clean.js b/utils/build/clean.js
index b0ad6f2278..53079baf29 100644
--- a/utils/build/clean.js
+++ b/utils/build/clean.js
@@ -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'));
+ }
}
}