Update shiki to v4#442
Conversation
✅ Deploy Preview for expressive-code ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Thanks @ocavue! Looks like there’s a test failure related to excluding Shiki code from SSR bundles — would you be able to take a look?
Edit: oh looks like you just did! Thanks! For some reason CI checks aren’t running or showing up for me to approve though… thanks GitHub.
# Conflicts: # docs/package.json # pnpm-lock.yaml
This might be because of the conflict between my branch and |
Interesting — I’ve never seen GitHub do that, but tests are indeed running now 🎉 |
|
FYI, if you use
|
Co-authored-by: Chris Swithinbank <[email protected]>
Closes #434
Summary
Shiki v4 changed how its bundles are split, and that broke the Astro Cloudflare bundle optimizations.
This PR fixes the regression where the worker bundle started including:
engine: 'javascript'was selectedWhy
Two things changed in Shiki v4:
shikiroot can pull in both regex engineslangs-bundle-full-*, not justlangs.mjsThat means the old code no longer removed the extra engine and extra language chunks correctly.
What Changed
plugin-shikiruntime imports to narrower Shiki entrypointslangs-bundle-full-*Test
pnpm exec vitest run test/integration.test.ts