fumadocs-mdx 11.6.4 → 11.6.5

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.
@@ -36,24 +36,21 @@ __export(watcher_exports, {
36
36
  watcher: () => watcher
37
37
  });
38
38
  function watcher(configPath, config, ignored) {
39
- const deps = [configPath];
40
- function add(dir) {
41
- if (Array.isArray(dir)) deps.push(...dir);
42
- else deps.push(dir);
43
- }
39
+ const watcher2 = new import_chokidar.FSWatcher({
40
+ ignoreInitial: true,
41
+ persistent: true,
42
+ ignored
43
+ });
44
+ watcher2.add(configPath);
44
45
  for (const collection of config.collections.values()) {
45
46
  if (collection.type === "docs") {
46
- add(collection.docs.dir);
47
- add(collection.meta.dir);
47
+ watcher2.add(collection.docs.dir);
48
+ watcher2.add(collection.meta.dir);
48
49
  } else {
49
- add(collection.dir);
50
+ watcher2.add(collection.dir);
50
51
  }
51
52
  }
52
- return (0, import_chokidar.watch)(deps, {
53
- ignoreInitial: true,
54
- ignored,
55
- persistent: true
56
- });
53
+ return watcher2;
57
54
  }
58
55
  var import_chokidar;
59
56
  var init_watcher = __esm({
@@ -173,7 +170,7 @@ var fs3 = __toESM(require("fs/promises"), 1);
173
170
  // src/map/generate.ts
174
171
  var path2 = __toESM(require("path"), 1);
175
172
  var fs2 = __toESM(require("fs/promises"), 1);
176
- var import_fast_glob = __toESM(require("fast-glob"), 1);
173
+ var import_tinyglobby = require("tinyglobby");
177
174
 
178
175
  // src/utils/get-type-from-path.ts
179
176
  var import_node_path = require("path");
@@ -389,7 +386,7 @@ async function getCollectionFiles(collection) {
389
386
  const dirs = Array.isArray(collection.dir) ? collection.dir : [collection.dir];
390
387
  await Promise.all(
391
388
  dirs.map(async (dir) => {
392
- const result = await (0, import_fast_glob.default)(collection.files ?? "**/*", {
389
+ const result = await (0, import_tinyglobby.glob)(collection.files ?? "**/*", {
393
390
  cwd: path2.resolve(dir),
394
391
  absolute: true
395
392
  });
@@ -19,7 +19,7 @@ import * as fs2 from "fs/promises";
19
19
  // src/map/generate.ts
20
20
  import * as path from "path";
21
21
  import * as fs from "fs/promises";
22
- import fg from "fast-glob";
22
+ import { glob } from "tinyglobby";
23
23
 
24
24
  // src/utils/get-type-from-path.ts
25
25
  import { extname } from "path";
@@ -178,7 +178,7 @@ async function getCollectionFiles(collection) {
178
178
  const dirs = Array.isArray(collection.dir) ? collection.dir : [collection.dir];
179
179
  await Promise.all(
180
180
  dirs.map(async (dir) => {
181
- const result = await fg(collection.files ?? "**/*", {
181
+ const result = await glob(collection.files ?? "**/*", {
182
182
  cwd: path.resolve(dir),
183
183
  absolute: true
184
184
  });
@@ -253,7 +253,7 @@ async function start(dev, configPath, outDir2) {
253
253
  }
254
254
  await updateMapFile();
255
255
  if (dev) {
256
- const { watcher } = await import("../watcher-7O2HAQ63.js");
256
+ const { watcher } = await import("../watcher-4NDMOH4R.js");
257
257
  const instance = watcher(configPath, config, [outPath]);
258
258
  instance.on("ready", () => {
259
259
  console.log("[MDX] started dev server");
@@ -0,0 +1,22 @@
1
+ // src/map/watcher.ts
2
+ import { FSWatcher } from "chokidar";
3
+ function watcher(configPath, config, ignored) {
4
+ const watcher2 = new FSWatcher({
5
+ ignoreInitial: true,
6
+ persistent: true,
7
+ ignored
8
+ });
9
+ watcher2.add(configPath);
10
+ for (const collection of config.collections.values()) {
11
+ if (collection.type === "docs") {
12
+ watcher2.add(collection.docs.dir);
13
+ watcher2.add(collection.meta.dir);
14
+ } else {
15
+ watcher2.add(collection.dir);
16
+ }
17
+ }
18
+ return watcher2;
19
+ }
20
+ export {
21
+ watcher
22
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-mdx",
3
- "version": "11.6.4",
3
+ "version": "11.6.5",
4
4
  "description": "The built-in source for Fumadocs",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -48,13 +48,13 @@
48
48
  "cross-spawn": "^7.0.6",
49
49
  "esbuild": "^0.25.4",
50
50
  "estree-util-value-to-estree": "^3.4.0",
51
- "fast-glob": "^3.3.3",
52
51
  "gray-matter": "^4.0.3",
53
52
  "js-yaml": "^4.1.0",
54
53
  "lru-cache": "^11.1.0",
55
54
  "picocolors": "^1.1.1",
55
+ "tinyglobby": "^0.2.13",
56
56
  "unist-util-visit": "^5.0.0",
57
- "zod": "^3.24.4"
57
+ "zod": "^3.25.7"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@types/cross-spawn": "^6.0.6",
@@ -66,11 +66,11 @@
66
66
  "next": "^15.3.2",
67
67
  "unified": "^11.0.5",
68
68
  "vfile": "^6.0.3",
69
- "webpack": "^5.99.8",
70
- "@fumadocs/mdx-remote": "1.3.1",
69
+ "webpack": "^5.99.9",
70
+ "@fumadocs/mdx-remote": "1.3.2",
71
71
  "eslint-config-custom": "0.0.0",
72
- "tsconfig": "0.0.0",
73
- "fumadocs-core": "15.3.3"
72
+ "fumadocs-core": "15.3.4",
73
+ "tsconfig": "0.0.0"
74
74
  },
75
75
  "peerDependencies": {
76
76
  "@fumadocs/mdx-remote": "^1.2.0",
@@ -1,25 +0,0 @@
1
- // src/map/watcher.ts
2
- import { watch } from "chokidar";
3
- function watcher(configPath, config, ignored) {
4
- const deps = [configPath];
5
- function add(dir) {
6
- if (Array.isArray(dir)) deps.push(...dir);
7
- else deps.push(dir);
8
- }
9
- for (const collection of config.collections.values()) {
10
- if (collection.type === "docs") {
11
- add(collection.docs.dir);
12
- add(collection.meta.dir);
13
- } else {
14
- add(collection.dir);
15
- }
16
- }
17
- return watch(deps, {
18
- ignoreInitial: true,
19
- ignored,
20
- persistent: true
21
- });
22
- }
23
- export {
24
- watcher
25
- };