Created by: detrohutt
With the addition of the nohoist feature, yarn has enabled a new optional format for the workspaces key in package.json:
"workspaces": {
"packages": ["packages/*"],
"nohoist": ["**"]
}
This feature is already available in the current yarn nightly build and I'm successfully using it with the following setup:
yarn@1.4.1-20180208.2355 (nightly)
react-scripts@2.0.0-next.47d2d941 (with my patch)
lerna@2.8.0 (with a similar patch)
With these patches applied, everything worked out-of-the-box*, aside from needing to make use of the nohoist option.
*(obviously, I also needed to configure lerna to use yarn and workspaces)
With the nightly build of yarn installed all enabling nohoist required was:
- Adding the settings shown above to my
package.json - Adding the following to my
.yarnrc:
--workspaces-experimental true
--workspaces-nohoist-experimental true
I could put together a demo lerna repo with my patches applied if needed, but I'm pretty busy with my current project, so if it's not necessary I won't bother.
Similarly, I'd be willing to add a new test to prove it gets the values from workspaces.packages when present. But I'm wondering if that's overkill for such a simple change.
Let me know if you have any questions or concerns! :)