Skip to content

Commit bf334d9

Browse files
authored
chore: use subpath imports instead of path aliases (#7735)
* chore: use subpath imports instead of path aliases * fixup! chore: use subpath imports instead of path aliases * #ui and #site
1 parent 16beaa7 commit bf334d9

File tree

226 files changed

+573
-549
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

226 files changed

+573
-549
lines changed

COLLABORATOR_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ To add a new download installation method, follow these steps:
356356
}
357357
```
358358

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

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

apps/site/app/[locale]/[...path]/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
* dynamic params, which will lead on static export errors and other sort of issues.
88
*/
99

10-
import * as basePage from '@/app/[locale]/page';
10+
import * as basePage from '#site/app/[locale]/page';
1111
import {
1212
ENABLE_STATIC_EXPORT_LOCALE,
1313
ENABLE_STATIC_EXPORT,
14-
} from '@/next.constants.mjs';
15-
import { dynamicRouter } from '@/next.dynamic.mjs';
16-
import { availableLocaleCodes, defaultLocale } from '@/next.locales.mjs';
14+
} from '#site/next.constants.mjs';
15+
import { dynamicRouter } from '#site/next.dynamic.mjs';
16+
import { availableLocaleCodes, defaultLocale } from '#site/next.locales.mjs';
1717

1818
// This is the default Viewport Metadata
1919
// @see https://nextjs.org/docs/app/api-reference/functions/generate-viewport#generateviewport-function

apps/site/app/[locale]/error.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { ArrowRightIcon } from '@heroicons/react/24/solid';
44
import { useTranslations } from 'next-intl';
55
import type { FC } from 'react';
66

7-
import Button from '@/components/Common/Button';
8-
import GlowingBackdropLayout from '@/layouts/GlowingBackdrop';
7+
import Button from '#site/components/Common/Button';
8+
import GlowingBackdropLayout from '#site/layouts/GlowingBackdrop';
99

1010
const ErrorPage: FC<{ error: Error }> = () => {
1111
const t = useTranslations();

apps/site/app/[locale]/feed/[feed]/route.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { NextResponse } from 'next/server';
22

3-
import provideWebsiteFeeds from '@/next-data/providers/websiteFeeds';
4-
import { siteConfig } from '@/next.json.mjs';
5-
import { defaultLocale } from '@/next.locales.mjs';
3+
import provideWebsiteFeeds from '#site/next-data/providers/websiteFeeds';
4+
import { siteConfig } from '#site/next.json.mjs';
5+
import { defaultLocale } from '#site/next.locales.mjs';
66

77
type DynamicStaticPaths = { locale: string; feed: string };
88
type StaticParams = { params: Promise<DynamicStaticPaths> };

apps/site/app/[locale]/layout.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import classNames from 'classnames';
44
import { NextIntlClientProvider } from 'next-intl';
55
import type { FC, PropsWithChildren } from 'react';
66

7-
import BaseLayout from '@/layouts/Base';
8-
import { VERCEL_ENV } from '@/next.constants.mjs';
9-
import { IBM_PLEX_MONO, OPEN_SANS } from '@/next.fonts';
10-
import { availableLocalesMap, defaultLocale } from '@/next.locales.mjs';
11-
import { ThemeProvider } from '@/providers/themeProvider';
7+
import BaseLayout from '#site/layouts/Base';
8+
import { VERCEL_ENV } from '#site/next.constants.mjs';
9+
import { IBM_PLEX_MONO, OPEN_SANS } from '#site/next.fonts';
10+
import { availableLocalesMap, defaultLocale } from '#site/next.locales.mjs';
11+
import { ThemeProvider } from '#site/providers/themeProvider';
1212

13-
import '@/styles/index.css';
13+
import '#site/styles/index.css';
1414

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

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

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

3-
import provideReleaseData from '@/next-data/providers/releaseData';
4-
import { GITHUB_API_KEY } from '@/next.constants.mjs';
5-
import { defaultLocale } from '@/next.locales.mjs';
6-
import type { GitHubApiFile } from '@/types';
7-
import { getGitHubApiDocsUrl } from '@/util/gitHubUtils';
8-
import { parseRichTextIntoPlainText } from '@/util/stringUtils';
3+
import provideReleaseData from '#site/next-data/providers/releaseData';
4+
import { GITHUB_API_KEY } from '#site/next.constants.mjs';
5+
import { defaultLocale } from '#site/next.locales.mjs';
6+
import type { GitHubApiFile } from '#site/types';
7+
import { getGitHubApiDocsUrl } from '#site/util/gitHubUtils';
8+
import { parseRichTextIntoPlainText } from '#site/util/stringUtils';
99

1010
// Defines if we should use the GitHub API Key for the request
1111
// based on the environment variable `GITHUB_API_KEY`

apps/site/app/[locale]/next-data/blog-data/[category]/[page]/route.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import {
22
provideBlogPosts,
33
providePaginatedBlogPosts,
4-
} from '@/next-data/providers/blogData';
5-
import { defaultLocale } from '@/next.locales.mjs';
6-
import type { BlogCategory } from '@/types';
4+
} from '#site/next-data/providers/blogData';
5+
import { defaultLocale } from '#site/next.locales.mjs';
6+
import type { BlogCategory } from '#site/types';
77

88
type DynamicStaticPaths = {
99
locale: string;

apps/site/app/[locale]/next-data/download-snippets/route.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import provideDownloadSnippets from '@/next-data/providers/downloadSnippets';
2-
import { defaultLocale } from '@/next.locales.mjs';
1+
import provideDownloadSnippets from '#site/next-data/providers/downloadSnippets';
2+
import { defaultLocale } from '#site/next.locales.mjs';
33

44
type DynamicStaticPaths = { locale: string };
55
type StaticParams = { params: Promise<DynamicStaticPaths> };

apps/site/app/[locale]/next-data/og/[category]/[title]/route.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import HexagonGrid from '@node-core/ui-components/Icons/HexagonGrid';
22
import JsWhiteIcon from '@node-core/ui-components/Icons/Logos/JsWhite';
33
import { ImageResponse } from 'next/og';
44

5-
import { DEFAULT_CATEGORY_OG_TYPE } from '@/next.constants.mjs';
6-
import { defaultLocale } from '@/next.locales.mjs';
7-
import { hexToRGBA } from '@/util/hexToRGBA';
5+
import { DEFAULT_CATEGORY_OG_TYPE } from '#site/next.constants.mjs';
6+
import { defaultLocale } from '#site/next.locales.mjs';
7+
import { hexToRGBA } from '#site/util/hexToRGBA';
88

99
// TODO: use CSS variables instead of absolute values
1010
const CATEGORY_TO_THEME_COLOUR_MAP = {

apps/site/app/[locale]/next-data/page-data/route.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import { deflateSync } from 'node:zlib';
22

33
import matter from 'gray-matter';
44

5-
import { dynamicRouter } from '@/next.dynamic.mjs';
6-
import { defaultLocale } from '@/next.locales.mjs';
7-
import { parseRichTextIntoPlainText } from '@/util/stringUtils';
5+
import { dynamicRouter } from '#site/next.dynamic.mjs';
6+
import { defaultLocale } from '#site/next.locales.mjs';
7+
import { parseRichTextIntoPlainText } from '#site/util/stringUtils';
88

99
// This is the Route Handler for the `GET` method which handles the request
1010
// for a digest and metadata of all existing pages on Node.js Website

0 commit comments

Comments
 (0)