I have a package and I want to downgrade the version use. How can I do this with yarn "dependencies"?
This is a command line utility program to upgrade all the packages in your package. json to the latest version (potentially upgrading packages across major versions).
Running yarn upgrade without any modifiers does not update package. json . If we run yarn upgrade without any flags, it will install the latest version that matches the version pattern indicated by package. json .
Yarn version | Command | Example |
---|---|---|
1 | yarn upgrade package@version |
yarn upgrade luxon@^3.0.1 |
2, 3 | yarn up package@version |
yarn up luxon@^3.0.1 |
yarn -v
to check your Yarn version.upgrade
, it can be used for downgrading too.This is the official documentation https://classic.yarnpkg.com/en/docs/cli/upgrade There is no keyword for downgrading to a specific version.you have to use the upgrade keyword for both
yarn upgrade package@version
For example
yarn upgrade @types/express-session@^1.15.16
You can upgrade/downgrade a package interactively like so:
yarn upgrade my_package@^
This will produce an interactive list of available versions for the package for you to choose from. Like so:
Couldn't find any versions for "my_package" that matches "^"
? Please choose a version of "my_package" from this list: (Use arrow keys)
❯ 0.10.1
0.10.0
0.9.3
0.9.2
0.9.1
0.9.0
0.8.2
0.8.0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With