mdast-util-mdx-expression is an mdast extension that parses and serializes MDX or MDX.js expression syntax inside markdown, such as `{Math.PI}` or `{true}`. It provides `mdxExpressionFromMarkdown()` for use with mdast-util-from-markdown, and `mdxExpressionToMarkdown()` for use with mdast-util-to-markdown, turning expressions into `mdxFlowExpression` or `mdxTextExpression` nodes (optionally including an ESTree `Program` in `data.estree`).
Project status
- The source appears to be in maintenance mode or quiet, with its latest published update being 2.0.1 on 2024-09-13, and no newer published updates shown in the provided history (although the upstream repo shows a push on 2025-11-19, suggesting some activity without corresponding published updates here).
- Apparent update cadence is low, with long gaps between updates (notably between 2.0.1 in 2024, and the prior 2.x major in 2023, and earlier releases dating back to 2021-2022).
AI summary generated
Recent updates
2.0.1
Release 2.0.1 makes a small formatting fix for MDX expression serialization, specifically adding indentation to generated markdown expressions. It also updates type declaration generation (declaration maps) and refactors type imports to use `@import` syntax.
2.0.0
Release 2.0.0 modernizes mdast-util-mdx-expression for a new major ecosystem baseline, requiring Node.js 16 and switching the public exports to an exports-map. It also changes the API exports for the markdown extensions from exported objects to functions that must be called (adding parentheses), and updates the TypeScript types accordingly.
Breaking1.3.2
Release 1.3.2 is described as a documentation update, a code-style/refactor pass, and a tsconfig.json change. However, the actual diff includes a substantial refactor of how the package exports TypeScript types and how the runtime entrypoint is wired.
1.3.1
Release 1.3.1 is primarily aimed at fixing TypeScript type import behavior under Node16 module resolution. The changes focus on updating how complex type modules are imported, along with a small TypeScript compiler configuration tweak.
1.3.0
Release 1.3.0 updates the project for newer tooling and a TypeScript typing dependency. The release notes mention only an `@types/estree-jsx` update, but the code diff shows additional dependency and CI matrix changes.
1.2.1
Release 1.2.1 is primarily a type fix related to how MDX expression nodes are represented in hast element typings, plus a documentation refresh. The only code-relevant changes visible in the diff are in TypeScript declaration mappings and updated test expectations.
1.2.0
Release 1.2.0 updates the TypeScript type registry so mdx expression nodes are represented in the `hast` typings. It also adds coverage for markdown to mdast to markdown roundtripping whitespace behavior for flow and text expressions.
BreakingFeatures1.1.1
Release 1.1.1 changes how mdxFlowExpression whitespace is handled during parse and serialization. It removes the previous de-indenting (dedent) and re-indenting (indent) logic for flow expression values, adjusting output formatting.
1.1.0
Release 1.1.0 updates the package typings to add MDX expression node types into the mdast node type registry. The code diff also refactors internal JSDoc typing for flow and text expressions to align with the new type declarations.
1.0.0
Release 1.0.0 primarily modernizes the package to ESM, adds JSDoc-based types, and improves documentation. The implementation changes are more substantial than the release notes suggest, including a public API export rename and packaging changes.
BreakingFeatures