From 76750a2b9e6dec5c13966f7cf886eef379c5da24 Mon Sep 17 00:00:00 2001 From: 43081j <43081j@users.noreply.github.com> Date: Wed, 7 Aug 2024 20:49:19 +0100 Subject: [PATCH] fix: log success per codemod --- src/main.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.ts b/src/main.ts index 22288af..88a325f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -178,6 +178,10 @@ async function fixFile( } }); + cl.log.success(dedent` + Applying codemod ${pc.cyan(replacement.moduleName)} to ${scanResult.path} + `); + newContent = transformResult; } catch (err) { cl.log.error(dedent` @@ -189,10 +193,6 @@ async function fixFile( } if (scanResult.contents !== newContent) { - cl.log.success(dedent` - Writing file ${scanResult.path} with codemod changes. - `); - await writeFile(scanResult.path, newContent, 'utf8'); } }