refactor(*): migrate to yaml

This commit is contained in:
Fuma Nama
2026-07-13 17:10:02 +08:00
parent 06dd35b3a8
commit 8a280f5d3b
69 changed files with 1104 additions and 1176 deletions
+3 -3
View File
@@ -44,8 +44,8 @@
"@base-ui/react": "^1.6.0",
"class-variance-authority": "^0.7.1",
"cnfast": "^0.0.8",
"js-yaml": "^5.2.1",
"lucide-react": "^1.23.0"
"lucide-react": "^1.24.0",
"yaml": "^2.9.0"
},
"devDependencies": {
"@types/node": "^26.1.1",
@@ -53,7 +53,7 @@
"fumadocs-core": "workspace:*",
"fumadocs-ui": "workspace:@fumadocs/base-ui@*",
"tsconfig": "workspace:*",
"tsdown": "0.22.4"
"tsdown": "0.22.5"
},
"peerDependencies": {
"@types/react": "*",
+2 -2
View File
@@ -1,6 +1,6 @@
import type { OutputFile } from './convert';
import * as fs from 'node:fs/promises';
import { dump } from 'js-yaml';
import { stringify } from 'yaml';
import * as path from 'node:path';
interface WriteOptions {
@@ -28,5 +28,5 @@ export async function write(output: OutputFile[], options: WriteOptions = {}) {
}
export function frontmatter(obj: unknown) {
return `---\n${dump(obj).trim()}\n---`;
return `---\n${stringify(obj, { compat: 'yaml-1.1', singleQuote: true }).trim()}\n---`;
}