bumpStable function

Version bumpStable(
  1. Version stable,
  2. ApiChangeMagnitude magnitude
)

Implementation

Version bumpStable(Version stable, ApiChangeMagnitude magnitude) {
  switch (magnitude) {
    case ApiChangeMagnitude.major:
      return stable.nextMajor;
    case ApiChangeMagnitude.minor:
      return stable.nextMinor;
    case ApiChangeMagnitude.patch:
      return stable.nextPatch;
    case ApiChangeMagnitude.ignore:
      return stable;
  }
}