Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion COLLABORATOR_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ To add a new download installation method, follow these steps:
}
```

3. **Update `InstallationMethodLabel` and `InstallationMethod` in `@/types/release.ts`:**
3. **Update `InstallationMethodLabel` and `InstallationMethod` in `apps/site/types/release.ts`:**

- Add the new method to the `InstallationMethodLabel` and `InstallationMethod` types.

Expand Down
8 changes: 4 additions & 4 deletions apps/site/app/[locale]/[...path]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
* dynamic params, which will lead on static export errors and other sort of issues.
*/

import * as basePage from '@/app/[locale]/page';
import * as basePage from '#app/[locale]/page';
import {
ENABLE_STATIC_EXPORT_LOCALE,
ENABLE_STATIC_EXPORT,
} from '@/next.constants.mjs';
import { dynamicRouter } from '@/next.dynamic.mjs';
import { availableLocaleCodes, defaultLocale } from '@/next.locales.mjs';
} from '#next.constants.mjs';
import { dynamicRouter } from '#next.dynamic.mjs';
import { availableLocaleCodes, defaultLocale } from '#next.locales.mjs';

// This is the default Viewport Metadata
// @see https://nextjs.org/docs/app/api-reference/functions/generate-viewport#generateviewport-function
Expand Down
4 changes: 2 additions & 2 deletions apps/site/app/[locale]/error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { ArrowRightIcon } from '@heroicons/react/24/solid';
import { useTranslations } from 'next-intl';
import type { FC } from 'react';

import Button from '@/components/Common/Button';
import GlowingBackdropLayout from '@/layouts/GlowingBackdrop';
import Button from '#components/Common/Button';
import GlowingBackdropLayout from '#layouts/GlowingBackdrop';

const ErrorPage: FC<{ error: Error }> = () => {
const t = useTranslations();
Expand Down
6 changes: 3 additions & 3 deletions apps/site/app/[locale]/feed/[feed]/route.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { NextResponse } from 'next/server';

import provideWebsiteFeeds from '@/next-data/providers/websiteFeeds';
import { siteConfig } from '@/next.json.mjs';
import { defaultLocale } from '@/next.locales.mjs';
import provideWebsiteFeeds from '#next-data/providers/websiteFeeds';
import { siteConfig } from '#next.json.mjs';
import { defaultLocale } from '#next.locales.mjs';

type DynamicStaticPaths = { locale: string; feed: string };
type StaticParams = { params: Promise<DynamicStaticPaths> };
Expand Down
12 changes: 6 additions & 6 deletions apps/site/app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import classNames from 'classnames';
import { NextIntlClientProvider } from 'next-intl';
import type { FC, PropsWithChildren } from 'react';

import BaseLayout from '@/layouts/Base';
import { VERCEL_ENV } from '@/next.constants.mjs';
import { IBM_PLEX_MONO, OPEN_SANS } from '@/next.fonts';
import { availableLocalesMap, defaultLocale } from '@/next.locales.mjs';
import { ThemeProvider } from '@/providers/themeProvider';
import BaseLayout from '#layouts/Base';
import { VERCEL_ENV } from '#next.constants.mjs';
import { IBM_PLEX_MONO, OPEN_SANS } from '#next.fonts';
import { availableLocalesMap, defaultLocale } from '#next.locales.mjs';
import { ThemeProvider } from '#providers/themeProvider';

import '@/styles/index.css';
import '#styles/index.css';

const fontClasses = classNames(IBM_PLEX_MONO.variable, OPEN_SANS.variable);

Expand Down
12 changes: 6 additions & 6 deletions apps/site/app/[locale]/next-data/api-data/route.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { deflateSync } from 'node:zlib';

import provideReleaseData from '@/next-data/providers/releaseData';
import { GITHUB_API_KEY } from '@/next.constants.mjs';
import { defaultLocale } from '@/next.locales.mjs';
import type { GitHubApiFile } from '@/types';
import { getGitHubApiDocsUrl } from '@/util/gitHubUtils';
import { parseRichTextIntoPlainText } from '@/util/stringUtils';
import provideReleaseData from '#next-data/providers/releaseData';
import { GITHUB_API_KEY } from '#next.constants.mjs';
import { defaultLocale } from '#next.locales.mjs';
import type { GitHubApiFile } from '#types';
import { getGitHubApiDocsUrl } from '#util/gitHubUtils';
import { parseRichTextIntoPlainText } from '#util/stringUtils';

// Defines if we should use the GitHub API Key for the request
// based on the environment variable `GITHUB_API_KEY`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {
provideBlogPosts,
providePaginatedBlogPosts,
} from '@/next-data/providers/blogData';
import { defaultLocale } from '@/next.locales.mjs';
import type { BlogCategory } from '@/types';
} from '#next-data/providers/blogData';
import { defaultLocale } from '#next.locales.mjs';
import type { BlogCategory } from '#types';

type DynamicStaticPaths = {
locale: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import provideDownloadSnippets from '@/next-data/providers/downloadSnippets';
import { defaultLocale } from '@/next.locales.mjs';
import provideDownloadSnippets from '#next-data/providers/downloadSnippets';
import { defaultLocale } from '#next.locales.mjs';

type DynamicStaticPaths = { locale: string };
type StaticParams = { params: Promise<DynamicStaticPaths> };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import HexagonGrid from '@node-core/ui-components/Icons/HexagonGrid';
import JsWhiteIcon from '@node-core/ui-components/Icons/Logos/JsWhite';
import { ImageResponse } from 'next/og';

import { DEFAULT_CATEGORY_OG_TYPE } from '@/next.constants.mjs';
import { defaultLocale } from '@/next.locales.mjs';
import { hexToRGBA } from '@/util/hexToRGBA';
import { DEFAULT_CATEGORY_OG_TYPE } from '#next.constants.mjs';
import { defaultLocale } from '#next.locales.mjs';
import { hexToRGBA } from '#util/hexToRGBA';

// TODO: use CSS variables instead of absolute values
const CATEGORY_TO_THEME_COLOUR_MAP = {
Expand Down
6 changes: 3 additions & 3 deletions apps/site/app/[locale]/next-data/page-data/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { deflateSync } from 'node:zlib';

import matter from 'gray-matter';

import { dynamicRouter } from '@/next.dynamic.mjs';
import { defaultLocale } from '@/next.locales.mjs';
import { parseRichTextIntoPlainText } from '@/util/stringUtils';
import { dynamicRouter } from '#next.dynamic.mjs';
import { defaultLocale } from '#next.locales.mjs';
import { parseRichTextIntoPlainText } from '#util/stringUtils';

// This is the Route Handler for the `GET` method which handles the request
// for a digest and metadata of all existing pages on Node.js Website
Expand Down
4 changes: 2 additions & 2 deletions apps/site/app/[locale]/next-data/release-data/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import provideReleaseData from '@/next-data/providers/releaseData';
import { defaultLocale } from '@/next.locales.mjs';
import provideReleaseData from '#next-data/providers/releaseData';
import { defaultLocale } from '#next.locales.mjs';

// This is the Route Handler for the `GET` method which handles the request
// for generating static data related to the Node.js Release Data
Expand Down
4 changes: 2 additions & 2 deletions apps/site/app/[locale]/not-found.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import Image from 'next/image';
import { useTranslations } from 'next-intl';
import type { FC } from 'react';

import Button from '@/components/Common/Button';
import GlowingBackdropLayout from '@/layouts/GlowingBackdrop';
import Button from '#components/Common/Button';
import GlowingBackdropLayout from '#layouts/GlowingBackdrop';

const NotFoundPage: FC = () => {
const t = useTranslations();
Expand Down
16 changes: 8 additions & 8 deletions apps/site/app/[locale]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ import { notFound, redirect } from 'next/navigation';
import { setRequestLocale } from 'next-intl/server';
import type { FC } from 'react';

import { setClientContext } from '@/client-context';
import WithLayout from '@/components/withLayout';
import { setClientContext } from '#client-context';
import WithLayout from '#components/withLayout';
import {
ENABLE_STATIC_EXPORT_LOCALE,
ENABLE_STATIC_EXPORT,
} from '@/next.constants.mjs';
import { PAGE_VIEWPORT, DYNAMIC_ROUTES } from '@/next.dynamic.constants.mjs';
import { dynamicRouter } from '@/next.dynamic.mjs';
import { allLocaleCodes, availableLocaleCodes } from '@/next.locales.mjs';
import { defaultLocale } from '@/next.locales.mjs';
import { MatterProvider } from '@/providers/matterProvider';
} from '#next.constants.mjs';
import { PAGE_VIEWPORT, DYNAMIC_ROUTES } from '#next.dynamic.constants.mjs';
import { dynamicRouter } from '#next.dynamic.mjs';
import { allLocaleCodes, availableLocaleCodes } from '#next.locales.mjs';
import { defaultLocale } from '#next.locales.mjs';
import { MatterProvider } from '#providers/matterProvider';

type DynamicStaticPaths = { path: Array<string>; locale: string };
type DynamicParams = { params: Promise<DynamicStaticPaths> };
Expand Down
6 changes: 3 additions & 3 deletions apps/site/app/global-error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import { ArrowRightIcon } from '@heroicons/react/24/solid';
import type { FC } from 'react';

import Button from '@/components/Common/Button';
import BaseLayout from '@/layouts/Base';
import GlowingBackdropLayout from '@/layouts/GlowingBackdrop';
import Button from '#components/Common/Button';
import BaseLayout from '#layouts/Base';
import GlowingBackdropLayout from '#layouts/GlowingBackdrop';

const GlobalErrorPage: FC<{ error: Error }> = () => (
<html>
Expand Down
6 changes: 3 additions & 3 deletions apps/site/app/sitemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import {
BASE_PATH,
BASE_URL,
EXTERNAL_LINKS_SITEMAP,
} from '@/next.constants.mjs';
import { dynamicRouter } from '@/next.dynamic.mjs';
import { availableLocaleCodes, defaultLocale } from '@/next.locales.mjs';
} from '#next.constants.mjs';
import { dynamicRouter } from '#next.dynamic.mjs';
import { availableLocaleCodes, defaultLocale } from '#next.locales.mjs';

// This is the combination of the Application Base URL and Base PATH
const baseUrlAndPath = `${BASE_URL}${BASE_PATH}`;
Expand Down
4 changes: 2 additions & 2 deletions apps/site/client-context.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { cache } from 'react';

import type { ClientSharedServerContext } from '@/types';
import { assignClientContext } from '@/util/assignClientContext';
import type { ClientSharedServerContext } from '#types';
import { assignClientContext } from '#util/assignClientContext';

// This allows us to have Server-Side Context's of the shared "contextual" data
// which includes the frontmatter, the current pathname from the dynamic segments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import assert from 'node:assert/strict';

import { render, screen } from '@testing-library/react';

import BlogHeader from '@/components/Blog/BlogHeader';
import BlogHeader from '#components/Blog/BlogHeader';

describe('BlogHeader', () => {
it('should have correct href when category is all', () => {
Expand Down
4 changes: 2 additions & 2 deletions apps/site/components/Blog/BlogHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { RssIcon } from '@heroicons/react/24/solid';
import { useTranslations } from 'next-intl';
import type { FC } from 'react';

import Link from '@/components/Link';
import { siteConfig } from '@/next.json.mjs';
import Link from '#components/Link';
import { siteConfig } from '#next.json.mjs';

import styles from './index.module.css';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { render, screen } from '@testing-library/react';

import { isVisible } from '../../../../../../tests/utilities.mjs';

import BlogPostCard from '@/components/Blog/BlogPostCard';
import BlogPostCard from '#components/Blog/BlogPostCard';

function renderBlogPostCard({
title = 'Blog post title',
Expand Down
10 changes: 5 additions & 5 deletions apps/site/components/Blog/BlogPostCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import Preview from '@node-core/ui-components/Common/Preview';
import { useTranslations } from 'next-intl';
import type { FC } from 'react';

import FormattedTime from '@/components/Common/FormattedTime';
import Link from '@/components/Link';
import WithAvatarGroup from '@/components/withAvatarGroup';
import type { BlogCategory } from '@/types';
import { mapBlogCategoryToPreviewType } from '@/util/blogUtils';
import FormattedTime from '#components/Common/FormattedTime';
import Link from '#components/Link';
import WithAvatarGroup from '#components/withAvatarGroup';
import type { BlogCategory } from '#types';
import { mapBlogCategoryToPreviewType } from '#util/blogUtils';

import styles from './index.module.css';

Expand Down
2 changes: 1 addition & 1 deletion apps/site/components/Common/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import BaseButton, {
} from '@node-core/ui-components/Common/BaseButton';
import type { FC, ComponentProps } from 'react';

import Link from '@/components/Link';
import Link from '#components/Link';

const Button: FC<
Omit<ButtonProps, 'as'> & Omit<ComponentProps<typeof Link>, 'as' | 'size'>
Expand Down
4 changes: 2 additions & 2 deletions apps/site/components/Common/CodeBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import BaseCodeBox from '@node-core/ui-components/Common/BaseCodeBox';
import { useTranslations } from 'next-intl';
import type { FC, PropsWithChildren, ReactNode } from 'react';

import Link from '@/components/Link';
import { useCopyToClipboard, useNotification } from '@/hooks';
import Link from '#components/Link';
import { useCopyToClipboard, useNotification } from '#hooks';

type CodeBoxProps = {
language: string;
Expand Down
2 changes: 1 addition & 1 deletion apps/site/components/Common/CrossLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { CrossLinkProps } from '@node-core/ui-components/Common/BaseCrossLi
import { useTranslations } from 'next-intl';
import type { FC } from 'react';

import Link from '@/components/Link';
import Link from '#components/Link';

const CrossLink: FC<Omit<CrossLinkProps, 'as' | 'label'>> = props => {
const t = useTranslations();
Expand Down
2 changes: 1 addition & 1 deletion apps/site/components/Common/FormattedTime.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { DateTimeFormatOptions } from 'next-intl';
import { useFormatter } from 'next-intl';
import type { FC } from 'react';

import { DEFAULT_DATE_FORMAT } from '@/next.calendar.constants.mjs';
import { DEFAULT_DATE_FORMAT } from '#next.calendar.constants.mjs';

type FormattedTimeProps = {
date: string | Date;
Expand Down
4 changes: 2 additions & 2 deletions apps/site/components/Common/LinkTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import BaseLinkTabs from '@node-core/ui-components/Common/BaseLinkTabs';
import type { LinkTabsProps } from '@node-core/ui-components/Common/BaseLinkTabs';
import type { FC } from 'react';

import Link from '@/components/Link';
import { useRouter } from '@/navigation.mjs';
import Link from '#components/Link';
import { useRouter } from '#navigation.mjs';

const LinkTabs: FC<Omit<LinkTabsProps, 'as' | 'onSelect'>> = props => {
const { push } = useRouter();
Expand Down
2 changes: 1 addition & 1 deletion apps/site/components/Common/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { PaginationProps } from '@node-core/ui-components/Common/BasePagina
import { useTranslations } from 'next-intl';
import type { FC } from 'react';

import Link from '@/components/Link';
import Link from '#components/Link';

const Pagination: FC<
Omit<PaginationProps, 'as' | 'labels' | 'getPageLabel'>
Expand Down
4 changes: 2 additions & 2 deletions apps/site/components/Common/Search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import { useTranslations, useLocale } from 'next-intl';
import { useTheme } from 'next-themes';
import type { FC } from 'react';

import { useRouter } from '@/navigation.mjs';
import { useRouter } from '#navigation.mjs';
import {
ORAMA_CLOUD_ENDPOINT,
ORAMA_CLOUD_API_KEY,
DEFAULT_ORAMA_QUERY_PARAMS,
DEFAULT_ORAMA_SUGGESTIONS,
BASE_URL,
} from '@/next.constants.mjs';
} from '#next.constants.mjs';

type ResultMapDescription = {
path: string;
Expand Down
10 changes: 5 additions & 5 deletions apps/site/components/Downloads/DownloadButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { CloudArrowDownIcon } from '@heroicons/react/24/outline';
import classNames from 'classnames';
import type { FC, PropsWithChildren } from 'react';

import Button from '@/components/Common/Button';
import { useClientContext } from '@/hooks';
import type { NodeRelease } from '@/types';
import { getNodeDownloadUrl } from '@/util/getNodeDownloadUrl';
import { getUserPlatform } from '@/util/getUserPlatform';
import Button from '#components/Common/Button';
import { useClientContext } from '#hooks';
import type { NodeRelease } from '#types';
import { getNodeDownloadUrl } from '#util/getNodeDownloadUrl';
import { getUserPlatform } from '#util/getUserPlatform';

import styles from './index.module.css';

Expand Down
12 changes: 6 additions & 6 deletions apps/site/components/Downloads/DownloadLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

import type { FC, PropsWithChildren } from 'react';

import LinkWithArrow from '@/components/LinkWithArrow';
import { useClientContext } from '@/hooks';
import type { NodeRelease } from '@/types';
import type { DownloadKind } from '@/util/getNodeDownloadUrl';
import { getNodeDownloadUrl } from '@/util/getNodeDownloadUrl';
import { getUserPlatform } from '@/util/getUserPlatform';
import LinkWithArrow from '#components/LinkWithArrow';
import { useClientContext } from '#hooks';
import type { NodeRelease } from '#types';
import type { DownloadKind } from '#util/getNodeDownloadUrl';
import { getNodeDownloadUrl } from '#util/getNodeDownloadUrl';
import { getUserPlatform } from '#util/getUserPlatform';

type DownloadLinkProps = { release: NodeRelease; kind?: DownloadKind };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { useTranslations } from 'next-intl';
import type { FC } from 'react';
import { use } from 'react';

import LinkWithArrow from '@/components/LinkWithArrow';
import { ReleaseModalContext } from '@/providers/releaseModalProvider';
import type { NodeRelease } from '@/types';
import LinkWithArrow from '#components/LinkWithArrow';
import { ReleaseModalContext } from '#providers/releaseModalProvider';
import type { NodeRelease } from '#types';

type DetailsButtonProps = {
versionData: NodeRelease;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import Badge from '@node-core/ui-components/Common/Badge';
import { getTranslations } from 'next-intl/server';
import type { FC } from 'react';

import FormattedTime from '@/components/Common/FormattedTime';
import DetailsButton from '@/components/Downloads/DownloadReleasesTable/DetailsButton';
import getReleaseData from '@/next-data/releaseData';
import FormattedTime from '#components/Common/FormattedTime';
import DetailsButton from '#components/Downloads/DownloadReleasesTable/DetailsButton';
import getReleaseData from '#next-data/releaseData';

const DownloadReleasesTable: FC = async () => {
const releaseData = await getReleaseData();
Expand Down
Loading
Loading