code: function ensureUpperBound (range, maximum) {
    return function applyUpperBound (comparators) {
      var hasUpperBound = isBounded.comparators(comparators)
      if (hasUpperBound) return comparators
      var msg = printf(
        'Cannot determine major versions: ' +
        '"%s" is unbounded and ',
        range
      )
      if (maximum == null) {
        throw new Error(msg + 'no maximum was provided')
      }
      var upper = last(comparators)
      if (!upper.test(maximum)) {
        var explanation = printf('"%s" does not satisfy "%s"', maximum, upper.toString())
        throw new Error(msg + explanation)
      }
      return comparators.concat(new semver.Comparator('<=' + maximum))
    }
  }
docs: /*
  Range must have an upper bound. Check if the last comparator is >/>=.
  If so, a maximum must be provided.