Skip to content

Commit

Permalink
Update astro-expressive-code (#1720)
Browse files Browse the repository at this point in the history
Co-authored-by: hippotastic <6137925+hippotastic@users.noreply.github.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
  • Loading branch information
3 people committed Apr 30, 2024
1 parent d05d693 commit 749ddf8
Show file tree
Hide file tree
Showing 5 changed files with 126 additions and 136 deletions.
7 changes: 7 additions & 0 deletions .changeset/strong-moose-jam.md
@@ -0,0 +1,7 @@
---
'@astrojs/starlight': minor
---

Updates `astro-expressive-code` dependency to the latest minor release (0.35) and exposes a new `@astrojs/starlight/expressive-code/hast` module for users who need to use Expressive Code鈥檚 version of `hast`.

This includes a potentially breaking change if you use custom Expressive Code plugins. See the [Expressive Code release notes](https://expressive-code.com/releases/#0340) for full details.
5 changes: 5 additions & 0 deletions packages/starlight/integrations/expressive-code/hast.d.ts
@@ -0,0 +1,5 @@
/**
* @file This file provides the types for Starlight's `@astrojs/starlight/expressive-code/hast` export.
*/

export * from 'astro-expressive-code/hast';
9 changes: 9 additions & 0 deletions packages/starlight/integrations/expressive-code/hast.mjs
@@ -0,0 +1,9 @@
/**
* @file This file is exported by Starlight as `@astrojs/starlight/expressive-code/hast`.
*
* Note: This file is intentionally not a TypeScript module to allow access to all exported
* functionality even if TypeScript is not available, e.g. from the `ec.config.mjs` file
* that does not get processed by Vite.
*/

export * from 'astro-expressive-code/hast';
6 changes: 5 additions & 1 deletion packages/starlight/package.json
Expand Up @@ -166,6 +166,10 @@
"types": "./expressive-code.d.ts",
"default": "./expressive-code.mjs"
},
"./expressive-code/hast": {
"types": "./integrations/expressive-code/hast.d.ts",
"default": "./integrations/expressive-code/hast.mjs"
},
"./index.astro": "./index.astro",
"./404.astro": "./404.astro",
"./style/markdown.css": "./style/markdown.css"
Expand All @@ -186,7 +190,7 @@
"@pagefind/default-ui": "^1.0.3",
"@types/hast": "^3.0.3",
"@types/mdast": "^4.0.3",
"astro-expressive-code": "^0.33.4",
"astro-expressive-code": "^0.35.2",
"bcp-47": "^2.1.0",
"hast-util-from-html": "^2.0.1",
"hast-util-select": "^6.0.2",
Expand Down

0 comments on commit 749ddf8

Please sign in to comment.