All Projects โ†’ tophat โ†’ Yvm

tophat / Yvm

Licence: apache-2.0
๐Ÿงถ Manage multiple versions of Yarn

Programming Languages

javascript
184084 projects - #8 most used programming language
es6
455 projects

Projects that are alternatives of or similar to Yvm

Bolt
โšก๏ธ Super-powered JavaScript project management
Stars: โœญ 2,134 (+705.28%)
Mutual labels:  npm, yarn
Greenkeeper Lockfile
๐Ÿ”’ Your lockfile, up to date, all the time
Stars: โœญ 181 (-31.7%)
Mutual labels:  npm, yarn
Script Progress
Estimate script execution time
Stars: โœญ 175 (-33.96%)
Mutual labels:  npm, yarn
Defu
Assign default properties, recursively. ๐ŸŒŠ
Stars: โœญ 161 (-39.25%)
Mutual labels:  npm, yarn
Ngx Smart Modal
Modal/Dialog component crafted for Angular
Stars: โœญ 256 (-3.4%)
Mutual labels:  npm, yarn
Pinst
๐Ÿบ dev only postinstall hooks (package.json)
Stars: โœญ 162 (-38.87%)
Mutual labels:  npm, yarn
Ni
๐Ÿ’ก Use the right package manager
Stars: โœญ 179 (-32.45%)
Mutual labels:  npm, yarn
Klap
zero config, zero dependency bundler for tiny javascript packages
Stars: โœญ 143 (-46.04%)
Mutual labels:  npm, yarn
Corepack
Zero-runtime-dependency package acting as bridge between Node projects and their package managers
Stars: โœญ 196 (-26.04%)
Mutual labels:  npm, yarn
Cheat Sheets
Cheat Sheets ๐Ÿญ๐Ÿค–๐Ÿ‘€
Stars: โœญ 185 (-30.19%)
Mutual labels:  npm, yarn
Sass Recipes
Sass things that I do all the time or should remember to do because googling tutorials gets old
Stars: โœญ 156 (-41.13%)
Mutual labels:  npm, yarn
Npx card
use npx anmol to connect with me
Stars: โœญ 377 (+42.26%)
Mutual labels:  opensource, npm
Tbify
ไฝฟ็”จๆท˜ๅฎ้•œๅƒ่ฟ่กŒๅ‘ฝไปค: tbify [nvm|npm|npx|yarn|pnpm|...]
Stars: โœญ 153 (-42.26%)
Mutual labels:  npm, yarn
React D3 Speedometer
โœจ โš›๏ธ React Speedometer component using d3.js ๐ŸŒˆ ๐ŸŽจ
Stars: โœญ 162 (-38.87%)
Mutual labels:  npm, yarn
Verdaccio
๐Ÿ“ฆ๐Ÿ” A lightweight Node.js private proxy registry
Stars: โœญ 12,667 (+4680%)
Mutual labels:  npm, yarn
Yarnhook
Run `yarn install`, `npm install` or `pnpm install` on git hooks automatically
Stars: โœญ 177 (-33.21%)
Mutual labels:  npm, yarn
Foxy
A fast, reliable, and secure NPM/Yarn bridge for Composer
Stars: โœญ 137 (-48.3%)
Mutual labels:  npm, yarn
Yerna
A Lerna-like tool for managing Javascript monorepos using Yarn
Stars: โœญ 140 (-47.17%)
Mutual labels:  npm, yarn
Atom Autocomplete Module Import
โš›๏ธ Search & install npm packages from import/require statements.
Stars: โœญ 182 (-31.32%)
Mutual labels:  npm, yarn
Yalc
Work with yarn/npm packages locally like a boss.
Stars: โœญ 3,155 (+1090.57%)
Mutual labels:  npm, yarn

Yarn Version Manager (yvm)

Logo

YVM Latest Version Minimum Node Version Builds codecov semantic-release Dependencies Dependabot All Contributors Discord Maturity badge - level 3 Pull Reminders

Overview

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

YVM will automatically use the correct yarn version when you run any yarn commands in any folder with a package.json, .yvmrc or any other supported configuration 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: >=10.0.0

Homebrew

Installs the latest stable version.

brew install tophat/bar/yvm --without-node

NOTE: Remove the flag --without-node to install with the node dependency.

Windows

TODO: #435

Node

Execute the following in your terminal:

curl -s https://raw.githubusercontent.com/tophat/yvm/master/scripts/install.js | node

Or to install a specific version:

curl -s https://raw.githubusercontent.com/tophat/yvm/v3.2.1/scripts/install.js | INSTALL_VERSION="v3.2.1" node

Script

Some older versions of yvm do not have the node installer enabled. If so the shell script installer can be used.

curl -s https://raw.githubusercontent.com/tophat/yvm/v2.4.3/scripts/install.sh | INSTALL_VERSION="v2.4.3" bash

Manual

Navigate to yvm releases and download the yvm.js file for the latest release into your desired yvm install directory.

Typically .yvm your home directory, then run the following command to configure your shell.

node ./home/joe_user/.yvm/yvm.js configure-shell

You will need to reload the shell to get yvm, or source the generated yvm.{sh,fish} scripts.

Upgrade

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

yvm update-self

Usage

Automagic

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

Yarn is shimmed to use the default version or the version defined your current directory config file.

yarn --version

Basic

To download and install a specific 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:

yvm use <version>
yarn --version

NOTE: The above disables yarn shimming until a new shell is loaded.

Control version aliasing:

yvm alias stable
# stable โ†’ 1.13.0 (1.13.0)

yvm alias default stable
# default โ†’ stable (1.13.0)

yvm alias
# default โ†’ stable (1.13.0)
# latest โ†’ 1.14.0 (1.14.0)
# stable โ†’ 1.13.0 (1.13.0)
# system โ†’ 1.13.0 (1.13.0)

yvm alias default '^1.7'
# default โ†’ ^1.7 (1.14.0)

Show path to version used:

yvm which

List installed yarn versions:

yvm list

Full list of available commands:

yvm --help

Configuration file

Yvm defaults to using the yarn version in your package.json engines. Otherwise 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 config file if no version number is supplied to the command. You can also declare the version using other configuration files

Custom Bootstrapping

When using yvm exec, the appropriate yarn version is executed using the node available in the current context. This can be explicitly specified using the YVM_BOOTSTRAP_EXEC_PATH environment variable.

Example: if you are using nvm, you can avoid having to execute nvm use before using yvm exec:

export YVM_BOOTSTRAP_EXEC_PATH=~/.nvm/nvm-exec
yvm exec my-command

You can set this environment variable globally in your preferred shell's setup script (e.g. bashrc/zshrc).

The script referenced via the exec path must be executable. It receives the yarn executable as its first argument, and should forward the remaining arguments to yarn.

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 ] && . $YVM_DIR/yvm.sh

Remove in $HOME/.config/fish/config.fish for fishers:

set -x YVM_DIR /home/joe_user/.yvm
[ -r $YVM_DIR/yvm.fish ]; and source $YVM_DIR/yvm.fish

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.

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. 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>

Technologies to Familiarize Yourself with

Contributors

Thanks goes to these wonderful people (emoji key):


Francois Campbell

๐Ÿ’ป
๐Ÿš‡
Brandon Baksh

๐Ÿ’ป

Milan Milojic

๐Ÿ’ป

Umar Ahmed

๐Ÿ’ป

Nicholas Dujay

๐Ÿ’ป

Aser Eldamaty

๐Ÿ’ป

Michael Rose

๐Ÿ’ป

Sanchit Gera

๐Ÿ“–

sdcosta

๐Ÿ“–
๐Ÿš‡ ๐Ÿš‡
Jay Crumb

๐Ÿ“–

Michael Lunรธe

๐Ÿ“–

Yash Shah

๐Ÿ’ป

Wacล‚aw Schiller

๐Ÿ’ป
๐Ÿš‡
Emmanuel Ogbizi

๐Ÿ’ป โš ๏ธ ๐Ÿ“–

Martin Lai

๐Ÿ’ป

Marc Cataford

๐Ÿ’ป

Ahmed Elkady

๐Ÿ‘€
๐Ÿš‡
Derek Delaney

๐Ÿ“–
๐Ÿš‡
allcontributors[bot]

๐Ÿ“–

Umar Ahmed

๐Ÿ›
๐Ÿ“†
Josh Dean

๐Ÿ“–
๐Ÿš‡ ๐Ÿ”ง ๐Ÿ’ป

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

Credits

Thanks to Carol Skelly for donating the github organization!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].