MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / getAllReleaseNotes

Function getAllReleaseNotes

source code/utils/releaseNotes.ts:251–278  ·  view source on GitHub ↗
(
  changelogContent: string = getStoredChangelogFromMemory(),
)

Source from the content-addressed store, hash-verified

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

Tested by

no test coverage detected