Skip to content

Commit 1e6e0f4

Browse files
committed
docs: updating according to layout/naming
1 parent 968517f commit 1e6e0f4

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

apps/site/components/Downloads/MinorReleasesTable/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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 (

apps/site/components/withDownloadArchive.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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
*/
2021
const 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) {

apps/site/next.dynamic.constants.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const IGNORED_ROUTES = [
2020
locale !== defaultLocale.code && /^blog/.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 }) => /^download\/(v\d+(\.\d+)*|archive)$/.test(pathname),
2525
];
2626

apps/site/util/downloadUtils/archive.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
*/
9195
export const buildReleaseArtifacts = (
9296
release: NodeRelease,
9397
version: string

0 commit comments

Comments
 (0)