* chore(TODO.md): update TODO list, remove completed task

* refactor(cli.ts): remove unnecessary async/await keywords, remove version check and "new version available" message
This commit is contained in:
di-sukharev
2023-03-11 01:01:26 +08:00
parent 6821e937cf
commit 4b703c634a
2 changed files with 4 additions and 11 deletions
+1 -1
View File
@@ -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
+3 -10
View File
@@ -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