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

fixes transtive file: dependencies #3709

Merged
merged 4 commits into from
Jun 26, 2017
Merged

Conversation

bestander
Copy link
Member

@bestander bestander commented Jun 23, 2017

Summary

Transitive file: dependencies were losing relative path indication and you could not install root -> a-> file:./b

The problem was that between tarball-resolver and tarball-fetcher we were loosing information about file: protocol that clearly identifies that the tarball is local.

Test plan

Added test.

},
"devDependencies": {
"b": "file:b"
"b": "file:./b"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this fix the test was failing.
That is strange and needs a bit more investigation later on

@@ -107,7 +107,7 @@ export default class FileResolver extends ExoticResolver {
if (temp === section) {
temp = Object.assign({}, section);
}
temp[k] = `file:${path.relative(this.config.cwd, path.join(loc, util.removePrefix(v, 'file:')))}`;
temp[k] = `file:./${path.relative(this.config.cwd, path.join(loc, util.removePrefix(v, 'file:')))}`;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An alternative would be to make the fix at fetcher level that tries to fetch non relative paths from registry.

@bestander bestander requested a review from arcanis June 23, 2017 19:56
@bestander bestander merged commit 6ff4966 into yarnpkg:master Jun 26, 2017
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.

2 participants