(v1, v2)
| 24 | isValidNext(next, nextNext) |
| 25 | |
| 26 | function isValidNext(v1, v2) { |
| 27 | const semverV1 = semver.coerce(v1).raw |
| 28 | const semverV2 = semver.coerce(v2).raw |
| 29 | const isValid = |
| 30 | semverV2 === semver.inc(semverV1, 'minor') || semverV2 === semver.inc(semverV1, 'major') |
| 31 | if (!isValid) |
| 32 | throw new Error(`The version "${v2}" is not one version ahead of "${v1}" as expected`) |
| 33 | } |
| 34 | |
| 35 | // This indicates the point where we started treating redirect lookups |
| 36 | // to be a *function* rather than a big *lookup object*. |
no outgoing calls
no test coverage detected