diff --git a/.github/TODO.md b/.github/TODO.md index aa07091..f0ce2b8 100644 --- a/.github/TODO.md +++ b/.github/TODO.md @@ -1,7 +1,7 @@ # TODOs - [x] set prepare-commit-msg hook -- [x] show "new version available" message, look into this commit e146d4d cli.ts file +- [] show "new version available" message, look into this commit e146d4d cli.ts file - [] make bundle smaller by properly configuring esbuild - [] [build for both mjs and cjs](https://snyk.io/blog/best-practices-create-modern-npm-package/) - [] do // TODOs in the code diff --git a/src/cli.ts b/src/cli.ts index 82ff083..e669ce4 100755 --- a/src/cli.ts +++ b/src/cli.ts @@ -21,18 +21,11 @@ cli( ignoreArgv: (type) => type === 'unknown-flag' || type === 'argument', help: { description: packageJSON.description } }, - async () => { + () => { if (isHookCalled) { - await prepareCommitMessageHook(); + prepareCommitMessageHook(); } else { - await commit(); - const { stdout } = await execa('npm', ['view', 'opencommit', 'version']); - - if (stdout !== packageJSON.version) { - outro( - 'new opencommit version is available, update with `npm i -g opencommit`' - ); - } + commit(); } }, rawArgv