Skip to content

Commit fc5fdc1

Browse files
authored
Update Astro to v4 and Starlight to v0.15 (withastro#5740)
1 parent 6a21510 commit fc5fdc1

File tree

6 files changed

+1226
-2038
lines changed

6 files changed

+1226
-2038
lines changed

package.json

+25-25
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@
3232
"@babel/core": "^7.18.10",
3333
"@docsearch/css": "^3.5.1",
3434
"@types/canvas-confetti": "^1.6.0",
35-
"@types/hast": "^2.3.4",
35+
"@types/hast": "^3.0.3",
3636
"@types/html-escaper": "^3.0.0",
37-
"@types/mdast": "^3.0.10",
37+
"@types/mdast": "^4.0.3",
3838
"@types/node": "^18.6.4",
3939
"@typescript-eslint/eslint-plugin": "^5.46.1",
4040
"@typescript-eslint/parser": "^5.46.1",
41-
"astro": "^3.6.0",
42-
"astro-auto-import": "^0.3.2",
41+
"astro": "^4.0.2",
42+
"astro-auto-import": "^0.4.2",
4343
"astro-eslint-parser": "^0.16.0",
44-
"astro-og-canvas": "^0.4.0",
44+
"astro-og-canvas": "^0.4.1",
4545
"bcp-47-normalize": "^2.1.0",
4646
"canvaskit-wasm": "^0.37.0",
4747
"dedent-js": "^1.0.1",
@@ -50,48 +50,48 @@
5050
"eslint-plugin-astro": "^0.21.0",
5151
"eslint-plugin-react": "^7.32.1",
5252
"fast-glob": "^3.2.11",
53-
"hast-util-from-html": "^1.0.0",
54-
"hast-util-to-html": "^8.0.4",
55-
"hast-util-to-string": "^2.0.0",
56-
"hastscript": "^7.0.2",
53+
"hast-util-from-html": "^2.0.1",
54+
"hast-util-to-html": "^9.0.0",
55+
"hast-util-to-string": "^3.0.0",
56+
"hastscript": "^8.0.0",
5757
"html-escaper": "^3.0.3",
5858
"htmlparser2": "^7.2.0",
5959
"kleur": "^4.1.5",
60-
"mdast-util-from-markdown": "^1.2.0",
61-
"mdast-util-to-hast": "^12.2.4",
62-
"mdast-util-to-string": "^3.1.1",
63-
"micromark-util-character": "^1.1.0",
64-
"micromark-util-symbol": "^1.0.1",
60+
"mdast-util-from-markdown": "^2.0.0",
61+
"mdast-util-to-hast": "^13.0.0",
62+
"mdast-util-to-string": "^4.0.0",
63+
"micromark-util-character": "^2.0.1",
64+
"micromark-util-symbol": "^2.0.0",
6565
"node-fetch": "^3.2.10",
6666
"organize-imports-cli": "^0.10.0",
6767
"p-retry": "^5.1.1",
6868
"parse-numeric-range": "^1.3.0",
6969
"prettier": "^3.1.0",
7070
"prettier-plugin-astro": "^0.12.2",
7171
"prompts": "^2.4.2",
72-
"rehype": "^12.0.1",
73-
"remark": "^14.0.2",
74-
"remark-directive": "^2.0.1",
72+
"rehype": "^13.0.1",
73+
"remark": "^15.0.1",
74+
"remark-directive": "^3.0.0",
7575
"simple-git": "^3.11.0",
7676
"tsm": "^2.3.0",
7777
"typescript": "^5.0.2",
78-
"unified": "^10.1.2",
79-
"unist-util-remove": "^3.1.0",
80-
"unist-util-visit": "^4.1.0",
78+
"unified": "^11.0.4",
79+
"unist-util-remove": "^4.0.0",
80+
"unist-util-visit": "^5.0.0",
8181
"unist-util-walker": "^1.0.0"
8282
},
8383
"dependencies": {
84-
"@astrojs/check": "^0.2.0",
84+
"@astrojs/check": "^0.3.1",
8585
"@astrojs/sitemap": "^3.0.3",
86-
"@astrojs/starlight": "0.14.0",
86+
"@astrojs/starlight": "0.15.0",
8787
"@docsearch/js": "^3.5.2",
8888
"@fontsource/ibm-plex-mono": "^4.5.10",
8989
"canvas-confetti": "^1.6.0",
9090
"jsdoc-api": "^7.1.1",
9191
"minimatch": "^9.0.3",
92-
"rehype-autolink-headings": "^6.1.1",
93-
"rehype-slug": "^5.0.1",
94-
"remark-gfm": "^3.0.1",
92+
"rehype-autolink-headings": "^7.1.0",
93+
"rehype-slug": "^6.0.0",
94+
"remark-gfm": "^4.0.0",
9595
"remark-smartypants": "^2.0.0",
9696
"sass": "^1.54.3",
9797
"sharp": "^0.32.5"

plugins/rehype-autolink.ts

-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ function rehypei18nAutolinkHeadings() {
8181
* Spread this into Astro’s `markdown.rehypePlugins` option.
8282
*/
8383
export const rehypeAutolink = (): RehypePlugins => [
84-
// @ts-expect-error — Astro is not happy with this [plugin, options] tuple for some reason, but it works!
8584
[rehypeAutolinkHeadings, autolinkConfig],
8685
rehypei18nAutolinkHeadings(),
8786
];

plugins/rehype-optimize-static.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const headingRe = /h([0-6])/;
1616
* string instead, which also reduces the AST size that Rollup holds in memory.
1717
*/
1818
export function rehypeOptimizeStatic(): Transformer<Root, Root> {
19-
return (tree) => {
19+
return (tree: Node) => {
2020
// All possible elements that could be the root of a subtree
2121
const allPossibleElements = new Set<Node>();
2222
// The current collapsible element stack while traversing the tree

0 commit comments

Comments
 (0)