diff --git a/src/migrate.ts b/src/migrate.ts index eeb5598e3..f01dd5469 100644 --- a/src/migrate.ts +++ b/src/migrate.ts @@ -81,7 +81,10 @@ async function migratePackageJson(dryRun?: boolean): Promise { if (pkg.scripts[key].includes('tsup')) { consola.info(`Migrating \`${key}\` script to tsdown`) found = true - pkg.scripts[key] = pkg.scripts[key].replaceAll('tsup', 'tsdown') + pkg.scripts[key] = pkg.scripts[key].replaceAll( + /tsup(?:-node)?/, + 'tsdown', + ) } } }