mirror of
https://github.com/zen-browser/www.git
synced 2025-07-08 01:10:02 +02:00
Refactor ReleaseNoteItem component and add Firefox version extraction logic; update twilight release notes with new features and fixes
This commit is contained in:
parent
c1d694f4a9
commit
f05dda1478
5 changed files with 98 additions and 36 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue