Yarn: Need to update yarn upgrade Doc pages

Created on 13 Jun 2018  路  3Comments  路  Source: yarnpkg/yarn

https://github.com/yarnpkg/yarn/issues/1458#issuecomment-397097249

I noticed a long thread where people are having issues using yarn upgrade --dev [package]. deDependencies are not upgradable at this time and it was mentioned that by using yarn add instead of yarn upgrade upgrades the package, so there is no need to have yarn upgrade as a command anymore and this should be referenced on the Docs portion of the website to allow for clearer communications.

Here are the two pages needing updating to reflect the above issues:

node v9.11.1
yarn v1.7.0
macOS High Sierra 10.13.5 (17F77)
cat-documentation

Most helpful comment

Sounds more like a bug than intentional then 馃槥

All 3 comments

devDependencies are upgradable, but there is an incorrect warning that is printed.

upgrade and add are very similar (upgrade actually calls add internally) but upgrade by default respects your semver range. It also will upgrade all outdated dependencies, which add has no way of doing unless you list each one individually with it's semver range as parameters.

The docs under the --latest flag states "The package.json file will be updated to reflect the latest version range" but the normal command doesn't say that. It would be beneficial to explicitly state that it is not changed.

If you would like to propose some updates to the docs, please feel free to submit a PR to the https://github.com/yarnpkg/website repo

@rally25rsupgrade does not seem to be working for me when I go to upgrade yarn wants to place the dependency upgrade as a "dependency" instead of a "devDependency" and issues a warning. Then it actually does not upgrade the package.

But add worked perfectly.

Sounds more like a bug than intentional then 馃槥

Was this page helpful?
0 / 5 - 0 ratings