From 01bbf5bf12020a27cb25b4b50466c4f419c6a788 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Wed, 29 Mar 2023 12:08:08 +0200 Subject: [PATCH] Only run it in mdx-to-csf codemod --- code/lib/cli/src/migrate.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/lib/cli/src/migrate.ts b/code/lib/cli/src/migrate.ts index 8176466fc6c3..fef65bf24ffa 100644 --- a/code/lib/cli/src/migrate.ts +++ b/code/lib/cli/src/migrate.ts @@ -6,7 +6,9 @@ export async function migrate(migration: any, { glob, dryRun, list, rename, logg if (list) { listCodemods().forEach((key: any) => logger.log(key)); } else if (migration) { - await runFixes({ fixes: [bareMdxStoriesGlob] }); + if (migration === 'mdx-to-csf') { + await runFixes({ fixes: [bareMdxStoriesGlob] }); + } await runCodemod(migration, { glob, dryRun, logger, rename, parser }); } else { throw new Error('Migrate: please specify a migration name or --list');