mirror of
https://github.com/di-sukharev/opencommit.git
synced 2026-04-20 03:02:51 -04:00
* add ollama support --------- Co-authored-by: di-sukharev <dim.sukharev@gmail.com> Co-authored-by: GPT10 <57486732+di-sukharev@users.noreply.github.com> Co-authored-by: Jaroslaw Weber <jaroslaw.weber@adriel.com>
27 lines
704 B
TypeScript
27 lines
704 B
TypeScript
import chalk from 'chalk';
|
|
|
|
import { outro } from '@clack/prompts';
|
|
|
|
import currentPackage from '../../package.json';
|
|
import { getOpenCommitLatestVersion } from '../version';
|
|
|
|
export const checkIsLatestVersion = async () => {
|
|
const latestVersion = await getOpenCommitLatestVersion();
|
|
|
|
if (latestVersion) {
|
|
const currentVersion = currentPackage.version;
|
|
|
|
if (currentVersion !== latestVersion) {
|
|
outro(
|
|
chalk.yellow(
|
|
`
|
|
You are not using the latest stable version of OpenCommit with new features and bug fixes.
|
|
Current version: ${currentVersion}. Latest version: ${latestVersion}.
|
|
🚀 To update run: npm i -g opencommit@latest.
|
|
`
|
|
)
|
|
);
|
|
}
|
|
}
|
|
};
|