di-sukharev / opencommit

Generate conventional git commit messages with AI in 1 second 🤯🔫
https://www.npmjs.com/package/opencommit
MIT License
5.98k stars 318 forks source link

bug: checkIsLatestVersion doesnt work as expected #40

Open di-sukharev opened 1 year ago

di-sukharev commented 1 year ago

the function checkIsLatestVersion always returns that version is not latest..

di-sukharev commented 1 year ago

anybody could fix that?

matt-degraffenreid commented 1 year ago

hey @di-sukharev I'm not able to reproduce this bug on my end.

Steps I took to reproduce:

  1. Clone the opencommit repo.
  2. Build the project and run npm link.
  3. Open a dummy project and run npm link opencommit.
  4. I uncommented the needed lines in cli.ts
  5. when running with 1.1.22 as the version number in the package.json no message pops up as expected
  6. when I change the version number in the package.json to something <1.1.22 I get the message as expected.

Let me know if I'm not following correctly.

di-sukharev commented 1 year ago

thanks bro,

it works when tested locally, but it shows the message all the time in prod

here is how it goes for me — when i install latest npm i -g opencommit@latest and run oc --version i see not the latest version, but the version before latest, that's why message is displayed all the time. I believe it's due to some npm latest tag management.

image
github-actions[bot] commented 1 year ago

Stale issue message