Skip to content

Automated Dependency Updates for Mix

Categories: elixir

Renovate supports updating Mix dependencies.

File Matching

By default, Renovate will check any files matching the following regular expression: (^|/)mix\.exs$.

For details on how to extend a manager's fileMatch value, please follow this link.

Supported datasources

This manager supports extracting the following datasources: github-tags, git-tags, hex.

Default config

{
  "fileMatch": [
    "(^|/)mix\\.exs$"
  ]
}

Additional Information

The mix manager uses Renovate's implementation of Elixir SemVer to evaluate update ranges.

The mix package manager itself is used to keep the lock file up-to-date.

The following depTypes are currently supported by the mix manager :

  • prod: all dependencies by default
  • dev: dependencies with :only option not containing :prod

Default rangeStrategy=auto behavior

Renovate's default rangeStrategy is "auto". Here's how "auto" works with the mix manager:

Version type New version Old range New range after update What Renovate does
Complex range 1.7.2 < 1.7.0 or ~> 1.7.1 < 1.7.0 or ~> 1.7.2 Widen range to include the new version.
Simple range 0.39.0 <= 0.38.0 <= 0.39.0 If update outside current range: widens range to include the new version.
Exact version constraint 0.13.0 == 0.12.0 == 0.13.0 Replace old version with new version.

For applications, we recommend using rangeStrategy=pin. This pins your dependencies to exact versions, which is generally considered best practice for apps.

For libraries, use rangeStrategy=widen with version ranges in your mix.exs. This allows for greater compatibility with other projects that may use your library as a dependency.

Open items

The below list of features were current when this page was generated on January 20, 2025.

Feature requests

  • Use dynamic elixir/mix version selection #6370