-
Notifications
You must be signed in to change notification settings - Fork 239
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
[RRFC] Optional install #156
Comments
Just think about having stuff into a mono-repo. I do the same for example our e2e setup is in its own package with its own deps and only runs on the stage it needs to be runned. So not installing any e2e related when not needed. The job depends on the build stage obviously but i guess its clear what a mono repo can do for you :) Another way is making dependencies yourself for example all linters in one package. Then during the job you can install them while not being part of your package lib. Having cypress for example as package is a total waste of energy, you can think about creating an image for it. Why download it, is has a huge post install phase and thats really a waste of energy :) Create the container and be done with it. Hope it helps. |
same issue: we want to skip installing e2e related devDependencies (e.g. puppeteer) - it's very time-costing! but I suggest something like related discussion: npm/npm#3870 |
@gotbahn apologies for the delay in bubbling this up - I've added the "Agenda" label to this issue & it should get discussed at our next Open RFC call on Wednesday. As a side note, you might actually be able to get this type of behaivour by utilizing workspaces when we ship the next round of improvements which include filtered/scoped installs (ex. |
Oh, nice! Scoped installs sounds exciting. Looking forward to try it out. |
Motivation ("The Why")
As a Continuous Integration maintainer, I'm highly interested in fast build jobs. Installing dependencies one of the key parts here.
Caching helps significantly speed up, but:
I highly appreciate that npm has
--production
flag feature, that allows us to avoiddevDependcies
installation, this technique significantly reduces install time for delivery jobs.It would be so nice if such behavior could be more eloquent and we can define or exclude certain packages from being installed. Lemme give some example
Example
Let's say we running some test jobs in parallel, based on type:
eslint
,stylelint
,typescript
, etc.jest
,redux-mock-store
, etc.cypress
, cypress plugin, etc.How
Current Behaviour
Each of the jobs installs all dependencies. Hower "static" and "unit" don't need packages from end-to-end, but have to install it together with all "devDependencies".
Desired Behaviour
I have no strong vision of how API should look like in the end, but can give a couple of ideas:
Exclude packages
As an additional argument, that accepts list of package to be ignored upon install
npm i --exclude=express,cypress
Unique listing
Assemble own unique lists
Can follow the same rule as
--production
, and install packages from "dependencies" & unique list. For exampleor
References
Sorry, I haven't found anything useful to ref
The text was updated successfully, but these errors were encountered: