Skip to content

umar-ahmed/yvm

 
 

Repository files navigation

Overview

Yarn Version Manager

Pesky yarn versions got you down? Automatically and easilly manage those versions.

YVM will automatically use the correct yarn version when you run any yarn commands in any folder with a .yvmrc file. Otherwise, it will use you a globally set version of yarn.

Motivation

Manually managing different yarn versions across projects is a pain. This fixes that.

Installation

Node: >=4.8.0

Execute the following in your terminal:

curl -fsSL https://raw.githubusercontent.com/tophat/yvm/master/scripts/install.sh | bash

Or if already installed, to update to the latest version

yvm update-self

Usage

Automatic magic

Run any yarn command and watch it magically use the correct version of yarn

Basic

To download and install a version of yarn, run:

yvm install <version>

Execute an arbitrary command using a specific version of yarn:

yvm exec <version> <command>

Additional commands

Switch the current yarn versions, using:

yvm use <version>
yarn --version

List Versions

yvm list

Check Current Version

yvm which

Full list of available commands

yvm help

Using a .yvmrc File

You can create a .yvmrc file containing the version number of yarn in your project's root directory. Afterwards, yvm use, yvm install and yvm exec will use the version specified in the .yvmrc file if no version number is supplied to the command. You can also declare the version using other configuration files

Additional reference

A full list of commands is on the api reference page

Have questions? List of common questions and answers

Technologies to Familiarize Yourself with

Contributing

We welcome contributions from the community, Top Hatters and non-Top Hatters alike. Here are some guidelines to help you get started!

Basic development flow

  1. Ensure the problem you are solving is an issue or you've created one
  2. Clone the repo
  3. We use make. make help will show you a list of development commands
  4. make install-watch will install yvm on your shell, and update when you make changes. Make sure to only run this in the root yvm directory. It will fail elsewhere.
  5. Run source yvm.sh every time you make a change to yvm.sh to have changes appear
  6. make test and make lint are also commonly helpful

Make sure all changes are well documented. Our documentation can be found inside the docs section of this repo. Be sure to read it carefully and make modifications wherever necessary. You can also access the documentation on our website

Please make sure to look over our Code of Conduct as well!

Manual testing command contributions

make install
yvm <your-command-here>

Contributors

Thanks goes to these wonderful people (emoji key):


Francois Campbell

💻

Jake Bolam

📖 💻 🚇

Brandon Baksh

💻

Milan Milojic

💻

Umar Ahmed

💻

Nicholas Dujay

💻

Aser Eldamaty

💻

Michael Rose

💻

Sanchit Gera

📖

sdcosta

📖

Siavash Mahmoudian

🚇

greenkeeper[bot]

🚇

Jay Crumb

📖

Michael Lunøe

📖

This project follows the all-contributors specification. Contributions of any kind welcome!

Credits

Thanks to Carol Skelly for donating the github organization!

About

Manage multiple versions of Yarn

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 76.5%
  • Shell 12.7%
  • Makefile 7.6%
  • CSS 2.3%
  • HTML 0.9%