We’ve been on a quest lately: How can we reduce the amount of PRs Depfu creates, while still keeping your app up-to-date?

One of the more obvious avenues to explore is grouping updates together. While we are still convinced individual PRs are easier to assess and to merge, there are a few situations where grouping makes sense.

The first one I want to talk about is monorepo libraries.

JavaScript vs Ruby

In the JavaScript ecosystem it’s quite common to have many smaller packages, all coming from a single monorepo. Some prominent examples are React and Babel. These frameworks are split up into several individual packages, but they’re always getting released at the same time and with the same version number. You would always update react and react-dom at the same time, so getting individual PRs for each of them from Depfu is not only more noise than necessary, it’s pretty much just wrong.

In Ruby there is less of a need for this, since it’s mostly handled with subdependencies. Even though Rails also gets developed in a monorepo, in most cases you would only have the top-level dependency rails defined in your Gemfile and all subdependencies get updated together when a new version of Rails is released.

Making a list

So we looked at how we can make this work better for JavaScript and there is really no other way than to manually curate a list of packages that belong together. Luckily our friends from Greenkeeper already started that list and open-sourced it.

So when we encounter a new release from one of these packages, we check if the same exact version got released for the other packages from the same monorepo as well. If yes, we group them together into a single PR, that will update all packages you’re using from that group.

The result

Maybe you’ve already seen one of these new group update PRs, as we’ve released this a few weeks ago:

We hope these changes make Depfu more useful for you when using packages coming from monorepos and reduce the amount of PRs just a little bit. If you have any questions, ideas or feedback about this: Let us know on Twitter or via email.