Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No easy way to upgrade nested dependencies #6633

Open
aqeelat opened this issue Dec 17, 2024 · 0 comments
Open

No easy way to upgrade nested dependencies #6633

aqeelat opened this issue Dec 17, 2024 · 0 comments

Comments

@aqeelat
Copy link
Contributor

aqeelat commented Dec 17, 2024

Let's say that some time ago, I installed a package (for example: @hookform/devtools@npm:^4.3.1).
The package has a couple of dependencies using a semver range. The entry in lockfile is:

"@hookform/devtools@npm:^4.3.1":
  version: 4.3.1
  resolution: "@hookform/devtools@npm:4.3.1"
  dependencies:
    "@emotion/react": "npm:^11.1.5"
    "@emotion/styled": "npm:^11.3.0"
    "@types/lodash": "npm:^4.14.168"
    little-state-machine: "npm:^4.1.0"
    lodash: "npm:^4.17.21"
    react-simple-animate: "npm:^3.3.12"
    use-deep-compare-effect: "npm:^1.8.1"
    uuid: "npm:^8.3.2"
  peerDependencies:
    react: ^16.8.0 || ^17 || ^18
    react-dom: ^16.8.0 || ^17 || ^18
  checksum: 10c0/4155e4c5da69b397e7a0aea9c674def5cb92e9d21f420be6cbb32d3c893a239e890d3a17f8a31fb194493696230806f8d77b8b2be1b7a9c797a3f89477c3c9f5
  languageName: node
  linkType: hard

A few hours ago, that package released a new version. The nested packages (little-state-machine and react-simple-animate) also release new versions.

I ran yarn upgrade-interactive and selected the package to be upgraded. However, yarn did not upgrade the nested packages because the parent package did not change the semver constraints for them as the upgrades are also covered in the same range.

I ran yarn up, yarn up -R, yarn up * -R, and yarn up @hookform/devtools -R and they weren't picked up.
The were only upgraded when I ran yarn up react-simple-animate little-state-machine -R

I know that deleting the lockfile is a solution. I just tried that and the diff was longer than my parent's disappointment in me and I'm scared to look at it.
Is it the recommended approach? Or is there a way to gradually do it? Such than when we run upgrade interactive, we run it recursively?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant