lue-bird / elm-docs-diff / Elm.SemanticMagnitude

Severity of a diff


type Magnitude
    = Major
    | Minor
    | Patch

What kind of version bump would be necessary?

theMoreSevere : ( Magnitude, Magnitude ) -> Magnitude

Choose maximum severity between the two Magnitudes

[ Elm.SemanticMagnitude.Minor
, Elm.SemanticMagnitude.Major
, Elm.SemanticMagnitude.Patch
]
    |> List.foldl
        (\next soFar -> ( soFar, next ) |> Elm.SemanticMagnitude.theMoreSevere)
        Elm.SemanticMagnitude.Patch
--> Elm.SemanticMagnitude.Major

name : Magnitude -> String

Lowercase name

"-- This is a "
    ++ (Elm.SemanticMagnitude.Minor |> Elm.SemanticMagnitude.name |> String.toUpper)
    ++ " change. --"
--> "-- This is a MINOR change. --"