-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
feat: docusaurus upgrade cli command #4082
base: main
Are you sure you want to change the base?
Conversation
485c68d
to
d98f00a
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✔️ Deploy preview for docusaurus-2 ready! 🔨 Explore the source changes: 485c68d 🔍 Inspect the deploy logs: https://app.netlify.com/sites/docusaurus-2/deploys/60088bfd300ec90008905dac 😎 Browse the preview: https://deploy-preview-4082--docusaurus-2.netlify.app |
Size Change: -2 B (0%) Total Size: 27.1 kB ℹ️ View Unchanged
|
⚡️ Lighthouse report for the deploy preview of this PR
|
✅ [V2]Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
Thanks @semoal that looks like a good start. I don't have time to test it right now and will be a bit busy but will get back to you when I can. Was wondering if you could do some upfront research on how other CLIs are implementing this kind of feature, as this is quite common. Was wondering if the common approach is to actually run In the end I'd like the version to be upgraded in both the lockfile/node_modules but also the package.json, is it the case currently? Also, maybe we should default to the @latest tag, not sure it is picked by default for NPM users due to using alpha (not sure it's a problem though). |
@@ -10,6 +10,7 @@ | |||
"deploy": "docusaurus deploy", | |||
"clear": "docusaurus clear", | |||
"serve": "docusaurus serve", | |||
"upgrade": "docusaurus upgrade", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to add this to init templates as well
Looks nice, will run it tomorrow Maybe you could:
Edit: oh, this PR is quite old 😅 |
I think this command should be a separate package instead of in the core. Reason: we may want to make it display the changelog / highlights of the latest version, and auto-fix some breaking changes / recommended changes. If the project's version is |
Agree, we should be able to use We may provide more than just upgrading deps in the future |
Motivation
Introduce the feature requested here: #4075
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan & Pending things