-
Notifications
You must be signed in to change notification settings - Fork 172
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
Feature request: corepack command to call manager cli (to install project's dependencies using defined package manager) #352
Comments
What about options? Does corepack have to basically support a union of all options and environment variables of |
This is almost a duplicate of #57, the same arguments for and against apply here as well for the most part, so you might find the read interesting.
That's a good remark, and certainly a difference with |
We can bypass all the nuances for this issue #352 and for #57 if we simply make alias So it would be possible to run If some manager does not support passed command, corepack won't care, user will see error from the manager and this behavior will be expected. Probably described solution is also covers needs that this draft is trying to solve. |
Not even touching environment variables, in part because they aren't neatly listed in a particular |
As I wrote, corepack should not care, user will see error from the manager and this behavior will be expected. Apart from the logged error, it would be nice if corepack log the name of the manager that is called at the beginning. |
If the |
@styfle I'm not sure. Throw an error is ok, but it seems like using |
IMO it would be a mistake to set npm as the default (Corepack goal is to provide a level playing field). A more fair behavior would be:
|
This would lead to people forgetting to set the I'd like to better understand the workflow you'd like to improve here. In the case of
If we provided a If some commands should be run through Corepack and some others should be run through individual package managers, I strongly suspect things will get more confusing overall, not less, with some tutorials using one version or the other, and newcomers not understanding the nuances. Corepack already does a lot, I don't see providing a unified user experience as part of its goals. |
I want to improve scenarios that appear when developers working with a lot of projects that uses different package managers.
I got the idea that it would be even better to make a separate cli that would call the actual And call it shorter, for example And we would work with it through commands |
This is not the same at least because it requires manual install of it. In general, before starting the creation of corepack, it was possible to invite everyone to use yarpm :) |
It doesn't make it impossible, and it doesn't even make it harder. I understand it would be more convenient for you if it was a core behavior of Corepack simply because it's shipped with Node by default, but the same could be said of pretty much every CLI tool. We shouldn't expand the scope of Corepack in a way that would change how packages managers are used. Its only purpose is to change how they are installed. |
I'm not suggesting giving corepack the knowledge of how to use package managers. |
I would like to install packages in a project without thinking about which package manager should be used in this project.
This can be solved with the
corepack manager
proxy command that would call package manager that is defined in"packageManager"
section of project'spackage.json
, so it would be possible to install packages viacorepack manager install
.BTW,
corepack up
does similar, after upgrading package manager it installs project's packages (together with yarn at least), but I think this was not intended by corepack.The text was updated successfully, but these errors were encountered: