-
Notifications
You must be signed in to change notification settings - Fork 607
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
[rush] Enable "rush install" to install only a subset of dependencies using PNPM's "--filter" option #1669
Comments
#1553 is a top priority on our roadmap for Rush. It will delegate most of the installation responsibility to the package manager. And then we'd try to solve this problem using a PNPM feature rather than a Rush-specific feature. That said, I'm not sure that PNPM supports this today. @sunilsurana could you investigate that, and if it's supported, could your report back with some details about how PNPM's feature works? Your proposed feature sounds pretty valuable, so I'd like to get started on the design early in case it has any implications for #1553.
This would be complex for Rush to implement. The package manager is in the best position to perform this sort of filtering. |
In Pnpm i see that there is option the specify filter and supply package using different patterns but not a standardized way to say install all dependecies for productA or something like that. |
Yes. The basic idea would be to install a subset of the package-lock.yaml tree, based on a set of monorepo projects that we want to build. I feel like this should be fairly easy for PNPM to do within its current model. I bet people have asked it before. Please CC me on your issue so I can follow along. Thanks! |
This will become easier with PnP / Yarn 2 since the package manager doesn't have to resolve conflicts between versions. It would probably be a Yarn feature though. e.g. You could ask Yarn to install dependencies for a workspace (which could possibly also install them for workspaces it depends on). |
I've created a separate issue to track PNPM workspaces support here: #1887 |
Is this a feature or a bug?
An organisation can decide to host all of its products code under one repo. In this case when a developer starts to work on repo when doing rush install he will have to download whole npm dependencies which are not even related to his work. And this can get bad in PR builds.
Feature ask
Create a workspace feature where the rush.json structure looks like
{
Worspace1:
[package A,
package B],
Workspace2:{
[packageC,
packageD]
}
So when someone run rush install workspace1 it will only download dependencies for packages in that workspace.
The text was updated successfully, but these errors were encountered: