()
| 6 | import { getOpenCommitLatestVersion } from '../version'; |
| 7 | |
| 8 | export const checkIsLatestVersion = async () => { |
| 9 | if (process.env.OCO_TEST_SKIP_VERSION_CHECK === 'true') { |
| 10 | return; |
| 11 | } |
| 12 | |
| 13 | const latestVersion = await getOpenCommitLatestVersion(); |
| 14 | |
| 15 | if (latestVersion) { |
| 16 | const currentVersion = currentPackage.version; |
| 17 | |
| 18 | if (currentVersion !== latestVersion) { |
| 19 | outro( |
| 20 | chalk.yellow( |
| 21 | ` |
| 22 | You are not using the latest stable version of OpenCommit with new features and bug fixes. |
| 23 | Current version: ${currentVersion}. Latest version: ${latestVersion}. |
| 24 | 🚀 To update run: npm i -g opencommit@latest. |
| 25 | ` |
| 26 | ) |
| 27 | ); |
| 28 | } |
| 29 | } |
| 30 | }; |
no test coverage detected
searching dependent graphs…