( lastSeenVersion: string | null | undefined, currentVersion: string = MACRO.VERSION, )
| 334 | * returns accurate results in component render bodies. |
| 335 | */ |
| 336 | export function checkForReleaseNotesSync( |
| 337 | lastSeenVersion: string | null | undefined, |
| 338 | currentVersion: string = MACRO.VERSION, |
| 339 | ): { hasReleaseNotes: boolean; releaseNotes: string[] } { |
| 340 | // For Ant builds, use VERSION_CHANGELOG bundled at build time |
| 341 | if (isInternalBuild()) { |
| 342 | const changelog = MACRO.VERSION_CHANGELOG |
| 343 | if (changelog) { |
| 344 | const commits = changelog.trim().split('\n').filter(Boolean) |
| 345 | return { |
| 346 | hasReleaseNotes: commits.length > 0, |
| 347 | releaseNotes: commits, |
| 348 | } |
| 349 | } |
| 350 | return { |
| 351 | hasReleaseNotes: false, |
| 352 | releaseNotes: [], |
| 353 | } |
| 354 | } |
| 355 | |
| 356 | const releaseNotes = getRecentReleaseNotes(currentVersion, lastSeenVersion) |
| 357 | return { |
| 358 | hasReleaseNotes: releaseNotes.length > 0, |
| 359 | releaseNotes, |
| 360 | } |
| 361 | } |
nothing calls this directly
no test coverage detected