Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Esp participation #7086

Merged
merged 11 commits into from
Oct 18, 2024
9 changes: 7 additions & 2 deletions apps/site/components/Downloads/Release/ReleaseCodeBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
import { useTranslations } from 'next-intl';
import { useContext, useEffect, useState } from 'react';
import type { FC } from 'react';
import semVer from 'semver';

import Banner from '@/components/Common/Banner';
import CodeBox from '@/components/Common/CodeBox';
import { ReleaseContext } from '@/providers/releaseProvider';
import { shikiPromise, highlightToHtml } from '@/util/getHighlighter';
Expand All @@ -29,13 +31,16 @@ const ReleaseCodeBox: FC = () => {
}, [release.versionWithPrefix, os, platform]);

const codeLanguage = os === 'WIN' ? 'PowerShell' : 'Bash';

return (
<div className="mb-2 mt-6 flex flex-col gap-2">
AugustinMauroy marked this conversation as resolved.
Show resolved Hide resolved
{semVer.lt(release.versionWithPrefix, '18.0.0') && (
bmuenzenmeyer marked this conversation as resolved.
Show resolved Hide resolved
<Banner type="error" link="/about/previous-releases/">
{t('layouts.download.codeBox.unsupportedVersionWarning')}&nbsp;
</Banner>
)}
<CodeBox language={codeLanguage} className="min-h-[15.5rem]">
<code dangerouslySetInnerHTML={{ __html: code }} />
</CodeBox>

<span className="text-center text-xs text-neutral-800 dark:text-neutral-200">
{t('layouts.download.codeBox.communityWarning')}
<br />
Expand Down
4 changes: 4 additions & 0 deletions apps/site/navigation.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
"link": "https://nodejs.org/docs/latest/api/",
"label": "components.containers.navBar.links.docs"
},
"support": {
"link": "/about/previous-releases",
"label": "components.containers.navBar.links.support"
},
"certification": {
"link": "https://training.linuxfoundation.org/openjs/",
"label": "components.containers.navBar.links.certification",
Expand Down
4 changes: 4 additions & 0 deletions apps/site/pages/en/about/previous-releases.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ Production applications should only use _Active LTS_ or _Maintenance LTS_ releas

Full details regarding Node.js release schedule are available [on GitHub](https://github.com/nodejs/release#release-schedule).

### Commercial Support

Commercial support for versions past Maintenance phase is available through our OpenJS Ecosystem Sustainability Program partner [HeroDevs](https://herodevs.com/).

## Looking for latest release of a version branch?

<DownloadReleasesTable />
2 changes: 2 additions & 0 deletions packages/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"about": "About",
"download": "Download",
"docs": "Docs",
"support": "Version Support",
"guides": "Guides",
"learn": "Learn",
"security": "Security",
Expand Down Expand Up @@ -299,6 +300,7 @@
"platform": "Platform"
},
"codeBox": {
"unsupportedVersionWarning": "This version is out of maintenance. Find more information here:",
"fnmEnvSetup": "configure fnm environment",
"systemManagerWarning": "is not a Node.js package manager. Please ensure you already have {packageManager} installed.",
"communityWarning": "Package managers and their installation scripts are not maintained by the Node.js project.",
Expand Down
Loading