From c90bad5b601bc8915aa84492346fcb6ae97da3fe Mon Sep 17 00:00:00 2001 From: Jose Quintas Date: Mon, 2 Dec 2024 19:07:17 +0100 Subject: [PATCH] check if preset-safe folder exists --- packages/x-codemod/src/v8.0.0/preset-safe/preset-safe.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/x-codemod/src/v8.0.0/preset-safe/preset-safe.test.ts b/packages/x-codemod/src/v8.0.0/preset-safe/preset-safe.test.ts index 84b3d9c6e9af..90a28d50b7c8 100644 --- a/packages/x-codemod/src/v8.0.0/preset-safe/preset-safe.test.ts +++ b/packages/x-codemod/src/v8.0.0/preset-safe/preset-safe.test.ts @@ -14,7 +14,9 @@ function getAllDirs() { .readdirSync(path.resolve(__dirname, '..')) .filter( (file) => - fs.statSync(path.resolve(__dirname, '..', file)).isDirectory() && file !== 'preset-safe', + fs.statSync(path.resolve(__dirname, '..', file)).isDirectory() && + file !== 'preset-safe' && + fs.existsSync(path.resolve(__dirname, '..', file, 'preset-safe')), ); }