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

docs: add docs on yarn version management #896

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions _data/guides.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,13 @@
- id: docs_workspaces
path: /docs/workspaces

- id: docs_yarn_version_management
title: docs_yarn_version_management_title
description: docs_yarn_version_management_description
pages:
- id: docs_yarn_version_management
path: /docs/yarn-version-management

- id: yarn_organization
title: yarn_organization_title
description: yarn_organization_description
Expand Down
5 changes: 5 additions & 0 deletions _data/i18n/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,11 @@ docs_workspaces_title: Workspaces
docs_workspaces_description: |
Link together your projects for easier maintenance.

docs_yarn_version_management: Yarn Version Management
docs_yarn_version_management_title: Yarn Version Management
docs_yarn_version_management_description: |
Manage your yarn version per project.

yarn_organization_title: Yarn Organization
yarn_organization_description: |
The Yarn organization is a collaboration of many companies and
Expand Down
22 changes: 22 additions & 0 deletions lang/en/docs/yarn-version-management.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
id: docs_yarn_version_management
guide: docs_yarn_version_management
layout: guide
---

{% include vars.html %}

## Motivation <a class="toc" id="toc-motivation" href="#toc-motivation"></a>

As your usage of yarn grows, you will find yourself with projects that depend on certain versions of yarn.
Once you hit this scale it can be difficult to keep all your projects compatible with the latest version of yarn.
This becomes increasingly more difficult if you have many developers working on these projects, as it is near impossible to have all project-contributors running the same version of yarn.
To mitigate this, you can manage your version of yarn per project.

#### Use `yvm`, the yarn version manager <a class="toc" id="toc-use-yvm-the-yarn-version-manager" href="#toc-use-yvm-the-yarn-version-manager"></a>

You [can use yvm](https://yvm.js.org/) to manage your yarn versions

#### Commit the yarn binary to the project and use `yarn-path` in `.yvmrc` <a class="toc" id="toc-commit-the-yarn-binary-to-the-project-and-use-yarn-path-in-yvmrc" href="#toc-commit-the-yarn-binary-to-the-project-and-use-yarn-path-in-yvmrc"></a>

See [`yarn-path` in the yarnrc docs](/lang/en/docs/yarnrc/#toc-yarn-path)