Back to Explore

syntax-tree/mdast-util-mdx-expression

GitHub
1 watchersOpen source

Last release: 9/13/2024

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 project appears actively maintained, with an upstream push dated 2025-11-19, and at least one recent published update (2.0.1 on 2024-09-13).
  • Update cadence looks sporadic, with a major baseline change in 2.0.0 (2023-07-11), a smaller follow-up in 2.0.1 (2024-09-13), and no additional version entries shown after 2.0.1 even though the repo had a later push in 2025.

AI summary generated Today

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • 2.0.1

    9/13/2024

    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

    7/11/2023

    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.

    Breaking
  • 1.3.2

    1/31/2023

    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.