To update each dependency in package.json to the latest version with Yarn and JavaScript, we run yarn upgrade.
For instance, we run
yarn upgrade <package-name> --latest
to upgrade the package with yarn upgrade to the latest version with the --latest flag.