-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breaking change in v2.2.0 of MDX Loader #8298
Comments
We do assume only content plugins use |
Thanks for the reply @Josh-Cena. Yes, we can default a value for While I would expect changes to an undocumented API surface, I would not expect API additions to result in broken builds/types. This seems problematic as an unknown number of plugins could be impacted by this, without much visibility to this change in the CHANGELOG/commits. This issue seems resolvable at both ends. The plugin can backfill this option to add support for 2.2.0. Docusaurus could either make |
I would maintain the ground that undocumented APIs are internal and we shouldn't send the message that we care about breaking users of these internal APIs, at the cost of complicating our logic. This is stated in the docs:
We do normalize the |
Ok cool. I think we can close out this issue then 👍 I have a viable change to the plugin and others that run into a similar issue can come across this issue as a reference. Thanks for the quick follow-up! |
Welcome! Thanks for letting us know :) |
Added in the Mermaid PR that we recommend third-party plugins using mdx loader to forward the new markdownConfig option: const loader = {
loader: require.resolve('@docusaurus/mdx-loader'),
options: {
markdownConfig: siteConfig.markdown,
},
} More options will be added later, to control the global markdown behavior of your site |
While I understand your reasoning regarding private API changes, it does seem like an easily avoided breaking change (for plugins using mdx-loader directly). Anyway, could you at least update the documentation for the mdx-loader to indicate this value and that it is required? It is missing here: |
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.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
@docusaurus/mdx-loader
in a plugin/app pre 2.2.0Can 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
Self-service
The text was updated successfully, but these errors were encountered: