Skip to content
Snippets Groups Projects
user avatar
Peter Valdemar Mørch authored
* feat(config): allow exporting async config (#13035)

module.exports can now be a function and it can be/return a Promise,
allowing the results of asynchronous operations to be used in the
configuration.

The discussion leading up to this PR in #13035 assumed that
module.exports had to be a plain object.

But this commit:

  commit 9aa97af5
  Author: Nejc Habjan <hab.nejc@gmail.com>
  Date:   Thu Dec 9 13:45:48 2021 +0100

      feat(config)!: parse JSON5/YAML self-hosted admin config (#12644)

      Adds support for alternative admin config file formats.

      BREAKING CHANGE: Renovate will now fail if RENOVATE_CONFIG_FILE is specified without a file extension

Had as an undocumented side effect, that it also handled transparenty
if module.exports was assigned a Promise. With that commit, the
promise will be await-ed so the resolved value is returned from
getConfig(). That was not the case before that commit.

So in this commit, configs that export functions are handled, and
test cases for both promises and functions have been added.

* Update lib/workers/global/config/parse/__fixtures__/fileAsyncFunction.js

Co-authored-by: default avatarHonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* Update lib/workers/global/config/parse/__fixtures__/fileFunctionPromise.js

Co-authored-by: default avatarHonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* feat(config): Fixed linter problems (#13035)

* feat(config)!: Add doc for JSON5/YAML self-hosted admin config (#12644)

The code was introduced in 9aa97af5 and here is the documentation to
go with it

* feat(config): Document config.js exports (#13035)

* feat(config): Rename file*.js to config*.js because they really are config (#13035)

* Update docs/usage/getting-started/running.md

Co-authored-by: default avatarHonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* Update docs/usage/getting-started/running.md

Co-authored-by: default avatarHonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

Co-authored-by: default avatarHonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: default avatarMichael Kriese <michael.kriese@visualon.de>
c7a7ffbe
History

Renovate banner

Renovate

Automated dependency updates. Multi-platform and multi-language.

License: AGPL v3 codecov Renovate enabled Build status

Why Use Renovate?

  • Receive automated Pull Requests whenever dependencies need updating
  • Define schedules to avoid unnecessary noise in projects (e.g. for weekends or outside of working hours, or weekly updates, etc.)
  • Relevant package files are discovered automatically (e.g. supports monorepo architecture such as Lerna or Yarn workspaces without further configuration)
  • Bot behavior is extremely customizable via configuration files (config as code)
  • Use ESLint-like shared config presets for ease of use and simplifying configuration (JSON format only)
  • Lock files are natively supported and updated in the same commit, including immediately resolving conflicts whenever PRs are merged
  • Supports GitHub (.com and Enterprise), GitLab (.com and CE/EE), Bitbucket Cloud, Bitbucket Server, Azure DevOps and Gitea.
  • Open source (installable via npm/Yarn or Docker Hub) so can be self-hosted or used via GitHub App

Who Uses Renovate?

Renovate was released in 2017 and already is widely used in the developer community, including:

Renovate Matrix

The Renovate Approach

  • We believe everyone benefits from automation, whether it's a little or a lot
  • Renovate should not cause you to change your workflow against your wishes, instead it should be adaptable to your existing workflow
  • All behavior should be configurable, down to a ridiculous level if necessary
  • Autodetect settings wherever possible (to minimize configuration) but always allow overrides

Using Renovate

The easiest way to use Renovate if you are hosted on GitHub.com is to install the hosted Renovate app. On Azure DevOps you can install Renovate as an extension from the marketplace.

For GitHub, go to https://github.com/apps/renovate to install it now. More details on the GitHub App installation.

For Azure DevOps, visit the Visual Studio Marketplace and install the Renovate Me extension in your organization. From there you can create a pipeline with the RenovateMe task. More details on how to configure the pipeline. Note: This extension is created and maintained personally by a Renovate developer/user so support requests relating to the extension itself cannot be answered directly in the main Renovate repository. Alternatively, you can create a custom pipeline with a yml definition that will trigger npx renovate. More details on how to configure the pipeline.

For Bitbucket Cloud, Bitbucket Server, Gitea and GitLab, use our self-hosting option.

Configuration

Visit https://docs.renovatebot.com/ for documentation, and in particular https://docs.renovatebot.com/configuration-options/ for a list of configuration options.

To get help and/or a review for your config, go to the discussions tab in the Renovate repository and open a new "config help" discussion post.

Self-Hosting

If you are not on github.com or gitlab.com, or you prefer to run your own instance of Renovate then you have several options:

  • Install the renovate CLI tool from npmjs, run it on a schedule (e.g. using cron)
  • Run the renovate/renovate Docker Hub image (same content/versions as the CLI tool), run it on a schedule
  • Run the renovate/renovate:slim Docker Hub image if you only use package managers that don't need third-party binaries (e.g. JavaScript, Docker, NuGet, pip)

More details on the self-hosting development.

Contributing

If you would like to contribute to Renovate or get a local copy running for some other reason, please see the instructions in .github/contributing.md.

Security / Disclosure

If you discover any important bug with Renovate that may pose a security problem, please disclose it confidentially to renovate-disclosure@whitesourcesoftware.com first, so that it can be assessed and hopefully fixed prior to being exploited. Please do not raise GitHub issues for security-related doubts or problems.