Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add deprecated info in nextui-cli #132

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/helpers/output-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,3 +336,19 @@ export function outputBox({
function generateComponentOutputVersion(currentVersion: string, newVersion: string) {
return `${chalk.white(`${currentVersion} ->`)} ${chalk.yellowBright(`${newVersion} (new)`)}`;
}

export function outputDeprecatedInfo() {
outputBox({
color: 'yellow',
padding: 1,
text: `NextUI has rebranded to HeroUI! These packages are deprecated and won’t receive updates.
HeroUI offers the same great features with ongoing improvements.

β†’ ${chalk.bold('Switch to [HeroUI](https://heroui.com) for the latest updates.')}
β†’ ${chalk.bold('Migration guide:')} [NextUI to HeroUI](https://heroui.com/docs/nextui-to-heroui)
β†’ ${chalk.bold('New NPM package:')} "@heroui/react"

Thanks for your support β€” see you at HeroUI!`,
title: chalk.yellow(`❗️ Notice: NextUI is now ${chalk.bold('HeroUI')} ❗️`)
});
}
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {Command} from 'commander';

import {Logger, gradientString} from '@helpers/logger';
import {findMostMatchText} from '@helpers/math-diff';
import {outputBox} from '@helpers/output-info';
import {outputBox, outputDeprecatedInfo} from '@helpers/output-info';
import {getCommandDescAndLog} from '@helpers/utils';

import pkg from '../package.json';
Expand Down Expand Up @@ -197,6 +197,8 @@ nextui.hook('preAction', async (command) => {
});
Logger.newLine();
}

outputDeprecatedInfo();
});

nextui.parseAsync(process.argv).catch(async (reason) => {
Expand Down
Loading