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

Function getAllReleaseNotes

src/utils/releaseNotes.ts:250–277  ·  view source on GitHub ↗
(
  changelogContent: string = getStoredChangelogFromMemory(),
)

Source from the content-addressed store, hash-verified

248 * @returns Array of [version, notes[]] arrays
249 */
250export function getAllReleaseNotes(
251 changelogContent: string = getStoredChangelogFromMemory(),
252): Array<[string, string[]]> {
253 try {
254 const releaseNotes = parseChangelog(changelogContent)
255
256 // Sort versions with oldest first
257 const sortedVersions = Object.keys(releaseNotes).sort((a, b) =>
258 gt(a, b) ? 1 : -1,
259 )
260
261 // Return array of [version, notes] arrays
262 return sortedVersions
263 .map(version => {
264 const versionNotes = releaseNotes[version]
265 if (!versionNotes || versionNotes.length === 0) return null
266
267 const notes = versionNotes.filter(Boolean)
268 if (notes.length === 0) return null
269
270 return [version, notes] as [string, string[]]
271 })
272 .filter((item): item is [string, string[]] => item !== null)
273 } catch (error) {
274 logError(toError(error))
275 return []
276 }
277}
278
279/**
280 * Checks if there are release notes to show based on the last seen version.

Callers 1

callFunction · 0.85

Calls 6

parseChangelogFunction · 0.85
gtFunction · 0.85
keysMethod · 0.80
logErrorFunction · 0.70
toErrorFunction · 0.70

Tested by

no test coverage detected