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

Fix git dependencies with slashes inside branch name #813

Merged
merged 1 commit into from Oct 12, 2016

Conversation

saschagehlich
Copy link
Contributor

Summary

Previously, branches with slashes such as features/feature-branch would not be recognized by the package resolver. This happened because ref names (e.g. refs/heads/features/feature-branch) were not parsed correctly. Instead of looking at everything after the second slash, it only looked at the string after the second slash and before the third. This resulted in refs/heads/features/feature-branch being parsed to features instead of features/feature-branch.

Test plan

I have added a test case to __tests__/package-resolver.js that tries to parse https://github.com/babel/babel-loader.git#feature/sourcemaps. Previously, this caused an error. This has been fixed now.

There is one more failing test though, but I'm sure it's not related to my change. Tests seem to be always failing for this project right now.

@sebmck sebmck merged commit 76c8f9b into yarnpkg:master Oct 12, 2016
@sebmck
Copy link
Contributor

sebmck commented Oct 12, 2016

Thank you!

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.

None yet

2 participants