unstale

npm / @astrojs/mdx

@astrojs/mdx

What changed in @astrojs/mdx 4 to 8, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

9 breaking1 security8 deprecations5 new APIs and options6 behavior and defaults10 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@astrojs/mdx 812 changes

Breaking changes 2

  • The minimum supported Node.js version is now 22.22.0, aligning with Astro's Node.js support policy and StackBlitz support.

    8.1.0release notes

  • MDX files are now processed by Markdown processors, which must meet the required versions when explicitly configured.

    8.0.0release notes

Security 1

  • @astrojs/netlify generates an overly-broad Netlify Image CDN allowlist because remotePatterns.pathname metacharacters are not escaped

    8.1.2security advisory

Deprecations 3

  • A warning is added when recmaPlugins is ignored because the configured Markdown processor does not run it.

    8.0.0release notes

  • A warning is now emitted when this deprecated option is ignored because the configured Markdown processor does not run it.

    8.0.0release notes

  • A warning is added when remarkRehype is ignored because the configured Markdown processor does not run it.

    8.0.0release notes

Behavior and default changes 4

  • Unpins @astrojs/* dependencies so versions matching the ^ range can be installed.

    8.1.6release notes

  • YAML parsing now supports merge keys in MDX content.

    8.0.3release notes

  • YAML parsing now supports timestamps and merge keys in MDX, and YAML errors are formatted consistently.

    8.0.3release notes

  • With extendMarkdownConfig false, MDX uses a clean default processor; pass mdx({ processor }) to choose one explicitly.

    8.0.0release notes

Fixes and other changes 2

  • YAML errors are formatted consistently across Astro, Markdown, MDX, and Markdoc.

    8.0.3release notes

  • Prevents installation with incompatible Astro versions and improves the error message to suggest updating astro.

    8.0.2release notes

@astrojs/mdx 711 changes

Breaking changes 2

  • Astro now renders Markdown and MDX with Sätteri instead of the remark/rehype pipeline. To keep using unified plugins, install @astrojs/markdown-remark and set processor to unified().

    7.0.0upgrade guide

  • Upgrades to Vite v8, which may affect project build and development behavior.

    7.0.0release notes

Deprecations 2

  • Import getContainerRenderer from the dedicated container-renderer entrypoint instead of the @astrojs/mdx package root.

    7.0.0upgrade guide

  • Importing getContainerRenderer() from the package root still works but is deprecated and logs a warning.

    7.0.0release notes

New APIs and options 2

  • Adds a container-renderer entrypoint exporting getContainerRenderer() for MDX integrations.

    7.0.0release notes

  • Sätteri plugins can read and mutate frontmatter programmatically, with the result used as the MDX page's frontmatter.

    7.0.0release notes

Fixes and other changes 5

  • Build errors for wrapped plugin errors now show the correct file location, line and column, and more accurate hints.

    7.0.8release notes

  • Sätteri processor option types now accept all plugin entries supported by Sätteri v0.10.3.

    7.0.8release notes

  • Fixes a bug where the integration emitted React-cased attribute names.

    7.0.4release notes

  • Custom pre components now apply to syntax-highlighted code blocks when using the Sätteri Markdown processor with MDX.

    7.0.3release notes

  • Corrects the dependencies declared in peerDependencies, improving dependency resolution for users installing the package.

    7.0.1release notes

@astrojs/mdx 66 changes

Deprecations 3

  • The top-level option is deprecated; move rehype plugins into unified({...}) or the preferred plugin processor.

    6.0.0release notes

  • The top-level option is deprecated; move it into unified({...}) or the preferred plugin processor.

    6.0.0release notes

  • The MDX integration option is deprecated; move it onto unified({...}) or the preferred plugin processor.

    6.0.0release notes

New APIs and options 3

  • Adds Prism syntax highlighting for code blocks in the Sätteri Markdown and MDX processors when markdown.syntaxHighlight is set to 'prism'.

    6.0.3release notes

  • The MDX integration can use a different Markdown processor, allowing Sätteri for Markdown while retaining Unified for MDX.

    6.0.0release notes

  • Adds a configuration option to choose an alternative Markdown processor while keeping unified() as the default.

    6.0.0release notes

@astrojs/mdx 56 changes

Breaking changes 3

  • Temporary support for Node >=20.19.1 was removed because Stackblitz now uses Node 22 by default.

    5.0.2release notes

  • The Astro peer dependency requirement is updated to 6.0.0, affecting compatibility when installing or using this integration.

    5.0.1release notes

  • Markdown heading ID generation was updated, which may change generated heading anchors.

    5.0.0release notes

Behavior and default changes 1

  • The minimum Node.js requirement was changed, including a lower requirement to support StackBlitz until it supports v22.

    5.0.0release notes

Fixes and other changes 2

  • Fixes an issue where the smartypants option was ignored.

    5.0.6release notes

  • Detection of export const components declarations was fixed for projects using the optimize option.

    5.0.0release notes

@astrojs/mdx 44 changes

Breaking changes 2

  • MDX pages without layouts automatically receive this tag by default. Layout components should include it because Astro content pages no longer respond with charset=utf-8 in the Content-Type header.

    4.0.0release notes

  • Node 21 is no longer supported.

    4.0.0release notes

Behavior and default changes 1

  • The returned object now includes a client hydration entrypoint, enabling client-side interactivity without manually calling container.addClientRenderer().

    4.3.10release notes

Fixes and other changes 1

  • Fixes a case where the MDX renderer could not be loaded when used as a direct dependency of an Astro integration.

    4.0.0release notes