File tree Expand file tree Collapse file tree
app/[locale]/next-data/api-data Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { deflateSync } from 'node:zlib' ;
22
3+ import getReleaseData from '@/next-data/releaseData' ;
34import { VERCEL_REVALIDATE } from '@/next.constants.mjs' ;
45import { defaultLocale } from '@/next.locales.mjs' ;
56import 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
1516export 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
Original file line number Diff line number Diff line change @@ -43,11 +43,11 @@ export const platformItems = [
4343export 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 {
You can’t perform that action at this time.
0 commit comments