File tree Expand file tree Collapse file tree 4 files changed +11
-3
lines changed
Downloads/MinorReleasesTable Expand file tree Collapse file tree 4 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ export const MinorReleasesTable: FC<MinorReleasesTableProps> = ({
2727 releases,
2828} ) => {
2929 const t = useTranslations ( 'components.minorReleasesTable' ) ;
30+ // Chunk minor releases into groups of 8 for scrollable display.
31+ // This is to ensure that the table does not become too wide and remains user-friendly
3032 const releaseGroups = chunkedReleases ( releases , 8 ) ;
3133
3234 return (
Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ type WithDownloadArchiveProps = {
1515} ;
1616
1717/**
18- * Provides download artifacts and sidebar items to its child component
18+ * Higher-order component that extracts version from pathname,
19+ * fetches release data, and provides download artifacts to child component
1920 */
2021const WithDownloadArchive : FC < WithDownloadArchiveProps > = async ( {
2122 children : Component ,
@@ -26,10 +27,11 @@ const WithDownloadArchive: FC<WithDownloadArchiveProps> = async ({
2627 // Extract version from pathname
2728 const version = extractVersionFromPath ( pathname ) ;
2829
29- if ( ! version ) {
30+ if ( version == null ) {
3031 return null ;
3132 }
3233
34+ // Find the release data for the given version
3335 const release = findReleaseByVersion ( releaseData , version ) ;
3436
3537 if ( ! release ) {
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export const IGNORED_ROUTES = [
2020 locale !== defaultLocale . code && / ^ b l o g / . test ( pathname ) ,
2121 // This is used to ignore all pathnames that are empty
2222 ( { locale, pathname } ) => locale . length && ! pathname . length ,
23- // This is used to ignore download routes for major versions and downloads archive page
23+ // This is used to ignore download routes for Node.js versions and downloads archive page
2424 ( { pathname } ) => / ^ d o w n l o a d \/ ( v \d + ( \. \d + ) * | a r c h i v e ) $ / . test ( pathname ) ,
2525] ;
2626
Original file line number Diff line number Diff line change @@ -88,6 +88,10 @@ const getCompatibleArtifacts = ({
8888 } ) ;
8989} ;
9090
91+ /**
92+ * Builds the release artifacts for a given Node.js release and version.
93+ * It retrieves binaries, installers, and source files based on the version.
94+ */
9195export const buildReleaseArtifacts = (
9296 release : NodeRelease ,
9397 version : string
You can’t perform that action at this time.
0 commit comments