upgrade yarn version code example
Example 1: install yarn
npm install -g yarn
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: upgrade node via yarn
$ npm i -g yarn
$ yarn global add yarn
$ npm rm -g yarn
Example 5: pick yarn version
yarn policies set-version