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.
Manually managing different yarn versions across projects is a pain. This fixes that.
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
Run any yarn command and watch it magically use the correct version of yarn
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>
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
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
A full list of commands is on the api reference page
Have questions? List of common questions and answers
We welcome contributions from the community, Top Hatters and non-Top Hatters alike. Here are some guidelines to help you get started!
- Ensure the problem you are solving is an issue or you've created one
- Clone the repo
- We use make.
make help
will show you a list of development commands 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.- Run
source yvm.sh
every time you make a change to yvm.sh to have changes appear make test
andmake 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!
make install
yvm <your-command-here>
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
Thanks to Carol Skelly for donating the github organization!