yarn upgrade --latest | -L doesn't work

Created on 8 Apr 2019  ยท  7Comments  ยท  Source: yarnpkg/yarn

Example given: I'm on "react": "^16.8.0-alpha.1", current latest version is 16.8.6, yarn upgrade react -L doesn't do anything.

yarn v1.15.2

Edit: yarn upgrade react@latest works though.

Most helpful comment

Can testify; same issue as @butlersrepos. --latest doesn't work in Yarn Workspaces.

All 7 comments

Hi @desmap,

can you provide the commands and outputs that you have got?

I can not reproduce it.

```
mkdir yarn-react-test
โžœ projects cd yarn-react-test
โžœ yarn-react-test yarn init -y
yarn init v1.16.0
warning The yes flag has been set. This will automatically answer yes to all questions, which may have security implications.
success Saved package.json
โœจ Done in 0.04s.
โžœ yarn-react-test yarn add [email protected] --registry https://registry.npmjs.org
yarn add v1.16.0
info No lockfile found.
[1/4] ๐Ÿ” Resolving packages...
[2/4] ๐Ÿšš Fetching packages...
[3/4] ๐Ÿ”— Linking dependencies...
[4/4] ๐Ÿ”จ Building fresh packages...
success Saved lockfile.
success Saved 6 new dependencies.
info Direct dependencies
โ””โ”€ [email protected]
info All dependencies
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ””โ”€ [email protected]
โœจ Done in 0.70s.
โžœ yarn-react-test yarn upgrade-interactive --latest
yarn upgrade-interactive v1.16.0
info Color legend :
"" : Major Update backward-incompatible updates
"" : Minor Update backward-compatible features
"" : Patch Update backward-compatible bug fixes
? Choose which packages to update. (Press to select, to toggle all, to invert selection)
dependencies
name range from to url
โฏโ—ฏ react latest 16.8.0-alpha.1 โฏ 16.8.6
https://reactjs.org/

โžœ yarn-react-test yarn upgrade --latest
yarn upgrade v1.16.0
[1/4] ๐Ÿ” Resolving packages...
[2/4] ๐Ÿšš Fetching packages...
[3/4] ๐Ÿ”— Linking dependencies...
[4/4] ๐Ÿ”จ Rebuilding all packages...
success Saved lockfile.
success Saved 5 new dependencies.
info Direct dependencies
โ””โ”€ [email protected]
info All dependencies
...
โ”œโ”€ [email protected]
...
โœจ Done in 0.63s.

I've seen this same issue when working in a workspaces monorepo, yarn upgrade foo --latest does not update my nested package.json but yarn upgrade foo@latest does.

Can testify; same issue as @butlersrepos. --latest doesn't work in Yarn Workspaces.

@DanielRuf do you have any updates about this issue?

yarn upgrade --latest just stoped to upgrade package.json file.
You can reproduce it with this steps:

  1. yarn create react-app
  2. add "@material-ui/core": "^4.5.1" to your dependencies in package.json
  3. run yarn
  4. run yarn upgrade -L or yarn upgrade --latest
  5. check your package.json: @material-ui/core still ^4.5.1 version, but should be ^4.6.0+

yarn version is 1.19.1

any word on this bug? it certainly still seems to be a bug, yarn 1.22.4

This issue occurs in [email protected], regardless of monorepo and workspaces.
Until this issue is fixed, it is recommended to use npx npm-check-updates -u instead.

Or try yarn upgrade-interactive --latest.

Was this page helpful?
0 / 5 - 0 ratings