diff --git a/app/[locale]/[[...path]]/page.tsx b/app/[locale]/[[...path]]/page.tsx
index b11084be9dc12..2f4e2a7947c5d 100644
--- a/app/[locale]/[[...path]]/page.tsx
+++ b/app/[locale]/[[...path]]/page.tsx
@@ -37,6 +37,8 @@ export const generateMetadata = async (c: DynamicParams) => {
export const generateStaticParams = async () => {
const paths: DynamicStaticPaths[] = [];
+ // We don't need to compute all possible paths on regular builds
+ // as we benefit from Next.js's ISR (Incremental Static Regeneration)
if (!ENABLE_STATIC_EXPORT) {
return [];
}
diff --git a/components/Docs/NodeApiVersionLinks.tsx b/components/Docs/NodeApiVersionLinks.tsx
index ee2cd71175532..5ac9f7d7ade54 100644
--- a/components/Docs/NodeApiVersionLinks.tsx
+++ b/components/Docs/NodeApiVersionLinks.tsx
@@ -1,21 +1,13 @@
-import { useMemo } from 'react';
-
-import { useNodeReleases } from '@/hooks/useNodeReleases';
import { DOCS_URL } from '@/next.constants.mjs';
+import { releaseData } from '@/next.json.mjs';
const NodeApiVersionLinks = () => {
- const { releases } = useNodeReleases();
-
- const mappedReleases = useMemo(
- () =>
- // Gets all major releases without the 0x release as those are divided on 0.12x and 0.10x
- releases.slice(0, -1).map(({ major }) => (
-
- Node.js {major}.x
-
- )),
- [releases]
- );
+ // Gets all major releases without the 0x release as those are divided on 0.12x and 0.10x
+ const mappedReleases = releaseData.slice(0, -1).map(({ major }) => (
+
+ Node.js {major}.x
+
+ ));
return (
diff --git a/components/Downloads/DownloadReleasesTable.tsx b/components/Downloads/DownloadReleasesTable.tsx
index 75f8b9cff3c26..437c3d6ced7e8 100644
--- a/components/Downloads/DownloadReleasesTable.tsx
+++ b/components/Downloads/DownloadReleasesTable.tsx
@@ -1,15 +1,13 @@
import { useTranslations } from 'next-intl';
import type { FC } from 'react';
-import { useNodeReleases } from '@/hooks/useNodeReleases';
+import { releaseData } from '@/next.json.mjs';
import { getNodeApiLink } from '@/util/getNodeApiLink';
import { getNodejsChangelog } from '@/util/getNodeJsChangelog';
const DownloadReleasesTable: FC = () => {
const t = useTranslations();
- const { releases } = useNodeReleases();
-
return (
@@ -27,7 +25,7 @@ const DownloadReleasesTable: FC = () => {
- {releases.map(release => (
+ {releaseData.map(release => (
Node.js {release.version}
{release.codename}
diff --git a/components/Downloads/PrimaryDownloadMatrix.tsx b/components/Downloads/PrimaryDownloadMatrix.tsx
index b47d866c56b09..f9ef976aa789a 100644
--- a/components/Downloads/PrimaryDownloadMatrix.tsx
+++ b/components/Downloads/PrimaryDownloadMatrix.tsx
@@ -51,7 +51,7 @@ const PrimaryDownloadMatrix: FC = ({
{downloads.current}
diff --git a/components/withLayout.tsx b/components/withLayout.tsx
index 18bbb3d06ba7d..0a508d0bdfd42 100644
--- a/components/withLayout.tsx
+++ b/components/withLayout.tsx
@@ -6,7 +6,6 @@ import BlogPostLayout from '@/layouts/BlogPostLayout';
import ContributeLayout from '@/layouts/ContributeLayout';
import DefaultLayout from '@/layouts/DefaultLayout';
import DocsLayout from '@/layouts/DocsLayout';
-import DownloadCurrentLayout from '@/layouts/DownloadCurrentLayout';
import DownloadLayout from '@/layouts/DownloadLayout';
import IndexLayout from '@/layouts/IndexLayout';
import LearnLayout from '@/layouts/LearnLayout';
@@ -15,12 +14,10 @@ import type { LegacyLayouts } from '@/types';
const layoutComponents = {
'docs.hbs': DocsLayout,
'about.hbs': AboutLayout,
- 'blog-index.hbs': BlogCategoryLayout,
+ 'blog-categpry.hbs': BlogCategoryLayout,
'blog-post.hbs': BlogPostLayout,
- 'category-index.hbs': BlogCategoryLayout,
'contribute.hbs': ContributeLayout,
'download.hbs': DownloadLayout,
- 'download-current.hbs': DownloadCurrentLayout,
'index.hbs': IndexLayout,
'learn.hbs': LearnLayout,
'page.hbs': DefaultLayout,
@@ -30,10 +27,7 @@ type WithLayoutProps = PropsWithChildren<{ layout: LegacyLayouts }>;
export const WithLayout: FC = ({ layout, children }) => {
const LayoutComponent = useMemo(
- () =>
- layout in layoutComponents
- ? layoutComponents[layout as keyof typeof layoutComponents]
- : DefaultLayout,
+ () => layoutComponents[layout] || DefaultLayout,
[layout]
);
diff --git a/components/withNodeRelease.tsx b/components/withNodeRelease.tsx
index 4f9296bf009c0..f2257f13e0bc8 100644
--- a/components/withNodeRelease.tsx
+++ b/components/withNodeRelease.tsx
@@ -1,9 +1,7 @@
-import { useMemo } from 'react';
import type { FC } from 'react';
-import { useNodeReleases } from '@/hooks/useNodeReleases';
+import { releaseData } from '@/next.json.mjs';
import type { NodeRelease, NodeReleaseStatus } from '@/types';
-import { isNodeRelease } from '@/util/nodeRelease';
type WithNodeReleaseProps = {
status: NodeReleaseStatus[] | NodeReleaseStatus;
@@ -14,20 +12,9 @@ export const WithNodeRelease: FC = ({
status,
children: Component,
}) => {
- const { getReleaseByStatus } = useNodeReleases();
+ const matchingRelease = releaseData.find(release =>
+ [status].flat().includes(release.status)
+ ) as NodeRelease;
- const [release] = useMemo(
- () =>
- [status]
- .flat()
- .map(s => getReleaseByStatus(s))
- .filter(s => !!s),
- [status, getReleaseByStatus]
- );
-
- if (release !== undefined && isNodeRelease(release)) {
- return ;
- }
-
- return null;
+ return ;
};
diff --git a/hooks/useNodeReleases.ts b/hooks/useNodeReleases.ts
deleted file mode 100644
index 57f40bf1f9b49..0000000000000
--- a/hooks/useNodeReleases.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-import { useCallback, useMemo } from 'react';
-
-import { releaseData } from '@/next.json.mjs';
-import type { NodeReleaseSource, NodeReleaseStatus } from '@/types';
-import { getNodeReleaseStatus } from '@/util/nodeRelease';
-
-export const useNodeReleases = () => {
- const releases = useMemo(() => {
- const now = new Date();
-
- return releaseData.map((raw: NodeReleaseSource) => {
- const support = {
- currentStart: raw.currentStart,
- ltsStart: raw.ltsStart,
- maintenanceStart: raw.maintenanceStart,
- endOfLife: raw.endOfLife,
- };
-
- const status = getNodeReleaseStatus(now, support);
-
- return {
- ...support,
- major: raw.major,
- version: raw.version,
- versionWithPrefix: `v${raw.version}`,
- codename: raw.codename || '',
- isLts: status === 'Active LTS' || status === 'Maintenance LTS',
- status: status,
- npm: raw.npm || '',
- v8: raw.v8 || '',
- releaseDate: raw.releaseDate || '',
- modules: raw.modules || '',
- };
- });
- }, []);
-
- const getReleaseByStatus = useCallback(
- (status: NodeReleaseStatus) =>
- releases.find(release => release.status === status),
- [releases]
- );
-
- const getLatestIsLtsRelease = useCallback(
- () => releases.find(release => release.isLts),
- [releases]
- );
-
- return { releases, getReleaseByStatus, getLatestIsLtsRelease };
-};
diff --git a/layouts/DocsLayout.tsx b/layouts/DocsLayout.tsx
index db5a3111a10f9..29944cebafa83 100644
--- a/layouts/DocsLayout.tsx
+++ b/layouts/DocsLayout.tsx
@@ -1,19 +1,16 @@
'use client';
import type { RichTranslationValues } from 'next-intl';
-import { useMemo } from 'react';
import type { FC, PropsWithChildren } from 'react';
import SideNavigation from '@/components/SideNavigation';
-import { useNodeReleases } from '@/hooks/useNodeReleases';
+import { releaseData } from '@/next.json.mjs';
const DocsLayout: FC = ({ children }) => {
- const { getReleaseByStatus, getLatestIsLtsRelease } = useNodeReleases();
-
- const [lts, current] = useMemo(
- () => [getLatestIsLtsRelease(), getReleaseByStatus('Current')],
- [getLatestIsLtsRelease, getReleaseByStatus]
- );
+ const [lts, current] = [
+ releaseData.find(({ isLts }) => isLts),
+ releaseData.find(({ status }) => status === 'Current'),
+ ];
const translationContext: Record = {
apiLts: {
diff --git a/layouts/DownloadCurrentLayout.tsx b/layouts/DownloadCurrentLayout.tsx
deleted file mode 100644
index be92a5312dc42..0000000000000
--- a/layouts/DownloadCurrentLayout.tsx
+++ /dev/null
@@ -1,42 +0,0 @@
-'use client';
-
-import type { FC, PropsWithChildren } from 'react';
-
-import PrimaryDownloadMatrix from '@/components/Downloads/PrimaryDownloadMatrix';
-import SecondaryDownloadMatrix from '@/components/Downloads/SecondaryDownloadMatrix';
-import { WithNodeRelease } from '@/components/withNodeRelease';
-import { useMatter } from '@/hooks/useMatter';
-import type { LegacyDownloadsFrontMatter } from '@/types';
-
-import BaseLayout from './BaseLayout';
-
-const DownloadCurrentLayout: FC = ({ children }) => {
- const { matter: frontMatter } = useMatter();
-
- const { downloads } = frontMatter as LegacyDownloadsFrontMatter;
-
- return (
-
-
-
-
-
{downloads.headline}
-
-
- {children}
-
-
- {({ release }) => (
- <>
-
-
- >
- )}
-
-
-
-
- );
-};
-
-export default DownloadCurrentLayout;
diff --git a/layouts/DownloadLayout.tsx b/layouts/DownloadLayout.tsx
index 28774edcecec8..32a52131880f6 100644
--- a/layouts/DownloadLayout.tsx
+++ b/layouts/DownloadLayout.tsx
@@ -6,13 +6,17 @@ import PrimaryDownloadMatrix from '@/components/Downloads/PrimaryDownloadMatrix'
import SecondaryDownloadMatrix from '@/components/Downloads/SecondaryDownloadMatrix';
import { WithNodeRelease } from '@/components/withNodeRelease';
import { useMatter } from '@/hooks/useMatter';
+import { usePathname } from '@/navigation.mjs';
import type { LegacyDownloadsFrontMatter } from '@/types';
const DownloadLayout: FC = ({ children }) => {
const { matter: frontMatter } = useMatter();
+ const pathname = usePathname();
const { downloads } = frontMatter as LegacyDownloadsFrontMatter;
+ const isCurrentReleasePage = pathname.includes('/current');
+
return (
@@ -22,14 +26,27 @@ const DownloadLayout: FC = ({ children }) => {
{children}
-
- {({ release }) => (
- <>
-
-
- >
- )}
-
+ {isCurrentReleasePage && (
+
+ {({ release }) => (
+ <>
+
+
+ >
+ )}
+
+ )}
+
+ {isCurrentReleasePage || (
+
+ {({ release }) => (
+ <>
+
+
+ >
+ )}
+
+ )}
);
diff --git a/next-data/generateNodeReleasesJson.mjs b/next-data/generateNodeReleasesJson.mjs
index c4f93484c3b6e..91fa7bd7acd1c 100644
--- a/next-data/generateNodeReleasesJson.mjs
+++ b/next-data/generateNodeReleasesJson.mjs
@@ -3,6 +3,34 @@ import { join } from 'node:path';
import nodevu from '@nodevu/core';
+const getNodeReleaseStatus = (now, support) => {
+ if (support.endOfLife) {
+ if (now > new Date(support.endOfLife)) {
+ return 'End-of-life';
+ }
+ }
+
+ if (support.maintenanceStart) {
+ if (now > new Date(support.maintenanceStart)) {
+ return 'Maintenance LTS';
+ }
+ }
+
+ if (support.ltsStart) {
+ if (now > new Date(support.ltsStart)) {
+ return 'Active LTS';
+ }
+ }
+
+ if (support.currentStart) {
+ if (now >= new Date(support.currentStart)) {
+ return 'Current';
+ }
+ }
+
+ return 'Pending';
+};
+
// this is the destination path for where the JSON file will be written
const jsonFilePath = join(process.cwd(), 'public/node-releases-data.json');
@@ -18,18 +46,27 @@ const generateNodeReleasesJson = async () => {
const nodeReleases = majors.map(major => {
const [latestVersion] = Object.values(major.releases);
- return {
- major: latestVersion.semver.major,
- version: latestVersion.semver.raw,
- codename: major.support.codename,
+ const support = {
currentStart: major.support.phases.dates.start,
ltsStart: major.support.phases.dates.lts,
maintenanceStart: major.support.phases.dates.maintenance,
endOfLife: major.support.phases.dates.end,
- npm: latestVersion.dependencies.npm,
- v8: latestVersion.dependencies.v8,
- releaseDate: latestVersion.releaseDate,
- modules: latestVersion.modules.version,
+ };
+
+ const status = getNodeReleaseStatus(new Date(), support);
+
+ return {
+ ...support,
+ status,
+ major: latestVersion.semver.major,
+ version: latestVersion.semver.raw,
+ versionWithPrefix: `v${latestVersion.semver.raw}`,
+ codename: major.support.codename || '',
+ isLts: status === 'Active LTS' || status === 'Maintenance LTS',
+ npm: latestVersion.dependencies.npm || '',
+ v8: latestVersion.dependencies.v8 || '',
+ releaseDate: latestVersion.releaseDate || '',
+ modules: latestVersion.modules.version || '',
};
});
diff --git a/next.json.mjs b/next.json.mjs
index 62551f2e99758..afa18a5887be5 100644
--- a/next.json.mjs
+++ b/next.json.mjs
@@ -1,17 +1,26 @@
'use strict';
-import localeConfig from './i18n/config.json' assert { type: 'json' };
-import siteNavigation from './navigation.json' assert { type: 'json' };
-import blogData from './public/blog-posts-data.json' assert { type: 'json' };
-import releaseData from './public/node-releases-data.json' assert { type: 'json' };
-import siteRedirects from './redirects.json' assert { type: 'json' };
-import siteConfig from './site.json' assert { type: 'json' };
+import _localeConfig from './i18n/config.json' assert { type: 'json' };
+import _siteNavigation from './navigation.json' assert { type: 'json' };
+import _blogData from './public/blog-posts-data.json' assert { type: 'json' };
+import _releaseData from './public/node-releases-data.json' assert { type: 'json' };
+import _siteRedirects from './redirects.json' assert { type: 'json' };
+import _siteConfig from './site.json' assert { type: 'json' };
-export {
- siteConfig,
- siteNavigation,
- siteRedirects,
- localeConfig,
- blogData,
- releaseData,
-};
+/** @type {import('./types').LocaleConfig[]} */
+export const localeConfig = _localeConfig;
+
+/** @type {Record} */
+export const siteNavigation = _siteNavigation;
+
+/** @type {import('./types').BlogData} */
+export const blogData = _blogData;
+
+/** @type {import('./types').NodeRelease[]} */
+export const releaseData = _releaseData;
+
+/** @type {Record} */
+export const siteRedirects = _siteRedirects;
+
+/** @type {import('./types').SiteConfig} */
+export const siteConfig = _siteConfig;
diff --git a/pages/en/blog/advisory-board/index.md b/pages/en/blog/advisory-board/index.md
index 41f59a4ca533e..eccc8acf8e6cf 100644
--- a/pages/en/blog/advisory-board/index.md
+++ b/pages/en/blog/advisory-board/index.md
@@ -1,4 +1,4 @@
---
title: Advisory Board
-layout: category-index.hbs
+layout: blog-categpry.hbs
---
diff --git a/pages/en/blog/announcements/index.md b/pages/en/blog/announcements/index.md
index 9c052ecd88302..bb5a6aa83c002 100644
--- a/pages/en/blog/announcements/index.md
+++ b/pages/en/blog/announcements/index.md
@@ -1,4 +1,4 @@
---
title: Announcements
-layout: category-index.hbs
+layout: blog-categpry.hbs
---
diff --git a/pages/en/blog/community/index.md b/pages/en/blog/community/index.md
index c6ee385303b82..3bd5d6b07aca6 100644
--- a/pages/en/blog/community/index.md
+++ b/pages/en/blog/community/index.md
@@ -1,4 +1,4 @@
---
title: Community
-layout: category-index.hbs
+layout: blog-categpry.hbs
---
diff --git a/pages/en/blog/feature/index.md b/pages/en/blog/feature/index.md
index c1d1233e8a107..0f24145a1944a 100644
--- a/pages/en/blog/feature/index.md
+++ b/pages/en/blog/feature/index.md
@@ -1,4 +1,4 @@
---
title: Features
-layout: category-index.hbs
+layout: blog-categpry.hbs
---
diff --git a/pages/en/blog/index.md b/pages/en/blog/index.md
index fb7b2a23fff31..71c46d94c4276 100644
--- a/pages/en/blog/index.md
+++ b/pages/en/blog/index.md
@@ -1,4 +1,4 @@
---
title: News
-layout: blog-index.hbs
+layout: blog-categpry.hbs
---
diff --git a/pages/en/blog/module/index.md b/pages/en/blog/module/index.md
index f8180e2a9a24a..3de051b87a691 100644
--- a/pages/en/blog/module/index.md
+++ b/pages/en/blog/module/index.md
@@ -1,4 +1,4 @@
---
title: Modules
-layout: category-index.hbs
+layout: blog-categpry.hbs
---
diff --git a/pages/en/blog/npm/index.md b/pages/en/blog/npm/index.md
index 6cb3969b8a319..f8fce7ca4cc3d 100644
--- a/pages/en/blog/npm/index.md
+++ b/pages/en/blog/npm/index.md
@@ -1,4 +1,4 @@
---
title: NPM
-layout: category-index.hbs
+layout: blog-categpry.hbs
---
diff --git a/pages/en/blog/pagination.md b/pages/en/blog/pagination.md
index e160827325e4b..9451553abbd10 100644
--- a/pages/en/blog/pagination.md
+++ b/pages/en/blog/pagination.md
@@ -1,5 +1,5 @@
---
title: News from
-layout: blog-index.hbs
+layout: blog-categpry.hbs
author: The Node.js Project
---
diff --git a/pages/en/blog/release/index.md b/pages/en/blog/release/index.md
index 86183adbb5670..8bba772c914e3 100644
--- a/pages/en/blog/release/index.md
+++ b/pages/en/blog/release/index.md
@@ -1,4 +1,4 @@
---
title: Releases
-layout: category-index.hbs
+layout: blog-categpry.hbs
---
diff --git a/pages/en/blog/uncategorized/index.md b/pages/en/blog/uncategorized/index.md
index 9be83e45c7850..f4da17526045f 100644
--- a/pages/en/blog/uncategorized/index.md
+++ b/pages/en/blog/uncategorized/index.md
@@ -1,4 +1,4 @@
---
title: Uncategorized
-layout: category-index.hbs
+layout: blog-categpry.hbs
---
diff --git a/pages/en/blog/video/index.md b/pages/en/blog/video/index.md
index 26167354d90da..daa4b69b7f934 100644
--- a/pages/en/blog/video/index.md
+++ b/pages/en/blog/video/index.md
@@ -1,4 +1,4 @@
---
title: Videos
-layout: category-index.hbs
+layout: blog-categpry.hbs
---
diff --git a/pages/en/blog/vulnerability/index.md b/pages/en/blog/vulnerability/index.md
index bb664ed4ef348..6096fdc315069 100644
--- a/pages/en/blog/vulnerability/index.md
+++ b/pages/en/blog/vulnerability/index.md
@@ -1,4 +1,4 @@
---
title: Vulnerabilities
-layout: category-index.hbs
+layout: blog-categpry.hbs
---
diff --git a/pages/en/blog/weekly-updates/index.md b/pages/en/blog/weekly-updates/index.md
index 013733555d999..a3d348847f87d 100644
--- a/pages/en/blog/weekly-updates/index.md
+++ b/pages/en/blog/weekly-updates/index.md
@@ -1,4 +1,4 @@
---
title: Weekly Updates
-layout: category-index.hbs
+layout: blog-categpry.hbs
---
diff --git a/pages/en/download/current.md b/pages/en/download/current.md
index 5c8f320149341..29f29037aab91 100644
--- a/pages/en/download/current.md
+++ b/pages/en/download/current.md
@@ -1,5 +1,5 @@
---
-layout: download-current.hbs
+layout: download.hbs
title: Download
download: Download
downloads:
diff --git a/providers/themeProvider.tsx b/providers/themeProvider.tsx
index 516c7fda2a2c6..4e219e4c045e0 100644
--- a/providers/themeProvider.tsx
+++ b/providers/themeProvider.tsx
@@ -10,7 +10,6 @@ export const ThemeProvider: FC = ({ children }) => (
attribute="data-theme"
defaultTheme="dark"
storageKey={THEME_STORAGE_KEY}
- enableColorScheme={false}
enableSystem={false}
>
{children}
diff --git a/types/api.ts b/types/api.ts
deleted file mode 100644
index d6fae3d6beebc..0000000000000
--- a/types/api.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-export interface ApiChange {
- version: string | string[];
- 'pr-url': string;
- description: string;
-}
-
-export interface ApiUpdate {
- type: 'added' | 'removed' | 'deprecated' | 'introduced_in' | 'napiVersion';
- version: string[];
-}
diff --git a/types/dropdown.ts b/types/dropdown.ts
deleted file mode 100644
index 52bc847a4a9de..0000000000000
--- a/types/dropdown.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-export interface DropdownItem {
- title: string;
- label: string;
- onClick: () => void;
- active?: boolean;
-}
diff --git a/types/dynamic.ts b/types/dynamic.ts
deleted file mode 100644
index f3a12c0762902..0000000000000
--- a/types/dynamic.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import type { Heading } from '@vcarl/remark-headings';
-
-import type { LegacyFrontMatter } from './frontmatter';
-
-export interface DynamicStaticProps {
- content: string;
- frontmatter: LegacyFrontMatter;
- headings: Heading[];
-}
-
-export interface NextAppProps extends DynamicStaticProps {
- messages: Record;
- locale: string;
-}
diff --git a/types/i18n.ts b/types/i18n.ts
index 07d9a68bbd725..6f8160ef2e792 100644
--- a/types/i18n.ts
+++ b/types/i18n.ts
@@ -7,10 +7,3 @@ export interface LocaleConfig {
hrefLang: string;
enabled: boolean;
}
-
-export interface LocaleContext {
- localeMessages: Record;
- availableLocales: LocaleConfig[];
- currentLocale: LocaleConfig;
- defaultLocale: LocaleConfig;
-}
diff --git a/types/index.ts b/types/index.ts
index 633e08674b506..a1117e8f6a3d9 100644
--- a/types/index.ts
+++ b/types/index.ts
@@ -1,12 +1,9 @@
-export * from './api';
export * from './blog';
export * from './config';
-export * from './dropdown';
export * from './features';
export * from './frontmatter';
export * from './i18n';
export * from './layouts';
export * from './navigation';
-export * from './prevNextLink';
export * from './releases';
-export * from './dynamic';
+export * from './redirects';
diff --git a/types/layouts.ts b/types/layouts.ts
index 1f5576b7e880a..e67d3d4fe64b7 100644
--- a/types/layouts.ts
+++ b/types/layouts.ts
@@ -2,12 +2,10 @@
export type LegacyLayouts =
| 'about.hbs'
| 'learn.hbs'
- | 'blog-index.hbs'
+ | 'blog-categpry.hbs'
| 'blog-post.hbs'
- | 'category-index.hbs'
| 'contribute.hbs'
| 'index.hbs'
| 'docs.hbs'
| 'download.hbs'
- | 'download-current.hbs'
| 'page.hbs';
diff --git a/types/prevNextLink.ts b/types/prevNextLink.ts
deleted file mode 100644
index 77ac2a76ee65d..0000000000000
--- a/types/prevNextLink.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export interface LinkInfo {
- slug: string;
-}
diff --git a/types/redirects.ts b/types/redirects.ts
new file mode 100644
index 0000000000000..b1e729160b346
--- /dev/null
+++ b/types/redirects.ts
@@ -0,0 +1,4 @@
+export interface Redirect {
+ source: string;
+ destination: string;
+}
diff --git a/types/releases.ts b/types/releases.ts
index db708a3489e89..78db7a528d923 100644
--- a/types/releases.ts
+++ b/types/releases.ts
@@ -35,8 +35,3 @@ export interface NodeRelease extends NodeReleaseSource {
isLts: boolean;
status: NodeReleaseStatus;
}
-
-export type NodeReleaseSupport = Pick<
- NodeRelease,
- 'currentStart' | 'ltsStart' | 'maintenanceStart' | 'endOfLife'
->;
diff --git a/util/isAbsoluteUrl.ts b/util/isAbsoluteUrl.ts
deleted file mode 100644
index e485fe09726db..0000000000000
--- a/util/isAbsoluteUrl.ts
+++ /dev/null
@@ -1 +0,0 @@
-export const isAbsoluteUrl = (link: string) => /^https?:\/\//.test(link);
diff --git a/util/nodeRelease.ts b/util/nodeRelease.ts
deleted file mode 100644
index 608ed061837ea..0000000000000
--- a/util/nodeRelease.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-import type {
- NodeRelease,
- NodeReleaseStatus,
- NodeReleaseSupport,
-} from '@/types/releases';
-
-export const isNodeRelease = (release: NodeRelease) =>
- typeof release === 'object' && release?.version;
-
-export const getNodeReleaseStatus = (
- now: Date,
- support: NodeReleaseSupport
-): NodeReleaseStatus => {
- if (support.endOfLife) {
- if (now > new Date(support.endOfLife)) {
- return 'End-of-life';
- }
- }
-
- if (support.maintenanceStart) {
- if (now > new Date(support.maintenanceStart)) {
- return 'Maintenance LTS';
- }
- }
-
- if (support.ltsStart) {
- if (now > new Date(support.ltsStart)) {
- return 'Active LTS';
- }
- }
-
- if (support.currentStart) {
- if (now >= new Date(support.currentStart)) {
- return 'Current';
- }
- }
-
- return 'Pending';
-};
diff --git a/util/parseApiDocsVersion.ts b/util/parseApiDocsVersion.ts
deleted file mode 100644
index 925348eeaf7e8..0000000000000
--- a/util/parseApiDocsVersion.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export const parseApiDocsVersion = (version: string | string[]): string =>
- typeof version === 'string' ? version : version.join(', ');