yarn update pachage code example
Example 1: add dev dependency yarn
yarn add -D package
//or
yarn add --dev package
Example 2: how to upgrade package yarn global
yarn global add <package>@latest
yarn add -D package
//or
yarn add --dev package
yarn global add <package>@latest