Monorepos
Depfu fully supports monorepos and package.json/Gemfiles in non-root paths.
Auto-Detection
When you enable a repo in Depfu, we first try to find a Gemfile/package.json in your root folder. If there is none, we iterate through your subfolders and see if we can find any relevant files there. We create what we call a “project” for each of the folders we find dependency files in.
By default, we only activate the first of these projects/folders we find and start sending you pull requests. The other projects you’ll have to activate yourself in the Depfu UI. This is to make sure it’s a folder you actually want to get dependency updates for and not just random test files.
We are only looking one level deep in this step. But if we don’t find a folder you’ll want Depfu to run on, you can just add it manually.
Adding Folders
If you’re creating new folders in your monorepo or have an existing repo where we didn’t do the auto-detection, you can add a folder yourself. Just click the “+ Add” button and select the folders you want to enable in Depfu.
The Pull Requests
Wen you're using a monorepos, the pull requests will look a bit different
- Indicate the folder in the branch name: Branches have to be unique, so we’re including the name of the folder in the branch name to make sure it doesn’t clash with the exact same update in another folder.
- Indicate the folder in the PR title: To also visually differentiate the PRs from each other when you look at your list of PRs, we prefix them with the name of the folder.
You can additionally configure Depfu to use a unique label for each project.
The PR limit
The Depfu Scheduler makes sure we don’t open more than 7 PRs at the same time to not flood your list of PRs with only dependency updates. In the case of monorepos we wanted to make sure you get updates for each of your folders all the time, so we decided to do a PR limit of 3 per folder.
That means depending on the amount of folders you have, your monorepo can get a lot more than 7 PRs from Depfu. For example, you would get a maximum of 30 PRs from us if you had 10 folders in your monorepo.