Greenkeeper: Always up-to-date npm dependencies
greenkeeper.io
greenkeeper.io
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.
All Greenkeeper does is send you a Pull Request, which then runs your test. Only when you as the maintainer are satisfied this works, you get to merge the PR.
We have another project https://github.com/semantic-release/semantic-release that you can use to make sure your project leaves semver to computers and keeps humans out of the process, because they tend to screw this up.
With both Greenkeeper and semantic-release, we hope to get npm into shape that we, one day, can do more automated updates and it’s gonna be a long road, but we’ll have to start somewhere.
For now, Greenkeeper takes a lot of the chores out of the process you described to well in your comment.
This is actually golden. When you do this for Rubygems. I will be the first paying customer.
Let computers do the chores for us :)
- check Gemnasium
- bump the gem locally and push to branch to GitHub
- find the changelog for the change (or a diff link) and paste create a PR with that as the description
- merge and deploy if our test pass and the changelog looks OK
Everything except the final step should definitely be automated. I can totally see how doing the same across many repos and sharing aggregated information could make the final step a lot easier, too.
Psyched to see you guys expand.
But, apparently you are magical. ;-) What can you tell us about your planned approach to automating this? Seems like a massive undertaking.
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.
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.
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).
npm install --save --save-exactWe’re super happy for any feedback :)