Skip to content
DepDelta for Gerrit, GitLab, Forgejo, Bitbucket and Azure DevOps

Dependency reviews in your CI

The depdelta command runs in your CI on every change that updates a dependency, from Renovate or anyone, and posts what breaks: breaking changes, security fixes, removed APIs and where your code uses them.

Free while in beta. Works alongside Renovate. On GitHub? Use the GitHub app

DepDelta Bot Patch Set 2:autogenerated
DepDelta review: 🔴 Breaking

Lockfile: 412 → 412 packages · 9 updated · no new install scripts

eslint 8.57.0 → 9.0.0 · 🔴 Breaking

37 breaking changes and a platform requirement change.

This repo appears to use:
- tools/lint.js:12 · CLIEngine (removed: will break)

Supply chain: dev dependency

Must act:
- Breaking · 9.0.0 · Moves AST traversal into SourceCode.
- Breaking · 9.0.0 · Changes no-unused-vars default caughtErrors to 'all'.
- Breaking · 9.0.0 · Adds stricter rule test validations.
- and 34 more

Migration guide: Migrate to ESLint 9 https://eslint.org/docs/latest/use/migrate-to-9.0.0

Every change in the range: https://depdelta.com/npm/eslint/compare/8.57.0...9.0.0
A real review on an example change. On the other hosts the same review is a Markdown comment, like the GitHub app's.
  1. 1Make an API keyIn Settings, signed in. Store it in your CI's secrets as DEPDELTA_API_KEY.
  2. 2Add one job to CIIt runs depdelta on every change. Changes that touch no manifest or lockfile finish at once.
  3. 3DepDelta posts the reviewA message on the Gerrit patch set, or one comment on the merge or pull request, kept up to date.
Install
docker pull ghcr.io/mbobiosio/depdelta-cli:latest
# or
pip install depdelta-cli

Run it in the job the Gerrit Trigger plugin starts on patchset-created. The trigger sets the change, project and patch set; the review is posted as a message on the patch set, with no vote.

Jenkinsfile
pipeline {
  agent { docker { image 'ghcr.io/mbobiosio/depdelta-cli:latest' } }
  stages {
    stage('DepDelta') {
      steps {
        withCredentials([
          string(credentialsId: 'depdelta-api-key', variable: 'DEPDELTA_API_KEY'),
          usernamePassword(credentialsId: 'gerrit-http',
                           usernameVariable: 'GERRIT_HTTP_USER',
                           passwordVariable: 'GERRIT_HTTP_PASSWORD'),
        ]) {
          // A DepDelta outage shouldn't fail the build.
          catchError(buildResult: 'SUCCESS', stageResult: 'UNSTABLE') {
            sh 'depdelta'
          }
        }
      }
    }
  }
}
DEPDELTA_API_KEY
Your API key, from Settings.
GERRIT_HTTP_USER
The Gerrit account that posts (a service account works best).
GERRIT_HTTP_PASSWORD
That account's HTTP password, from its Gerrit settings.
Manifests and lockfiles Sent to DepDelta
The ones the change touches, before and after, to work out which versions changed.
Where your code uses changed APIs Sent to DepDelta
When an update removes or changes APIs, the command looks for them in your checkout and sends each use's path, line and name. Nothing else from the code.
Your source code Stays in CI
It's read where it's checked out, by the open-source command, and never sent.
Git host credentials Stay with you
Sent only to your own Gerrit, GitLab, Forgejo, Gitea, Bitbucket or Azure DevOps, to post the review.

The command is open source (MIT): read the code on GitHub. The privacy policy has the details.

--fail-on breaking
Exit 1 when an update is breaking (or review, unknown, safe and riskier), to fail the job.
--wait 300
Seconds to wait for release notes DepDelta hasn't read yet. After that the review posts as it stands.
--print
Print the review instead of posting it.
--base REV --head REV
Review any two commits, outside CI: depdelta --base origin/main --head HEAD.
--format text
Plain text (Gerrit's default), markdown (GitLab's and Forgejo's) or commonmark (Bitbucket's and Azure DevOps').

Exit status: 0 posted (or nothing to review), 1 the --fail-on verdict was met or .depdelta.yml blocks new install-time code, 2 it couldn't review or post.

Reviews flag packages that newly run code when installed: a new package with an install script, or an update that gains one. Packages that always had one, like esbuild, aren't news. Add a .depdelta.yml at the repository root to choose how much that matters.

.depdelta.yml
install_scripts: warn        # off | warn (default) | block
allow_install_scripts:       # never flagged
  - esbuild
  - sharp
warn
The default. Each package that newly runs code at install is flagged in the review.
block
Flagged too, and the GitHub check asks for action; from CI, depdelta exits 1 so the job fails. Until the package is allowed or removed.
off
Install-time code is left out of the review. Lockfile counts and new dependencies still show.

An npm install script, a pnpm build step, a Python package built from source (no wheel), a Composer plugin, or a Cargo build script. Read at the change's head commit. A file DepDelta can't read falls back to the defaults, and the review says why.

Which ecosystems does it review?

npm, PyPI, Maven, Composer, Cargo, RubyGems, pub.dev, NuGet, Go. Finding where your code uses removed or changed APIs works for npm packages that ship types, PyPI packages, Maven packages, Composer packages, gems, pub packages, NuGet packages and Go modules, in TypeScript, JavaScript, Python, Java, Kotlin, PHP, Ruby, Dart, C# and Go.

Does it check install scripts?

Yes. npm's package-lock, pnpm (before v9), uv, Poetry and Composer lockfiles record it. For yarn, pnpm 9, older package-locks, Pipfile.lock and Cargo.lock, DepDelta asks the registry about the packages a change adds or updates, up to 50 per review, and says how many it checked. RubyGems and pub aren't checked yet, and the review says so rather than staying silent. Go, Gradle and NuGet run no code at install.

Does it vote on Gerrit changes?

No. It only posts a message, tagged autogenerated so Gerrit folds older patch sets' reviews away, and notifies only the change owner. To stop merges on breaking updates, use --fail-on breaking and let your own verification job vote.

What does it need on the CI machine?

The Docker image has everything. Without Docker: Python 3.11 or newer and git; the command has no other dependencies. A shallow clone is fine: it fetches the commit it compares from when it's missing.

How many reviews can a key make?

240 an hour, waiting on release notes included. Revoke a key in Settings and CI using it stops at once.

What about GitHub, or another host?

On GitHub, the GitHub app does this with no CI job. Elsewhere, depdelta --base and --head --print prints the review for any two commits, to post however you like.

What does it cost?

Nothing while DepDelta is in beta.

Review your next dependency update