-
Notifications
You must be signed in to change notification settings - Fork 1.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: add options for package manager #3328
feat: add options for package manager #3328
Conversation
@arihantbansal is attempting to deploy a commit to the coral-xyz Team on Vercel. A member of the Team first needs to authorize it. |
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.
This is a great addition, but I think it would be much better if the package manager could be controlled from Anchor.toml
rather than having to pass CLI arguments each time, since this is not something people would want to change too often. For example, we could have something like:
[toolchain]
# Possible values "npm", "yarn" or "pnpm"
package_manager = "npm"
One place where it makes sense to have a CLI option for this is with the init
command (because Anchor.toml
hasn't been created yet).
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.
Almost ready. Could you also note this feature in the CHANGELOG?
Co-authored-by: acheron <[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.
Adding a dedicated field for the package manager was already on my to-do list (within a greater refactoring of Anchor.toml
), but no reason not to have it now. Thanks!
We'll most likely make npm
the default in v0.32 as mentioned earlier.
- Adds thepackage_manager
flag ininit
,build
,test
,verify
, andpublish
commands.This PR doesn't change yarn being used to build Anchor itself.
This PR is inspired by #2934, and builds up on it.
Addresses #2881.