Read npm/npm#6247 <https://github.com/npm/npm/issues/6247> for information on why using npm update is generally a bad idea. As should be clear, the npm CLI team intends to fix its issues sometime in the near to medium term.
Until then, I put together a small script <https://gist.github.com/othiym23/4ac31155da23962afd0e> that allows you to update all your global packages; it shouldn’t be very difficult to adapt for use on a per-application basis. F On Thu, Dec 11, 2014 at 3:27 PM, Jimb Esser <[email protected]> wrote: > So, for one of our projects, we've moved to having a bunch of npm modules > on an internal registry for various sub-parts of our projects and we're > running into some trouble that seems like it would generally be an issue. > Our primary package.json has a bunch of explicit version number > dependencies (3rd party modules that we don't want changing out from under > us unknowingly), and a bunch of ~version dependencies (mostly for internal > packages which are updated daily). > > So, the problem is, now after every "git pull", we need to do an "npm > update" to get all of the related module changes, but "npm update" is > really slow, as it appears to re-download and re-install *every* package, > not just those that have updated versions available. "npm install" is fast > (and is what we were used to doing), and that updates all of the packages > for which we explicitly bumped the version number, but doesn't update > packages with the ~version number dependencies that have had a new version > published recently. I saw there's an "npm outdated" command which, very > quickly, tells us exactly which packages would actually need to get > updated, but I cannot find any npm command that will just update what needs > to be updated without spending lots of time re-downloading/building/etc all > of our "static" dependencies. > > I did put together this, uh, simple command to do what we need > efficiently, but it seems like there should be a better way (within npm)! > npm outdated --parseable | cut -f 2-3 -d : | grep -ve "^\(.*\):\\1$" | cut > -f 1 -d @ | xargs npm update > > -- > Job board: http://jobs.nodejs.org/ > New group rules: > https://gist.github.com/othiym23/9886289#file-moderation-policy-md > Old group rules: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/nodejs/71d4d5fb-61e6-4d72-9f84-2a09258293a7%40googlegroups.com > <https://groups.google.com/d/msgid/nodejs/71d4d5fb-61e6-4d72-9f84-2a09258293a7%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/CAHG3qKqo_duD3qQ0Gy7HpyW3SiEgLwkiaDP9xLKKeQ5OL7iBUQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
