Reputation: 374
My question is: how do I update both the module(s) and "package.json" simultaneously?
Upvotes: 1
Views: 62
Reputation: 74670
If you have a package to update you can install a specific version with npm (instead of update)
npm install --save-exact [email protected]
Yarn also supports this for add
/upgrade
without the extra option.
yarn upgrade [email protected]
It's unwieldy for large updates though, see Raphael's answer
Upvotes: 1
Reputation: 2175
Consider using npm-check-updates.
At first I didn't want to install something for this basic task but npm
lacks this "basic" option
Upvotes: 1