This repo contain a set of Renovate Bot presets that modules in this organization can depend on.
The purpose of these presets is to be able to optimize the process of keeping dependencies up to date accross all modules in this organization while minimizing the amount of releases of each module in this organization caused by automatically bumping dependencies.
As an example lets say we have a set of modules using Renovate Bot and Semantic Release structured like so:
|-- @eik/module-a
| |-- 3rd-party-dependency
| |-- @eik/module-b
| | |-- 3rd-party-dependency
@eik/module-a
and @eik/module-b
depend on the same 3rd-party-dependency
.
@eik/module-a
is a public facing module that other modules can use as a dependency. @eik/module-b
is not a public facing module. Rather, it's an internal module which contains code that is only of interest to other modules within our organisation and it should never be used as a dependency by external modules.
If we were to use the default configuration from Renovate Bot the following would happen when we have Semantic Release in our setup and there is a new version of the 3rd-party-dependency
: @eik/module-a
would get a PR with an update of the 3rd-party-dependency
and when merged a new release of @eik/module-a
would be cut. Meanwhile @eik/module-b
would also get a PR with an update of the 3rd-party-dependency
and when merged a new release of @eik/module-b
would also be cut.
This release of @eik/module-b
would again create a new PR in @eik/module-a
and cause a new release of @eik/module-a
when merged.
In other words; Due to both @eik/module-a
and @eik/module-b
depending on 3rd-party-dependency
an update of 3rd-party-dependency
will cause two releases of @eik/module-a
which is not optimal.
To deal with problems such as that described in the introduction above we separate modules into two categories, top level modules and sub modules, where each category has slightly different groupings and dependency strategies.
In short; sub modules receive and merge dependencies as they arrive. Top level modules receive and merge dependencies on a less frequent schedule. This more or less removes the problem outlined above.
Top level modules are publicly facing modules. These are modules that other external modules and projects will use as a dependency.
Top level modules have their dependencies updated once a week.
To use the preset for top level modules within another module, add the following config to renovate.json
:
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>eik-lib/renovate-presets:top-level-module"
]
}
Sub modules are not publicly facing. These are internal modules which contain code only of interest to top level modules and should never be used by external projects and modules as dependencies.
Sub modules have their dependencies updated as they are published.
To use the preset for sub modules within another module, add the following config to renovate.json
:
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>eik-lib/renovate-presets:sub-level-module"
]
}
Dev dependencies are updated once a month. Both top level and sub modules have the same dev dependency preset.
See license file.