fumadocs-typescript 4.0.4 → 4.0.6

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.
@@ -53,8 +53,8 @@ var __async = (__this, __arguments, generator) => {
53
53
  // src/markdown.ts
54
54
  import { remark } from "remark";
55
55
  import {
56
- remarkGfm,
57
- rehypeCode
56
+ rehypeCode,
57
+ remarkGfm
58
58
  } from "fumadocs-core/mdx-plugins";
59
59
  import remarkRehype from "remark-rehype";
60
60
  var processor = remark().use(remarkGfm).use(remarkRehype).use(rehypeCode, {
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { G as GenerateOptions, a as GeneratedDoc, D as DocEntry, b as Generator, c as GenerateTypeTableOptions } from './base-CDpZg096.js';
2
2
  export { e as GeneratorOptions, f as createGenerator, d as createProject, g as generateDocumentation } from './base-CDpZg096.js';
3
- import fg from 'fast-glob';
3
+ import { GlobOptions } from 'tinyglobby';
4
4
  import { Nodes } from 'hast';
5
5
  import { Root } from 'mdast';
6
6
  import { Transformer } from 'unified';
@@ -25,7 +25,7 @@ interface GenerateFilesOptions {
25
25
  * Output directory, or a function that returns the output path
26
26
  */
27
27
  output: string | ((inputPath: string) => string);
28
- globOptions?: fg.Options;
28
+ globOptions?: GlobOptions;
29
29
  options?: GenerateMDXOptions;
30
30
  /**
31
31
  * @returns New content
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  __spreadProps,
5
5
  __spreadValues,
6
6
  renderMarkdownToHast
7
- } from "./chunk-B4VUDCYC.js";
7
+ } from "./chunk-C45FGSN3.js";
8
8
 
9
9
  // src/lib/base.ts
10
10
  import {
@@ -23,11 +23,11 @@ function createProject(options = {}) {
23
23
  }
24
24
 
25
25
  // src/lib/base.ts
26
- import fs3 from "node:fs";
26
+ import fs3 from "fs";
27
27
 
28
28
  // src/lib/type-table.ts
29
- import * as fs from "node:fs/promises";
30
- import { join } from "node:path";
29
+ import * as fs from "fs/promises";
30
+ import { join } from "path";
31
31
  function getTypeTableOutput(gen, _a, options) {
32
32
  return __async(this, null, function* () {
33
33
  var _b = _a, { name, type } = _b, props = __objRest(_b, ["name", "type"]);
@@ -57,9 +57,9 @@ export type ${typeName} = ${type}`;
57
57
  }
58
58
 
59
59
  // src/lib/cache.ts
60
- import fs2 from "node:fs";
61
- import { createHash } from "node:crypto";
62
- import path from "node:path";
60
+ import fs2 from "fs";
61
+ import { createHash } from "crypto";
62
+ import path from "path";
63
63
  function createCache() {
64
64
  const dir = path.join(process.cwd(), ".next/fumadocs-typescript");
65
65
  try {
@@ -85,7 +85,7 @@ function createCache() {
85
85
  }
86
86
 
87
87
  // src/lib/base.ts
88
- import path2 from "node:path";
88
+ import path2 from "path";
89
89
  function createGenerator(config) {
90
90
  var _a;
91
91
  const options = config instanceof Project2 ? {
@@ -192,7 +192,7 @@ function getDocEntry(prop, context) {
192
192
  }
193
193
 
194
194
  // src/lib/mdx.ts
195
- import * as path3 from "node:path";
195
+ import * as path3 from "path";
196
196
  var regex = new RegExp("^---type-table---\\r?\\n(?<file>.+?)(?:#(?<name>.+))?\\r?\\n---end---$", "gm");
197
197
  var defaultTemplates = {
198
198
  block: (doc, c) => `### ${doc.name}
@@ -235,12 +235,12 @@ function replaceJsDocLinks(md) {
235
235
  }
236
236
 
237
237
  // src/lib/file.ts
238
- import * as path4 from "node:path";
239
- import { mkdir, writeFile, readFile as readFile2 } from "node:fs/promises";
240
- import fg from "fast-glob";
238
+ import * as path4 from "path";
239
+ import { mkdir, writeFile, readFile as readFile2 } from "fs/promises";
240
+ import { glob } from "tinyglobby";
241
241
  function generateFiles(generator, options) {
242
242
  return __async(this, null, function* () {
243
- const files = yield fg(options.input, options.globOptions);
243
+ const files = yield glob(options.input, options.globOptions);
244
244
  const produce = files.map((file) => __async(null, null, function* () {
245
245
  const absolutePath = path4.resolve(file);
246
246
  const outputPath = typeof options.output === "function" ? options.output(file) : path4.resolve(
@@ -271,7 +271,7 @@ function write(file, content) {
271
271
  import { valueToEstree } from "estree-util-value-to-estree";
272
272
  import { visit } from "unist-util-visit";
273
273
  import { toEstree } from "hast-util-to-estree";
274
- import { dirname as dirname2 } from "node:path";
274
+ import { dirname as dirname2 } from "path";
275
275
  function mapProperty(entry, renderMarkdown) {
276
276
  return __async(this, null, function* () {
277
277
  const value = valueToEstree({
package/dist/ui/index.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  __spreadProps,
5
5
  __spreadValues,
6
6
  renderMarkdownToHast
7
- } from "../chunk-B4VUDCYC.js";
7
+ } from "../chunk-C45FGSN3.js";
8
8
 
9
9
  // src/ui/auto-type-table.tsx
10
10
  import { TypeTable } from "fumadocs-ui/components/type-table";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-typescript",
3
- "version": "4.0.4",
3
+ "version": "4.0.6",
4
4
  "description": "Typescript Integration for Fumadocs",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -28,33 +28,39 @@
28
28
  "dist/*"
29
29
  ],
30
30
  "dependencies": {
31
- "estree-util-value-to-estree": "^3.3.3",
32
- "fast-glob": "^3.3.3",
31
+ "estree-util-value-to-estree": "^3.4.0",
33
32
  "hast-util-to-estree": "^3.1.3",
34
33
  "hast-util-to-jsx-runtime": "^2.3.6",
35
34
  "remark": "^15.0.1",
36
35
  "remark-rehype": "^11.1.2",
37
- "shiki": "^3.4.0",
38
- "ts-morph": "^25.0.1",
36
+ "shiki": "^3.6.0",
37
+ "tinyglobby": "^0.2.14",
38
+ "ts-morph": "^26.0.0",
39
39
  "unist-util-visit": "^5.0.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@mdx-js/mdx": "^3.1.0",
43
- "@types/estree": "^1.0.7",
43
+ "@types/estree": "^1.0.8",
44
44
  "@types/hast": "^3.0.4",
45
45
  "@types/mdast": "^4.0.3",
46
- "@types/node": "22.15.12",
47
- "@types/react": "19.1.3",
48
- "@types/react-dom": "19.1.3",
46
+ "@types/node": "24.0.1",
47
+ "@types/react": "19.1.8",
48
+ "@types/react-dom": "19.1.6",
49
49
  "typescript": "^5.8.3",
50
50
  "unified": "^11.0.5",
51
51
  "eslint-config-custom": "0.0.0",
52
- "fumadocs-core": "15.3.1",
53
- "fumadocs-ui": "15.3.1",
52
+ "fumadocs-core": "15.5.2",
53
+ "fumadocs-ui": "15.5.2",
54
54
  "tsconfig": "0.0.0"
55
55
  },
56
56
  "peerDependencies": {
57
- "typescript": "*"
57
+ "typescript": "*",
58
+ "@types/react": "*"
59
+ },
60
+ "peerDependenciesMeta": {
61
+ "@types/react": {
62
+ "optional": true
63
+ }
58
64
  },
59
65
  "publishConfig": {
60
66
  "access": "public"