fumadocs-typescript 5.2.1 → 5.2.3

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 +5 -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.1";
33
+ var version = "5.2.3";
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}`);
@@ -204,6 +204,7 @@ async function buildTypeProp(entries, renderer) {
204
204
  elements: await Promise.all(tags.params.map(onParam))
205
205
  });
206
206
  if (entry.description) node.addJsxProperty("description", await renderer.renderMarkdownToHast(entry.description));
207
+ if (entry.deprecated) node.addExpressionNode("deprecated", valueToEstree(true));
207
208
  return node.build();
208
209
  }
209
210
  async function onParam(param) {
@@ -329,7 +330,7 @@ function createFileSystemGeneratorCache(dir) {
329
330
  },
330
331
  async read(hash) {
331
332
  try {
332
- 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"));
333
334
  } catch {
334
335
  return;
335
336
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-typescript",
3
- "version": "5.2.1",
3
+ "version": "5.2.3",
4
4
  "description": "Typescript Integration for Fumadocs",
5
5
  "keywords": [
6
6
  "Docs",
@@ -45,17 +45,17 @@
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.0",
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",
52
52
  "shiki": "^4.0.2",
53
- "tsdown": "0.21.6",
53
+ "tsdown": "0.21.7",
54
54
  "typescript": "^6.0.2",
55
55
  "vfile": "^6.0.3",
56
- "fumadocs-core": "16.7.8",
57
- "fumadocs-ui": "16.7.8",
58
- "tsconfig": "0.0.0"
56
+ "fumadocs-core": "16.7.13",
57
+ "tsconfig": "0.0.0",
58
+ "fumadocs-ui": "16.7.13"
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
  },