Client work

M-Trust API Guard

Automated semantic versioning for Dart and Flutter packages: API Guard analyzes a package's public API, detects breaking changes, bumps the version, and writes the changelog — no more guessing whether a release is a patch or a major.

Laptop with an open code editor

Semantic versioning asks a question most teams answer by guessing: is this release a patch, a minor or a major? API Guard answers it by reading the code.

The tool walks a Dart package's public API, writes it out as a structured snapshot, and diffs that snapshot against an earlier one from any git ref. Whatever it finds decides the version bump and writes the changelog entry. A removed parameter is a major. A new optional one is a minor. Nobody has to remember which.

Teams need escape hatches, so the classification is configurable per element through analysis_options.yaml: suppress an internal class, relax the rules for something still experimental, tighten them for the parts you cannot afford to break. Workspaces get per-package versions and tags, with the constraints between packages updated in the same pass.

It was built in a two-person team at Merck and open-sourced by EMD Group. My side was the analysis and comparison, plus the git handling: checking out another ref to compare against is exactly the kind of convenience that eats someone's uncommitted work if you get it wrong.

  • Co-developed in a two-person team
  • Open-sourced by EMD Group / Merck
  • Static analysis of Dart API signatures

GitHub

Period
since 2024
Client
Merck KGaA / EMD Group
My role
Dart tooling, co-developed in a two-person team
Stack
Dart · CLI · Open Source · Semantic Versioning

Interested in something similar?

Get in touch