feature request: telling user when new version is available#35
feature request: telling user when new version is available#35di-sukharev merged 7 commits intodi-sukharev:devfrom
Conversation
This commit adds a new function that checks if the current version of OpenCommit is the latest version. The function uses the getOpenCommitLatestVersion function from the api module to get the latest version of OpenCommit. If the current version is not the latest version, a warning message is printed to the console, informing the user to update to the latest version to get the latest features and bug fixes.
|
|
||
| if (currentVersion !== latestVersion) { | ||
| console.warn( | ||
| chalk.yellow( |
There was a problem hiding this comment.
@nader-zouaoui What do you think about already suggesting the command to perform the update? ex:
🎉 Update to latest version by running:
npm update opencommit
There was a problem hiding this comment.
Makes sense, will do it
| Consider updating to the latest version to get the latest features and bug fixes. | ||
| Current version: ${currentVersion} | ||
| Latest version: ${latestVersion} | ||
| 🎉 To update to the latest version, run: npm update opencommit |
| @@ -1,6 +1,6 @@ | |||
| { | |||
| "name": "opencommit", | |||
| "version": "1.1.11", | |||
There was a problem hiding this comment.
@nader-zouaoui the current version is already 1.1.16. Is your branch up to date?
There was a problem hiding this comment.
These are the computed changes after the merge, so yeah it will be up-to-date after this
There was a problem hiding this comment.
I understood!
Per the Contribution Guidelines the pull request must be opened to the master branch. That's why I got confused.
There was a problem hiding this comment.
I think Contribution Guidelines should be updated, and the default should be the dev branch.
…rev#35) * ✨ feat(cli.ts): add checkIsLatestVersion function This commit adds a new function that checks if the current version of OpenCommit is the latest version. The function uses the getOpenCommitLatestVersion function from the api module to get the latest version of OpenCommit. If the current version is not the latest version, a warning message is printed to the console, informing the user to update to the latest version to get the latest features and bug fixes.

proposal for #32