-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed as not planned
Labels
closed: wontfixA fix will bring significant overhead, or is out of scope (for feature requests)A fix will bring significant overhead, or is out of scope (for feature requests)
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I'm using the latest version of Docusaurus.
- I have tried the
npm run clearoryarn clearcommand. - I have tried
rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages. - I have tried creating a repro with https://new.docusaurus.io.
- I have read the console error message carefully (if applicable).
Description
The 2.2.0 release for Mermaid introduced a breaking change to the type for Options in @docusaurus/mdx-loader.
This commit/line: 9c92a79#diff-545a046200b390be351720ea1e83af42ec7ed096a4351213383e1550467d8cdcR66
markdownConfig should be an optional type or have a default value assigned, to align with semver.
Reproducible demo
No response
Steps to reproduce
- Use
@docusaurus/mdx-loaderin a plugin/app pre 2.2.0 - Upgrade to 2.2.0
- Observe: Build breaks with error:
[ERROR] TypeError: Cannot read properties of undefined (reading 'mermaid')
at Object.mdxLoader (/Users/ben/flagsmith/docs/node_modules/@docusaurus/mdx-loader/lib/loader.js:115:43)
at LOADER_EXECUTION (/Users/ben/flagsmith/docs/node_modules/loader-runner/lib/LoaderRunner.js:132:14)
at runSyncOrAsync (/Users/ben/flagsmith/docs/node_modules/loader-runner/lib/LoaderRunner.js:133:4)
at iterateNormalLoaders (/Users/ben/flagsmith/docs/node_modules/loader-runner/lib/LoaderRunner.js:250:2)
at /Users/ben/flagsmith/docs/node_modules/loader-runner/lib/LoaderRunner.js:223:4
at /Users/ben/flagsmith/docs/node_modules/webpack/lib/NormalModule.js:834:15
at eval (eval at create (/Users/ben/flagsmith/docs/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:12:1)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
at runNextTicks (node:internal/process/task_queues:65:3)
at processImmediate (node:internal/timers:437:9)
Can be seen here: cloud-annotations/docusaurus-openapi#222
Expected behavior
Breaking changes should be reserved for major release cycles. markdownConfig should either be optional or have a default value assigned as its value.
Actual behavior
Build process breaks when upgrading to 2.2.0.
Your environment
- Docusaurus version used: v2.2.0
- Environment name and version (e.g. Chrome 89, Node.js 16.4): Chrome Version 107.0.5304.87 (Official Build) (arm64), Node.js v18.11.0
- Operating system and version (e.g. Ubuntu 20.04.2 LTS): Mac OS 13.0
Self-service
- I'd be willing to fix this bug myself.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
closed: wontfixA fix will bring significant overhead, or is out of scope (for feature requests)A fix will bring significant overhead, or is out of scope (for feature requests)