upgrade package with yarn code example
Example 1: upgrade node via yarn
$ npm i -g yarn
$ yarn global add yarn
$ npm rm -g yarn
Example 2: how to upgrade package yarn global
yarn global add <package>@latest
$ npm i -g yarn
$ yarn global add yarn
$ npm rm -g yarn
yarn global add <package>@latest