@docusaurus/plugin-content-docs 3.7.0-canary-6235 → 3.7.0-canary-6238

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/index.js CHANGED
@@ -32,6 +32,12 @@ const contentHelpers_1 = require("./contentHelpers");
32
32
  // Problem documented here: https://github.com/facebook/docusaurus/pull/10934
33
33
  // TODO this is not a perfect solution, find better?
34
34
  async function createMdxLoaderDependencyFile({ dataDir, options, versionsMetadata, }) {
35
+ // TODO this has been temporarily made opt-in until Rspack cache bug is fixed
36
+ // See https://github.com/facebook/docusaurus/pull/10931
37
+ // See https://github.com/facebook/docusaurus/pull/10934#issuecomment-2672253145
38
+ if (!process.env.DOCUSAURUS_ENABLE_MDX_DEPENDENCY_FILE) {
39
+ return undefined;
40
+ }
35
41
  const filePath = path_1.default.join(dataDir, '__mdx-loader-dependency.json');
36
42
  // the cache is invalidated whenever this file content changes
37
43
  const fileContent = {
@@ -72,7 +78,7 @@ async function pluginContentDocs(context, options) {
72
78
  options,
73
79
  versionsMetadata,
74
80
  }),
75
- ],
81
+ ].filter((d) => typeof d === 'string'),
76
82
  useCrossCompilerCache: siteConfig.future.experimental_faster.mdxCrossCompilerCache,
77
83
  admonitions: options.admonitions,
78
84
  remarkPlugins,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/plugin-content-docs",
3
- "version": "3.7.0-canary-6235",
3
+ "version": "3.7.0-canary-6238",
4
4
  "description": "Docs plugin for Docusaurus.",
5
5
  "main": "lib/index.js",
6
6
  "sideEffects": false,
@@ -35,15 +35,15 @@
35
35
  },
36
36
  "license": "MIT",
37
37
  "dependencies": {
38
- "@docusaurus/core": "3.7.0-canary-6235",
39
- "@docusaurus/logger": "3.7.0-canary-6235",
40
- "@docusaurus/mdx-loader": "3.7.0-canary-6235",
41
- "@docusaurus/module-type-aliases": "3.7.0-canary-6235",
42
- "@docusaurus/theme-common": "3.7.0-canary-6235",
43
- "@docusaurus/types": "3.7.0-canary-6235",
44
- "@docusaurus/utils": "3.7.0-canary-6235",
45
- "@docusaurus/utils-common": "3.7.0-canary-6235",
46
- "@docusaurus/utils-validation": "3.7.0-canary-6235",
38
+ "@docusaurus/core": "3.7.0-canary-6238",
39
+ "@docusaurus/logger": "3.7.0-canary-6238",
40
+ "@docusaurus/mdx-loader": "3.7.0-canary-6238",
41
+ "@docusaurus/module-type-aliases": "3.7.0-canary-6238",
42
+ "@docusaurus/theme-common": "3.7.0-canary-6238",
43
+ "@docusaurus/types": "3.7.0-canary-6238",
44
+ "@docusaurus/utils": "3.7.0-canary-6238",
45
+ "@docusaurus/utils-common": "3.7.0-canary-6238",
46
+ "@docusaurus/utils-validation": "3.7.0-canary-6238",
47
47
  "@types/react-router-config": "^5.0.7",
48
48
  "combine-promises": "^1.1.0",
49
49
  "fs-extra": "^11.1.1",
@@ -68,5 +68,5 @@
68
68
  "engines": {
69
69
  "node": ">=18.0"
70
70
  },
71
- "gitHead": "ec994a5adaf54a7fd730a73a0507ff24e321c34a"
71
+ "gitHead": "f578117193ea532a51f5b09fa9625f7ffee4ad16"
72
72
  }
package/src/index.ts CHANGED
@@ -76,7 +76,14 @@ async function createMdxLoaderDependencyFile({
76
76
  dataDir: string;
77
77
  options: PluginOptions;
78
78
  versionsMetadata: VersionMetadata[];
79
- }) {
79
+ }): Promise<string | undefined> {
80
+ // TODO this has been temporarily made opt-in until Rspack cache bug is fixed
81
+ // See https://github.com/facebook/docusaurus/pull/10931
82
+ // See https://github.com/facebook/docusaurus/pull/10934#issuecomment-2672253145
83
+ if (!process.env.DOCUSAURUS_ENABLE_MDX_DEPENDENCY_FILE) {
84
+ return undefined;
85
+ }
86
+
80
87
  const filePath = path.join(dataDir, '__mdx-loader-dependency.json');
81
88
  // the cache is invalidated whenever this file content changes
82
89
  const fileContent = {
@@ -138,7 +145,7 @@ export default async function pluginContentDocs(
138
145
  options,
139
146
  versionsMetadata,
140
147
  }),
141
- ],
148
+ ].filter((d): d is string => typeof d === 'string'),
142
149
 
143
150
  useCrossCompilerCache:
144
151
  siteConfig.future.experimental_faster.mdxCrossCompilerCache,