Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(config): add .cjs file extension config support #26075

Merged
merged 9 commits into from
Dec 1, 2023
4 changes: 3 additions & 1 deletion docs/development/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ Options which have `"globalOnly": true` are reserved only for bot global configu

### Configuration File

You can override default configuration using a configuration file, with default name `config.js` or `config.cjs` (in ESM repositories) in the working directory.
You can override default configuration using a configuration file, with default name `config.js` in the working directory.
If you need an alternate location or name, set it in the environment variable `RENOVATE_CONFIG_FILE`.

**Note:** `RENOVATE_CONFIG_FILE` must be provided with an explicit file extension.
For example `RENOVATE_CONFIG_FILE=myconfig.js` or `RENOVATE_CONFIG_FILE=myconfig.json` and not `RENOVATE_CONFIG_FILE=myconfig`.
If none is provided, or the file type is invalid, Renovate will fail.

If you are in an ESM repo (`"type": "module"` in `package.json`) then you must use a `.cjs` extension and set `RENOVATE_CONFIG_FILE`.
jamiehaywood marked this conversation as resolved.
Show resolved Hide resolved

Using a configuration file gives you very granular configuration options.
For instance, you can override most settings at the global (file), repository, or package level.
e.g. apply one set of labels for `backend/package.json` and a different set of labels for `frontend/package.json` in the same repository.
Expand Down