Description
We've been using some kind of monorepo approach for our projects for quite some time, a bit like lerna but with a more private and nested approach (our packages aren't expected to be published for now) along some specific needs: we must to link some public dependencies (eg. mongoose) that must be the exact same instance accross our subpackages (otherwise you encounter a lot of exotic bugs, edge cases), we also link our devDeps (they are shared accross all our subpackages).
At first we used linklocal with npm@2, leveraging a custom use of the file:
prefix (basically just symlinking them), but npm@3 broke a lot of things related to their handling (eg. #10343). We ended up moving to ied where we implemented the file:
prefix handling using simple symlinks, that tackled our need.
I would love to be able to switch theses project to yarn but I would need a way to create this links, I can see two ways to achieve that:
- Either add a new
link:
prefix that would just create symlinks and that's it - Add an option flag
--link-file-dependencies
that would override defaultfile:
handling (copying) and use symlinks instead.
Would gladly submit a PR with tests if you would consider such request.