yarn upgrade code example

Example 1: pip upgrade

python -m pip install --upgrade pip

Example 2: yarn update all dependencies to latest

yarn upgrade --latest

Example 3: update yarn

# Windows
choco upgrade yarn

# MacOS
brew upgrade yarn

Example 4: yarn update a specific package

yarn upgrade
yarn upgrade left-pad
yarn upgrade left-pad@^1.0.0
yarn upgrade left-pad grunt
yarn upgrade @angular

Example 5: upgrade node via yarn

$ npm i -g yarn
$ yarn global add yarn
$ npm rm -g yarn

Example 6: how to upgrade package yarn global

yarn global add <package>@latest