MCPcopy
hub / github.com/codeaashu/claude-code / getAllReleaseNotes

Function getAllReleaseNotes

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

Source from the content-addressed store, hash-verified

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