Skip to content

Commit 1d70c58

Browse files
committed
chore: apply hotfixes requested by the TSC
1 parent b9d1c4e commit 1d70c58

2 files changed

Lines changed: 14 additions & 5 deletions

File tree

app/[locale]/next-data/api-data/route.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { deflateSync } from 'node:zlib';
22

3+
import getReleaseData from '@/next-data/releaseData';
34
import { VERCEL_REVALIDATE } from '@/next.constants.mjs';
45
import { defaultLocale } from '@/next.locales.mjs';
56
import type { GitHubApiFile } from '@/types';
@@ -13,7 +14,15 @@ const getPathnameForApiFile = (name: string) =>
1314
// for a digest and metadata of all API pages from the Node.js Website
1415
// @see https://nextjs.org/docs/app/building-your-application/routing/router-handlers
1516
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+
);
1726

1827
return gitHubApiResponse.json().then((apiDocsFiles: Array<GitHubApiFile>) => {
1928
// maps over each api file and get the download_url, fetch the content and deflates it

util/downloadUtils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ export const platformItems = [
4343
export const bitnessItems = {
4444
WIN: [
4545
{
46-
label: '64-bit',
46+
label: 'x64',
4747
value: '64',
4848
},
4949
{
50-
label: '32-bit',
50+
label: 'x86',
5151
value: '86',
5252
},
5353
{
@@ -57,7 +57,7 @@ export const bitnessItems = {
5757
],
5858
MAC: [
5959
{
60-
label: '64-bit',
60+
label: 'x64',
6161
value: '64',
6262
},
6363
{
@@ -67,7 +67,7 @@ export const bitnessItems = {
6767
],
6868
LINUX: [
6969
{
70-
label: '64-bit',
70+
label: 'x64',
7171
value: '64',
7272
},
7373
{

0 commit comments

Comments
 (0)