Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upimpossible to update package without pulling in updates of all dependencies #5475
Comments
heupr
bot
assigned
rally25rs
Mar 7, 2018
heupr
bot
added
the
triaged
label
Mar 7, 2018
rsichny
changed the title from
impossible to update package without pulling in all dependencies
to
impossible to update package without pulling in updates of all dependencies
Mar 7, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rally25rs
Mar 9, 2018
Contributor
Can you use yarn update <packagename>? Docs are here: https://yarnpkg.com/en/docs/cli/upgrade
edit:
Oh wait, you want to upgrade <packagename> without upgrading all these?
bootstrap-sass "^3.3.7"
ember-bootstrap "^1.0.0"
ember-bootstrap-datetimepicker "^1.1.0"
ember-cli-babel "^5.1.7"
ember-cli-htmlbars "^1.3.4"
ember-cli-moment-shim "^3.5.0"
ember-cli-string-helpers "^1.5.0"
ember-component-css "^0.3.7"
ember-config-service "^0.1.5"
ember-font-awesome "^3.1.0"
ember-moment "^7.4.1"
ember-power-select "^1.10.4"
ember-sticky-element "0.1.3"
ember-truth-helpers "^2.0.0"
eonasdan-bootstrap-datetimepicker "^4.17.47"
Don't run yarn upgrade <packagename> then, because by popular community demand, it will update all the transitive deps (yarn v1.0 used to not, but a bunch of people opened issues saying it should upgrade transitive deps too).
Hmm, I wonder if that behavior changed then. It might be finding the version in the lockfile and using that locked version despite the --force flag.
|
Can you use edit: Oh wait, you want to upgrade
Don't run Hmm, I wonder if that behavior changed then. It might be finding the version in the lockfile and using that locked version despite the |
rally25rs
added
cat-bug
help wanted
good first issue
labels
Mar 9, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ajomadlabs
commented
Mar 9, 2018
|
Can I take up this issue |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rsichny
Mar 9, 2018
Oh wait, you want to upgrade without upgrading all these?
right, and i agree that yarn update should update them, but having no way to update <packagename> without updating its dependencies is bad.
Hmm, I wonder if that behavior changed then.
It definitely did. yarn add --force worked fine for us before 1.5.1.
rsichny
commented
Mar 9, 2018
•
right, and i agree that
It definitely did. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rsichny
Mar 9, 2018
Also, i'd say the most suitable solution would be an option for yarn update (like --prefer-locked-dependencies) which would only trigger the upgrade of transitive dependencies if it is really required.
rsichny
commented
Mar 9, 2018
|
Also, i'd say the most suitable solution would be an option for |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ruslan-polutsygan
Apr 12, 2018
Don't run yarn upgrade then ..
How can I upgrade only one package then?
ruslan-polutsygan
commented
Apr 12, 2018
How can I upgrade only one package then? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
felixfbecker
commented
Sep 10, 2018
atcase
referenced a pull request that will
close
this issue
Oct 2, 2018
Open
Add --prefer-locked-dependencies option to upgrade command #6471
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
atcase
Oct 2, 2018
I’ve opened PR #6471 which is my attempt to implement this. It worked for some rudimentary test cases I tried on my machine. I’d love to hear if this works for others too.
atcase
commented
Oct 2, 2018
|
I’ve opened PR #6471 which is my attempt to implement this. It worked for some rudimentary test cases I tried on my machine. I’d love to hear if this works for others too. |
rsichny commentedMar 7, 2018
•
edited
Do you want to request a feature or report a bug?
bug
What is the current behavior?
"<packagename>": "~4.6.0",dependency is defined<packagename>in repository (4.6.74)<packagename>is package.json file (with version bumped). Just one number, no other changes at all.There is no way to update
<packagename>from4.6.73to4.6.74without updating all its dependenciesWhat is the expected behavior?
With yarn 1.3.2 we could run
yarn add <packagename>@~4.6.0 --forceand the package would be updated correctly, in 1.5.1 this doesn't do anything. There's no other way of doing update like that (yarn updatepulls updates for other dependencies which is unacceptable).Please mention your node.js, yarn and operating system version.