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

Update astro-expressive-code #1720

Merged
merged 14 commits into from Apr 30, 2024

Conversation

jacobdalamb
Copy link
Contributor

@jacobdalamb jacobdalamb commented Apr 7, 2024

Description

Updates astro-expressive-code dependency to the latest minor release (0.34) and hastscript to ^9.0.

astro-expressive-code updates dependencies hast, hastscript and hast-util-* to the latest versions.

Potentially breaking change: Unfortunately, some of the new hast types are incompatible with their old versions. If you created custom plugins to manipulate HAST nodes, you may need to update your dependencies as well and probably change some types. For example, if you were using the Parent type before, you will probably need to replace it with Parents or Element in the new version.

Adds a new /hast entrypoint to @expressive-code/core, expressive-code, remark-expressive-code and astro-expressive-code to simplify plugin development.

This new entrypoint provides direct access to the correct versions of HAST types and commonly used tree traversal, querying and manipulation functions. Instead of having to add your own dependencies on libraries like hastscript, hast-util-select or unist-util-visit to your project and manually keeping them in sync with the versions used by Expressive Code, you can now import the internally used functions and types directly from this new entrypoint.

Ensures that static assets (styles and JS modules) are prerendered when using SSR adapters. Makes astro-expressive-code compatible with SSR adapters.Makes Expressive Code compatible with Bun.

See the Expressive Code release notes for more information including details of potentially breaking changes.

Copy link

changeset-bot bot commented Apr 7, 2024

🦋 Changeset detected

Latest commit: a95b94b

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

This PR includes changesets to release 1 package
Name Type
@astrojs/starlight Minor

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

Copy link

vercel bot commented Apr 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
starlight ✅ Ready (Inspect) Visit Preview Apr 30, 2024 10:08am

@github-actions github-actions bot added the 🌟 core Changes to Starlight’s main package label Apr 7, 2024
@astrobot-houston
Copy link
Collaborator

Hello! Thank you for opening your first PR to Starlight! ✨

Here’s what will happen next:

  1. Our GitHub bots will run to check your changes.
    If they spot any issues you will see some error messages on this PR.
    Don’t hesitate to ask any questions if you’re not sure what these mean!

  2. In a few minutes, you’ll be able to see a preview of your changes on Vercel 🤩

  3. One or more of our maintainers will take a look and may ask you to make changes.
    We try to be responsive, but don’t worry if this takes a few days.

@hippotastic
Copy link
Contributor

Thank you for this PR! It might be a good idea to re-export the new /hast entrypoint as expressive-code/hast so that people writing custom plugins in Starlight projects can use it without having to add a separate EC dependency.

Copy link
Contributor

@hippotastic hippotastic left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for jumping in @delucis!

Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

Still looks good to me — thanks for the update @hippotastic!

There are couple of other minor PRs close to completion, so will hang on a little longer to see if we can get those merged together with this.

@delucis
Copy link
Member

delucis commented Apr 30, 2024

Thanks again for everyone‘s work on this! Releasing our next minor today, so merging now 🚀

@delucis delucis merged commit 749ddf8 into withastro:main Apr 30, 2024
9 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Apr 30, 2024
HiDeoo added a commit to HiDeoo/starlight that referenced this pull request Apr 30, 2024
* main: (63 commits)
  Add translation for copy button (withastro#1788)
  Update astro-expressive-code (withastro#1720)
  Fix type inference for extended i18n schemas (withastro#1786)
  Fix TypeScript schema error when using project references (withastro#1777)
  Update fa.json (withastro#1793)
  i18n(fr): update `resources/community-content.mdx` (withastro#1795)
  [ci] format
  i18n(ko-KR): update `community-content.mdx` (withastro#1794)
  [ci] format
  Adds Starlight in Next.js project video (withastro#1789)
  [ci] format
  i18n(ru): update translations (withastro#1783)
  i18n(id): Update getting-started.mdx (withastro#1778)
  Upgrade Lunaria and add Action (withastro#1768)
  [ci] format
  i18n(es): update `sidebar` (withastro#1767)
  i18n(pt-br): Update `getting-started.mdx` (withastro#1776)
  i18n(es): update `configuration` (withastro#1766)
  [ci] format
  Add TrueCharts to showcases (withastro#1773)
  ...
Daweyy added a commit to Daweyy/docs.dofusretro.fr that referenced this pull request May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 core Changes to Starlight’s main package 🌟 minor Change that triggers a minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants