artifacts.spec.ts
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: