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

Selective module resolution doesn't work with scoped packages #4242

Closed
s-panferov opened this issue Aug 23, 2017 · 2 comments · Fixed by #4243
Closed

Selective module resolution doesn't work with scoped packages #4242

s-panferov opened this issue Aug 23, 2017 · 2 comments · Fixed by #4243

Comments

@s-panferov
Copy link
Contributor

s-panferov commented Aug 23, 2017

#4105 cc @kaylieEB

Do you want to request a feature or report a bug?
Bug

What is the current behavior?

"resolutions": {
  "@types/react": "15.0.22"
}

Result:

Couldn't find any versions for "react" that matches "15.0.22"

The error is that yarn thinks that package @types/react is a path @types/react.

What is the expected behavior?
Yarn should correctly install the dep.

The source of bug is this line. We cannot simply split by / here.

We either have to

  1. Improve parsing rules to properly split scoped packages
  2. Use different package separator
  3. Use some kind of escaping.

Please mention your node.js, yarn and operating system version.
yarn@1.0.0-20170823.1414
node@6.11.2
osx 10.12.6

@s-panferov s-panferov changed the title Selective module resolution #4105 doesn't work with scoped packages Selective module resolution doesn't work with scoped packages Aug 23, 2017
@s-panferov
Copy link
Contributor Author

Started to work on the fix in #4243

@kaylie-alexa
Copy link
Member

@s-panferov awesome! Thanks for working on this :) let me know if you need any help.

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 a pull request may close this issue.

2 participants