MCPcopy
hub / github.com/vitejs/vite / findEndBoundary

Function findEndBoundary

scripts/mergeChangelog.ts:55–69  ·  view source on GitHub ↗
(
  lines: string[],
  startIdx: number,
  version: string,
)

Source from the content-addressed store, hash-verified

53}
54
55function findEndBoundary(
56 lines: string[],
57 startIdx: number,
58 version: string,
59): number {
60 const prereleaseRe = new RegExp(
61 `^## (?:<small>)?\\[${escapeRegex(version)}-(beta|alpha|rc)\\.\\d+\\]`,
62 )
63 for (let i = startIdx + 1; i < lines.length; i++) {
64 if (versionHeaderRe.test(lines[i]) && !prereleaseRe.test(lines[i])) {
65 return i
66 }
67 }
68 return lines.length
69}
70
71function parseCategories(releaseLines: string[]): Map<string, string[]> {
72 const categories = new Map<string, string[]>()

Callers 1

mergeChangelog.tsFile · 0.85

Calls 1

escapeRegexFunction · 0.70

Tested by

no test coverage detected