File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
apps/site/next-data/generators Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 33import getMajorNodeReleases from './majorNodeReleases.mjs' ;
44
55// Gets the appropriate release status for each major release
6- const getNodeReleaseStatus = ( now , support ) => {
6+ const getNodeReleaseStatus = ( latest , support ) => {
7+ const now = new Date ( ) ;
78 const { endOfLife, maintenanceStart, ltsStart, currentStart } = support ;
89
910 if ( endOfLife && now >= new Date ( endOfLife ) ) {
1011 return 'End-of-life' ;
1112 }
1213
13- if ( maintenanceStart && now >= new Date ( maintenanceStart ) ) {
14+ if (
15+ latest . lts . isLts &&
16+ maintenanceStart &&
17+ now >= new Date ( maintenanceStart )
18+ ) {
1419 return 'Maintenance LTS' ;
1520 }
1621
17- if ( ltsStart && now >= new Date ( ltsStart ) ) {
22+ if ( latest . lts . isLts && ltsStart && now >= new Date ( ltsStart ) ) {
1823 return 'Active LTS' ;
1924 }
2025
@@ -45,7 +50,7 @@ const generateReleaseData = async () => {
4550 } ;
4651
4752 // Get the major release status based on our Release Schedule
48- const status = getNodeReleaseStatus ( new Date ( ) , support ) ;
53+ const status = getNodeReleaseStatus ( latestVersion , support ) ;
4954
5055 const minorVersions = Object . entries ( major . releases ) . map ( ( [ , release ] ) => ( {
5156 modules : release . modules . version || '' ,
You can’t perform that action at this time.
0 commit comments