Compare commits

..

2 Commits

Author SHA1 Message Date
di-sukharev
8fe382a072 1.1.3 2023-03-11 01:02:37 +08:00
di-sukharev
4b703c634a * 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
2023-03-11 01:01:26 +08:00
4 changed files with 7 additions and 14 deletions

2
.github/TODO.md vendored
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

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "opencommit",
"version": "1.1.2",
"version": "1.1.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "opencommit",
"version": "1.1.2",
"version": "1.1.3",
"license": "ISC",
"dependencies": {
"@clack/prompts": "^0.6.1",

View File

@@ -1,6 +1,6 @@
{
"name": "opencommit",
"version": "1.1.2",
"version": "1.1.3",
"description": "GPT CLI to auto-generate impressive commits in 1 second. Killing lame commits with AI 🤯🔫",
"keywords": [
"git",

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