use-cases.md
Use Cases
This page describes common use cases for Renovate.
Development dependency updates
The original use case, and the most popular one, is for developers to automate dependency updating in their software projects.
Updating of package files
The term "package file" is used to describe files which have references to dependencies. Package files are managed by a "package manager".
Example package files include:
-
package.json
, managed by npm or Yarn -
Gemfile
, managed by Bundler -
go.mod
, managed bygo
modules
How Renovate updates a package file
Renovate:
- Scans your repositories to detect package files and their dependencies
- Checks if any newer versions exist
- Raises Pull Requests for available updates
The Pull Requests patch the package files directly, and include Release Notes for the newer versions (if they are available).
By default:
- You'll get separate Pull Requests for each dependency
- Major updates are kept separate from non-major updates
Package managers with lock files
Many package managers support "lock files", which "freeze" the entire dependency tree including transitive dependencies. npm, Yarn, Bundler, Composer, Poetry, Pipenv, and Cargo all support or use lock files.
If you use a lock file then changes to your package file must come with a compatible change to the lock file. Renovate can patch/update package files directly, but a lock file is too complex to "reverse engineer". Therefore Renovate lets the package manager do the lock file update. A simplified example:
- The repository has a
package.json
andpackage-lock.json
with version1.0.0
of a dependency - Renovate sees that version
1.1.0
is available - Renovate patches the
package.json
to change the dependency's version from1.0.0
to1.1.0
- Renovate runs
npm install
to letnpm
update thepackage-lock.json
- Renovate commits the
package.json
andpackage-lock.json
- Renovate creates the PR
Custom dependency extraction
Renovate supports 60+ types of package files. Not all dependencies are detected by default, this can be because:
- The package manager/file format is not supported, or
- The file format is not a standard or is proprietary
If your dependencies are not detected by default, you can use use our "regex" manager to set your own custom patterns to extract dependencies. You configure the regex manager by telling it:
- Which file pattern(s) to match
- How to find the dependency name and version from within the file
- Which datasource (e.g. Docker registry, npm registry, etc) to use to look up new versions
The end result is that Renovate can keep dependencies in custom file formats up-to-date as long as the dependency datasource is known to Renovate.
DevOps tooling
Renovate is increasingly used for purposes which are traditionally described as DevOps instead of Developer.
DevOps / Infrastructure as Code updates
It's common for repositories to have DevOps-related files like CI/CD configs, or "Infrastructure as Code" (IaC) files. Examples of IaC files are Docker, Kubernetes or Terraform files. Renovate handles IaC files as "package managers" and "package files" and can detect and update them.
Docker-compatible images
Docker-compatible images are a key building block of modern software. These images are commonly found in CI/CD pipeline configs or referenced in IaC files. Renovate detects these IaC files and then queries Docker registries to determine if newer tags or digests exists.