Skip to content

Commit a6c909b

Browse files
outsleptfuma-nama
andauthored
Deps: Reducing deps (#1873)
* Deps: Reducing deps * Changeset * Reverting the changes for `generate-docs` script as it shuold work as expected without any additional workarounds * Returning `isbot` dep * clean code --------- Co-authored-by: Fuma Nama <god63820869@gmail.com>
1 parent 98bc69e commit a6c909b

File tree

23 files changed

+81
-102
lines changed

23 files changed

+81
-102
lines changed

.changeset/legal-beers-flow.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'create-fumadocs-app': patch
3+
'@fumadocs/mdx-remote': patch
4+
'fumadocs-typescript': patch
5+
'fumadocs-openapi': patch
6+
'fumadocs-mdx': patch
7+
---
8+
9+
Removed unused devDependencies and migrated from `fast-glob` to `tinyglobby`

apps/docs/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
"@oramacloud/client": "^2.1.4",
1919
"@radix-ui/react-dialog": "^1.1.13",
2020
"@radix-ui/react-hover-card": "^1.1.13",
21-
"@radix-ui/react-popover": "^1.1.13",
22-
"@radix-ui/react-slot": "^1.2.2",
2321
"@radix-ui/react-tooltip": "^1.2.6",
2422
"@shikijs/rehype": "^3.4.2",
2523
"@shikijs/transformers": "^3.4.2",
@@ -40,7 +38,6 @@
4038
"next-themes": "^0.4.6",
4139
"octokit": "^4.1.3",
4240
"oxc-transform": "^0.70.0",
43-
"phenomenon": "^1.6.0",
4441
"react": "^19.1.0",
4542
"react-dom": "^19.1.0",
4643
"rehype-katex": "^7.0.1",
@@ -68,12 +65,12 @@
6865
"@types/react-dom": "^19.1.5",
6966
"algoliasearch": "4.24.0",
7067
"eslint-config-custom": "workspace:*",
71-
"fast-glob": "^3.3.3",
7268
"gray-matter": "^4.0.3",
7369
"next-validate-link": "^1.5.2",
7470
"postcss": "^8.5.3",
7571
"tailwindcss": "^4.1.7",
7672
"tailwindcss-animate": "^1.0.7",
73+
"tinyglobby": "^0.2.13",
7774
"ts-morph": "^25.0.1",
7875
"tsconfig": "workspace:*",
7976
"tsx": "^4.19.4",

apps/docs/scripts/lint.mts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import fg from 'fast-glob';
1+
import { glob } from 'tinyglobby';
22
import { printErrors, scanURLs, validateFiles } from 'next-validate-link';
33
import { createGetUrl, getSlugs, parseFilePath } from 'fumadocs-core/source';
44
import { getTableOfContents } from 'fumadocs-core/server';
@@ -23,11 +23,15 @@ async function readFromPath(file: string) {
2323

2424
async function checkLinks() {
2525
const docsFiles = await Promise.all(
26-
await fg('content/docs/**/*.mdx').then((files) => files.map(readFromPath)),
26+
await glob('content/docs/**/*.mdx').then((files) =>
27+
files.map(readFromPath),
28+
),
2729
);
2830

2931
const blogFiles = await Promise.all(
30-
await fg('content/blog/**/*.mdx').then((files) => files.map(readFromPath)),
32+
await glob('content/blog/**/*.mdx').then((files) =>
33+
files.map(readFromPath),
34+
),
3135
);
3236

3337
const docs = docsFiles.map(async (file) => {

examples/i18n/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"start": "next start"
99
},
1010
"dependencies": {
11-
"@orama/stopwords": "^3.1.6",
1211
"@orama/tokenizers": "^3.1.6",
1312
"fumadocs-core": "workspace:*",
1413
"fumadocs-mdx": "workspace:*",

examples/openapi/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,13 @@
1010
"types:check": "fumadocs-mdx && tsc --noEmit"
1111
},
1212
"dependencies": {
13-
"@scalar/api-client-react": "^1.2.34",
1413
"fumadocs-core": "workspace:*",
1514
"fumadocs-mdx": "workspace:*",
1615
"fumadocs-openapi": "workspace:*",
1716
"fumadocs-ui": "workspace:*",
1817
"next": "15.3.2",
1918
"react": "19.1.0",
20-
"react-dom": "19.1.0",
21-
"shiki": "^3.4.2",
22-
"zod": "^3.24.4"
19+
"react-dom": "19.1.0"
2320
},
2421
"devDependencies": {
2522
"@tailwindcss/postcss": "^4.1.7",

examples/python/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
"fumadocs-ui": "workspace:*",
1717
"next": "15.3.2",
1818
"react": "^19.1.0",
19-
"react-dom": "^19.1.0",
20-
"shiki": "^3.4.2"
19+
"react-dom": "^19.1.0"
2120
},
2221
"devDependencies": {
2322
"@tailwindcss/postcss": "^4.1.7",

examples/remote-mdx/app/docs/utils.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as fs from 'node:fs/promises';
22
import * as path from 'node:path';
3-
import FastGlob from 'fast-glob';
3+
import { glob } from 'tinyglobby';
44

55
export interface Frontmatter {
66
title: string;
@@ -43,13 +43,22 @@ interface Page {
4343
}
4444

4545
export async function getPages(): Promise<Page[]> {
46-
const files = await FastGlob('content/docs/**/*.mdx');
46+
const files = await glob('content/docs/**/*.mdx');
4747

4848
return files.map((file) => {
4949
const slugs = file.split(path.sep).filter(Boolean).slice(2);
50-
const last = slugs[slugs.length - 1];
5150

52-
slugs[slugs.length - 1] = last.slice(0, -path.extname(last).length);
51+
if (slugs.length === 0) {
52+
return {
53+
path: file,
54+
slug: [],
55+
};
56+
}
57+
58+
slugs[slugs.length - 1] = slugs[slugs.length - 1].slice(
59+
0,
60+
-path.extname(slugs[slugs.length - 1]).length,
61+
);
5362
if (slugs[slugs.length - 1] === 'index') slugs.pop();
5463

5564
return {

examples/remote-mdx/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"start": "next start"
99
},
1010
"dependencies": {
11+
"tinyglobby": "^0.2.13",
1112
"@fumadocs/mdx-remote": "workspace:*",
12-
"fast-glob": "^3.3.3",
1313
"fumadocs-core": "workspace:*",
1414
"fumadocs-ui": "workspace:*",
1515
"next": "15.3.2",

examples/tanstack-start/lib/source.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
} from 'fumadocs-core/source';
88
import matter from 'gray-matter';
99
import * as path from 'node:path';
10-
import FastGlob from 'fast-glob';
10+
import { globSync } from 'tinyglobby';
1111
import * as fs from 'node:fs';
1212

1313
let files: [string, string][];
@@ -21,7 +21,7 @@ if (typeof import.meta.glob === 'function') {
2121
}),
2222
);
2323
} else {
24-
files = FastGlob.sync('content/docs/**/*').map((file) => {
24+
files = globSync('content/docs/**/*').map((file) => {
2525
return [file, fs.readFileSync(file).toString()];
2626
});
2727
}

examples/tanstack-start/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
"@fumadocs/mdx-remote": "workspace:*",
1313
"@tanstack/react-router": "^1.120.3",
1414
"@tanstack/react-start": "^1.120.3",
15-
"fast-glob": "^3.3.3",
1615
"fumadocs-core": "workspace:*",
1716
"fumadocs-ui": "workspace:*",
1817
"gray-matter": "^4.0.3",
1918
"react": "^19.1.0",
2019
"react-dom": "^19.1.0",
20+
"tinyglobby": "^0.2.13",
2121
"vinxi": "^0.5.6"
2222
},
2323
"devDependencies": {

0 commit comments

Comments
 (0)