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

fix(cli): update notifier should be shown if current is less than latest #5798

Merged
merged 1 commit into from
Nov 4, 2021

Conversation

semoal
Copy link
Contributor

@semoal semoal commented Oct 27, 2021

Motivation

Will close #5780

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Oct 27, 2021
@netlify
Copy link

netlify bot commented Oct 27, 2021

✔️ [V2]
Built without sensitive environment variables

🔨 Explore the source changes: 327af61

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/61794278a3038f00074f3753

😎 Browse the preview: https://deploy-preview-5798--docusaurus-2.netlify.app

@github-actions
Copy link

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟢 Performance 96
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-5798--docusaurus-2.netlify.app/

@slorber slorber changed the title fix(): update notifier should be shown if current is less than latest fix: update notifier should be shown if current is less than latest Oct 27, 2021
@slorber
Copy link
Collaborator

slorber commented Oct 27, 2021

Thanks

Can you tell me how you tested it works, so that I can also try this locally?

The complicated thing with this is to actually test it reliably :D

@Josh-Cena
Copy link
Collaborator

Josh-Cena commented Oct 27, 2021

The only case that this PR fixes (I think) is when the package.json version is newer than that in the NPM registry. So maybe update Docusaurus to 2.0.0-beta.9

Edit. No, that doesn't fire the update notifier😅 I have no idea how to reproduce it

@semoal
Copy link
Contributor Author

semoal commented Oct 27, 2021

Will try to create a repro asap guys, I've looked into the code and makes sense to me the issue itself. It was warning the user when current was different than latest, but current could be higher than latest somehow (dont ask me how). That's why I decided to use the semver util to check if the current is less than latest, we should notify that the user should update.

@Josh-Cena Josh-Cena added the pr: bug fix This PR fixes a bug in a past release. label Oct 28, 2021
@Josh-Cena Josh-Cena changed the title fix: update notifier should be shown if current is less than latest fix(cli): update notifier should be shown if current is less than latest Oct 28, 2021
@slorber
Copy link
Collaborator

slorber commented Nov 4, 2021

Let's give it a try, it's hard to test locally but hopefully people won't report this issue again in the future 🤷‍♂️

@slorber slorber merged commit cbcaa52 into facebook:main Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update-notifier wants to downgrade from beta.9 to beta.7
4 participants