-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Conversation
}, | ||
"devDependencies": { | ||
"b": "file:b" | ||
"b": "file:./b" |
There was a problem hiding this comment.
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:')))}`; |
There was a problem hiding this comment.
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.
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.