Refactor npm/yarn invocations
We currently have at least three areas of code where npm (and yarn) are used to install dependencies:
-
ember install(andember new,ember addonandember init) viaNpmInstallTaskclass -
Blueprint.addPackagesToProject() -
InstallBlueprintTaskclass if the blueprint comes from npm (see #6789)
We should try to refactor those code paths to reduce the duplication and use the same code underneath. In the same refactoring the InstallBlueprintTask class needs to be taught about yarn.
see also https://github.com/ember-cli/ember-cli/issues/6784
Don't forget about our test helper which was intended to abstract away these differences: https://github.com/ember-cli/ember-cli/blob/master/tests/helpers/package-cache.js
is there anyone working on this ?
Iām looking into this, hopefully I can come up with something šāāļø
Hey team! I started working on it (progress at https://github.com/ember-cli/ember-cli/pull/9789) but got to the point where I would like to know/brainstorm exactly where do we want to take this. What is the ideal outcome of it? How much refactor/DRYness do we want in the code? How much abstraction do we want for install and etc.? Thanks in advance šāāļø