* 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:
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
# TODOs
|
# TODOs
|
||||||
|
|
||||||
- [x] set prepare-commit-msg hook
|
- [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
|
- [] make bundle smaller by properly configuring esbuild
|
||||||
- [] [build for both mjs and cjs](https://snyk.io/blog/best-practices-create-modern-npm-package/)
|
- [] [build for both mjs and cjs](https://snyk.io/blog/best-practices-create-modern-npm-package/)
|
||||||
- [] do // TODOs in the code
|
- [] do // TODOs in the code
|
||||||
|
|||||||
+3
-10
@@ -21,18 +21,11 @@ cli(
|
|||||||
ignoreArgv: (type) => type === 'unknown-flag' || type === 'argument',
|
ignoreArgv: (type) => type === 'unknown-flag' || type === 'argument',
|
||||||
help: { description: packageJSON.description }
|
help: { description: packageJSON.description }
|
||||||
},
|
},
|
||||||
async () => {
|
() => {
|
||||||
if (isHookCalled) {
|
if (isHookCalled) {
|
||||||
await prepareCommitMessageHook();
|
prepareCommitMessageHook();
|
||||||
} else {
|
} else {
|
||||||
await commit();
|
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`'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
rawArgv
|
rawArgv
|
||||||
|
|||||||
Reference in New Issue
Block a user