Skip to content

Avoid Astro 6.4 deprecation warnings#449

Merged
delucis merged 1 commit into
expressive-code:mainfrom
HiDeoo:hd/fix-astro-6-4-update-config-warnings
Jun 9, 2026
Merged

Avoid Astro 6.4 deprecation warnings#449
delucis merged 1 commit into
expressive-code:mainfrom
HiDeoo:hd/fix-astro-6-4-update-config-warnings

Conversation

@HiDeoo

@HiDeoo HiDeoo commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

This PR refactors how the Astro Expressive Code integration registers its Markdown plugin.

  • When using Astro 6.4+ with Sätteri, the current behavior is unchanged.
  • When using Astro 6.4+ with Unified (explicitly or by not specifying any processor), we now push the EC rehype plugin onto processor.options.rehypePlugins. This avoids a deprecation warning: [astro] 'markdown.remarkPlugins', 'markdown.rehypePlugins', and 'markdown.remarkRehype' are deprecated. Pass them to 'unified({...})' from '@astrojs/markdown-remark' directly instead.
  • When using Astro 6.4+ with an unknown processor, we log a warning that the processor isn't supported but still register the Vite plugin for the <Code> component.
  • When using Astro 6.3 or below, with no processor, we fall back to the previous behavior.

For tests, I renamed the existing 6.4 fixture to "astro-6.4.0-satteri" and made a new "astro-6.4.0-unified" fixture. This seemed more in line with the current testing strategy in the project but I'm not familiar with it so let me know if you'd prefer a different approach.

@HiDeoo HiDeoo marked this pull request as ready for review June 9, 2026 11:20
@netlify

netlify Bot commented Jun 9, 2026

Copy link
Copy Markdown

Deploy Preview for expressive-code ready!

Name Link
🔨 Latest commit c43b474
🔍 Latest deploy log https://app.netlify.com/projects/expressive-code/deploys/6a27f70145364b000896e59b
😎 Deploy Preview https://deploy-preview-449--expressive-code.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@delucis delucis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @HiDeoo — LGTM!

@delucis delucis merged commit d9a3942 into expressive-code:main Jun 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants