MCPcopy
hub / github.com/prisma/prisma / getMaxPatchVersionIncrement

Function getMaxPatchVersionIncrement

scripts/ci/publish.ts:353–367  ·  view source on GitHub ↗
(versions: string[])

Source from the content-addressed store, hash-verified

351
352// TODO: Adjust this for stable releases
353function 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

Callers 1

getNewPatchDevVersionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected