Use a Robot to upgrade your Node dependencies

Chris House
SlackerNoon
Published in
3 min readMay 29, 2019

Background: I have an angular 7 application, that I wanted to automatically upgrade to the latest minor and patch version to the latest version. Angular is considered to be a monorepo which has many packages that all get upgraded at the same time.

my package.json

I also have many other non angular related npm packages that need to be updated to the latest version. Angular CLI has a nice upgrade command I can use to upgrade, but it doesnt upgrade other dependencies I have.

My code lives on github, and on github there are three (+) bots that can manage dependencies for you automatically.

I have tried Greenkeeper, Dependabot, and Renovate. At the time of writing this, Renovate has handled monorepo’s the best and appeared to have more features such as automatically closing pull requests once all tests passed and the code was merged.

In this example, you can see that it made a pull request and that my CI/CD process has passed.

The reason I let the robot auto-merge is because my test coverage is over 90%. I can set rules up to not allow this process to happen if it ever falls under 90%.

To Install on github, go to https://github.com/marketplace/renovate and sign up.

The result is I can now save time and reduce risk by automating dependency updates in software projects.

Here is the repo with full CI/CI proccess and renovate enable: https://github.com/crh225/angular-github-issues

Thanks!

How I set up my CI/CD process: https://blog.cloudboost.io/continuous-integration-for-angular-and-firebase-809507053058

How I sped up my CI/CD process: https://medium.com/@chrishouse/speed-up-ci-builds-with-npm-offline-cache-aa72a2bb63c5

--

--