Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] No info on availability of new version of cli to user. #1680

Open
2 tasks done
neoandmatrix opened this issue Feb 20, 2025 · 4 comments
Open
2 tasks done

[BUG] No info on availability of new version of cli to user. #1680

neoandmatrix opened this issue Feb 20, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@neoandmatrix
Copy link
Contributor

Describe the bug.

Whenever a new version is released of the cli and if after that user runs a command then a info should be given that a new version of the cli is available. It is already implemented here but appears to be not working as can be seen from below screenshots.

Expected behavior

An info should be shown with new available version and current version once every day of running any commands.

Screenshots

Image

Image

As evident form above screenshots i am using an older version and info should be displayed that a new version is available but no info is shown.

How to Reproduce

  1. Install any older version of cli.
  2. Run any command.
  3. No info is displayed that a new version is available even tough it is.

🥦 Browser

None

👀 Have you checked for similar open issues?

  • I checked and didn't find similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue ?

Yes I am willing to submit a PR!

@neoandmatrix neoandmatrix added the bug Something isn't working label Feb 20, 2025
@github-project-automation github-project-automation bot moved this to To Triage in CLI - Kanban Feb 20, 2025
@neoandmatrix
Copy link
Contributor Author

Hey @AayushSaini101 any update on this issue? If verified and relevant would like to work on this.

In my opinion this can be due to the missing registry parameter in the plugin configuration as mentioned here in the warn-if-update-available docs https://github.com/oclif/plugin-warn-if-update-available?tab=readme-ov-file#configuration.

Would really appreciate your thoughts on this.

Thanks.

@pseudo-tensor
Copy link

@neoandmatrix I doubt its anything to do with the registry field as it states that if nothing is specified it defaults to the package name specified in the package.json

You can confirm this by setting the frequency to something like 10 seconds,

Image

Some npm scripts do trigger the warning but this warning never appears while you are running any command, and with a lower frequency it doesn't appear at all even with the scripts (one would expect that even with a lower frequency at least one warning should appear at beginning and then none would appear for the duration of the specified frequency)

@neoandmatrix
Copy link
Contributor Author

Thanks @pseudo-tensor for clarification. So i if am understanding your last point that is this

(one would expect that even with a lower frequency at least one warning should appear at beginning and then none would appear for the duration of the specified frequency)

then at least a waring should appear after 24 hours that is specified in the current configuration , right?

Moreover form what i can understand from reading the https://github.com/oclif/plugin-warn-if-update-available?tab=readme-ov-file#how-it-works especially

the downside is that it will only display after running a command that fetches the new version.

Once a command is ran that uses some script to fetch new version then only it will be displayed after every 24 hours on every command as mentioned in
https://github.com/oclif/plugin-warn-if-update-available?tab=readme-ov-file#notification-frequency

Once a new version has been found, the default behavior is to notify the user on every command execution.

Please correct if i am getting something wrong regarding this. Then can confirm form mentors that if this is the desired behavior or something can be changed.

Thanks.

@neoandmatrix
Copy link
Contributor Author

Hey @AayushSaini101 can you please have a look at this and confirm that this is the intended behaviour for the updates to show as mentioned in the previous comment above or some changes can be made to make it more informative like instead of depending on a command that will fetch a new version and then warning will be shown, we can do it to show on every command at some fixed interval like currently 24 hours as sometimes these changes can contain important patches or fixes also.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: To Triage
Development

No branches or pull requests

2 participants