Skip to content

Commit

Permalink
docs(turborepo): Update managing dependency for yarn berry (#8637)
Browse files Browse the repository at this point in the history
### Description

I noticed that the documentation mentions Yarn 2+, but doesn't explain
the correct way to install dependencies when using that package manager.
It's well documented
[here](https://yarnpkg.com/cli/workspaces/foreach#usage), so I went
ahead and updated the documentation to reflect the correct approach.

<!--
  ✍️ Write a short summary of your work.
  If necessary, include relevant screenshots.
-->

### Testing Instructions

Navigate to the managing dependencies page of the documentation, and
confirm the new documentation looks good and reads well.

<!--
  Give a quick description of steps to test your changes.
-->
  • Loading branch information
vinnymac committed Jul 11, 2024
1 parent 1957068 commit 4db451b
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,26 @@ npm install jest --workspace=web --workspace=@repo/ui --save-dev
</Tab>

<Tab>
Yarn 1:

```bash title="Terminal"
yarn workspace web add jest --dev
yarn workspace @repo/ui add jest --dev
```

<LinkToDocumentation href="https://classic.yarnpkg.com/en/docs/cli/add">yarn 1 documentation</LinkToDocumentation>
<LinkToDocumentation href="https://classic.yarnpkg.com/en/docs/cli/add">
Yarn 1 documentation
</LinkToDocumentation>

Yarn 2+:

```bash title="Terminal"
yarn workspaces foreach -R --from '{web,@repo/ui}' add jest --dev
```

<LinkToDocumentation href="https://yarnpkg.com/cli/workspaces/foreach#usage">
Yarn 2+ documentation
</LinkToDocumentation>
</Tab>

<Tab>
Expand Down

0 comments on commit 4db451b

Please sign in to comment.