yarn
yarn copied to clipboard
yarn upgradeInteractive --latest not showing latest package(s)
Do you want to request a feature or report a bug? bug
What is the current behavior?
yarn upgradeInteractive --latest
doesn't seem to show the latest package versions, or I'm missing out something? For example, "react": "^16.6.3",
in package.json
, while [email protected]
is already available?
I was able to successfully use the command some hours before to update some really old packages. I also tried to delete the node_modules
directory incl. yarn.lock
file, which unfortunately didn't help to resolve this issue.
$ yarn upgradeInteractive --latest
yarn upgradeInteractive v1.12.3
success All of your dependencies are up to date.
Done in 0.56s.
If the current behavior is a bug, please provide the steps to reproduce.
Please see above.
What is the expected behavior?
I would expect it to offer an upgrade to [email protected]
which can be added separately.
Please mention your node.js, yarn and operating system version.
Node.js: 8.11.3
Yarn: 1.12.3
OS: Windows 10
Are you able to share your package.json
and yarn.lock
files? It would help in being able to reproduce this issue.
Note also that if 16.7.0 is already installed in node_modules
then yarn upgrade
won't offer an update, because latest is already installed.
Based on the lock file, I would guess that 16.7.0
is the currently installed version?, but it's not getting updated in package.json
afterward. What would be the correct way (if not with this command) to update it to the latest version number in there as well?
yarn upgrade
outputs the following:
$ yarn upgrade
yarn upgrade v1.12.3
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Rebuilding all packages...
While yarn upgradeInteractive
says:
$ yarn upgradeInteractive
yarn upgradeInteractive v1.12.3
success All of your dependencies are up to date.
Done in 0.26s.
success Saved lockfile.
success Saved 4 new dependencies.
info Direct dependencies
└─ [email protected]
info All dependencies
├─ [email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
Done in 0.49s.
package.json
"dependencies": {
"react": "^16.6.3"
}
yarn.lock
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"js-tokens@^3.0.0 || ^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
loose-envify@^1.1.0, loose-envify@^1.3.1:
version "1.4.0"
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
dependencies:
js-tokens "^3.0.0 || ^4.0.0"
object-assign@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=
prop-types@^15.6.2:
version "15.6.2"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.2.tgz#05d5ca77b4453e985d60fc7ff8c859094a497102"
integrity sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==
dependencies:
loose-envify "^1.3.1"
object-assign "^4.1.1"
react@^16.6.3:
version "16.7.0"
resolved "https://registry.yarnpkg.com/react/-/react-16.7.0.tgz#b674ec396b0a5715873b350446f7ea0802ab6381"
integrity sha512-StCz3QY8lxTb5cl2HJxjwLFOXPIFQp+p+hxQfc8WE0QiLfCtIlKj8/+5tjjKm8uSTlAW+fCPaavGFS06V9Ar3A==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.2"
scheduler "^0.12.0"
scheduler@^0.12.0:
version "0.12.0"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.12.0.tgz#8ab17699939c0aedc5a196a657743c496538647b"
integrity sha512-t7MBR28Akcp4Jm+QoR63XgAi9YgCUmgvDHqf5otgAj4QvdoBE4ImCX0ffehefePPG+aitiYHp0g/mW6s4Tp+dw==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"
Ah, right, this is sort of a known issue. What happens is that the first step that yarn upgrade
does is to find any outdated packages versus what is installed (same as running yarn outdated
)
If finds nothing outdated (16.7.0 is latest, and that is what is installed) so it exits.
The code never progresses to the point where it would update the package.json
reference.
If an older version was still installed, then it would find an outdated package and move on to the modification of pacakge.json
and yarn.lock
. (it's basically just exiting early because there are no out of date packages).
I think there is an open issue for this case somewhere, but I can't find it at the moment, so I'll tag this issue as a bug.
Hi, I will try to fix it :)
Here's what I found:
Fail:
yarn upgrade-interactive --latest
yarn upgrade-interactive -L
yarn -L upgrade-interactive
Success:
yarn --latest upgrade-interactive
I use yarn workspaces.
https://github.com/yarnpkg/yarn/issues/4390 this BUG exists still in today, I have to change the package.json by myself
Still an issue.
Using yarn upgrade-interactive --latest
in my project:
yarn upgrade-interactive v1.22.10
success All of your dependencies are up to date.
Done in 3.20s.
Using ncu
in my project:
Using yarn
Checking /home/vavra/Projects/shepherd/package.json
[====================] 11/11 100%
@typescript-eslint/eslint-plugin ^4.19.0 → ^4.23.0
@typescript-eslint/parser ^4.19.0 → ^4.23.0
eslint ^7.23.0 → ^7.26.0
eslint-plugin-prettier ^3.3.0 → ^3.4.0
eslint-plugin-react ^7.23.1 → ^7.23.2
prettier ^2.2.1 → ^2.3.0
typescript ^4.2.3 → ^4.2.4
Run ncu -u to upgrade package.json
I recommend using npm-check-updates until this is fixed.
Is this issue still open? Can I pick this up?
Do you want to request a feature or report a bug? bug
What is the current behavior?
yarn upgradeInteractive --latest
doesn't seem to show the latest package versions, or I'm missing out something? For example,"react": "^16.6.3",
inpackage.json
, while[email protected]
is already available?I was able to successfully use the command some hours before to update some really old packages. I also tried to delete the
node_modules
directory incl.yarn.lock
file, which unfortunately didn't help to resolve this issue.$ yarn upgradeInteractive --latest yarn upgradeInteractive v1.12.3 success All of your dependencies are up to date. Done in 0.56s.
If the current behavior is a bug, please provide the steps to reproduce.
Please see above.
What is the expected behavior? I would expect it to offer an upgrade to
[email protected]
which can be added separately.Please mention your node.js, yarn and operating system version. Node.js:
8.11.3
Yarn:1.12.3
OS:Windows 10
#6852