Refactor ReleaseNoteItem component and add Firefox version extraction logic; update twilight release notes with new features and fixes

This commit is contained in:
Mr. M 2025-04-28 00:30:26 +02:00
parent c1d694f4a9
commit f05dda1478
No known key found for this signature in database
GPG key ID: 6292C4C8F8652B18
5 changed files with 98 additions and 36 deletions

View file

@ -25,3 +25,19 @@ export interface ReleaseNote {
export const releaseNotes: ReleaseNote[] = releaseNotesStable.reverse()
export { default as releaseNotesTwilight } from './release-notes/twilight.json'
export function getReleaseNoteFirefoxVersion(
releaseNote: ReleaseNote,
): string | null {
// Check if "firefox" is on the feature list
for (const feature of releaseNote.features || []) {
if (feature.toLowerCase().includes('firefox')) {
// may be X or X.X or X.X.X
const match = feature.match(/(\d+(\.\d+){0,2})/)
if (match) {
return match[0]
}
}
}
return null
}