Skip to content

Commit 57b6819

Browse files
authored
chore: remove dead code (#7587)
* chore: remove dead code * fixup!
1 parent 913bfff commit 57b6819

11 files changed

+236
-146
lines changed

Diff for: .github/dependabot.yml

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ updates:
4545
next-js:
4646
patterns:
4747
- 'next'
48-
- 'eslint-config-next'
4948
- '@next/eslint-plugin-next'
5049
- 'next-*'
5150
- '@vercel/*'

Diff for: apps/site/components/Common/ActiveLink.tsx

-14
This file was deleted.

Diff for: apps/site/components/__mocks__/client-context.mjs

-11
This file was deleted.

Diff for: apps/site/components/__mocks__/next-image.mjs

-4
This file was deleted.

Diff for: apps/site/components/withRouterSelect.tsx

-31
This file was deleted.

Diff for: apps/site/next.constants.mjs

-9
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,6 @@ export const NEXT_DATA_URL = process.env.NEXT_PUBLIC_DATA_URL
100100
? `${BASE_URL}${BASE_PATH}/en/next-data/`
101101
: `http://localhost:${process.env.PORT ?? 3000}/en/next-data/`;
102102

103-
/**
104-
* This ReGeX is used to remove the `index.md(x)` suffix of a name and to remove
105-
* the `.md(x)` extensions of a filename.
106-
*
107-
* This RegEx is used to transform the file system pathnames into acceptable
108-
* Route Segments for Next.js Dynamic Routes on `pages/[...path].tsx`
109-
*/
110-
export const MD_EXTENSION_REGEX = /((\/)?(index))?\.mdx?$/i;
111-
112103
/**
113104
* This is the default type of blog post type that we use for OG Meta Tags
114105
*/

Diff for: apps/site/next.helpers.mjs

-16
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,6 @@ import { glob } from 'glob';
1313
* @type {Map<string, Promise<string>>} */
1414
const globCacheByPath = new Map();
1515

16-
export const getMatchingRoutes = (route = '', matches = []) =>
17-
matches.some(match => route === match);
18-
19-
/**
20-
* This method is responsible for reading all immediate subdirectories of a directory
21-
*
22-
* @param {string} root the root directory to search from
23-
* @param {string} cwd the current working directory
24-
* @returns {Promise<Array<string>>} a promise containing an array of directories
25-
*/
26-
export const getDirectories = async (root, cwd) => {
27-
return glob('*', { root, cwd, withFileTypes: true })
28-
.then(d => d.filter(e => e.isDirectory()))
29-
.then(d => d.map(e => e.name));
30-
};
31-
3216
/**
3317
* This gets the relative path from `import.meta.url`
3418
*

Diff for: apps/site/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"@node-core/ui-components": "*",
2727
"@node-core/website-i18n": "*",
2828
"@nodevu/core": "0.3.0",
29-
"@opentelemetry/api": "1.9.0",
3029
"@orama/react-components": "^0.6.4",
3130
"@oramacloud/client": "^2.1.4",
3231
"@radix-ui/react-slot": "^1.1.2",

Diff for: apps/site/types/frontmatter.ts

-12
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,3 @@ export interface LegacyFrontMatter extends Record<string, any> {
88
labels?: Record<string, string>;
99
authors?: string;
1010
}
11-
12-
// @TODO: Extra data from Frontmatter should not be a thing in the future
13-
export interface LegacyBlogFrontMatter extends LegacyFrontMatter {
14-
author: string;
15-
date: string;
16-
}
17-
18-
// @TODO: Extra data from Frontmatter should not be a thing in the future
19-
export interface LegacyDownloadsFrontMatter extends LegacyFrontMatter {
20-
downloads: Record<string, string>;
21-
additional: Record<string, string>;
22-
}

Diff for: apps/site/types/og.ts

-3
This file was deleted.

0 commit comments

Comments
 (0)