MCPcopy Create free account
hub / github.com/Noumena-Network/code / getRecentReleaseNotesSync

Function getRecentReleaseNotesSync

src/utils/logoV2Utils.ts:314–352  ·  view source on GitHub ↗
(maxItems: number)

Source from the content-addressed store, hash-verified

312 * For external users, uses public changelog
313 */
314export function getRecentReleaseNotesSync(maxItems: number): string[] {
315 // For ants, use bundled changelog
316 if (isInternalBuild()) {
317 const changelog = MACRO.VERSION_CHANGELOG
318 if (changelog) {
319 const commits = changelog.trim().split('\n').filter(Boolean)
320 return commits.slice(0, maxItems)
321 }
322 return []
323 }
324
325 const changelog = getStoredChangelogFromMemory()
326 if (!changelog) {
327 return []
328 }
329
330 let parsed
331 try {
332 parsed = parseChangelog(changelog)
333 } catch {
334 return []
335 }
336
337 // Get notes from recent versions
338 const allNotes: string[] = []
339 const versions = Object.keys(parsed)
340 .sort((a, b) => (gt(a, b) ? -1 : 1))
341 .slice(0, 3) // Look at top 3 recent versions
342
343 for (const version of versions) {
344 const notes = parsed[version]
345 if (notes) {
346 allNotes.push(...notes)
347 }
348 }
349
350 // Return raw notes without filtering or premature truncation
351 return allNotes.slice(0, maxItems)
352}

Callers

nothing calls this directly

Calls 5

isInternalBuildFunction · 0.85
parseChangelogFunction · 0.85
gtFunction · 0.85
keysMethod · 0.80

Tested by

no test coverage detected