The Node.js® Website

chore: apply hotfixes requested by the TSC

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