function validateVersionPart(part: string, partName: string): number | 'x' {
  if (part === 'x') {
    return part;
  }
  return validateVersionNumPart(part, partName);
}
Given a number-or-wildcard part of a version string (i.e. a `minor` or
`patch` part), parse the string into either a number or 'x'.