MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / checkIsLatestVersion

Function checkIsLatestVersion

src/utils/checkIsLatestVersion.ts:8–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6import { getOpenCommitLatestVersion } from '../version';
7
8export 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 `
22You are not using the latest stable version of OpenCommit with new features and bug fixes.
23Current version: ${currentVersion}. Latest version: ${latestVersion}.
24🚀 To update run: npm i -g opencommit@latest.
25 `
26 )
27 );
28 }
29 }
30};

Callers 1

cli.tsFile · 0.90

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…