[RRFC] Add nohoist option for workspaces
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 777
- Forks
- 267
- PR merge metrics
- No merged PRs in 30d
Description
Motivation ("The Why")
Yarn already supports this option. It makes it possible to work with tooling that expects certain modules to be located in inside the same package that consumes them.
Example
In order for a React Native app to build properly within a monorepo, some packages that react-native depends on must reside inside the node_modules folder within the app package. With yarn, I'm able to accomplish it with this configuration:
"workspaces": {
"packages": [
"api",
"app",
"shared/*"
],
"nohoist": [
// my-app is the name of the package inside the app folder
"my-app/**"
]
}
How
See: https://classic.yarnpkg.com/blog/2018/02/15/nohoist/
References
- Related to: npm/cli#2036
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the workspace and nohoist example in this RFC, then read the linked Yarn no-hoist explanation and related npm/cli#2036 discussion. Define how the option should behave for workspace packages and React Native-style layouts before identifying the npm implementation and tests. Done means the proposal has an agreed design and verified behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100