Yarn: Add "-N, --next" feature to "yarn upgrade"

Created on 17 Jun 2018  路  2Comments  路  Source: yarnpkg/yarn

Do you want to request a feature or report a bug?

Feature.

What is the current behavior?
Families of packages like Gatsby all use the same versioning, and v2 is currently unstable. The flag --latest updates dependencies to the next stable version, but what I want is to upgrade all Gatsby dependencies to @next, my proposal is this:

yarn upgrade --pattern gatsby --next

Is there a way to do something like this?

Please mention your node.js, yarn and operating system version.

Node: 10.1.0
Yarn: 1.7.0
macOS: 10.13.5
cat-feature

Most helpful comment

It'd be interesting to further expand this to specify the version separately, like

yarn upgrade --pattern gatsby --version 1.2.3
yarn upgrade --pattern gatsby --version next

so you could specify a specific version for a pattern of packages.

All 2 comments

It'd be interesting to further expand this to specify the version separately, like

yarn upgrade --pattern gatsby --version 1.2.3
yarn upgrade --pattern gatsby --version next

so you could specify a specific version for a pattern of packages.

Good feature, would also be really useful for upgrading all the @angular packages at once to a specific version. Currently I always search & replace in the package.json

Was this page helpful?
0 / 5 - 0 ratings