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

Function checkForReleaseNotesSync

src/utils/releaseNotes.ts:360–385  ·  view source on GitHub ↗
(
  lastSeenVersion: string | null | undefined,
  currentVersion: string = MACRO.VERSION,
)

Source from the content-addressed store, hash-verified

358 * returns accurate results in component render bodies.
359 */
360export function checkForReleaseNotesSync(
361 lastSeenVersion: string | null | undefined,
362 currentVersion: string = MACRO.VERSION,
363): { hasReleaseNotes: boolean; releaseNotes: string[] } {
364 // For Ant builds, use VERSION_CHANGELOG bundled at build time
365 if (process.env.USER_TYPE === 'ant') {
366 const changelog = MACRO.VERSION_CHANGELOG
367 if (changelog) {
368 const commits = changelog.trim().split('\n').filter(Boolean)
369 return {
370 hasReleaseNotes: commits.length > 0,
371 releaseNotes: commits,
372 }
373 }
374 return {
375 hasReleaseNotes: false,
376 releaseNotes: [],
377 }
378 }
379
380 const releaseNotes = getRecentReleaseNotes(currentVersion, lastSeenVersion)
381 return {
382 hasReleaseNotes: releaseNotes.length > 0,
383 releaseNotes,
384 }
385}

Callers 1

LogoV2Function · 0.85

Calls 1

getRecentReleaseNotesFunction · 0.85

Tested by

no test coverage detected