(versions: string[])
| 351 | |
| 352 | // TODO: Adjust this for stable releases |
| 353 | function getMaxPatchVersionIncrement(versions: string[]): number { |
| 354 | const regex = /\d+\.\d+\.\d+-dev\.(\d+)/ |
| 355 | const increments = versions |
| 356 | .filter((v) => v.trim().length > 0) |
| 357 | .map((v) => { |
| 358 | const match = regex.exec(v) |
| 359 | if (match && match[1]) { |
| 360 | return Number(match[1]) |
| 361 | } |
| 362 | return 0 |
| 363 | }) |
| 364 | .filter((v) => v) |
| 365 | |
| 366 | return Math.max(...increments, 0) |
| 367 | } |
| 368 | |
| 369 | /** |
| 370 | * @param pkgs |
no outgoing calls
no test coverage detected