The Node.js® Website

chore: apply hotfixes requested by the TSC

+14 -5
+10 -1
app/[locale]/next-data/api-data/route.ts
··· 1 1 import { deflateSync } from 'node:zlib'; 2 2 3 + import getReleaseData from '@/next-data/releaseData'; 3 4 import { VERCEL_REVALIDATE } from '@/next.constants.mjs'; 4 5 import { defaultLocale } from '@/next.locales.mjs'; 5 6 import type { GitHubApiFile } from '@/types'; ··· 13 14 // for a digest and metadata of all API pages from the Node.js Website 14 15 // @see https://nextjs.org/docs/app/building-your-application/routing/router-handlers 15 16 export const GET = async () => { 16 - const gitHubApiResponse = await fetch(getGitHubApiDocsUrl('main')); 17 + const releases = await getReleaseData(); 18 + 19 + const latestLTSRelease = releases.find(release => 20 + ['Active LTS', 'Maintenance LTS'].includes(release.status) 21 + ); 22 + 23 + const gitHubApiResponse = await fetch( 24 + getGitHubApiDocsUrl(latestLTSRelease!.versionWithPrefix) 25 + ); 17 26 18 27 return gitHubApiResponse.json().then((apiDocsFiles: Array<GitHubApiFile>) => { 19 28 // maps over each api file and get the download_url, fetch the content and deflates it
+4 -4
util/downloadUtils.ts
··· 43 43 export const bitnessItems = { 44 44 WIN: [ 45 45 { 46 - label: '64-bit', 46 + label: 'x64', 47 47 value: '64', 48 48 }, 49 49 { 50 - label: '32-bit', 50 + label: 'x86', 51 51 value: '86', 52 52 }, 53 53 { ··· 57 57 ], 58 58 MAC: [ 59 59 { 60 - label: '64-bit', 60 + label: 'x64', 61 61 value: '64', 62 62 }, 63 63 { ··· 67 67 ], 68 68 LINUX: [ 69 69 { 70 - label: '64-bit', 70 + label: 'x64', 71 71 value: '64', 72 72 }, 73 73 {