yarn upgrade a package code example
Example 1: update yarn
# Windows
choco upgrade yarn
# MacOS
brew upgrade yarn
Example 2: how to upgrade package yarn global
yarn global add <package>@latest
# Windows
choco upgrade yarn
# MacOS
brew upgrade yarn
yarn global add <package>@latest