mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-26 10:55:57 +00:00
Chore: update deps
This commit is contained in:
+10
-10
@@ -19,8 +19,8 @@
|
||||
"@radix-ui/react-popover": "^1.1.5",
|
||||
"@radix-ui/react-slot": "^1.1.1",
|
||||
"@radix-ui/react-tooltip": "^1.1.7",
|
||||
"@shikijs/rehype": "^2.1.0",
|
||||
"@shikijs/twoslash": "^2.1.0",
|
||||
"@shikijs/rehype": "^2.2.0",
|
||||
"@shikijs/twoslash": "^2.2.0",
|
||||
"@theguild/remark-mermaid": "^0.2.0",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"fumadocs-core": "workspace:*",
|
||||
@@ -33,9 +33,9 @@
|
||||
"geist": "^1.3.1",
|
||||
"hast-util-to-jsx-runtime": "^2.3.2",
|
||||
"katex": "^0.16.21",
|
||||
"lucide-react": "^0.473.0",
|
||||
"lucide-react": "^0.474.0",
|
||||
"next": "15.1.6",
|
||||
"oxc-transform": "^0.47.1",
|
||||
"oxc-transform": "^0.48.1",
|
||||
"phenomenon": "^1.6.0",
|
||||
"react": "^19.0.0",
|
||||
"react-dom": "^19.0.0",
|
||||
@@ -47,8 +47,8 @@
|
||||
"remark-rehype": "^11.1.1",
|
||||
"remark-stringify": "^11.0.0",
|
||||
"scroll-into-view-if-needed": "^3.1.0",
|
||||
"shiki": "^2.1.0",
|
||||
"tailwind-merge": "^2.6.0",
|
||||
"shiki": "^2.2.0",
|
||||
"tailwind-merge": "^3.0.1",
|
||||
"zod": "^3.24.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -56,18 +56,18 @@
|
||||
"@next/bundle-analyzer": "15.1.6",
|
||||
"@next/env": "15.1.6",
|
||||
"@next/eslint-plugin-next": "15.1.6",
|
||||
"@tailwindcss/postcss": "^4.0.0",
|
||||
"@tailwindcss/postcss": "^4.0.2",
|
||||
"@types/hast": "^3.0.4",
|
||||
"@types/mdx": "^2.0.13",
|
||||
"@types/node": "22.10.9",
|
||||
"@types/react": "^19.0.7",
|
||||
"@types/node": "22.13.0",
|
||||
"@types/react": "^19.0.8",
|
||||
"@types/react-dom": "^19.0.3",
|
||||
"eslint-config-custom": "workspace:*",
|
||||
"fast-glob": "^3.3.3",
|
||||
"gray-matter": "^4.0.3",
|
||||
"next-validate-link": "^1.4.1",
|
||||
"postcss": "^8.5.1",
|
||||
"tailwindcss": "^4.0.0",
|
||||
"tailwindcss": "^4.0.2",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"ts-morph": "^25.0.0",
|
||||
"tsconfig": "workspace:*",
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"@content-collections/mdx": "^0.2.0",
|
||||
"@content-collections/next": "^0.2.4",
|
||||
"@types/mdx": "^2.0.13",
|
||||
"@types/react": "^19.0.7",
|
||||
"@types/react": "^19.0.8",
|
||||
"@types/react-dom": "^19.0.3",
|
||||
"typescript": "^5.7.3"
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mdx": "^2.0.13",
|
||||
"@types/react": "^19.0.7",
|
||||
"@types/react": "^19.0.8",
|
||||
"@types/react-dom": "^19.0.3",
|
||||
"typescript": "^5.7.3"
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mdx": "^2.0.13",
|
||||
"@types/react": "^19.0.7",
|
||||
"@types/react": "^19.0.8",
|
||||
"@types/react-dom": "^19.0.3",
|
||||
"algoliasearch": "4.24.0",
|
||||
"typescript": "^5.7.3"
|
||||
|
||||
@@ -10,25 +10,25 @@
|
||||
"types:check": "fumadocs-mdx && tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@scalar/api-client-react": "^1.1.22",
|
||||
"fumadocs-core": "workspace:*",
|
||||
"@scalar/api-client-react": "^1.1.17",
|
||||
"fumadocs-mdx": "workspace:*",
|
||||
"fumadocs-openapi": "workspace:*",
|
||||
"fumadocs-ui": "workspace:*",
|
||||
"next": "15.1.6",
|
||||
"react": "19.0.0",
|
||||
"react-dom": "19.0.0",
|
||||
"shiki": "^2.1.0",
|
||||
"shiki": "^2.2.0",
|
||||
"zod": "^3.24.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/postcss": "^4.0.0",
|
||||
"@tailwindcss/postcss": "^4.0.2",
|
||||
"@types/mdx": "^2.0.13",
|
||||
"@types/react": "^19.0.7",
|
||||
"@types/react": "^19.0.8",
|
||||
"@types/react-dom": "^19.0.3",
|
||||
"postcss": "^8.5.1",
|
||||
"rimraf": "^6.0.1",
|
||||
"tailwindcss": "^4.0.0",
|
||||
"tailwindcss": "^4.0.2",
|
||||
"typescript": "^5.7.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mdx": "^2.0.13",
|
||||
"@types/react": "^19.0.7",
|
||||
"@types/react": "^19.0.8",
|
||||
"@types/react-dom": "^19.0.3",
|
||||
"typescript": "^5.7.3"
|
||||
}
|
||||
|
||||
+7
-7
@@ -17,21 +17,21 @@
|
||||
"version": "changeset version && pnpm install --lockfile-only"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@changesets/cli": "^2.27.11",
|
||||
"@eslint/js": "^9.18.0",
|
||||
"@changesets/cli": "^2.27.12",
|
||||
"@eslint/js": "^9.19.0",
|
||||
"@types/eslint__js": "^8.42.3",
|
||||
"concurrently": "^9.1.2",
|
||||
"eslint": "^9.18.0",
|
||||
"eslint": "^9.19.0",
|
||||
"eslint-plugin-react": "^7.37.4",
|
||||
"eslint-plugin-react-hooks": "5.1.0",
|
||||
"eslint-plugin-tailwindcss": "^3.18.0",
|
||||
"prettier": "^3.4.2",
|
||||
"rimraf": "^6.0.1",
|
||||
"tsup": "8.3.5",
|
||||
"turbo": "2.3.3",
|
||||
"tsup": "8.3.6",
|
||||
"turbo": "2.4.0",
|
||||
"typescript": "^5.7.3",
|
||||
"typescript-eslint": "^8.21.0",
|
||||
"vitest": "^3.0.3"
|
||||
"typescript-eslint": "^8.22.0",
|
||||
"vitest": "^3.0.4"
|
||||
},
|
||||
"packageManager": "[email protected]",
|
||||
"engines": {
|
||||
|
||||
@@ -37,14 +37,14 @@
|
||||
"@clack/prompts": "^0.9.1",
|
||||
"commander": "^13.1.0",
|
||||
"execa": "^9.5.2",
|
||||
"package-manager-detector": "^0.2.8",
|
||||
"package-manager-detector": "^0.2.9",
|
||||
"picocolors": "^1.1.1",
|
||||
"ts-morph": "^25.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/cross-spawn": "^6.0.6",
|
||||
"@types/node": "22.10.9",
|
||||
"@types/react": "^19.0.7",
|
||||
"@types/node": "22.13.0",
|
||||
"@types/react": "^19.0.8",
|
||||
"eslint-config-custom": "workspace:*",
|
||||
"fast-glob": "^3.3.3",
|
||||
"tsconfig": "workspace:*",
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
"devDependencies": {
|
||||
"@content-collections/core": "^0.8.0",
|
||||
"@content-collections/mdx": "^0.2.0",
|
||||
"@types/node": "22.10.9",
|
||||
"@types/node": "22.13.0",
|
||||
"eslint-config-custom": "workspace:*",
|
||||
"fumadocs-core": "workspace:*",
|
||||
"tsconfig": "workspace:*",
|
||||
|
||||
@@ -86,8 +86,8 @@
|
||||
"dependencies": {
|
||||
"@formatjs/intl-localematcher": "^0.5.10",
|
||||
"@orama/orama": "^2.1.1",
|
||||
"@shikijs/rehype": "^2.1.0",
|
||||
"@shikijs/transformers": "^2.1.0",
|
||||
"@shikijs/rehype": "^2.2.0",
|
||||
"@shikijs/transformers": "^2.2.0",
|
||||
"github-slugger": "^2.0.0",
|
||||
"hast-util-to-estree": "^3.1.1",
|
||||
"hast-util-to-jsx-runtime": "^2.3.2",
|
||||
@@ -97,7 +97,7 @@
|
||||
"remark": "^15.0.0",
|
||||
"remark-gfm": "^4.0.0",
|
||||
"scroll-into-view-if-needed": "^3.1.0",
|
||||
"shiki": "^2.1.0",
|
||||
"shiki": "^2.2.0",
|
||||
"unist-util-visit": "^5.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -109,8 +109,8 @@
|
||||
"@types/hast": "^3.0.4",
|
||||
"@types/mdast": "^4.0.3",
|
||||
"@types/negotiator": "^0.6.3",
|
||||
"@types/node": "22.10.9",
|
||||
"@types/react": "^19.0.7",
|
||||
"@types/node": "22.13.0",
|
||||
"@types/react": "^19.0.8",
|
||||
"@types/react-dom": "^19.0.3",
|
||||
"algoliasearch": "4.24.0",
|
||||
"eslint-config-custom": "workspace:*",
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
"@content-collections/core": "^0.8.0",
|
||||
"@content-collections/mdx": "^0.2.0",
|
||||
"@content-collections/next": "^0.2.4",
|
||||
"@tailwindcss/postcss": "^4.0.2",
|
||||
"@types/mdx": "^2.0.13",
|
||||
"@types/node": "22.10.9",
|
||||
"@types/react": "^19.0.7",
|
||||
"@types/node": "22.13.0",
|
||||
"@types/react": "^19.0.8",
|
||||
"@types/react-dom": "^19.0.3",
|
||||
"next": "15.1.6",
|
||||
"postcss": "^8.5.1",
|
||||
"react": "^19.0.0",
|
||||
"react-dom": "^19.0.0",
|
||||
"tailwindcss": "^4.0.0",
|
||||
"@tailwindcss/postcss": "^4.0.0",
|
||||
"tailwindcss": "^4.0.2",
|
||||
"typescript": "^5.7.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/cross-spawn": "^6.0.6",
|
||||
"@types/node": "22.10.9",
|
||||
"@types/node": "22.13.0",
|
||||
"eslint-config-custom": "workspace:*",
|
||||
"fast-glob": "^3.3.3",
|
||||
"tsconfig": "workspace:*"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
"fumadocs-typescript": "workspace:^",
|
||||
"hast-util-to-estree": "^3.1.1",
|
||||
"npm-to-yarn": "^3.0.1",
|
||||
"oxc-transform": "^0.47.1",
|
||||
"oxc-transform": "^0.48.1",
|
||||
"unist-util-visit": "^5.0.0",
|
||||
"zod": "^3.24.1"
|
||||
},
|
||||
@@ -40,7 +40,7 @@
|
||||
"@types/estree": "^1.0.6",
|
||||
"@types/hast": "^3.0.4",
|
||||
"@types/mdast": "^4.0.3",
|
||||
"@types/node": "22.10.9",
|
||||
"@types/node": "22.13.0",
|
||||
"eslint-config-custom": "workspace:*",
|
||||
"remark": "^15.0.0",
|
||||
"tsconfig": "workspace:*",
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mdx": "^2.0.13",
|
||||
"@types/node": "22.10.9",
|
||||
"@types/react": "^19.0.7",
|
||||
"@types/node": "22.13.0",
|
||||
"@types/react": "^19.0.8",
|
||||
"eslint-config-custom": "workspace:*",
|
||||
"fast-glob": "^3.3.3",
|
||||
"fumadocs-core": "workspace:*",
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
"@types/mdast": "^4.0.3",
|
||||
"@types/mdx": "^2.0.13",
|
||||
"@types/micromatch": "^4.0.9",
|
||||
"@types/react": "^19.0.7",
|
||||
"@types/react": "^19.0.8",
|
||||
"eslint-config-custom": "workspace:*",
|
||||
"fumadocs-core": "workspace:*",
|
||||
"mdast-util-mdx-jsx": "^3.2.0",
|
||||
|
||||
@@ -15,7 +15,6 @@ export async function generateJS(
|
||||
configHash: string,
|
||||
getFrontmatter: (file: string) => Promise<unknown>,
|
||||
): Promise<string> {
|
||||
const experimentalRemote = true;
|
||||
const outDir = path.dirname(outputPath);
|
||||
const imports: ImportInfo[] = [
|
||||
{
|
||||
@@ -24,47 +23,9 @@ export async function generateJS(
|
||||
specifier: 'fumadocs-mdx',
|
||||
},
|
||||
];
|
||||
let asyncInit = false;
|
||||
const lines: string[] = [];
|
||||
|
||||
if (experimentalRemote) {
|
||||
imports.push(
|
||||
{
|
||||
type: 'default',
|
||||
specifier: 'node:fs/promises',
|
||||
name: 'fs',
|
||||
},
|
||||
{
|
||||
type: 'namespace',
|
||||
specifier: toImportPath(configPath, outDir),
|
||||
name: '_source',
|
||||
},
|
||||
{
|
||||
type: 'named',
|
||||
specifier: 'fumadocs-mdx/config',
|
||||
names: ['buildConfig'],
|
||||
},
|
||||
{
|
||||
type: 'named',
|
||||
specifier: 'fumadocs-mdx/runtime/mdx',
|
||||
names: ['remarkInclude'],
|
||||
},
|
||||
{
|
||||
type: 'named',
|
||||
specifier: '@fumadocs/mdx-remote',
|
||||
names: ['compileMDX'],
|
||||
},
|
||||
);
|
||||
|
||||
lines.push(
|
||||
'const [err, _sourceConfig] = buildConfig(_source)',
|
||||
'if (err) throw new Error(err)',
|
||||
'var _temp = _sourceConfig.global?.mdxOptions ?? {}',
|
||||
'_temp = typeof _temp === "function"? await _temp() : _temp',
|
||||
'const _temp_remark = _temp.remarkPlugins',
|
||||
'const _mdxOptions = { ..._temp, remarkPlugins: (v) => typeof _temp_remark === "function"? [remarkInclude, ..._temp_remark(v)] : [remarkInclude, ...v, ...(_temp_remark ?? [])] }',
|
||||
);
|
||||
}
|
||||
|
||||
async function generateEntry(
|
||||
file: FileInfo,
|
||||
collectionName: string,
|
||||
@@ -74,7 +35,48 @@ export async function generateJS(
|
||||
if (collection.type === 'doc' && collection.async) {
|
||||
const frontmatter = await getFrontmatter(file.absolutePath);
|
||||
|
||||
if (experimentalRemote)
|
||||
if (collection.async) {
|
||||
if (!asyncInit) {
|
||||
imports.push(
|
||||
{
|
||||
type: 'default',
|
||||
specifier: 'node:fs/promises',
|
||||
name: 'fs',
|
||||
},
|
||||
{
|
||||
type: 'namespace',
|
||||
specifier: toImportPath(configPath, outDir),
|
||||
name: '_source',
|
||||
},
|
||||
{
|
||||
type: 'named',
|
||||
specifier: 'fumadocs-mdx/config',
|
||||
names: ['buildConfig'],
|
||||
},
|
||||
{
|
||||
type: 'named',
|
||||
specifier: 'fumadocs-mdx/runtime/mdx',
|
||||
names: ['remarkInclude'],
|
||||
},
|
||||
{
|
||||
type: 'named',
|
||||
specifier: '@fumadocs/mdx-remote',
|
||||
names: ['compileMDX'],
|
||||
},
|
||||
);
|
||||
|
||||
lines.unshift(
|
||||
'const [err, _sourceConfig] = buildConfig(_source)',
|
||||
'if (err) throw new Error(err)',
|
||||
'var _temp = _sourceConfig.global?.mdxOptions ?? {}',
|
||||
'_temp = typeof _temp === "function"? await _temp() : _temp',
|
||||
'const _temp_remark = _temp.remarkPlugins',
|
||||
'const _mdxOptions = { ..._temp, remarkPlugins: (v) => typeof _temp_remark === "function"? [remarkInclude, ..._temp_remark(v)] : [remarkInclude, ...v, ...(_temp_remark ?? [])] }',
|
||||
);
|
||||
|
||||
asyncInit = true;
|
||||
}
|
||||
|
||||
return `toRuntimeAsync(${JSON.stringify(frontmatter)}, async () => {
|
||||
const source = await fs.readFile(${JSON.stringify(file.absolutePath)})
|
||||
const collection = _sourceConfig.collections.get(${JSON.stringify(collectionName)})
|
||||
@@ -83,9 +85,7 @@ const mdxOptions = collection?.mdxOptions ?? _mdxOptions
|
||||
const { body, ...res } = await compileMDX({ source: source.toString(), filePath: ${JSON.stringify(file.absolutePath)}, mdxOptions })
|
||||
return { ...res, default: body }
|
||||
}, ${JSON.stringify(file)})`;
|
||||
|
||||
const importPath = `${toImportPath(file.absolutePath, outDir)}?hash=${configHash}&collection=${collectionName}`;
|
||||
return `toRuntimeAsync(${JSON.stringify(frontmatter)}, () => import(${JSON.stringify(importPath)}), ${JSON.stringify(file)})`;
|
||||
}
|
||||
}
|
||||
|
||||
imports.push({
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
import { toRuntime, toRuntimeAsync } from "fumadocs-mdx"
|
||||
import { docs as c_docs } from "./config.ts"
|
||||
export const docs = await Promise.all([toRuntimeAsync({}, () => import("./index.mdx?hash=hash&collection=docs"), {"path":"index.mdx","absolutePath":"$cwd/packages/mdx/test/fixtures/index.mdx"}), toRuntimeAsync({}, () => import("./folder/test.mdx?hash=hash&collection=docs"), {"path":"folder/test.mdx","absolutePath":"$cwd/packages/mdx/test/fixtures/folder/test.mdx"})].map(v => c_docs.transform(v, undefined)));
|
||||
+26
-1
@@ -1,2 +1,27 @@
|
||||
import { toRuntime, toRuntimeAsync } from "fumadocs-mdx"
|
||||
export const docs = [toRuntimeAsync({}, () => import("./index.mdx?hash=hash&collection=docs"), {"path":"index.mdx","absolutePath":"$cwd/packages/mdx/test/fixtures/index.mdx"}), toRuntimeAsync({}, () => import("./folder/test.mdx?hash=hash&collection=docs"), {"path":"folder/test.mdx","absolutePath":"$cwd/packages/mdx/test/fixtures/folder/test.mdx"})];
|
||||
import fs from "node:fs/promises"
|
||||
import * as _source from "./config.ts"
|
||||
import { buildConfig } from "fumadocs-mdx/config"
|
||||
import { remarkInclude } from "fumadocs-mdx/runtime/mdx"
|
||||
import { compileMDX } from "@fumadocs/mdx-remote"
|
||||
const [err, _sourceConfig] = buildConfig(_source)
|
||||
if (err) throw new Error(err)
|
||||
var _temp = _sourceConfig.global?.mdxOptions ?? {}
|
||||
_temp = typeof _temp === "function"? await _temp() : _temp
|
||||
const _temp_remark = _temp.remarkPlugins
|
||||
const _mdxOptions = { ..._temp, remarkPlugins: (v) => typeof _temp_remark === "function"? [remarkInclude, ..._temp_remark(v)] : [remarkInclude, ...v, ...(_temp_remark ?? [])] }
|
||||
export const docs = [toRuntimeAsync({}, async () => {
|
||||
const source = await fs.readFile("$cwd/packages/mdx/test/fixtures/index.mdx")
|
||||
const collection = _sourceConfig.collections.get("docs")
|
||||
const mdxOptions = collection?.mdxOptions ?? _mdxOptions
|
||||
|
||||
const { body, ...res } = await compileMDX({ source: source.toString(), filePath: "$cwd/packages/mdx/test/fixtures/index.mdx", mdxOptions })
|
||||
return { ...res, default: body }
|
||||
}, {"path":"index.mdx","absolutePath":"$cwd/packages/mdx/test/fixtures/index.mdx"}), toRuntimeAsync({}, async () => {
|
||||
const source = await fs.readFile("$cwd/packages/mdx/test/fixtures/folder/test.mdx")
|
||||
const collection = _sourceConfig.collections.get("docs")
|
||||
const mdxOptions = collection?.mdxOptions ?? _mdxOptions
|
||||
|
||||
const { body, ...res } = await compileMDX({ source: source.toString(), filePath: "$cwd/packages/mdx/test/fixtures/folder/test.mdx", mdxOptions })
|
||||
return { ...res, default: body }
|
||||
}, {"path":"folder/test.mdx","absolutePath":"$cwd/packages/mdx/test/fixtures/folder/test.mdx"})];
|
||||
@@ -1,5 +0,0 @@
|
||||
import { toRuntime, toRuntimeAsync } from "fumadocs-mdx"
|
||||
import * as docs_0 from "./index.mdx?collection=docs&hash=hash"
|
||||
import * as docs_1 from "./folder/test.mdx?collection=docs&hash=hash"
|
||||
import { default as c_default, docs as c_docs } from "./config.ts"
|
||||
export const docs = await Promise.all([toRuntime("doc", docs_0, {"path":"index.mdx","absolutePath":"$cwd/packages/mdx/test/fixtures/index.mdx"}), toRuntime("doc", docs_1, {"path":"folder/test.mdx","absolutePath":"$cwd/packages/mdx/test/fixtures/folder/test.mdx"})].map(v => c_docs.transform(v, c_default)));
|
||||
@@ -1,5 +0,0 @@
|
||||
import { toRuntime, toRuntimeAsync } from "fumadocs-mdx"
|
||||
import * as docs_0 from "./index.mdx?collection=docs&hash=hash"
|
||||
import * as docs_1 from "./folder/test.mdx?collection=docs&hash=hash"
|
||||
import { docs as c_docs } from "./config.ts"
|
||||
export const docs = await Promise.all([toRuntime("doc", docs_0, {"path":"index.mdx","absolutePath":"$cwd/packages/mdx/test/fixtures/index.mdx"}), toRuntime("doc", docs_1, {"path":"folder/test.mdx","absolutePath":"$cwd/packages/mdx/test/fixtures/folder/test.mdx"})].map(v => c_docs.transform(v, undefined)));
|
||||
@@ -41,25 +41,6 @@ const cases = [
|
||||
dir: path.join(file, './fixtures'),
|
||||
}),
|
||||
},
|
||||
{
|
||||
name: 'sync-transform',
|
||||
collection: defineCollections({
|
||||
type: 'doc',
|
||||
dir: path.join(file, './fixtures'),
|
||||
transform() {},
|
||||
}),
|
||||
},
|
||||
{
|
||||
name: 'sync-transform-global',
|
||||
collection: defineCollections({
|
||||
type: 'doc',
|
||||
dir: path.join(file, './fixtures'),
|
||||
transform() {},
|
||||
}),
|
||||
global: {
|
||||
// empty
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'async',
|
||||
collection: defineCollections({
|
||||
@@ -68,18 +49,9 @@ const cases = [
|
||||
async: true,
|
||||
}),
|
||||
},
|
||||
{
|
||||
name: 'async-transform',
|
||||
collection: defineCollections({
|
||||
type: 'doc',
|
||||
dir: path.join(file, './fixtures'),
|
||||
async: true,
|
||||
transform() {},
|
||||
}),
|
||||
},
|
||||
];
|
||||
|
||||
for (const { name, collection, global } of cases) {
|
||||
for (const { name, collection } of cases) {
|
||||
test(`generate JS index file: ${name}`, async () => {
|
||||
const out = await generateJS(
|
||||
path.join(file, './fixtures/config.ts'),
|
||||
@@ -89,7 +61,6 @@ for (const { name, collection, global } of cases) {
|
||||
},
|
||||
// @ts-expect-error -- test file
|
||||
collections: new Map([['docs', collection]]),
|
||||
global,
|
||||
},
|
||||
path.join(file, './fixtures/index-async.output.js'),
|
||||
'hash',
|
||||
|
||||
@@ -59,21 +59,21 @@
|
||||
"react-hook-form": "^7.54.2",
|
||||
"remark": "^15.0.1",
|
||||
"remark-rehype": "^11.1.1",
|
||||
"shiki": "^2.1.0",
|
||||
"shiki": "^2.2.0",
|
||||
"xml-js": "^1.6.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@scalar/api-client-react": "^1.1.17",
|
||||
"@scalar/api-client-react": "^1.1.22",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"@types/node": "22.10.9",
|
||||
"@types/node": "22.13.0",
|
||||
"@types/openapi-sampler": "^1.0.3",
|
||||
"@types/react": "^19.0.7",
|
||||
"@types/react": "^19.0.8",
|
||||
"bunchee": "^6.3.2",
|
||||
"eslint-config-custom": "workspace:*",
|
||||
"lucide-react": "^0.473.0",
|
||||
"lucide-react": "^0.474.0",
|
||||
"next": "15.1.6",
|
||||
"openapi-types": "^12.1.3",
|
||||
"tailwindcss": "^4.0.0",
|
||||
"tailwindcss": "^4.0.2",
|
||||
"tsconfig": "workspace:*"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -37,20 +37,20 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@radix-ui/react-popover": "^1.1.5",
|
||||
"@shikijs/twoslash": "^2.1.0",
|
||||
"@shikijs/twoslash": "^2.2.0",
|
||||
"mdast-util-from-markdown": "^2.0.2",
|
||||
"mdast-util-gfm": "^3.0.0",
|
||||
"mdast-util-to-hast": "^13.2.0",
|
||||
"tailwind-merge": "^2.6.0"
|
||||
"tailwind-merge": "^3.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/hast": "^3.0.4",
|
||||
"@types/mdast": "^4.0.3",
|
||||
"@types/node": "22.10.9",
|
||||
"@types/react": "^19.0.7",
|
||||
"@types/node": "22.13.0",
|
||||
"@types/react": "^19.0.8",
|
||||
"eslint-config-custom": "workspace:*",
|
||||
"fumadocs-ui": "workspace:*",
|
||||
"shiki": "^2.1.0",
|
||||
"shiki": "^2.2.0",
|
||||
"tsconfig": "workspace:*"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -40,15 +40,15 @@
|
||||
"mdast-util-from-markdown": "^2.0.2",
|
||||
"mdast-util-gfm": "^3.0.0",
|
||||
"mdast-util-to-hast": "^13.2.0",
|
||||
"shiki": "^2.1.0",
|
||||
"shiki": "^2.2.0",
|
||||
"ts-morph": "^25.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/estree": "^1.0.6",
|
||||
"@types/hast": "^3.0.4",
|
||||
"@types/mdast": "^4.0.3",
|
||||
"@types/node": "22.10.9",
|
||||
"@types/react": "19.0.7",
|
||||
"@types/node": "22.13.0",
|
||||
"@types/react": "19.0.8",
|
||||
"@types/react-dom": "19.0.3",
|
||||
"eslint-config-custom": "workspace:*",
|
||||
"fumadocs-ui": "workspace:*",
|
||||
|
||||
@@ -74,23 +74,23 @@
|
||||
"@radix-ui/react-tabs": "^1.1.2",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"lodash.merge": "^4.6.2",
|
||||
"lucide-react": "^0.473.0",
|
||||
"lucide-react": "^0.474.0",
|
||||
"next-themes": "^0.4.4",
|
||||
"postcss-selector-parser": "^7.0.0",
|
||||
"react-medium-image-zoom": "^5.2.13",
|
||||
"tailwind-merge": "^2.6.0"
|
||||
"tailwind-merge": "^3.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@fumadocs/cli": "workspace:*",
|
||||
"@next/eslint-plugin-next": "^15.1.6",
|
||||
"@tailwindcss/cli": "^4.0.0",
|
||||
"@tailwindcss/cli": "^4.0.2",
|
||||
"@types/lodash.merge": "^4.6.9",
|
||||
"@types/react": "^19.0.7",
|
||||
"@types/react": "^19.0.8",
|
||||
"@types/react-dom": "^19.0.3",
|
||||
"eslint-config-custom": "workspace:*",
|
||||
"fumadocs-core": "workspace:*",
|
||||
"next": "15.1.6",
|
||||
"tailwindcss": "^4.0.0",
|
||||
"tailwindcss": "^4.0.2",
|
||||
"tsc-alias": "^1.8.10",
|
||||
"tsconfig": "workspace:*"
|
||||
},
|
||||
|
||||
Generated
+1195
-977
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user