fix: downgrade mdast-util-mdx-expression
#1251
Merged
+32
−2,027
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

🧰 Changes
We were seeing a weird minor regression when publishing the new
mdxishengine. The new engine usedmdast-util-mdx-expressionv2.0.1 instead of v2.0.0 which was used as a dependency for the oldmdxengine (viaremarkMdxif not mistaken). While themdxpipeline remained untouched, using v2.0.1 inmdxishunintentionally caused the oldmdxengine to also use this newer version... this introduced a slight bug (Im not sure if this was intentional) where it would indent expressions, including JSX comments when de- or serializing.What would usually be something like
would become
This is a short demo showcase of the bug:
Screen.Recording.2025-12-06.at.17.54.17.mov
Ive managed to trace the origin of this behaviour to this commit WITHIN the plugin library itself. Reverting back to v2.0.0 seems to work for now. Ive added a check against this to make sure this does not happen in the future.
Important
We need to make sure future work regarding
mdxormdxishuses the correct v2.0.0 version ofmdast-util-mdx-expression🧬 QA & Testing