Skip to content

paulsevere/yvm

This branch is 623 commits behind tophat/yvm:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

64e9644 Β· Jan 29, 2019
Jan 22, 2019
Dec 9, 2018
Jan 22, 2019
Jan 22, 2019
Jan 29, 2019
Jan 29, 2019
Jan 22, 2019
Jan 24, 2019
Jan 5, 2019
Dec 23, 2018
Jun 25, 2018
Dec 10, 2018
Nov 22, 2018
Dec 23, 2018
Dec 2, 2018
Jan 22, 2019
Jun 20, 2018
Dec 23, 2018
Jun 22, 2018
Jul 4, 2018
Dec 23, 2018
Jan 22, 2019
Nov 22, 2018
Jan 29, 2019
Jan 29, 2019

Repository files navigation

Yarn Version Manager (yvm)

Logo

YVM Latest Version Minimum Node Version Builds codecov semantic-release
Deps Dev Deps Green Keeper
All Contributors Slack workspace Maturity badge - level 3 Pull Reminders

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: >=8.0.0

Installation script

Execute the following in your terminal:

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

Or to install a specific version:

curl -fsSL https://raw.githubusercontent.com/tophat/yvm/master/scripts/install.sh | INSTALL_VERSION="v0.9.26" bash

Manual installation

Navigate to https://github.com/tophat/yvm/releases and download the yvm.zip file for the latest release to your home directory.

Next, unzip that file to the .yvm dir in your home directory and make extracted yvm.sh executable

unzip yvm.zip -d $HOME/.yvm
chmod a+x $HOME/.yvm/yvm.sh

Finally, add the following lines to your $HOME/.zshrc or $HOME/.bashrc, depending on the shell you use

export YVM_DIR=/home/joe_user/.yvm
[ -r $YVM_DIR/yvm.sh ] && source $YVM_DIR/yvm.sh

Upgrade

To upgrade yvm to the lastes version either install as normal, or run

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>

To get the latest version of Yarn, run:

yvm install --latest

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

Removing

To remove yvm simply execute

rm -rf $YVM_DIR

Next, edit $HOME/.bashrc and $HOME/.zshrc and remove those lines:

export YVM_DIR=/home/joe_user/.yvm
[ -r $YVM_DIR/yvm.sh ] && source $YVM_DIR/yvm.sh

In case you had older version of yvm installed, there could also be a line like

source /home/joe_user/.yvm/yvm.sh

or those lines could be in $HOME/.bash_profile instead of $HOME/.bashrc.

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, update when you make changes, and automatically source yvm.sh. Make sure to only run this in the root yvm directory. It will fail elsewhere.
  5. 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

πŸ“–

Yash Shah

πŸ’»

WacΕ‚aw Schiller

πŸ’»

yvm-bot

πŸš‡

Emmanuel Ogbizi

πŸ’» ⚠️

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 82.2%
  • Shell 9.8%
  • Makefile 5.9%
  • CSS 1.5%
  • HTML 0.6%