How to Group Specific Directories in Renovate

Introduction

I implemented Renovate as an automated dependency update tool for a released library. However, I found it very inconvenient that update PRs were being created individually for the package.json files within the example directory, which was used for demo pages.

I wanted the example updates to be bundled into a single PR, so I documented how I addressed this issue.

Configuration Method

You can use the matchFileNames property in packageRules to specify patterns, such as example/**, to group directories.

{
  "packageRules": [
    {
      "matchFileNames": ["example/**"],
      "groupName": "example"
    }
  ]
}

With this configuration, dependency update PRs for the example directory were successfully grouped into one.

Conclusion

Renovate is very convenient, but the numerous configuration options make it hard to feel like I’m fully utilizing it.

Previous

Load Font Data from Local Files in Astro

Next

Display Markdown Links as Cards in Astro Blog

PR

Related Posts