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 (fixes #884) #1109

Closed
wants to merge 1 commit into from

Conversation

mgcrea
Copy link
Contributor

@mgcrea mgcrea commented Oct 15, 2016

Summary

Implements the link: dependency type, see #884 for reasons.

I tried to integrate it as smoothly as possible in the existing code base, I chose to implement a noop LinkFetcher class instead of forking away the default resolving/fetching process.

Will gladly refactor if needed.

Test plan

With the following package.json:

{
  "name": "@mgcrea/test-yarn-link",
  "version": "1.0.0",
  "dependencies": {
    "@mgcrea/core-users": "link:./../core-users",
    "express-restify": "link:./../express-restify"
  },
  "devDependencies": {}
}
$ rm -rf node_modules; yarn
yarn install v0.15.1
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
✨  Done in 0.14s.
$ ll node_modules/
total 4.0K
drwxr-xr-x 3 olivier staff 102 Oct 16 00:46 '@mgcrea'/
lrwxr-xr-x 1 olivier staff  21 Oct 16 00:46 express-restify -> ../../express-restify/

Had to improve the possibleExtraneous logic to handle scoped packages as well (scope folder would be removed on yarn add).

@mgcrea mgcrea force-pushed the feat-884 branch 4 times, most recently from 1631460 to 2a5e4b3 Compare October 16, 2016 17:06
@mgcrea mgcrea force-pushed the feat-884 branch 5 times, most recently from 5ef41aa to b7e978b Compare October 27, 2016 15:36
@sebmck
Copy link
Contributor

sebmck commented Nov 1, 2016

Going to close this until we've got an accepted RFC. Please see the yarnpkg/rfcs repo for more information.

@sebmck sebmck closed this Nov 1, 2016
@mgcrea mgcrea deleted the feat-884 branch February 27, 2017 16:47
@mgcrea mgcrea restored the feat-884 branch March 1, 2017 07:54
@benlangfeld
Copy link

@kittens Could we re-open this now that the RFC is accepted in principle and npm 5 is implementing the same feature?

@arcanis
Copy link
Member

arcanis commented May 4, 2017

Github doesn't let me reopen it :( @mgcrea, can you try to start a new PR?

@bestander bestander mentioned this pull request May 5, 2017
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants