fumadocs-mdx 11.2.1 → 11.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.
@@ -9,12 +9,12 @@ import * as fs from "node:fs";
9
9
  // src/config/load.ts
10
10
  import * as path from "node:path";
11
11
  import { pathToFileURL } from "node:url";
12
- import { build } from "esbuild";
13
12
  function findConfigFile() {
14
13
  return path.resolve("source.config.ts");
15
14
  }
16
15
  async function loadConfig(configPath) {
17
16
  const outputPath = path.resolve(".source/source.config.mjs");
17
+ const { build } = await import("esbuild");
18
18
  const transformed = await build({
19
19
  entryPoints: [{ in: configPath, out: "source.config" }],
20
20
  bundle: true,
@@ -36,7 +36,7 @@ async function loadConfig(configPath) {
36
36
  const url = pathToFileURL(outputPath);
37
37
  const [err, config] = buildConfig(
38
38
  // every call to `loadConfig` will cause the previous cache to be ignored
39
- await import(`${url.toString()}?hash=${Date.now().toString()}`)
39
+ await import(`${url.href}?hash=${Date.now().toString()}`)
40
40
  );
41
41
  if (err !== null) throw new Error(err);
42
42
  return config;
@@ -89,7 +89,7 @@ async function loadConfigCached(configPath, hash) {
89
89
  return await config;
90
90
  }
91
91
  async function getConfigHash(configPath) {
92
- const hash = createHash("sha256");
92
+ const hash = createHash("md5");
93
93
  const rs = fs.createReadStream(configPath);
94
94
  for await (const chunk of rs) {
95
95
  hash.update(chunk);
package/dist/index.d.ts CHANGED
@@ -11,7 +11,7 @@ import 'webpack';
11
11
 
12
12
  declare function toRuntime(type: 'doc' | 'meta', file: Record<string, unknown>, info: FileInfo): unknown;
13
13
  declare function toRuntimeAsync(frontmatter: Record<string, unknown>, load: () => Promise<Record<string, unknown>>, info: FileInfo): unknown;
14
- declare function createMDXSource<Doc extends PageData & BaseCollectionEntry, Meta extends MetaData & BaseCollectionEntry>(docs: Doc[], meta: Meta[]): Source<{
14
+ declare function createMDXSource<Doc extends PageData & BaseCollectionEntry, Meta extends MetaData & BaseCollectionEntry>(docs: Doc[], meta?: Meta[]): Source<{
15
15
  pageData: Doc;
16
16
  metaData: Meta;
17
17
  }>;
package/dist/index.js CHANGED
@@ -53,7 +53,7 @@ function toRuntimeAsync(frontmatter, load, info) {
53
53
  _file: info
54
54
  };
55
55
  }
56
- function createMDXSource(docs, meta) {
56
+ function createMDXSource(docs, meta = []) {
57
57
  return {
58
58
  files: (rootDir) => resolveFiles({
59
59
  docs,
@@ -5,7 +5,7 @@ import {
5
5
  getConfigHash,
6
6
  getManifestEntryPath,
7
7
  loadConfigCached
8
- } from "./chunk-EVNXCXU4.js";
8
+ } from "./chunk-UMDOD6VX.js";
9
9
  import "./chunk-MKWJLEE7.js";
10
10
 
11
11
  // src/loader-mdx.ts
@@ -5,7 +5,7 @@ import {
5
5
  loadConfig,
6
6
  loadConfigCached,
7
7
  writeManifest
8
- } from "../chunk-EVNXCXU4.js";
8
+ } from "../chunk-UMDOD6VX.js";
9
9
  import "../chunk-MKWJLEE7.js";
10
10
 
11
11
  // src/next/create.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-mdx",
3
- "version": "11.2.1",
3
+ "version": "11.2.3",
4
4
  "description": "The built-in source for Fumadocs",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -53,12 +53,12 @@
53
53
  "@types/micromatch": "^4.0.9",
54
54
  "@types/react": "^19.0.2",
55
55
  "mdast-util-mdx-jsx": "^3.1.3",
56
- "next": "^15.1.2",
56
+ "next": "^15.1.3",
57
57
  "unified": "^11.0.5",
58
58
  "vfile": "^6.0.3",
59
59
  "webpack": "^5.97.1",
60
60
  "eslint-config-custom": "0.0.0",
61
- "fumadocs-core": "14.6.4",
61
+ "fumadocs-core": "14.7.1",
62
62
  "tsconfig": "0.0.0"
63
63
  },
64
64
  "peerDependencies": {