Skip to content

Commit

Permalink
v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jrgarciadev committed Jan 16, 2025
1 parent b42d9f1 commit 1de9814
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
4 changes: 3 additions & 1 deletion packages/codemod/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": false,
"type": "module",
"license": "MIT",
"version": "1.0.3",
"version": "1.1.0",
"homepage": "https://github.com/frontio-ai/heroui-cli#readme",
"description": "HeroUI Codemod provides transformations to help migrate your codebase from NextUI to HeroUI",
"keywords": [
Expand Down Expand Up @@ -58,8 +58,10 @@
"@clack/prompts": "0.7.0",
"async-retry": "1.3.3",
"chalk": "5.3.0",
"@winches/prompts": "0.0.6",
"cli-progress": "3.12.0",
"commander": "11.0.0",
"find-up": "7.0.0",
"compare-versions": "6.1.1",
"fast-glob": "3.3.2",
"gradient-string": "2.0.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/codemod/src/actions/codemod-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {migrateAction} from './migrate-action';

function printUsage() {
Logger.grey('Usage: ');
Logger.log(`nextui [codemod]`);
Logger.log(`nextui migrate [projectPath]`);
Logger.log(`heroui [codemod]`);
Logger.log(`heroui migrate [projectPath]`);
Logger.newLine();
Logger.grey('Codemods:');
Logger.log(`- ${codemods.join('\n- ')}`);
Expand Down
12 changes: 6 additions & 6 deletions packages/codemod/src/actions/migrate-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export async function migrateAction(projectPaths?: string[], options = {} as Mig
const nextuiFiles = filterNextuiFiles(files);
let step = 1;

p.intro(chalk.inverse(' Starting to migrate nextui to heroui '));
p.intro(chalk.inverse('Starting to migrate NextUI to HeroUI'));

/** ======================== 1. Migrate package.json ======================== */
const runMigratePackageJson = getCanRunCodemod(codemod, 'package-json-package-name');
Expand All @@ -69,7 +69,7 @@ export async function migrateAction(projectPaths?: string[], options = {} as Mig
const runMigrateImportNextui = getCanRunCodemod(codemod, 'import-heroui');

if (runMigrateImportNextui) {
p.log.step(`${step}. Migrating import "nextui" to "heorui"`);
p.log.step(`${step}. Migrating import "nextui" to "heroui"`);
const selectMigrateNextui = await confirmClack({
message: 'Do you want to migrate import nextui to heroui?'
});
Expand Down Expand Up @@ -160,7 +160,7 @@ export async function migrateAction(projectPaths?: string[], options = {} as Mig
p.log.step(`${step}. Remaining files with "@nextui-org" (${remainingFiles.length})`);
p.log.info(remainingFiles.join('\n'));
const selectMigrateLeftFiles = await confirmClack({
message: 'Do you want to replace all remaining instances of @nextui-org with @heroui?'
message: 'Do you want to replace all remaining instances of "@nextui-org" with "@heroui"?'
});

if (selectMigrateLeftFiles) {
Expand Down Expand Up @@ -209,11 +209,11 @@ export async function migrateAction(projectPaths?: string[], options = {} as Mig
try {
await exec(cmd);
} catch {
p.log.error(`Reinstall dependencies error, you need to run it manually e.g. "${cmd}"`);
p.log.error(`Failed to reinstall dependencies. Please run "${cmd}" manually.`);
}
} else {
// If user not want to reinstall the dependencies automatically, we need to tell user to run it manually
p.note(`Reinstall the dependencies e.g. "pnpm install"`, 'Next steps');
// If user doesn't want to reinstall the dependencies automatically, tell them to run it manually
p.note(`Please reinstall the dependencies (e.g., "pnpm install")`, 'Next steps');
}
step++;
}
Expand Down
6 changes: 6 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1de9814

Please sign in to comment.