News for hackers. Stuff that matters.
Re:Node v8.1.2 by libertymcateer on Thursday June 15, 2017 @09:25AM (#14560124)
Now's as good a time as any to ask:

What tools do you folks use to monitor your node dependencies and make sure you are keeping everything up to date?

Re:Node v8.1.2 by ameesdotme on Thursday June 15, 2017 @09:39AM (#14560221)
I just regularly run `yarn upgrade-interactive` in my projects.

I was thinking of making dependency-updates part of the CI-pipeline, using a 'allow_failure'-flag. However, if you decide not to upgrade a dep for some reason, this will cause each and every build to throw a warning.

Re:Node v8.1.2 by Androider on Thursday June 15, 2017 @10:00AM (#14560412)
https://www.npmjs.com/package/npm-check-updates is a small command line utility that will report which dependencies are out of date, and can also upgrade your package.json from the CLI while maintaining your existing semantic versioning policies and ranges across an upgrade (instead of just bumping for every minor update).

Mostly I just really like the compact output, and the short "ncu" command which I run every day to check what's available :)

Re:Node v8.1.2 by workerIbe on Thursday June 15, 2017 @10:03AM (#14560453)
Definitely something to the addage "if it ain't broke don't fix it". Some of our less critical modules are set to latest others are updated with care. Our modules are not under source control so are refreshed on deployment. We use Snyk to monitor for vulnerabilities, works pretty well.
Re:Node v8.1.2 by allover on Thursday June 15, 2017 @10:31AM (#14560718)
Are you at least checking in your npm-shrinkwrap.json? (If not you've got pain waiting to happen, that you won't find out about until deploy time)!
Re:Node v8.1.2 by rubber_duck on Thursday June 15, 2017 @11:12AM (#14561100)
This so much - shrinkwrap before it bites you when a CI kicks off a deploy that fails because it pulled latest minor dep release that broke everything (happened even in big lib like Angular 2 for us after stable 2.2 !) while your local box is running fine with a cached older version.
Re:Node v8.1.2 by kevinmannix on Thursday June 15, 2017 @11:16AM (#14561153)
Yes. I've had an app break due to a dependency's dependency update. Was the night before a big product launch. Learned to rely on npm-shrinkwrap the hard way.
Re:Node v8.1.2 by djslakor on Thursday June 15, 2017 @09:33AM (#14560178)
npm outdated -l
Re:Node v8.1.2 by ronjouch on Thursday June 15, 2017 @09:37AM (#14560208)
But in addition to that, how do you "update all and bump relevant package.json entries, dependencies _and_ devDependencies as appropriate" ?

`npm update --save` or `npm update --save-dev` say explicitly "save updates to `dependencies` resp. `devDependencies`", which causes duplication between dependencies and devDependencies. (Say you have a dep foo and a devDep bar and both are outdated: `npm update --save` will bork package.json with an additional incorrect dep bar, and `npm update --save-dev` will bork it with an additional incorrect devDep foo :-/ )

Am I missing something? I understand there are 3rd-party packages providing such functionality, but is there any reason to not cover this feature in npm?

Re:Node v8.1.2 by Osiris on Thursday June 15, 2017 @11:17AM (#14561166)
I use npm-check-updates[1] which will update the package.json file with the latest versions of each dependency.

[1] https://www.npmjs.com/package/npm-check-updates

Re:Node v8.1.2 by ronjouch on Thursday June 15, 2017 @11:58AM (#14561572)
Yeah that's the package I meant with "3rd-party packages providing such functionality", thanks for pointing it out :) ! Was wondering if there was a reason other than "because no one developed it" for such a feature not being in npm core.