Page MenuHomePhabricator

Support `yarn` instead of `npm` for some projects
Closed, DuplicatePublic

Description

This is for consideration only, not a request yet, as I might be able to get upstream lib to publish multiple npm packages.

There is at least one case, when npm refuses to support a use case that yarn supports. The Install multiple versions of a dependency #5499 was rejected by the NPM team, despite a very vocal demand by the community. Yarn chose to implement it.

This feature allows multiple versions of the same library to be added to a project. My particular use case is supporting multiple versions of Vega library, all of which exist under the same name in NPM repository.

The problem with yarn approach is that it makes package.json incompatible with the npm (npm throws an error on npm: protocol).

Can we introduce some project-level setting, e.g. a key in package.json to specify which package manager to use for the build?

Event Timeline

hashar subscribed.

Copy pasted to T148230. I am not leading any effort toward yarn though.

@hashar, this is not exactly a duplicate. It's fine to stay with npm, and allowing either tool to be used by the dev. I would like an option for just some of the projects to specify that a specific tool must be used due to limitations of the other