yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.43k stars 2.72k forks source link

strange peer-dep resolution #4674

Closed graingert closed 6 years ago

graingert commented 7 years ago

yep: 1.2.0

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

What is the current behavior? strange issue with enzyme and react-faux-dom, enzyme-adapter-utils gets react 15 nested under it. Even though it should peer dep with enzyme-adapter-react-16's react@^16 dep.

If the current behavior is a bug, please provide the steps to reproduce. https://github.com/graingert/enzyme-wtf What is the expected behavior? react-faux-dom gets react 15 nested under it.

Please mention your node.js, yarn and operating system version. Yarn: 1.2.0 Node: 8.6.0 OS: Ubuntu 17.10

graingert commented 7 years ago

of course with:

yarn add react@^16.0.0 react-dom@^16.0.0 react-test-renderer@^16.0.0 enzyme@^3.0.0 enzyme-adapter-react-16@^1.0.1 react-faux-dom@^4.0.4

everything is fine.

BYK commented 6 years ago

I think this was an issue with react-faux-dom and was resolved with https://github.com/Olical/react-faux-dom/pull/114/files

BYK commented 6 years ago

Yeah, I've just verified that this is not an issue with react-faux-dom@^4.0.4

graingert commented 6 years ago

@BYK sure, but yarn should not have resolved the tree as it did.

graingert commented 6 years ago

enzyme-adapter-utils should never have got react 15. It should have gone under react-faux-dom