fumadocs-mdx 14.0.3 → 14.0.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.
package/dist/bun/index.js CHANGED
@@ -1,3 +1,7 @@
1
+ import {
2
+ buildConfig
3
+ } from "../chunk-6RPNS75C.js";
4
+ import "../chunk-S7KOJHHO.js";
1
5
  import {
2
6
  createMdxLoader
3
7
  } from "../chunk-USWQVJWR.js";
@@ -7,18 +11,14 @@ import {
7
11
  import {
8
12
  createIntegratedConfigLoader,
9
13
  toBun
10
- } from "../chunk-OLL7FM7W.js";
11
- import {
12
- buildConfig
13
- } from "../chunk-6RPNS75C.js";
14
+ } from "../chunk-NKIL543T.js";
14
15
  import "../chunk-4JSFLXXT.js";
15
16
  import {
16
17
  _Defaults,
17
18
  createCore
18
- } from "../chunk-GB4W3YCZ.js";
19
- import "../chunk-S7KOJHHO.js";
20
- import "../chunk-VWJKRQZR.js";
19
+ } from "../chunk-K4KWUM3J.js";
21
20
  import "../chunk-WBIHDYMN.js";
21
+ import "../chunk-VWJKRQZR.js";
22
22
 
23
23
  // src/bun/index.ts
24
24
  import { pathToFileURL } from "url";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createCore
3
- } from "./chunk-GB4W3YCZ.js";
3
+ } from "./chunk-K4KWUM3J.js";
4
4
 
5
5
  // src/webpack/index.ts
6
6
  var core;
@@ -13,7 +13,8 @@ ${issues.map((issue) => ` ${issue.path}: ${issue.message}`).join("\n")}`
13
13
  this.issues = issues;
14
14
  }
15
15
  async toStringFormatted() {
16
- const picocolors = await import("picocolors");
16
+ const picocolorsModule = await import("picocolors");
17
+ const picocolors = picocolorsModule.default ?? picocolorsModule;
17
18
  return [
18
19
  picocolors.bold(`[MDX] ${this.title}:`),
19
20
  ...this.issues.map(
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ValidationError
3
- } from "./chunk-GB4W3YCZ.js";
3
+ } from "./chunk-K4KWUM3J.js";
4
4
 
5
5
  // src/loaders/adapter.ts
6
6
  import { fileURLToPath } from "url";
@@ -267,7 +267,8 @@ ${issues.map((issue) => ` ${issue.path}: ${issue.message}`).join("\n")}`
267
267
  this.issues = issues;
268
268
  }
269
269
  async toStringFormatted() {
270
- const picocolors = await import("picocolors");
270
+ const picocolorsModule = await import("picocolors");
271
+ const picocolors = picocolorsModule.default ?? picocolorsModule;
271
272
  return [
272
273
  picocolors.bold(`[MDX] ${this.title}:`),
273
274
  ...this.issues.map(
@@ -2,6 +2,7 @@ import {
2
2
  loadConfig
3
3
  } from "../chunk-LPX7ZO66.js";
4
4
  import "../chunk-6RPNS75C.js";
5
+ import "../chunk-S7KOJHHO.js";
5
6
  import {
6
7
  mdxLoaderGlob,
7
8
  metaLoaderGlob
@@ -10,13 +11,12 @@ import {
10
11
  ValidationError,
11
12
  _Defaults,
12
13
  createCore
13
- } from "../chunk-GB4W3YCZ.js";
14
- import "../chunk-S7KOJHHO.js";
14
+ } from "../chunk-K4KWUM3J.js";
15
15
  import {
16
16
  indexFile
17
- } from "../chunk-DKA3EWZH.js";
18
- import "../chunk-VWJKRQZR.js";
17
+ } from "../chunk-ED3ON275.js";
19
18
  import "../chunk-WBIHDYMN.js";
19
+ import "../chunk-VWJKRQZR.js";
20
20
 
21
21
  // src/next/index.ts
22
22
  import * as path from "path";
@@ -7,14 +7,14 @@ import {
7
7
  import {
8
8
  createStandaloneConfigLoader,
9
9
  toNode
10
- } from "../chunk-OLL7FM7W.js";
10
+ } from "../chunk-NKIL543T.js";
11
11
  import "../chunk-4JSFLXXT.js";
12
12
  import {
13
13
  _Defaults,
14
14
  createCore
15
- } from "../chunk-GB4W3YCZ.js";
16
- import "../chunk-VWJKRQZR.js";
15
+ } from "../chunk-K4KWUM3J.js";
17
16
  import "../chunk-WBIHDYMN.js";
17
+ import "../chunk-VWJKRQZR.js";
18
18
 
19
19
  // src/node/loader.ts
20
20
  var core = createCore({
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  indexFile
3
- } from "../chunk-DKA3EWZH.js";
4
- import "../chunk-VWJKRQZR.js";
3
+ } from "../chunk-ED3ON275.js";
5
4
  import "../chunk-WBIHDYMN.js";
5
+ import "../chunk-VWJKRQZR.js";
6
6
  export {
7
7
  indexFile as default
8
8
  };
@@ -13,7 +13,7 @@ import 'fumadocs-core/toc';
13
13
  import 'mdast';
14
14
  import 'mdx/types';
15
15
 
16
- type VersionControlFn = (filePath: string) => Promise<Date | undefined>;
16
+ type VersionControlFn = (filePath: string) => Promise<Date | null | undefined>;
17
17
  interface LastModifiedPluginOptions {
18
18
  /**
19
19
  * Version control to obtain the last modified time.
@@ -49,7 +49,7 @@ function lastModified(options = {}) {
49
49
  async vfile(file) {
50
50
  if (!filter(this.collection.name)) return;
51
51
  const timestamp = await fn(this.filePath);
52
- if (timestamp !== void 0) {
52
+ if (timestamp) {
53
53
  file.data["mdx-export"] ??= [];
54
54
  file.data["mdx-export"].push({
55
55
  name: "lastModified",
@@ -71,10 +71,11 @@ async function getGitTimestamp(file) {
71
71
  throwOnError: true
72
72
  }
73
73
  );
74
- return new Date(out.stdout);
74
+ const date = new Date(out.stdout);
75
+ return isNaN(date.getTime()) ? null : date;
75
76
  })();
76
77
  cache.set(file, timePromise);
77
- return timePromise.catch(() => void 0);
78
+ return timePromise.catch(() => null);
78
79
  }
79
80
  export {
80
81
  lastModified as default
@@ -8,14 +8,14 @@ import "../chunk-FBLMK4RS.js";
8
8
  import {
9
9
  buildConfig
10
10
  } from "../chunk-6RPNS75C.js";
11
+ import "../chunk-S7KOJHHO.js";
11
12
  import {
12
13
  createCore
13
- } from "../chunk-GB4W3YCZ.js";
14
- import "../chunk-S7KOJHHO.js";
14
+ } from "../chunk-K4KWUM3J.js";
15
+ import "../chunk-WBIHDYMN.js";
15
16
  import {
16
17
  fumaMatter
17
18
  } from "../chunk-VWJKRQZR.js";
18
- import "../chunk-WBIHDYMN.js";
19
19
 
20
20
  // src/runtime/dynamic.ts
21
21
  import { executeMdx } from "@fumadocs/mdx-remote/client";
@@ -1,3 +1,7 @@
1
+ import {
2
+ buildConfig
3
+ } from "../chunk-6RPNS75C.js";
4
+ import "../chunk-S7KOJHHO.js";
1
5
  import {
2
6
  createMdxLoader
3
7
  } from "../chunk-USWQVJWR.js";
@@ -7,22 +11,18 @@ import {
7
11
  import {
8
12
  createIntegratedConfigLoader,
9
13
  toVite
10
- } from "../chunk-OLL7FM7W.js";
11
- import {
12
- buildConfig
13
- } from "../chunk-6RPNS75C.js";
14
+ } from "../chunk-NKIL543T.js";
14
15
  import "../chunk-4JSFLXXT.js";
15
16
  import {
16
17
  ValidationError,
17
18
  _Defaults,
18
19
  createCore
19
- } from "../chunk-GB4W3YCZ.js";
20
- import "../chunk-S7KOJHHO.js";
20
+ } from "../chunk-K4KWUM3J.js";
21
21
  import {
22
22
  indexFile
23
- } from "../chunk-DKA3EWZH.js";
24
- import "../chunk-VWJKRQZR.js";
23
+ } from "../chunk-ED3ON275.js";
25
24
  import "../chunk-WBIHDYMN.js";
25
+ import "../chunk-VWJKRQZR.js";
26
26
 
27
27
  // src/vite/index.ts
28
28
  import { mergeConfig } from "vite";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  getCore
3
- } from "../chunk-Q5OSGLJL.js";
3
+ } from "../chunk-CGGDM5F3.js";
4
4
  import {
5
5
  createMdxLoader
6
6
  } from "../chunk-USWQVJWR.js";
7
7
  import {
8
8
  createStandaloneConfigLoader,
9
9
  toWebpack
10
- } from "../chunk-OLL7FM7W.js";
10
+ } from "../chunk-NKIL543T.js";
11
11
  import "../chunk-4JSFLXXT.js";
12
- import "../chunk-GB4W3YCZ.js";
13
- import "../chunk-VWJKRQZR.js";
12
+ import "../chunk-K4KWUM3J.js";
14
13
  import "../chunk-WBIHDYMN.js";
14
+ import "../chunk-VWJKRQZR.js";
15
15
 
16
16
  // src/webpack/mdx.ts
17
17
  var instance;
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  getCore
3
- } from "../chunk-Q5OSGLJL.js";
3
+ } from "../chunk-CGGDM5F3.js";
4
4
  import {
5
5
  createMetaLoader
6
6
  } from "../chunk-TYJDYTKH.js";
7
7
  import {
8
8
  createStandaloneConfigLoader,
9
9
  toWebpack
10
- } from "../chunk-OLL7FM7W.js";
10
+ } from "../chunk-NKIL543T.js";
11
11
  import "../chunk-4JSFLXXT.js";
12
- import "../chunk-GB4W3YCZ.js";
12
+ import "../chunk-K4KWUM3J.js";
13
13
  import "../chunk-WBIHDYMN.js";
14
14
 
15
15
  // src/webpack/meta.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-mdx",
3
- "version": "14.0.3",
3
+ "version": "14.0.4",
4
4
  "description": "The built-in source for Fumadocs",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -59,7 +59,7 @@
59
59
  "dependencies": {
60
60
  "@mdx-js/mdx": "^3.1.1",
61
61
  "@standard-schema/spec": "^1.0.0",
62
- "chokidar": "^4.0.3",
62
+ "chokidar": "^5.0.0",
63
63
  "esbuild": "^0.27.0",
64
64
  "estree-util-value-to-estree": "^3.5.0",
65
65
  "js-yaml": "^4.1.1",
@@ -97,7 +97,7 @@
97
97
  "webpack": "^5.102.1",
98
98
  "@fumadocs/mdx-remote": "1.4.3",
99
99
  "eslint-config-custom": "0.0.0",
100
- "fumadocs-core": "16.0.15",
100
+ "fumadocs-core": "16.2.0",
101
101
  "tsconfig": "0.0.0"
102
102
  },
103
103
  "peerDependencies": {
@@ -1,10 +1,10 @@
1
- import {
2
- fumaMatter
3
- } from "./chunk-VWJKRQZR.js";
4
1
  import {
5
2
  createCodegen,
6
3
  ident
7
4
  } from "./chunk-WBIHDYMN.js";
5
+ import {
6
+ fumaMatter
7
+ } from "./chunk-VWJKRQZR.js";
8
8
 
9
9
  // src/plugins/index-file.ts
10
10
  import path2 from "path";