fumadocs-typescript 5.2.2 → 5.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +4 -4
  2. package/package.json +8 -7
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ async function getTypeTableOutput(gen, { name, type, ...props }, options) {
10
10
  const file = props.path && options?.basePath ? path.join(options.basePath, props.path) : props.path;
11
11
  let typeName = name;
12
12
  let content = "";
13
- if (file) content = (await fs.readFile(file)).toString();
13
+ if (file) content = await fs.readFile(file, "utf-8");
14
14
  if (type && type.split("\n").length > 1) content += `\n${type}`;
15
15
  else if (type) {
16
16
  typeName ??= "$Fumadocs";
@@ -30,7 +30,7 @@ function generateHash(str) {
30
30
  }
31
31
  //#endregion
32
32
  //#region package.json
33
- var version = "5.2.2";
33
+ var version = "5.2.4";
34
34
  //#endregion
35
35
  //#region src/lib/base.ts
36
36
  async function createProject(options = {}) {
@@ -62,7 +62,7 @@ function createGenerator(options = {}) {
62
62
  return {
63
63
  async generateDocumentation(file, name, options = {}) {
64
64
  const fullPath = path.resolve(file.path);
65
- const content = file.content ?? (await fs.readFile(fullPath)).toString();
65
+ const content = file.content ?? await fs.readFile(fullPath, "utf-8");
66
66
  let cacheKey;
67
67
  if (cache) {
68
68
  cacheKey = generateHash(`${file.path}:${name}:${content}:${version}`);
@@ -330,7 +330,7 @@ function createFileSystemGeneratorCache(dir) {
330
330
  },
331
331
  async read(hash) {
332
332
  try {
333
- return JSON.parse((await fs.readFile(path.join(dir, `${hash}.json`))).toString());
333
+ return JSON.parse(await fs.readFile(path.join(dir, `${hash}.json`), "utf-8"));
334
334
  } catch {
335
335
  return;
336
336
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-typescript",
3
- "version": "5.2.2",
3
+ "version": "5.2.4",
4
4
  "description": "Typescript Integration for Fumadocs",
5
5
  "keywords": [
6
6
  "Docs",
@@ -12,7 +12,7 @@
12
12
  "author": "Fuma Nama",
13
13
  "repository": "github:fuma-nama/fumadocs",
14
14
  "files": [
15
- "dist/*"
15
+ "dist"
16
16
  ],
17
17
  "type": "module",
18
18
  "main": "./dist/index.js",
@@ -45,7 +45,7 @@
45
45
  "@types/estree": "^1.0.8",
46
46
  "@types/hast": "^3.0.4",
47
47
  "@types/mdast": "^4.0.4",
48
- "@types/node": "25.5.2",
48
+ "@types/node": "25.6.0",
49
49
  "@types/react": "^19.2.14",
50
50
  "@types/react-dom": "^19.2.3",
51
51
  "mdast-util-mdx": "^3.0.0",
@@ -53,9 +53,9 @@
53
53
  "tsdown": "0.21.7",
54
54
  "typescript": "^6.0.2",
55
55
  "vfile": "^6.0.3",
56
- "fumadocs-core": "16.7.11",
57
- "fumadocs-ui": "16.7.11",
58
- "tsconfig": "0.0.0"
56
+ "fumadocs-core": "16.7.14",
57
+ "tsconfig": "0.0.0",
58
+ "fumadocs-ui": "16.7.14"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "@types/estree": "*",
@@ -64,7 +64,8 @@
64
64
  "@types/react": "*",
65
65
  "fumadocs-core": "^16.7.0",
66
66
  "fumadocs-ui": "^16.7.0",
67
- "react": "*",
67
+ "react": "^19.2.0",
68
+ "react-dom": "^19.2.0",
68
69
  "shiki": "*",
69
70
  "typescript": "*"
70
71
  },