-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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(gatsby-cli): enable set packagemanager #26856
Conversation
Gatsby Cloud Build Reportgatsby 🎉 Your build was successful! See the Deploy preview here. Build Details🕐 Build time: 23m |
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.
Looking good! I'm not sure why we want to remove the package-lock files
Co-authored-by: Ward Peeters <[email protected]>
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.
I'm not sure if I understand "remove the selection option" here. Does it mean it should "forget" package manager setting that was selected before (through prompt thingie)? If so I can't see how this happens right now. |
@pieh poor phrasing, it means that we are removing the prompt code and doing it differently. It will listen to your existing selection if you have one. |
Co-authored-by: Ward Peeters <[email protected]>
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.
Looks good, thank you @laurieontech
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.
Looks good, thank you @laurieontech
Successfully published: |
This breaks installs using Yarn 2 - npm isn't compatible with it (cf the following run). Can you at least detect which package manager is currently used (by looking at the value of |
@arcanis Thanks for pointing that out and TIL about |
It's set in the environment (here). If you see |
CLI should default to npm and remove the selection option.
We'll then create a separate CLI option that allows a user to change their package manager.
For long term flexibility this command is
config
and can also be used to report telemetry.[ch7523]