In other words, I want something like npm install --save foo
...but I only want it to update my package.json (adding the name and latest version number to my dependencies), and I want it to skip the actual installation into node_modules. Is this possible?
I tried --dry-run
and this does skip the installation but it also skips updating package.json :/
(Yes, I could just edit the package.json manually, but I want to do this for about 30 dependencies at once, so I want to make use of npm's ability to automatically look up the latest version number for each one.)