Live data from Hacker News

Greenkeeper: Always up-to-date npm dependencies

greenkeeper.io

1–10 of 22 posts

Re: Greenkeeper: Always up-to-date npm dependencies

#2
This has been my primary annoyance working in node.js, dependencies automatically updating and breaking our code.

So far everyone has convinced me away from committing node_modules to the repo or doing an npm shrinkwrap, but I would love seeing a future with more people pinning dependencies and using this to update.

Re: Greenkeeper: Always up-to-date npm dependencies

#3

This has been my primary annoyance working in node.js, dependencies automatically updating and breaking our code. So far everyone has convinced me away from committing node_modules to the repo or doing an npm shrinkwrap, but I would love seeing a future with more people pinning dependencies and using this to update.

If you have sufficient test coverage and a proper merging and deployment flow then package upgrades that break your code will be caught, and you'll have a chance to adjust your code in response to the package changes.

The one minor issue I've still had with automatic dependency upgrades is the extremely rare case where a package maintainer actually pushes a broken package version. In those cases our tests catch it but I have to temporarily pin that specific package on the previous version until the maintainer is able to deprecate the broken package version and push a new one.

Re: Greenkeeper: Always up-to-date npm dependencies

#4
post #3

This has been my primary annoyance working in node.js, dependencies automatically updating and breaking our code. So far everyone has convinced me away from committing node_modules to the repo or doing an npm shrinkwrap, but I would love seeing a future with more people pinning dependencies and using this to update.

If you have sufficient test coverage and a proper merging and deployment flow then package upgrades that break your code will be caught, and you'll have a chance to adjust your code in response to the package changes. The one minor issue I've still had with automatic dependency upgrades is the extremely rare case where a package maintainer actually pushes a broken package version. In those cases our tests catch it bu…

The problem here is with your downstream users, an `npm install` two months after your release might install a broken sep for your end user and create a support request for you. This is a bad situation to be in if you are doing this for Open Source projects on volunteer time :)

Re: Greenkeeper: Always up-to-date npm dependencies

#5

This has been my primary annoyance working in node.js, dependencies automatically updating and breaking our code. So far everyone has convinced me away from committing node_modules to the repo or doing an npm shrinkwrap, but I would love seeing a future with more people pinning dependencies and using this to update.

Our hope with Greenkeeper is to get all of npm on it, so we all get to benefit from it.

In addition, we could do things like pro-active issue-opening. Say Underscore releases a new version and Ember uses it, gets a Greenkeeper dependency bump, and we see its Travis fails, we can open an issue on Underscore to say they broke Ember (all opt-in, of course).

Re: Greenkeeper: Always up-to-date npm dependencies

#6
Greenkeeper dev here, Another fun thing we can do with this is, say Node 5.0 comes out, we send a PR for everybody’s .travis.yml, to also test against 5.0 and see if a package is still compatible. And all that with without the maintainers having to install the new Node version, or fearing they screw up the dev environment.

Let computers do the chores for us :)

Re: Greenkeeper: Always up-to-date npm dependencies

#7

This has been my primary annoyance working in node.js, dependencies automatically updating and breaking our code. So far everyone has convinced me away from committing node_modules to the repo or doing an npm shrinkwrap, but I would love seeing a future with more people pinning dependencies and using this to update.

You want this:

  npm install --save --save-exact

Re: Greenkeeper: Always up-to-date npm dependencies

#8
Here's my 2 cents coming from experience with Rubygems (and my minimal experience with Node).

You simply cannot auto upgrade dependencies. Period. On an application running in production with development spanning over a couple of months this will break a lot of stuff.

For that to happen, all package developers have to follow semantic versioning and make sure they never break API with minor updates, but that's hard to achieve when you have so many developers.

Updating packages is unfortunately a manual process that you have to go through, you have to pin, upgrade, run tests, rinse and repeat.

I would love a notification when an upgrade is available, whenever a package is released, that'd be good, but still, the upgrade process on my side would be manual.

Re: Greenkeeper: Always up-to-date npm dependencies

#10
post #3

This has been my primary annoyance working in node.js, dependencies automatically updating and breaking our code. So far everyone has convinced me away from committing node_modules to the repo or doing an npm shrinkwrap, but I would love seeing a future with more people pinning dependencies and using this to update.

If you have sufficient test coverage and a proper merging and deployment flow then package upgrades that break your code will be caught, and you'll have a chance to adjust your code in response to the package changes. The one minor issue I've still had with automatic dependency upgrades is the extremely rare case where a package maintainer actually pushes a broken package version. In those cases our tests catch it bu…

I am talking about the situation where our tests catch the breakage, however rebasing does not work in this situation, with deeply nested dependencies it can be quite hard to figure out which update broke our library.
Post reply on HN