@docusaurus/plugin-content-docs 2.1.0 → 2.2.0

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/lib/docs.js CHANGED
@@ -192,13 +192,12 @@ async function doProcessDocMetadata({ docFile, versionMetadata, context, options
192
192
  frontMatter,
193
193
  };
194
194
  }
195
- function processDocMetadata(args) {
195
+ async function processDocMetadata(args) {
196
196
  try {
197
- return doProcessDocMetadata(args);
197
+ return await doProcessDocMetadata(args);
198
198
  }
199
199
  catch (err) {
200
- logger_1.default.error `Can't process doc metadata for doc at path path=${args.docFile.filePath} in version name=${args.versionMetadata.versionName}`;
201
- throw err;
200
+ throw new Error(`Can't process doc metadata for doc at path path=${args.docFile.filePath} in version name=${args.versionMetadata.versionName}`, { cause: err });
202
201
  }
203
202
  }
204
203
  exports.processDocMetadata = processDocMetadata;
package/lib/index.js CHANGED
@@ -244,6 +244,7 @@ async function pluginContentDocs(context, options) {
244
244
  createAssets: ({ frontMatter, }) => ({
245
245
  image: frontMatter.image,
246
246
  }),
247
+ markdownConfig: siteConfig.markdown,
247
248
  },
248
249
  },
249
250
  {
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@docusaurus/plugin-content-docs",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "Docs plugin for Docusaurus.",
5
5
  "main": "lib/index.js",
6
6
  "sideEffects": false,
7
7
  "exports": {
8
+ "./lib/*": "./lib/*",
8
9
  "./src/*": "./src/*",
9
10
  "./client": {
10
11
  "type": "./lib/client/index.d.ts",
@@ -34,13 +35,13 @@
34
35
  },
35
36
  "license": "MIT",
36
37
  "dependencies": {
37
- "@docusaurus/core": "2.1.0",
38
- "@docusaurus/logger": "2.1.0",
39
- "@docusaurus/mdx-loader": "2.1.0",
40
- "@docusaurus/module-type-aliases": "2.1.0",
41
- "@docusaurus/types": "2.1.0",
42
- "@docusaurus/utils": "2.1.0",
43
- "@docusaurus/utils-validation": "2.1.0",
38
+ "@docusaurus/core": "2.2.0",
39
+ "@docusaurus/logger": "2.2.0",
40
+ "@docusaurus/mdx-loader": "2.2.0",
41
+ "@docusaurus/module-type-aliases": "2.2.0",
42
+ "@docusaurus/types": "2.2.0",
43
+ "@docusaurus/utils": "2.2.0",
44
+ "@docusaurus/utils-validation": "2.2.0",
44
45
  "@types/react-router-config": "^5.0.6",
45
46
  "combine-promises": "^1.1.0",
46
47
  "fs-extra": "^10.1.0",
@@ -66,5 +67,5 @@
66
67
  "engines": {
67
68
  "node": ">=16.14"
68
69
  },
69
- "gitHead": "be9b0942641184213485eba7fd75ceb0b328d3f4"
70
+ "gitHead": "a308fb7c81832cca354192fe2984f52749441249"
70
71
  }
package/src/docs.ts CHANGED
@@ -316,7 +316,7 @@ async function doProcessDocMetadata({
316
316
  };
317
317
  }
318
318
 
319
- export function processDocMetadata(args: {
319
+ export async function processDocMetadata(args: {
320
320
  docFile: DocFile;
321
321
  versionMetadata: VersionMetadata;
322
322
  context: LoadContext;
@@ -324,10 +324,12 @@ export function processDocMetadata(args: {
324
324
  env: DocEnv;
325
325
  }): Promise<DocMetadataBase> {
326
326
  try {
327
- return doProcessDocMetadata(args);
327
+ return await doProcessDocMetadata(args);
328
328
  } catch (err) {
329
- logger.error`Can't process doc metadata for doc at path path=${args.docFile.filePath} in version name=${args.versionMetadata.versionName}`;
330
- throw err;
329
+ throw new Error(
330
+ `Can't process doc metadata for doc at path path=${args.docFile.filePath} in version name=${args.versionMetadata.versionName}`,
331
+ {cause: err as Error},
332
+ );
331
333
  }
332
334
  }
333
335
 
package/src/index.ts CHANGED
@@ -375,6 +375,7 @@ export default async function pluginContentDocs(
375
375
  }) => ({
376
376
  image: frontMatter.image,
377
377
  }),
378
+ markdownConfig: siteConfig.markdown,
378
379
  },
379
380
  },
380
381
  {