feat(checkIsLatestVersion.ts): add outro message from @clack/prompts to warn user about not using the latest stable version of OpenCommit
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import { getOpenCommitLatestVersion } from '../api';
|
import { getOpenCommitLatestVersion } from '../api';
|
||||||
import currentPackage from '../../package.json' assert { type: 'json' };
|
import currentPackage from '../../package.json' assert { type: 'json' };
|
||||||
import chalk from 'chalk';
|
import chalk from 'chalk';
|
||||||
|
import { outro } from '@clack/prompts';
|
||||||
|
|
||||||
export const checkIsLatestVersion = async () => {
|
export const checkIsLatestVersion = async () => {
|
||||||
const latestVersion = await getOpenCommitLatestVersion();
|
const latestVersion = await getOpenCommitLatestVersion();
|
||||||
@@ -9,7 +10,7 @@ export const checkIsLatestVersion = async () => {
|
|||||||
const currentVersion = currentPackage.version;
|
const currentVersion = currentPackage.version;
|
||||||
|
|
||||||
if (currentVersion !== latestVersion) {
|
if (currentVersion !== latestVersion) {
|
||||||
console.warn(
|
outro(
|
||||||
chalk.yellow(
|
chalk.yellow(
|
||||||
`
|
`
|
||||||
You are not using the latest stable version of OpenCommit with new features and bug fixes.
|
You are not using the latest stable version of OpenCommit with new features and bug fixes.
|
||||||
|
|||||||
Reference in New Issue
Block a user