Open desmap opened 5 years ago
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 react@16.8.0-alpha.1 --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
└─ react@16.8.0-alpha.1
info All dependencies
├─ js-tokens@4.0.0
├─ loose-envify@1.4.0
├─ prop-types@15.7.2
├─ react-is@16.8.6
├─ react@16.8.0-alpha.1
└─ scheduler@0.13.6
✨ Done in 0.70s.
➜ yarn-react-test yarn upgrade-interactive --latest
yarn upgrade-interactive v1.16.0
info Color legend :
"<red>" : Major Update backward-incompatible updates
"<yellow>" : Minor Update backward-compatible features
"<green>" : Patch Update backward-compatible bug fixes
? Choose which packages to update. (Press <space> to select, <a> to toggle all, <i> 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
└─ react@16.8.6
info All dependencies
...
├─ react@16.8.6
...
✨ 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:
yarn create react-app
yarn
yarn upgrade -L
or yarn upgrade --latest
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 yarn@1.22.4
, 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
.
Example given: I'm on
"react": "^16.8.0-alpha.1"
, current latest version is16.8.6
,yarn upgrade react -L
doesn't do anything.yarn
v1.15.2
Edit:
yarn upgrade react@latest
works though.