yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.4k stars 2.72k forks source link

Implement "yarn outdated --fix" to emulate npm-check-updates #3091

Open callumlocke opened 7 years ago

callumlocke commented 7 years ago

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

What is the current behavior?

yarn outdated prints a list of all your outdated dependencies, but it doesn't do anything about it.

What is the expected behavior?

Running yarn outdated --fix should not only print the outdated modules, but update your package.json so everything is set to its latest version. (Similar to npm-check-updates --upgradeAll.)

This functionality is currently provided by the npm-check-updates module, but that module is buggy and I think this functionality is important enough to do in yarn itself. It's evidently a very popular request.

levithomason commented 7 years ago

How about one of these?

yarn upgrade-interactive

This is similar to npm-check interactive update mode. It provides an easy way to update outdated packages.

yarn upgrade

This command updates all dependencies to their latest version based on the version range specified in the package.json file. The yarn.lock file will be recreated as well.

Golfenstein3D commented 7 years ago

yarn outdated follows the bad example of npm outdated and doesn't show any tildes or carats. That makes both of them useless liars (okay, maybe they don't lie, but they hide the truth), so it would be great if yarn outdated behaved more like ncu even if it doesn't include functionality like --upgradeAll.