Files
bible/rules/patterns/module-versioning

Module Versioning Pattern Notes

This file keeps examples and the decision tree. The normative rules live in contract.md.

Version Format

N.M

Examples:

  • 1.0
  • 2.0
  • 2.1
  • 2.3

Canonical Storage Options

Go constant:

const Version = "2.1"

Document header:

Version: 2.1

Config field:

{ "version": "2.1" }

Tag Format

<module-name>/v<N.M>

Examples:

  • parser/v2.0
  • api-client/v1.3

Decision Tree

Module changed?
  -> no: version unchanged
  -> yes: behavior or interface changed?
     -> yes: N+1, reset minor to 0
     -> no: narrow bugfix only -> N+0.1

Commit Reminder

If a commit changes a module, the same commit should update the module version.