Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade shiki to v0.14.1 #6932

Merged
merged 15 commits into from
May 3, 2023
Merged

Upgrade shiki to v0.14.1 #6932

merged 15 commits into from
May 3, 2023

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Apr 28, 2023

Changes

Fixes #6899

  • Upgrade shiki
  • Add compat code to handle shiki breaking changes
    • AFAICT the only breaking change is the theme name change, so I added compat to remap the old theme name to the newer one.
  • Clean up shiki theme and language codegen
  • Add theme name to pre tag class, e.g. <pre class="astro-code github-dark"> (feature by shiki itself)

NOTE: while this could break theme types in shikiConfig, they will still work in runtime so I don't think this is a breaking change.

Testing

Existing tests should pass. I also tested the <Code component locally so it still works, including the compat stuff.

Docs

The only new thing to document is probably the theme name in the pre tag, but I'm not sure if it needs to be documented specifically.

@changeset-bot
Copy link

changeset-bot bot commented Apr 28, 2023

🦋 Changeset detected

Latest commit: 4e3a99f

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added pkg: astro Related to the core `astro` package (scope) pkg: integration Related to any renderer integration (scope) feat: markdown Related to Markdown (scope) labels Apr 28, 2023
@bluwy bluwy marked this pull request as draft April 28, 2023 13:44
@github-actions github-actions bot added the semver: minor Change triggers a `minor` release label May 2, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 2, 2023

This PR is blocked because it contains a minor changeset. A reviewer will merge this at the next release if approved.

@bluwy bluwy marked this pull request as ready for review May 2, 2023 09:07
@bluwy
Copy link
Member Author

bluwy commented May 2, 2023

This is ready for review now. I added additional comments on some changes above that are minimized to keep this page clean.

@matthewp matthewp merged commit 49514e4 into main May 3, 2023
14 checks passed
@matthewp matthewp deleted the upgrade-shiki-stuff branch May 3, 2023 15:07
@astrobot-houston astrobot-houston mentioned this pull request May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: markdown Related to Markdown (scope) pkg: astro Related to the core `astro` package (scope) pkg: integration Related to any renderer integration (scope) semver: minor Change triggers a `minor` release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Certain Shiki themes unsupported by the Astro Code component
2 participants