MDX: bump zod to v4

This commit is contained in:
Fuma Nama
2025-07-10 16:51:34 +08:00
parent d57bfeb970
commit 73e07a5178
29 changed files with 1627 additions and 1325 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'fumadocs-mdx': patch
---
bump zod to v4
+13 -13
View File
@@ -12,17 +12,17 @@
"start": "next start"
},
"dependencies": {
"@ai-sdk/openai": "^1.3.22",
"@ai-sdk/openai": "^1.3.23",
"@ai-sdk/react": "^1.2.12",
"@fumadocs/mdx-remote": "workspace:*",
"@orama/orama": "^3.1.9",
"@orama/orama": "^3.1.10",
"@oramacloud/client": "^2.1.4",
"@radix-ui/react-dialog": "^1.1.14",
"@radix-ui/react-hover-card": "^1.1.14",
"@radix-ui/react-tooltip": "^1.2.7",
"@shikijs/rehype": "^3.7.0",
"@shikijs/transformers": "^3.7.0",
"ai": "^4.3.15",
"ai": "^4.3.17",
"class-variance-authority": "^0.7.1",
"feed": "^5.1.0",
"fumadocs-core": "workspace:*",
@@ -35,11 +35,11 @@
"hast-util-to-jsx-runtime": "^2.3.6",
"katex": "^0.16.22",
"lucide-react": "^0.525.0",
"mermaid": "^11.7.0",
"next": "15.3.4",
"mermaid": "^11.8.1",
"next": "15.3.5",
"next-themes": "^0.4.6",
"octokit": "^5.0.3",
"oxc-transform": "^0.75.0",
"oxc-transform": "^0.76.0",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"rehype-katex": "^7.0.1",
@@ -51,22 +51,22 @@
"scroll-into-view-if-needed": "^3.1.0",
"shiki": "^3.7.0",
"tailwind-merge": "^3.3.1",
"twoslash": "^0.3.1",
"twoslash": "^0.3.2",
"unist-util-visit": "^5.0.0",
"zod": "^3.25.67"
"zod": "^4.0.2"
},
"devDependencies": {
"@fumadocs/cli": "workspace:*",
"@next/bundle-analyzer": "15.3.4",
"@next/env": "15.3.4",
"@next/eslint-plugin-next": "15.3.4",
"@next/bundle-analyzer": "15.3.5",
"@next/env": "15.3.5",
"@next/eslint-plugin-next": "15.3.5",
"@tailwindcss/postcss": "^4.1.11",
"@types/hast": "^3.0.4",
"@types/mdx": "^2.0.13",
"@types/node": "24.0.7",
"@types/node": "24.0.12",
"@types/react": "^19.1.8",
"@types/react-dom": "^19.1.6",
"algoliasearch": "5.29.0",
"algoliasearch": "5.32.0",
"eslint-config-custom": "workspace:*",
"gray-matter": "^4.0.3",
"next-validate-link": "^1.5.2",
+2 -2
View File
@@ -11,12 +11,12 @@
"@fumadocs/content-collections": "workspace:*",
"fumadocs-core": "workspace:*",
"fumadocs-ui": "workspace:*",
"next": "^15.3.4",
"next": "^15.3.5",
"react": "19.1.0",
"react-dom": "19.1.0"
},
"devDependencies": {
"@content-collections/core": "^0.9.1",
"@content-collections/core": "^0.10.0",
"@content-collections/mdx": "^0.2.2",
"@content-collections/next": "^0.2.6",
"@types/mdx": "^2.0.13",
+2 -2
View File
@@ -8,11 +8,11 @@
"start": "next start"
},
"dependencies": {
"@orama/tokenizers": "^3.1.9",
"@orama/tokenizers": "^3.1.10",
"fumadocs-core": "workspace:*",
"fumadocs-mdx": "workspace:*",
"fumadocs-ui": "workspace:*",
"next": "15.3.4",
"next": "15.3.5",
"react": "19.1.0",
"react-dom": "19.1.0"
},
+1 -1
View File
@@ -11,7 +11,7 @@
"fumadocs-core": "workspace:*",
"fumadocs-mdx": "workspace:*",
"fumadocs-ui": "workspace:*",
"next": "15.3.4",
"next": "15.3.5",
"react": "19.1.0",
"react-dom": "19.1.0"
},
+1 -1
View File
@@ -14,7 +14,7 @@
"fumadocs-mdx": "workspace:*",
"fumadocs-openapi": "workspace:*",
"fumadocs-ui": "workspace:*",
"next": "15.3.4",
"next": "15.3.5",
"react": "19.1.0",
"react-dom": "19.1.0",
"shiki": "^3.7.0"
+2 -2
View File
@@ -14,14 +14,14 @@
"fumadocs-mdx": "workspace:*",
"fumadocs-python": "workspace:*",
"fumadocs-ui": "workspace:*",
"next": "15.3.4",
"next": "15.3.5",
"react": "^19.1.0",
"react-dom": "^19.1.0"
},
"devDependencies": {
"@tailwindcss/postcss": "^4.1.11",
"@types/mdx": "^2.0.13",
"@types/node": "24.0.7",
"@types/node": "24.0.12",
"@types/react": "^19.1.8",
"@types/react-dom": "^19.1.6",
"postcss": "^8.5.6",
+3 -3
View File
@@ -10,7 +10,7 @@
},
"dependencies": {
"@fumadocs/mdx-remote": "workspace:*",
"@orama/tokenizers": "^3.1.9",
"@orama/tokenizers": "^3.1.10",
"@react-router/node": "^7.6.3",
"@react-router/serve": "^7.6.3",
"fumadocs-core": "workspace:*",
@@ -24,12 +24,12 @@
"devDependencies": {
"@react-router/dev": "^7.6.3",
"@tailwindcss/vite": "^4.1.11",
"@types/node": "^24.0.7",
"@types/node": "^24.0.12",
"@types/react": "^19.1.2",
"@types/react-dom": "^19.1.2",
"tailwindcss": "^4.1.11",
"typescript": "^5.8.3",
"vite": "^7.0.0",
"vite": "^7.0.3",
"vite-tsconfig-paths": "^5.1.4"
}
}
+2 -2
View File
@@ -24,13 +24,13 @@
"devDependencies": {
"@react-router/dev": "^7.6.3",
"@tailwindcss/vite": "^4.1.11",
"@types/node": "^24.0.7",
"@types/node": "^24.0.12",
"@types/react": "^19.1.8",
"@types/react-dom": "^19.1.6",
"react-router-devtools": "^5.0.6",
"tailwindcss": "^4.1.11",
"typescript": "^5.8.3",
"vite": "^7.0.0",
"vite": "^7.0.3",
"vite-tsconfig-paths": "^5.1.4"
}
}
+1 -1
View File
@@ -11,7 +11,7 @@
"@fumadocs/mdx-remote": "workspace:*",
"fumadocs-core": "workspace:*",
"fumadocs-ui": "workspace:*",
"next": "15.3.4",
"next": "15.3.5",
"react": "19.1.0",
"react-dom": "19.1.0",
"tinyglobby": "^0.2.14"
+6 -6
View File
@@ -10,9 +10,9 @@
},
"dependencies": {
"@fumadocs/mdx-remote": "workspace:*",
"@tanstack/react-router": "^1.123.0",
"@tanstack/react-router-devtools": "^1.123.0",
"@tanstack/react-start": "^1.123.0",
"@tanstack/react-router": "^1.125.6",
"@tanstack/react-router-devtools": "^1.125.6",
"@tanstack/react-start": "^1.126.1",
"fumadocs-core": "workspace:*",
"fumadocs-ui": "workspace:*",
"gray-matter": "^4.0.3",
@@ -20,12 +20,12 @@
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tailwind-merge": "^3.3.1",
"vite": "^7.0.0",
"zod": "^3.25.67"
"vite": "^7.0.3",
"zod": "^4.0.2"
},
"devDependencies": {
"@tailwindcss/vite": "^4.1.11",
"@types/node": "^24.0.7",
"@types/node": "^24.0.12",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"tailwindcss": "^4.1.11",
+3 -3
View File
@@ -18,9 +18,9 @@
},
"devDependencies": {
"@changesets/cli": "^2.29.5",
"@eslint/js": "^9.30.0",
"@eslint/js": "^9.30.1",
"concurrently": "^9.2.0",
"eslint": "^9.30.0",
"eslint": "^9.30.1",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "5.2.0",
"eslint-plugin-tailwindcss": "^3.18.0",
@@ -30,7 +30,7 @@
"tsup": "8.5.0",
"turbo": "2.5.4",
"typescript": "^5.8.3",
"typescript-eslint": "^8.35.0",
"typescript-eslint": "^8.36.0",
"vitest": "^3.2.4"
},
"packageManager": "[email protected]",
+1 -1
View File
@@ -42,7 +42,7 @@
"ts-morph": "^26.0.0"
},
"devDependencies": {
"@types/node": "24.0.7",
"@types/node": "24.0.12",
"eslint-config-custom": "workspace:*",
"tsconfig": "workspace:*",
"tsx": "^4.20.3"
+3 -3
View File
@@ -35,14 +35,14 @@
"types:check": "tsc --noEmit"
},
"devDependencies": {
"@content-collections/core": "^0.9.1",
"@content-collections/core": "^0.10.0",
"@content-collections/mdx": "^0.2.2",
"@types/node": "24.0.7",
"@types/node": "24.0.12",
"eslint-config-custom": "workspace:*",
"fumadocs-core": "workspace:*",
"tsconfig": "workspace:*",
"unified": "^11.0.5",
"zod": "^3.25.67"
"zod": "^4.0.2"
},
"peerDependencies": {
"@content-collections/core": "0.x.x",
@@ -160,7 +160,7 @@ export const frontmatterSchema = z.object({
full: z.boolean().optional(),
// Fumadocs OpenAPI generated
_openapi: z.object({}).passthrough().optional(),
_openapi: z.looseObject({}).optional(),
});
export function createDocSchema(z: typeof Zod) {
@@ -170,7 +170,7 @@ export function createDocSchema(z: typeof Zod) {
icon: z.string().optional(),
full: z.boolean().optional(),
// Fumadocs OpenAPI generated
_openapi: z.record(z.any()).optional(),
_openapi: z.record(z.string(), z.any()).optional(),
};
}
+5 -5
View File
@@ -93,7 +93,7 @@
},
"dependencies": {
"@formatjs/intl-localematcher": "^0.6.1",
"@orama/orama": "^3.1.9",
"@orama/orama": "^3.1.10",
"@shikijs/rehype": "^3.7.0",
"@shikijs/transformers": "^3.7.0",
"github-slugger": "^2.0.0",
@@ -113,19 +113,19 @@
"devDependencies": {
"@mdx-js/mdx": "^3.1.0",
"@oramacloud/client": "^2.1.4",
"@tanstack/react-router": "^1.123.0",
"@tanstack/react-router": "^1.125.6",
"@types/estree-jsx": "^1.0.5",
"@types/hast": "^3.0.4",
"@types/mdast": "^4.0.3",
"@types/negotiator": "^0.6.4",
"@types/node": "24.0.7",
"@types/node": "24.0.12",
"@types/react": "^19.1.8",
"@types/react-dom": "^19.1.6",
"algoliasearch": "5.29.0",
"algoliasearch": "5.32.0",
"eslint-config-custom": "workspace:*",
"mdast-util-mdx-jsx": "^3.2.0",
"mdast-util-mdxjs-esm": "^2.0.1",
"next": "^15.3.4",
"next": "^15.3.5",
"react-router": "^7.6.3",
"remark-mdx": "^3.1.0",
"tsconfig": "workspace:*",
+6 -6
View File
@@ -5,7 +5,7 @@
"description": "Used to track dependency versions in create-fumadocs-app",
"license": "MIT",
"dependencies": {
"@content-collections/core": "^0.9.1",
"@content-collections/core": "^0.10.0",
"@content-collections/mdx": "^0.2.2",
"@content-collections/next": "^0.2.6",
"@react-router/dev": "^7.6.3",
@@ -13,16 +13,16 @@
"@react-router/serve": "^7.6.3",
"@tailwindcss/postcss": "^4.1.11",
"@tailwindcss/vite": "^4.1.11",
"@tanstack/react-router": "^1.123.0",
"@tanstack/react-start": "^1.123.0",
"@tanstack/react-router": "^1.125.6",
"@tanstack/react-start": "^1.126.1",
"@types/mdx": "^2.0.13",
"@types/node": "24.0.7",
"@types/node": "24.0.12",
"@types/react": "^19.1.8",
"@types/react-dom": "^19.1.6",
"@vitejs/plugin-react": "^4.6.0",
"gray-matter": "^4.0.3",
"isbot": "^5.1.28",
"next": "15.3.4",
"next": "15.3.5",
"postcss": "^8.5.6",
"react": "^19.1.0",
"react-dom": "^19.1.0",
@@ -33,7 +33,7 @@
"tinyglobby": "^0.2.14",
"typescript": "^5.8.3",
"vinxi": "^0.5.8",
"vite": "^7.0.0",
"vite": "^7.0.3",
"vite-tsconfig-paths": "^5.1.4"
}
}
+1 -1
View File
@@ -35,7 +35,7 @@
},
"devDependencies": {
"@types/cross-spawn": "^6.0.6",
"@types/node": "24.0.7",
"@types/node": "24.0.12",
"eslint-config-custom": "workspace:*",
"tinyglobby": "^0.2.14",
"tsconfig": "workspace:*"
+3 -3
View File
@@ -40,16 +40,16 @@
"estree-util-to-js": "^2.0.0",
"estree-util-value-to-estree": "^3.4.0",
"npm-to-yarn": "^3.0.1",
"oxc-transform": "^0.75.0",
"oxc-transform": "^0.76.0",
"unist-util-visit": "^5.0.0",
"zod": "^3.25.67"
"zod": "^4.0.2"
},
"devDependencies": {
"@mdx-js/mdx": "^3.1.0",
"@types/estree": "^1.0.8",
"@types/hast": "^3.0.4",
"@types/mdast": "^4.0.3",
"@types/node": "24.0.7",
"@types/node": "24.0.12",
"eslint-config-custom": "workspace:*",
"mdast-util-mdx-jsx": "^3.2.0",
"remark": "^15.0.0",
+2 -2
View File
@@ -38,11 +38,11 @@
"dependencies": {
"@mdx-js/mdx": "^3.1.0",
"gray-matter": "^4.0.3",
"zod": "^3.25.67"
"zod": "^4.0.2"
},
"devDependencies": {
"@types/mdx": "^2.0.13",
"@types/node": "24.0.7",
"@types/node": "24.0.12",
"@types/react": "^19.1.8",
"eslint-config-custom": "workspace:*",
"fumadocs-core": "workspace:*",
+5 -5
View File
@@ -57,7 +57,7 @@
"@mdx-js/mdx": "^3.1.0",
"@standard-schema/spec": "^1.0.0",
"chokidar": "^4.0.3",
"esbuild": "^0.25.5",
"esbuild": "^0.25.6",
"estree-util-value-to-estree": "^3.4.0",
"js-yaml": "^4.1.0",
"lru-cache": "^11.1.0",
@@ -65,7 +65,7 @@
"tinyexec": "^1.0.1",
"tinyglobby": "^0.2.14",
"unist-util-visit": "^5.0.0",
"zod": "^3.25.67"
"zod": "^4.0.2"
},
"devDependencies": {
"@fumadocs/mdx-remote": "workspace:*",
@@ -76,12 +76,12 @@
"eslint-config-custom": "workspace:*",
"fumadocs-core": "workspace:*",
"mdast-util-mdx-jsx": "^3.2.0",
"next": "^15.3.4",
"next": "^15.3.5",
"tsconfig": "workspace:*",
"unified": "^11.0.5",
"vfile": "^6.0.3",
"vite": "^7.0.0",
"webpack": "^5.99.9"
"vite": "^7.0.3",
"webpack": "^5.100.0"
},
"peerDependencies": {
"@fumadocs/mdx-remote": "^1.2.0",
+1 -1
View File
@@ -19,7 +19,7 @@ export const frontmatterSchema = z.object({
full: z.boolean().optional(),
// Fumadocs OpenAPI generated
_openapi: z.object({}).passthrough().optional(),
_openapi: z.looseObject({}).optional(),
});
export class ValidationError extends Error {
+4 -4
View File
@@ -30,10 +30,10 @@ test('format errors', async () => {
expect(error.toString()).toMatchInlineSnapshot(`
"in index.mdx::
text: Expected string, received number
obj,key: Required
obj,value: Expected number, received string
value: String must contain at most 4 character(s)"
text: Invalid input: expected string, received number
obj,key: Invalid input: expected number, received undefined
obj,value: Invalid input: expected number, received string
value: Too big: expected string to have <=4 characters"
`);
}
});
+5 -5
View File
@@ -57,7 +57,7 @@
"@radix-ui/react-dialog": "^1.1.14",
"@radix-ui/react-select": "^2.2.5",
"@radix-ui/react-slot": "^1.2.3",
"@scalar/openapi-parser": "0.18.0",
"@scalar/openapi-parser": "0.18.1",
"ajv": "^8.17.1",
"class-variance-authority": "^0.7.1",
"fumadocs-core": "workspace:*",
@@ -67,7 +67,7 @@
"js-yaml": "^4.1.0",
"next-themes": "^0.4.6",
"openapi-sampler": "^1.6.1",
"react-hook-form": "^7.59.0",
"react-hook-form": "^7.60.0",
"remark": "^15.0.1",
"remark-rehype": "^11.1.2",
"shiki": "^3.7.0",
@@ -75,14 +75,14 @@
"xml-js": "^1.6.11"
},
"devDependencies": {
"@scalar/api-client-react": "^1.3.18",
"@scalar/api-client-react": "^1.3.20",
"@types/js-yaml": "^4.0.9",
"@types/node": "24.0.7",
"@types/node": "24.0.12",
"@types/openapi-sampler": "^1.0.3",
"@types/react": "^19.1.8",
"eslint-config-custom": "workspace:*",
"json-schema-typed": "^8.0.1",
"next": "15.3.4",
"next": "15.3.5",
"openapi-types": "^12.1.3",
"tailwindcss": "^4.1.11",
"tsc-alias": "^1.8.16",
+1 -1
View File
@@ -40,7 +40,7 @@
},
"devDependencies": {
"@types/js-yaml": "^4.0.9",
"@types/node": "^24.0.7",
"@types/node": "^24.0.12",
"@types/react": "^19.1.8",
"eslint-config-custom": "workspace:*",
"fumadocs-core": "workspace:*",
+2 -2
View File
@@ -48,12 +48,12 @@
"mdast-util-to-hast": "^13.2.0",
"shiki": "^3.7.0",
"tailwind-merge": "^3.3.1",
"twoslash": "^0.3.1"
"twoslash": "^0.3.2"
},
"devDependencies": {
"@types/hast": "^3.0.4",
"@types/mdast": "^4.0.3",
"@types/node": "24.0.7",
"@types/node": "24.0.12",
"@types/react": "^19.1.8",
"eslint-config-custom": "workspace:*",
"fumadocs-ui": "workspace:*",
+1 -1
View File
@@ -50,7 +50,7 @@
"@types/estree": "^1.0.8",
"@types/hast": "^3.0.4",
"@types/mdast": "^4.0.3",
"@types/node": "24.0.7",
"@types/node": "24.0.12",
"@types/react": "19.1.8",
"@types/react-dom": "19.1.6",
"eslint-config-custom": "workspace:*",
+2 -2
View File
@@ -103,14 +103,14 @@
},
"devDependencies": {
"@fumadocs/cli": "workspace:*",
"@next/eslint-plugin-next": "^15.3.4",
"@next/eslint-plugin-next": "^15.3.5",
"@tailwindcss/cli": "^4.1.11",
"@types/lodash.merge": "^4.6.9",
"@types/react": "^19.1.8",
"@types/react-dom": "^19.1.6",
"eslint-config-custom": "workspace:*",
"fumadocs-core": "workspace:*",
"next": "15.3.4",
"next": "15.3.5",
"tailwindcss": "^4.1.11",
"tsc-alias": "^1.8.16",
"tsconfig": "workspace:*"
+1542 -1245
View File
File diff suppressed because it is too large Load Diff