skgandikota/CompareVersions

Compare two semantic version strings. Outputs diff type, whether version bumped, and comparison results.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
currentThe current/new version string (e.g. "2.1.0", "v2.1.0-beta.1").yes
previousThe previous/old version string to compare against.yes
namedescription
diffThe type of change: major, minor, patch, prerelease, none, or downgrade.
bumpedWhether the version was bumped (true/false).
is_majorWhether the change is a major bump (true/false).
is_minorWhether the change is a minor bump (true/false).
is_patchWhether the change is a patch bump (true/false).
is_prereleaseWhether the current version is a prerelease (true/false).
current_majorMajor version of current.
current_minorMinor version of current.
current_patchPatch version of current.
previous_majorMajor version of previous.
previous_minorMinor version of previous.
previous_patchPatch version of previous.
resultComparison result: 1 if current > previous, -1 if current < previous, 0 if equal.