(other)
| 182 | } |
| 183 | |
| 184 | compareBuild (other) { |
| 185 | if (!(other instanceof SemVer)) { |
| 186 | other = new SemVer(other, this.options) |
| 187 | } |
| 188 | |
| 189 | let i = 0 |
| 190 | do { |
| 191 | const a = this.build[i] |
| 192 | const b = other.build[i] |
| 193 | debug('build compare', i, a, b) |
| 194 | if (a === undefined && b === undefined) { |
| 195 | return 0 |
| 196 | } else if (b === undefined) { |
| 197 | return 1 |
| 198 | } else if (a === undefined) { |
| 199 | return -1 |
| 200 | } else if (a === b) { |
| 201 | continue |
| 202 | } else { |
| 203 | return compareIdentifiers(a, b) |
| 204 | } |
| 205 | } while (++i) |
| 206 | } |
| 207 | |
| 208 | // preminor will bump the version up to the next minor release, and immediately |
| 209 | // down to pre-release. premajor and prepatch work the same way. |
no test coverage detected