MCPcopy Create free account
hub / github.com/freecodexyz/free-code / getRecentReleaseNotes

Function getRecentReleaseNotes

src/utils/releaseNotes.ts:207–226  ·  view source on GitHub ↗
(
  currentVersion: string,
  previousVersion: string | null | undefined,
  changelogContent: string = getStoredChangelogFromMemory(),
)

Source from the content-addressed store, hash-verified

205 * @returns Array of release notes to display
206 */
207export function getRecentReleaseNotes(
208 currentVersion: string,
209 previousVersion: string | null | undefined,
210 changelogContent: string = getStoredChangelogFromMemory(),
211): string[] {
212 try {
213 return getRecentReleaseNoteGroups(
214 currentVersion,
215 previousVersion,
216 changelogContent,
217 )
218 .flatMap(([, notes]) => notes)
219 .filter(Boolean)
220 .slice(0, MAX_RELEASE_NOTES_SHOWN)
221 } catch (error) {
222 logError(toError(error))
223 return []
224 }
225 return []
226}
227
228export function getRecentReleaseNoteGroups(
229 currentVersion: string,

Callers 3

checkForReleaseNotesFunction · 0.85
checkForReleaseNotesSyncFunction · 0.85

Calls 4

toErrorFunction · 0.85
logErrorFunction · 0.70

Tested by

no test coverage detected