Determine the correct next semver version for a Helm chart based on change type.
Helm chart versions follow SemVer (MAJOR.MINOR.PATCH), and comparing two versions means comparing each segment left-to-right until a difference is found — the first differing segment determines both which version is newer and what kind of bump occurred. By SemVer convention, a major bump signals breaking changes, a minor bump signals backward-compatible new functionality, and a patch bump signals backward-compatible fixes, which is exactly the signal `helm dependency update` and chart consumers rely on when deciding whether an upgrade is safe to take automatically.
comparison = compare(newMajor.newMinor.newPatch, curMajor.curMinor.curPatch)
Yes — Chart.yaml's `version` field must be a valid SemVer 2 string, and Helm uses SemVer range constraints (e.g. `^1.2.3`, `~1.2.0`) in dependency declarations to decide which versions satisfy a requirement.
This calculator compares only the numeric major.minor.patch core; full SemVer also orders pre-release tags (alpha < beta < rc) and pre-release versions rank lower than their corresponding release version.
No — Chart.yaml's `appVersion` reflects the version of the application being deployed (which may follow its own versioning scheme) and is independent of the chart's own `version` field, which tracks the chart's packaging changes.