Skip to content
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

Add symlink link: dependency type #884

Closed
mgcrea opened this issue Oct 12, 2016 · 5 comments
Closed

Add symlink link: dependency type #884

mgcrea opened this issue Oct 12, 2016 · 5 comments

Comments

@mgcrea
Copy link
Contributor

mgcrea commented Oct 12, 2016

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 default file: handling (copying) and use symlinks instead.

Would gladly submit a PR with tests if you would consider such request.

@sebmck sebmck changed the title Feature request: ability to automatically link packages on install Add symlink link: dependency type Oct 12, 2016
@sebmck
Copy link
Contributor

sebmck commented Oct 12, 2016

Awesome idea!

mgcrea added a commit to mgcrea/yarn that referenced this issue Oct 15, 2016
mgcrea added a commit to mgcrea/yarn that referenced this issue Oct 15, 2016
mgcrea added a commit to mgcrea/yarn that referenced this issue Oct 15, 2016
mgcrea added a commit to mgcrea/yarn that referenced this issue Oct 15, 2016
mgcrea added a commit to mgcrea/yarn that referenced this issue Oct 16, 2016
mgcrea added a commit to mgcrea/yarn that referenced this issue Oct 16, 2016
mgcrea added a commit to mgcrea/yarn that referenced this issue Oct 24, 2016
mgcrea added a commit to mgcrea/yarn that referenced this issue Oct 27, 2016
mgcrea added a commit to mgcrea/yarn that referenced this issue Oct 27, 2016
mgcrea added a commit to mgcrea/yarn that referenced this issue Oct 27, 2016
mgcrea added a commit to mgcrea/yarn that referenced this issue Oct 27, 2016
mgcrea added a commit to mgcrea/yarn that referenced this issue Oct 31, 2016
@sebmck
Copy link
Contributor

sebmck commented Nov 1, 2016

Can you please open and move this to yarnpkg/rfcs?

@sebmck sebmck closed this as completed Nov 1, 2016
@cgatian
Copy link

cgatian commented Nov 1, 2016

@mgcrea Could you reference the issue number once you create it. I also would love to use yarn but we are blocked because we use the npm link feature.

mgcrea added a commit to mgcrea/yarn that referenced this issue Nov 24, 2016
mgcrea added a commit to mgcrea/yarn that referenced this issue Nov 24, 2016
@moimikey
Copy link

@mgcrea did you end up making your RFC :D?!

@mgcrea
Copy link
Contributor Author

mgcrea commented Feb 21, 2017

Related RFC: yarnpkg/rfcs#34

mgcrea added a commit to mgcrea/yarn that referenced this issue Feb 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants