From 0781f1405a01b14a677e995668ea8ae534632a66 Mon Sep 17 00:00:00 2001
From: HiDeoo <494699+HiDeoo@users.noreply.github.com>
Date: Mon, 9 Jun 2025 10:37:10 +0200
Subject: [PATCH 01/14] feat: update starlight package
---
package.json | 4 +-
pnpm-lock.yaml | 266 ++++++++++++++++++++++++++++++++++++++++---------
2 files changed, 220 insertions(+), 50 deletions(-)
diff --git a/package.json b/package.json
index 5d02dfeccec3e..5c93f18feea6a 100644
--- a/package.json
+++ b/package.json
@@ -64,8 +64,8 @@
"dependencies": {
"@astrojs/check": "^0.9.4",
"@astrojs/sitemap": "^3.3.0",
- "@astrojs/starlight": "^0.31.1",
- "@expressive-code/plugin-collapsible-sections": "^0.40.2",
+ "@astrojs/starlight": "^0.34.3",
+ "@expressive-code/plugin-collapsible-sections": "^0.41.2",
"@lunariajs/core": "https://pkg.pr.new/lunariajs/lunaria/@lunariajs/core@4c8b9b0",
"canvas-confetti": "^1.6.0",
"jsdoc-api": "^9.3.4",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index fec528f5ae1c0..6df9e6c1c958a 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -15,11 +15,11 @@ importers:
specifier: ^3.3.0
version: 3.3.0
'@astrojs/starlight':
- specifier: ^0.31.1
- version: 0.31.1(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))
+ specifier: ^0.34.3
+ version: 0.34.3(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))
'@expressive-code/plugin-collapsible-sections':
- specifier: ^0.40.2
- version: 0.40.2
+ specifier: ^0.41.2
+ version: 0.41.2
'@lunariajs/core':
specifier: https://pkg.pr.new/lunariajs/lunaria/@lunariajs/core@4c8b9b0
version: https://pkg.pr.new/lunariajs/lunaria/@lunariajs/core@4c8b9b0
@@ -46,7 +46,7 @@ importers:
version: 0.33.5
starlight-llms-txt:
specifier: ^0.5.1
- version: 0.5.1(@astrojs/starlight@0.31.1(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)))(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))
+ version: 0.5.1(@astrojs/starlight@0.34.3(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)))(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))
devDependencies:
'@11ty/eleventy-fetch':
specifier: ^5.0.1
@@ -296,23 +296,36 @@ packages:
'@astrojs/markdown-remark@6.3.1':
resolution: {integrity: sha512-c5F5gGrkczUaTVgmMW9g1YMJGzOtRvjjhw6IfGuxarM6ct09MpwysP10US729dy07gg8y+ofVifezvP3BNsWZg==}
+ '@astrojs/markdown-remark@6.3.2':
+ resolution: {integrity: sha512-bO35JbWpVvyKRl7cmSJD822e8YA8ThR/YbUsciWNA7yTcqpIAL2hJDToWP5KcZBWxGT6IOdOkHSXARSNZc4l/Q==}
+
'@astrojs/mdx@4.0.8':
resolution: {integrity: sha512-/aiLr2yQ55W9AbpyOgfMtFXk7g2t7XoWdC2Avps/NqxAx4aYONDLneX43D79QwgqdjFhin7o3cIPp/vVppMbaA==}
engines: {node: ^18.17.1 || ^20.3.0 || >=22.0.0}
peerDependencies:
astro: ^5.0.0
+ '@astrojs/mdx@4.3.0':
+ resolution: {integrity: sha512-OGX2KvPeBzjSSKhkCqrUoDMyzFcjKt5nTE5SFw3RdoLf0nrhyCXBQcCyclzWy1+P+XpOamn+p+hm1EhpCRyPxw==}
+ engines: {node: 18.20.8 || ^20.3.0 || >=22.0.0}
+ peerDependencies:
+ astro: ^5.0.0
+
'@astrojs/prism@3.2.0':
resolution: {integrity: sha512-GilTHKGCW6HMq7y3BUv9Ac7GMe/MO9gi9GW62GzKtth0SwukCu/qp2wLiGpEujhY+VVhaG9v7kv/5vFzvf4NYw==}
engines: {node: ^18.17.1 || ^20.3.0 || >=22.0.0}
+ '@astrojs/prism@3.3.0':
+ resolution: {integrity: sha512-q8VwfU/fDZNoDOf+r7jUnMC2//H2l0TuQ6FkGJL8vD8nw/q5KiL3DS1KKBI3QhI9UQhpJ5dc7AtqfbXWuOgLCQ==}
+ engines: {node: 18.20.8 || ^20.3.0 || >=22.0.0}
+
'@astrojs/sitemap@3.3.0':
resolution: {integrity: sha512-nYE4lKQtk+Kbrw/w0G0TTgT724co0jUsU4tPlHY9au5HmTBKbwiCLwO/15b1/y13aZ4Kr9ZbMeMHlXuwn0ty4Q==}
- '@astrojs/starlight@0.31.1':
- resolution: {integrity: sha512-VIVkHugwgtEqJPiRH8+ouP0UqUfdmpBO9C64R+6QaQ2qmADNkI/BA3/YAJHTBZYlMQQGEEuLJwD9qpaUovi52Q==}
+ '@astrojs/starlight@0.34.3':
+ resolution: {integrity: sha512-MAuD3NF+E+QXJJuVKofoR6xcPTP4BJmYWeOBd03udVdubNGVnPnSWVZAi+ZtnTofES4+mJdp8BNGf+ubUxkiiA==}
peerDependencies:
- astro: ^5.1.5
+ astro: ^5.5.0
'@astrojs/telemetry@3.2.0':
resolution: {integrity: sha512-wxhSKRfKugLwLlr4OFfcqovk+LIFtKwLyGPqMsv+9/ibqqnW3Gv7tBhtKEb0gAyUAC4G9BTVQeQahqnQAhd6IQ==}
@@ -586,20 +599,20 @@ packages:
resolution: {integrity: sha512-zSkKow6H5Kdm0ZUQUB2kV5JIXqoG0+uH5YADhaEHswm664N9Db8dXSi0nMJpacpMf+MyyglF1vnZohpEg5yUtg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- '@expressive-code/core@0.40.2':
- resolution: {integrity: sha512-gXY3v7jbgz6nWKvRpoDxK4AHUPkZRuJsM79vHX/5uhV9/qX6Qnctp/U/dMHog/LCVXcuOps+5nRmf1uxQVPb3w==}
+ '@expressive-code/core@0.41.2':
+ resolution: {integrity: sha512-AJW5Tp9czbLqKMzwudL9Rv4js9afXBxkSGLmCNPq1iRgAYcx9NkTPJiSNCesjKRWoVC328AdSu6fqrD22zDgDg==}
- '@expressive-code/plugin-collapsible-sections@0.40.2':
- resolution: {integrity: sha512-EtfuluXKk3CdFMAeCJoDsUJo/s+Yh9b+kX0hNHeFlZ/W2/H8FmdZ9Pu+Qel41vw4yP6AyiQpsamquO7bzlakug==}
+ '@expressive-code/plugin-collapsible-sections@0.41.2':
+ resolution: {integrity: sha512-gyg864xlkLFYLDlOoO5wyZVmuFOc2vi6b/tJjEfXDj/xc8//ttuRLZ0EjuLIkch1hEhEQc9XF6agmiNYUCzeww==}
- '@expressive-code/plugin-frames@0.40.2':
- resolution: {integrity: sha512-aLw5IlDlZWb10Jo/TTDCVsmJhKfZ7FJI83Zo9VDrV0OBlmHAg7klZqw68VDz7FlftIBVAmMby53/MNXPnMjTSQ==}
+ '@expressive-code/plugin-frames@0.41.2':
+ resolution: {integrity: sha512-pfy0hkJI4nbaONjmksFDcuHmIuyPTFmi1JpABe4q2ajskiJtfBf+WDAL2pg595R9JNoPrrH5+aT9lbkx2noicw==}
- '@expressive-code/plugin-shiki@0.40.2':
- resolution: {integrity: sha512-t2HMR5BO6GdDW1c1ISBTk66xO503e/Z8ecZdNcr6E4NpUfvY+MRje+LtrcvbBqMwWBBO8RpVKcam/Uy+1GxwKQ==}
+ '@expressive-code/plugin-shiki@0.41.2':
+ resolution: {integrity: sha512-xD4zwqAkDccXqye+235BH5bN038jYiSMLfUrCOmMlzxPDGWdxJDk5z4uUB/aLfivEF2tXyO2zyaarL3Oqht0fQ==}
- '@expressive-code/plugin-text-markers@0.40.2':
- resolution: {integrity: sha512-/XoLjD67K9nfM4TgDlXAExzMJp6ewFKxNpfUw4F7q5Ecy+IU3/9zQQG/O70Zy+RxYTwKGw2MA9kd7yelsxnSmw==}
+ '@expressive-code/plugin-text-markers@0.41.2':
+ resolution: {integrity: sha512-JFWBz2qYxxJOJkkWf96LpeolbnOqJY95TvwYc0hXIHf9oSWV0h0SY268w/5N3EtQaD9KktzDE+VIVwb9jdb3nw==}
'@humanfs/core@0.19.1':
resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==}
@@ -911,36 +924,54 @@ packages:
'@shikijs/core@3.2.1':
resolution: {integrity: sha512-FhsdxMWYu/C11sFisEp7FMGBtX/OSSbnXZDMBhGuUDBNTdsoZlMSgQv5f90rwvzWAdWIW6VobD+G3IrazxA6dQ==}
+ '@shikijs/core@3.6.0':
+ resolution: {integrity: sha512-9By7Xb3olEX0o6UeJyPLI1PE1scC4d3wcVepvtv2xbuN9/IThYN4Wcwh24rcFeASzPam11MCq8yQpwwzCgSBRw==}
+
'@shikijs/engine-javascript@1.29.2':
resolution: {integrity: sha512-iNEZv4IrLYPv64Q6k7EPpOCE/nuvGiKl7zxdq0WFuRPF5PAE9PRo2JGq/d8crLusM59BRemJ4eOqrFrC4wiQ+A==}
'@shikijs/engine-javascript@3.2.1':
resolution: {integrity: sha512-eMdcUzN3FMQYxOmRf2rmU8frikzoSHbQDFH2hIuXsrMO+IBOCI9BeeRkCiBkcLDHeRKbOCtYMJK3D6U32ooU9Q==}
+ '@shikijs/engine-javascript@3.6.0':
+ resolution: {integrity: sha512-7YnLhZG/TU05IHMG14QaLvTW/9WiK8SEYafceccHUSXs2Qr5vJibUwsDfXDLmRi0zHdzsxrGKpSX6hnqe0k8nA==}
+
'@shikijs/engine-oniguruma@1.29.2':
resolution: {integrity: sha512-7iiOx3SG8+g1MnlzZVDYiaeHe7Ez2Kf2HrJzdmGwkRisT7r4rak0e655AcM/tF9JG/kg5fMNYlLLKglbN7gBqA==}
'@shikijs/engine-oniguruma@3.2.1':
resolution: {integrity: sha512-wZZAkayEn6qu2+YjenEoFqj0OyQI64EWsNR6/71d1EkG4sxEOFooowKivsWPpaWNBu3sxAG+zPz5kzBL/SsreQ==}
+ '@shikijs/engine-oniguruma@3.6.0':
+ resolution: {integrity: sha512-nmOhIZ9yT3Grd+2plmW/d8+vZ2pcQmo/UnVwXMUXAKTXdi+LK0S08Ancrz5tQQPkxvjBalpMW2aKvwXfelauvA==}
+
'@shikijs/langs@1.29.2':
resolution: {integrity: sha512-FIBA7N3LZ+223U7cJDUYd5shmciFQlYkFXlkKVaHsCPgfVLiO+e12FmQE6Tf9vuyEsFe3dIl8qGWKXgEHL9wmQ==}
'@shikijs/langs@3.2.1':
resolution: {integrity: sha512-If0iDHYRSGbihiA8+7uRsgb1er1Yj11pwpX1c6HLYnizDsKAw5iaT3JXj5ZpaimXSWky/IhxTm7C6nkiYVym+A==}
+ '@shikijs/langs@3.6.0':
+ resolution: {integrity: sha512-IdZkQJaLBu1LCYCwkr30hNuSDfllOT8RWYVZK1tD2J03DkiagYKRxj/pDSl8Didml3xxuyzUjgtioInwEQM/TA==}
+
'@shikijs/themes@1.29.2':
resolution: {integrity: sha512-i9TNZlsq4uoyqSbluIcZkmPL9Bfi3djVxRnofUHwvx/h6SRW3cwgBC5SML7vsDcWyukY0eCzVN980rqP6qNl9g==}
'@shikijs/themes@3.2.1':
resolution: {integrity: sha512-k5DKJUT8IldBvAm8WcrDT5+7GA7se6lLksR+2E3SvyqGTyFMzU2F9Gb7rmD+t+Pga1MKrYFxDIeyWjMZWM6uBQ==}
+ '@shikijs/themes@3.6.0':
+ resolution: {integrity: sha512-Fq2j4nWr1DF4drvmhqKq8x5vVQ27VncF8XZMBuHuQMZvUSS3NBgpqfwz/FoGe36+W6PvniZ1yDlg2d4kmYDU6w==}
+
'@shikijs/types@1.29.2':
resolution: {integrity: sha512-VJjK0eIijTZf0QSTODEXCqinjBn0joAHQ+aPSBzrv4O2d/QSbsMw+ZeSRx03kV34Hy7NzUvV/7NqfYGRLrASmw==}
'@shikijs/types@3.2.1':
resolution: {integrity: sha512-/NTWAk4KE2M8uac0RhOsIhYQf4pdU0OywQuYDGIGAJ6Mjunxl2cGiuLkvu4HLCMn+OTTLRWkjZITp+aYJv60yA==}
+ '@shikijs/types@3.6.0':
+ resolution: {integrity: sha512-cLWFiToxYu0aAzJqhXTQsFiJRTFDAGl93IrMSBNaGSzs7ixkLfdG6pH11HipuWFGW5vyx4X47W8HDQ7eSrmBUg==}
+
'@shikijs/vscode-textmate@10.0.2':
resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==}
@@ -1177,8 +1208,8 @@ packages:
resolution: {integrity: sha512-JepyLROIad6f44uyqMF6HKE2QbunNzp3mYKRcPoDGt0QkxXmH222FAFC64WTyQu2Kg8NNEXHTN/sWuUId9sSxw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- astro-expressive-code@0.40.2:
- resolution: {integrity: sha512-yJMQId0yXSAbW9I6yqvJ3FcjKzJ8zRL7elbJbllkv1ZJPlsI0NI83Pxn1YL1IapEM347EvOOkSW2GL+2+NO61w==}
+ astro-expressive-code@0.41.2:
+ resolution: {integrity: sha512-HN0jWTnhr7mIV/2e6uu4PPRNNo/k4UEgTLZqbp3MrHU+caCARveG2yZxaZVBmxyiVdYqW5Pd3u3n2zjnshixbw==}
peerDependencies:
astro: ^4.0.0-beta || ^5.0.0-beta || ^3.3.0
@@ -1710,8 +1741,8 @@ packages:
eventemitter3@5.0.1:
resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==}
- expressive-code@0.40.2:
- resolution: {integrity: sha512-1zIda2rB0qiDZACawzw2rbdBQiWHBT56uBctS+ezFe5XMAaFaHLnnSYND/Kd+dVzO9HfCXRDpzH3d+3fvOWRcw==}
+ expressive-code@0.41.2:
+ resolution: {integrity: sha512-aLZiZaqorRtNExtGpUjK9zFH9aTpWeoTXMyLo4b4IcuXfPqtLPPxhRm/QlPb8QqIcMMXnSiGRHSFpQfX0m7HJw==}
extend@3.0.2:
resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==}
@@ -2061,6 +2092,10 @@ packages:
resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==}
engines: {node: '>=6'}
+ klona@2.0.6:
+ resolution: {integrity: sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==}
+ engines: {node: '>= 8'}
+
levn@0.4.1:
resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==}
engines: {node: '>= 0.8.0'}
@@ -2345,6 +2380,9 @@ packages:
ofetch@1.4.1:
resolution: {integrity: sha512-QZj2DfGplQAr2oj9KzceK9Hwz6Whxazmn85yYeVuS3u9XTMOGMRx0kO95MQ+vLsj/S/NwBDMMLU5hpxvI6Tklw==}
+ oniguruma-parser@0.12.1:
+ resolution: {integrity: sha512-8Unqkvk1RYc6yq2WBYRj4hdnsAxVze8i7iPfQr8e4uSP3tRv0rpZcbGUDvxfQQcdwHt/e9PrMvGCsa8OqG9X3w==}
+
oniguruma-parser@0.5.4:
resolution: {integrity: sha512-yNxcQ8sKvURiTwP0mV6bLQCYE7NKfKRRWunhbZnXgxSmB1OXa1lHrN3o4DZd+0Si0kU5blidK7BcROO8qv5TZA==}
@@ -2354,6 +2392,9 @@ packages:
oniguruma-to-es@4.1.0:
resolution: {integrity: sha512-SNwG909cSLo4vPyyPbU/VJkEc9WOXqu2ycBlfd1UCXLqk1IijcQktSBb2yRQ2UFPsDhpkaf+C1dtT3PkLK/yWA==}
+ oniguruma-to-es@4.3.3:
+ resolution: {integrity: sha512-rPiZhzC3wXwE59YQMRDodUwwT9FZ9nNBwQQfsd1wfdtlKEyCdRV0avrTcSZ5xlIvGRVPd/cx6ZN45ECmS39xvg==}
+
optionator@0.9.4:
resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==}
engines: {node: '>= 0.8.0'}
@@ -2485,6 +2526,10 @@ packages:
resolution: {integrity: sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==}
engines: {node: '>=6'}
+ prismjs@1.30.0:
+ resolution: {integrity: sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==}
+ engines: {node: '>=6'}
+
prompts@2.4.2:
resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==}
engines: {node: '>= 6'}
@@ -2550,8 +2595,8 @@ packages:
rehype-autolink-headings@7.1.0:
resolution: {integrity: sha512-rItO/pSdvnvsP4QRB1pmPiNHUskikqtPojZKJPPPAVx9Hj8i8TwMBhofrrAYRhYOOBZH9tgmG5lPqDLuIWPWmw==}
- rehype-expressive-code@0.40.2:
- resolution: {integrity: sha512-+kn+AMGCrGzvtH8Q5lC6Y5lnmTV/r33fdmi5QU/IH1KPHKobKr5UnLwJuqHv5jBTSN/0v2wLDS7RTM73FVzqmQ==}
+ rehype-expressive-code@0.41.2:
+ resolution: {integrity: sha512-vHYfWO9WxAw6kHHctddOt+P4266BtyT1mrOIuxJD+1ELuvuJAa5uBIhYt0OVMyOhlvf57hzWOXJkHnMhpaHyxw==}
rehype-format@5.0.0:
resolution: {integrity: sha512-kM4II8krCHmUhxrlvzFSptvaWh280Fr7UGNJU5DCMuvmAwGCNmGfi9CvFAQK6JDjsNoRMWQStglK3zKJH685Wg==}
@@ -2595,6 +2640,9 @@ packages:
remark-rehype@11.1.1:
resolution: {integrity: sha512-g/osARvjkBXb6Wo0XvAeXQohVta8i84ACbenPpoSsxTOQH/Ae0/RGP4WZgnMH5pMLpsj4FG7OHmcIcXxpza8eQ==}
+ remark-rehype@11.1.2:
+ resolution: {integrity: sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw==}
+
remark-smartypants@2.1.0:
resolution: {integrity: sha512-qoF6Vz3BjU2tP6OfZqHOvCU0ACmu/6jhGaINSQRI9mM7wCxNQTKB3JUAN4SVoN2ybElEDTxBIABRep7e569iJw==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
@@ -2707,6 +2755,9 @@ packages:
shiki@3.2.1:
resolution: {integrity: sha512-VML/2o1/KGYkEf/stJJ+s9Ypn7jUKQPomGLGYso4JJFMFxVDyPNsjsI3MB3KLjlMOeH44gyaPdXC6rik2WXvUQ==}
+ shiki@3.6.0:
+ resolution: {integrity: sha512-tKn/Y0MGBTffQoklaATXmTqDU02zx8NYBGQ+F6gy87/YjKbizcLd+Cybh/0ZtOBX9r1NEnAy/GTRDKtOsc1L9w==}
+
simple-git@3.27.0:
resolution: {integrity: sha512-ivHoFS9Yi9GY49ogc6/YAi3Fl9ROnF4VyubNylgCkA+RVqLaKWnDSzXOVzya8csELIaWaYNutsEuAhZrtOjozA==}
@@ -2869,6 +2920,9 @@ packages:
ultrahtml@1.5.3:
resolution: {integrity: sha512-GykOvZwgDWZlTQMtp5jrD4BVL+gNn2NVlVafjcFUJ7taY20tqYdwdoWBFy6GBJsNTZe1GkGPkSl5knQAjtgceg==}
+ ultrahtml@1.6.0:
+ resolution: {integrity: sha512-R9fBn90VTJrqqLDwyMph+HGne8eqY1iPfYhPzZrvKpIfwkWZbcYlfpsb8B9dTvBfpy1/hqAD7Wi8EKfP9e8zdw==}
+
ultramatter@0.0.4:
resolution: {integrity: sha512-1f/hO3mR+/Hgue4eInOF/Qm/wzDqwhYha4DxM0hre9YIUyso3fE2XtrAU6B4njLqTC8CM49EZaYgsVSa+dXHGw==}
@@ -3518,6 +3572,32 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ '@astrojs/markdown-remark@6.3.2':
+ dependencies:
+ '@astrojs/internal-helpers': 0.6.1
+ '@astrojs/prism': 3.3.0
+ github-slugger: 2.0.0
+ hast-util-from-html: 2.0.3
+ hast-util-to-text: 4.0.2
+ import-meta-resolve: 4.1.0
+ js-yaml: 4.1.0
+ mdast-util-definitions: 6.0.0
+ rehype-raw: 7.0.0
+ rehype-stringify: 10.0.1
+ remark-gfm: 4.0.1
+ remark-parse: 11.0.0
+ remark-rehype: 11.1.2
+ remark-smartypants: 3.0.2
+ shiki: 3.2.1
+ smol-toml: 1.3.1
+ unified: 11.0.5
+ unist-util-remove-position: 5.0.0
+ unist-util-visit: 5.0.0
+ unist-util-visit-parents: 6.0.1
+ vfile: 6.0.3
+ transitivePeerDependencies:
+ - supports-color
+
'@astrojs/mdx@4.0.8(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))':
dependencies:
'@astrojs/markdown-remark': 6.1.0
@@ -3537,26 +3617,50 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ '@astrojs/mdx@4.3.0(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))':
+ dependencies:
+ '@astrojs/markdown-remark': 6.3.2
+ '@mdx-js/mdx': 3.1.0(acorn@8.14.1)
+ acorn: 8.14.1
+ astro: 5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)
+ es-module-lexer: 1.6.0
+ estree-util-visit: 2.0.0
+ hast-util-to-html: 9.0.5
+ kleur: 4.1.5
+ rehype-raw: 7.0.0
+ remark-gfm: 4.0.1
+ remark-smartypants: 3.0.2
+ source-map: 0.7.4
+ unist-util-visit: 5.0.0
+ vfile: 6.0.3
+ transitivePeerDependencies:
+ - supports-color
+
'@astrojs/prism@3.2.0':
dependencies:
prismjs: 1.29.0
+ '@astrojs/prism@3.3.0':
+ dependencies:
+ prismjs: 1.30.0
+
'@astrojs/sitemap@3.3.0':
dependencies:
sitemap: 8.0.0
stream-replace-string: 2.0.0
zod: 3.24.2
- '@astrojs/starlight@0.31.1(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))':
+ '@astrojs/starlight@0.34.3(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))':
dependencies:
- '@astrojs/mdx': 4.0.8(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))
+ '@astrojs/markdown-remark': 6.3.1
+ '@astrojs/mdx': 4.3.0(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))
'@astrojs/sitemap': 3.3.0
'@pagefind/default-ui': 1.3.0
'@types/hast': 3.0.4
'@types/js-yaml': 4.0.9
'@types/mdast': 4.0.4
astro: 5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)
- astro-expressive-code: 0.40.2(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))
+ astro-expressive-code: 0.41.2(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))
bcp-47: 2.1.0
hast-util-from-html: 2.0.3
hast-util-select: 6.0.3
@@ -3564,6 +3668,7 @@ snapshots:
hastscript: 9.0.0
i18next: 23.16.4
js-yaml: 4.1.0
+ klona: 2.0.6
mdast-util-directive: 3.0.0
mdast-util-to-markdown: 2.1.0
mdast-util-to-string: 4.0.0
@@ -3571,6 +3676,7 @@ snapshots:
rehype: 13.0.2
rehype-format: 5.0.0
remark-directive: 3.0.0
+ ultrahtml: 1.6.0
unified: 11.0.5
unist-util-visit: 5.0.0
vfile: 6.0.3
@@ -3785,7 +3891,7 @@ snapshots:
dependencies:
levn: 0.4.1
- '@expressive-code/core@0.40.2':
+ '@expressive-code/core@0.41.2':
dependencies:
'@ctrl/tinycolor': 4.1.0
hast-util-select: 6.0.3
@@ -3797,22 +3903,22 @@ snapshots:
unist-util-visit: 5.0.0
unist-util-visit-parents: 6.0.1
- '@expressive-code/plugin-collapsible-sections@0.40.2':
+ '@expressive-code/plugin-collapsible-sections@0.41.2':
dependencies:
- '@expressive-code/core': 0.40.2
+ '@expressive-code/core': 0.41.2
- '@expressive-code/plugin-frames@0.40.2':
+ '@expressive-code/plugin-frames@0.41.2':
dependencies:
- '@expressive-code/core': 0.40.2
+ '@expressive-code/core': 0.41.2
- '@expressive-code/plugin-shiki@0.40.2':
+ '@expressive-code/plugin-shiki@0.41.2':
dependencies:
- '@expressive-code/core': 0.40.2
- shiki: 1.29.2
+ '@expressive-code/core': 0.41.2
+ shiki: 3.6.0
- '@expressive-code/plugin-text-markers@0.40.2':
+ '@expressive-code/plugin-text-markers@0.41.2':
dependencies:
- '@expressive-code/core': 0.40.2
+ '@expressive-code/core': 0.41.2
'@humanfs/core@0.19.1': {}
@@ -4081,6 +4187,13 @@ snapshots:
'@types/hast': 3.0.4
hast-util-to-html: 9.0.5
+ '@shikijs/core@3.6.0':
+ dependencies:
+ '@shikijs/types': 3.6.0
+ '@shikijs/vscode-textmate': 10.0.2
+ '@types/hast': 3.0.4
+ hast-util-to-html: 9.0.5
+
'@shikijs/engine-javascript@1.29.2':
dependencies:
'@shikijs/types': 1.29.2
@@ -4093,6 +4206,12 @@ snapshots:
'@shikijs/vscode-textmate': 10.0.2
oniguruma-to-es: 4.1.0
+ '@shikijs/engine-javascript@3.6.0':
+ dependencies:
+ '@shikijs/types': 3.6.0
+ '@shikijs/vscode-textmate': 10.0.2
+ oniguruma-to-es: 4.3.3
+
'@shikijs/engine-oniguruma@1.29.2':
dependencies:
'@shikijs/types': 1.29.2
@@ -4103,6 +4222,11 @@ snapshots:
'@shikijs/types': 3.2.1
'@shikijs/vscode-textmate': 10.0.2
+ '@shikijs/engine-oniguruma@3.6.0':
+ dependencies:
+ '@shikijs/types': 3.6.0
+ '@shikijs/vscode-textmate': 10.0.2
+
'@shikijs/langs@1.29.2':
dependencies:
'@shikijs/types': 1.29.2
@@ -4111,6 +4235,10 @@ snapshots:
dependencies:
'@shikijs/types': 3.2.1
+ '@shikijs/langs@3.6.0':
+ dependencies:
+ '@shikijs/types': 3.6.0
+
'@shikijs/themes@1.29.2':
dependencies:
'@shikijs/types': 1.29.2
@@ -4119,6 +4247,10 @@ snapshots:
dependencies:
'@shikijs/types': 3.2.1
+ '@shikijs/themes@3.6.0':
+ dependencies:
+ '@shikijs/types': 3.6.0
+
'@shikijs/types@1.29.2':
dependencies:
'@shikijs/vscode-textmate': 10.0.2
@@ -4129,6 +4261,11 @@ snapshots:
'@shikijs/vscode-textmate': 10.0.2
'@types/hast': 3.0.4
+ '@shikijs/types@3.6.0':
+ dependencies:
+ '@shikijs/vscode-textmate': 10.0.2
+ '@types/hast': 3.0.4
+
'@shikijs/vscode-textmate@10.0.2': {}
'@types/acorn@4.0.6':
@@ -4431,10 +4568,10 @@ snapshots:
transitivePeerDependencies:
- supports-color
- astro-expressive-code@0.40.2(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)):
+ astro-expressive-code@0.41.2(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)):
dependencies:
astro: 5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)
- rehype-expressive-code: 0.40.2
+ rehype-expressive-code: 0.41.2
astro-og-canvas@0.7.0(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)):
dependencies:
@@ -5047,12 +5184,12 @@ snapshots:
eventemitter3@5.0.1: {}
- expressive-code@0.40.2:
+ expressive-code@0.41.2:
dependencies:
- '@expressive-code/core': 0.40.2
- '@expressive-code/plugin-frames': 0.40.2
- '@expressive-code/plugin-shiki': 0.40.2
- '@expressive-code/plugin-text-markers': 0.40.2
+ '@expressive-code/core': 0.41.2
+ '@expressive-code/plugin-frames': 0.41.2
+ '@expressive-code/plugin-shiki': 0.41.2
+ '@expressive-code/plugin-text-markers': 0.41.2
extend@3.0.2: {}
@@ -5507,6 +5644,8 @@ snapshots:
kleur@4.1.5: {}
+ klona@2.0.6: {}
+
levn@0.4.1:
dependencies:
prelude-ls: 1.2.1
@@ -6070,6 +6209,8 @@ snapshots:
node-fetch-native: 1.6.6
ufo: 1.5.4
+ oniguruma-parser@0.12.1: {}
+
oniguruma-parser@0.5.4: {}
oniguruma-to-es@2.3.0:
@@ -6085,6 +6226,12 @@ snapshots:
regex: 6.0.1
regex-recursion: 6.0.2
+ oniguruma-to-es@4.3.3:
+ dependencies:
+ oniguruma-parser: 0.12.1
+ regex: 6.0.1
+ regex-recursion: 6.0.2
+
optionator@0.9.4:
dependencies:
deep-is: 0.1.4
@@ -6226,6 +6373,8 @@ snapshots:
prismjs@1.29.0: {}
+ prismjs@1.30.0: {}
+
prompts@2.4.2:
dependencies:
kleur: 3.0.3
@@ -6310,9 +6459,9 @@ snapshots:
unified: 11.0.5
unist-util-visit: 5.0.0
- rehype-expressive-code@0.40.2:
+ rehype-expressive-code@0.41.2:
dependencies:
- expressive-code: 0.40.2
+ expressive-code: 0.41.2
rehype-format@5.0.0:
dependencies:
@@ -6426,6 +6575,14 @@ snapshots:
unified: 11.0.5
vfile: 6.0.3
+ remark-rehype@11.1.2:
+ dependencies:
+ '@types/hast': 3.0.4
+ '@types/mdast': 4.0.4
+ mdast-util-to-hast: 13.0.2
+ unified: 11.0.5
+ vfile: 6.0.3
+
remark-smartypants@2.1.0:
dependencies:
retext: 8.1.0
@@ -6617,6 +6774,17 @@ snapshots:
'@shikijs/vscode-textmate': 10.0.2
'@types/hast': 3.0.4
+ shiki@3.6.0:
+ dependencies:
+ '@shikijs/core': 3.6.0
+ '@shikijs/engine-javascript': 3.6.0
+ '@shikijs/engine-oniguruma': 3.6.0
+ '@shikijs/langs': 3.6.0
+ '@shikijs/themes': 3.6.0
+ '@shikijs/types': 3.6.0
+ '@shikijs/vscode-textmate': 10.0.2
+ '@types/hast': 3.0.4
+
simple-git@3.27.0:
dependencies:
'@kwsites/file-exists': 1.1.1
@@ -6646,10 +6814,10 @@ snapshots:
space-separated-tokens@2.0.2: {}
- starlight-llms-txt@0.5.1(@astrojs/starlight@0.31.1(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)))(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)):
+ starlight-llms-txt@0.5.1(@astrojs/starlight@0.34.3(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)))(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)):
dependencies:
'@astrojs/mdx': 4.0.8(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))
- '@astrojs/starlight': 0.31.1(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))
+ '@astrojs/starlight': 0.34.3(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))
'@types/hast': 3.0.4
'@types/micromatch': 4.0.9
astro: 5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)
@@ -6778,6 +6946,8 @@ snapshots:
ultrahtml@1.5.3: {}
+ ultrahtml@1.6.0: {}
+
ultramatter@0.0.4: {}
uncrypto@0.1.3: {}
From 3bcbb01b91cbb8153155cf2936a2459f60c6d38b Mon Sep 17 00:00:00 2001
From: HiDeoo <494699+HiDeoo@users.noreply.github.com>
Date: Mon, 9 Jun 2025 10:37:24 +0200
Subject: [PATCH 02/14] refactor: update `social` config
---
astro.config.ts | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/astro.config.ts b/astro.config.ts
index 81a12b89e8317..6f85307962aee 100644
--- a/astro.config.ts
+++ b/astro.config.ts
@@ -53,10 +53,10 @@ export default defineConfig({
defaultLocale: 'en',
locales: makeLocalesConfig(),
sidebar,
- social: {
- github: 'https://github.com/withastro/astro',
- discord: 'https://astro.build/chat',
- },
+ social: [
+ { icon: 'github', label: 'GitHub', href: 'https://github.com/withastro/astro' },
+ { icon: 'discord', label: 'Discord', href: 'https://astro.build/chat' },
+ ],
pagefind: false,
head: [
// Add ICO favicon fallback for Safari.
From e6187e90c3d651ba12f36c63fc5a10ea27b57c04 Mon Sep 17 00:00:00 2001
From: HiDeoo <494699+HiDeoo@users.noreply.github.com>
Date: Mon, 9 Jun 2025 10:42:55 +0200
Subject: [PATCH 03/14] =?UTF-8?q?refactor:=20`Astro.props`=20=E2=86=92=20`?=
=?UTF-8?q?Astro.local.starlightRoute`?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/starlight/EditLink.astro | 3 +--
src/components/starlight/Footer.astro | 3 +--
src/components/starlight/Head.astro | 5 ++---
src/components/starlight/Hero.astro | 3 +--
src/components/starlight/MarkdownContent.astro | 3 +--
src/components/starlight/MobileMenuFooter.astro | 3 +--
src/components/starlight/MobileTableOfContents.astro | 5 ++---
src/components/starlight/PageSidebar.astro | 7 +++----
src/components/starlight/PageTitle.astro | 5 ++---
src/components/starlight/SiteTitle.astro | 3 +--
src/components/starlight/TableOfContents.astro | 7 +++----
src/components/tutorial/TutorialNav.astro | 7 ++-----
12 files changed, 20 insertions(+), 34 deletions(-)
diff --git a/src/components/starlight/EditLink.astro b/src/components/starlight/EditLink.astro
index c30a0e70a93cf..760408e2debdf 100644
--- a/src/components/starlight/EditLink.astro
+++ b/src/components/starlight/EditLink.astro
@@ -1,8 +1,7 @@
---
import { Icon } from '@astrojs/starlight/components';
-import type { Props } from '@astrojs/starlight/props';
-const { editUrl, entry, locale, isFallback } = Astro.props;
+const { editUrl, entry, locale, isFallback } = Astro.locals.starlightRoute;
const githubEditUrl =
entry.data.githubURL && (locale === 'en' || isFallback)
diff --git a/src/components/starlight/Footer.astro b/src/components/starlight/Footer.astro
index 330b75f3ad5f0..8a978a0353e80 100644
--- a/src/components/starlight/Footer.astro
+++ b/src/components/starlight/Footer.astro
@@ -1,6 +1,5 @@
---
import DefaultFooter from '@astrojs/starlight/components/Footer.astro';
-import type { Props } from '@astrojs/starlight/props';
import FooterLinks from '../FooterLinks.astro';
import { Ad } from '../RightSidebar/ad';
---
@@ -8,7 +7,7 @@ import { Ad } from '../RightSidebar/ad';
-
+
diff --git a/src/components/tutorial/Box.astro b/src/components/tutorial/Box.astro
index bc5961c01ad0f..27686f36bd883 100644
--- a/src/components/tutorial/Box.astro
+++ b/src/components/tutorial/Box.astro
@@ -71,11 +71,11 @@ const { icon } = Astro.props;
diff --git a/src/components/starlight/MobileTableOfContents.astro b/src/components/starlight/MobileTableOfContents.astro
index 1ff514017db26..2b7ee24ddcf87 100644
--- a/src/components/starlight/MobileTableOfContents.astro
+++ b/src/components/starlight/MobileTableOfContents.astro
@@ -36,81 +36,84 @@ const isTutorial = entry.id.split('/')[1] === 'tutorial';
}
diff --git a/src/components/starlight/PageSidebar.astro b/src/components/starlight/PageSidebar.astro
index 4d5a659a60ae0..948fbf3c50766 100644
--- a/src/components/starlight/PageSidebar.astro
+++ b/src/components/starlight/PageSidebar.astro
@@ -26,47 +26,49 @@ const Banner = Ad;
}
From 02537d291730ac75266cf270c5ee1462e580ddb4 Mon Sep 17 00:00:00 2001
From: HiDeoo <494699+HiDeoo@users.noreply.github.com>
Date: Mon, 9 Jun 2025 14:15:25 +0200
Subject: [PATCH 09/14] fix: css issues related to cascade layers
---
src/components/Landing/Discord.astro | 9 ++++++++-
src/components/tutorial/Box.astro | 2 +-
src/components/tutorial/PreCheck.astro | 4 ----
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/components/Landing/Discord.astro b/src/components/Landing/Discord.astro
index 43a122129f07f..9238e4e5129f1 100644
--- a/src/components/Landing/Discord.astro
+++ b/src/components/Landing/Discord.astro
@@ -16,7 +16,7 @@ const { title, cta } = Astro.props;
From 968f45b85808ceb47343f22de646b02e75ef9575 Mon Sep 17 00:00:00 2001
From: HiDeoo <494699+HiDeoo@users.noreply.github.com>
Date: Mon, 9 Jun 2025 15:18:35 +0200
Subject: [PATCH 10/14] fix: ad position
---
src/components/starlight/PageSidebar.astro | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/components/starlight/PageSidebar.astro b/src/components/starlight/PageSidebar.astro
index 948fbf3c50766..37684f6676dc7 100644
--- a/src/components/starlight/PageSidebar.astro
+++ b/src/components/starlight/PageSidebar.astro
@@ -54,10 +54,6 @@ const Banner = Ad;
color: var(--sl-color-white);
}
@media (min-width: 72rem) {
- .right-sidebar-panel {
- display: flex;
- }
-
.sl-container {
max-width: calc(
(
@@ -71,4 +67,10 @@ const Banner = Ad;
}
}
}
+
+ @media (min-width: 72rem) {
+ .right-sidebar-panel {
+ display: flex;
+ }
+ }
From ba11ee319785c91ad69f34ae348a1f046d328f3b Mon Sep 17 00:00:00 2001
From: HiDeoo <494699+HiDeoo@users.noreply.github.com>
Date: Fri, 13 Jun 2025 17:16:57 +0200
Subject: [PATCH 11/14] chore: update to starlight `0.34.4`
---
package.json | 2 +-
pnpm-lock.yaml | 20 ++++++++++----------
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/package.json b/package.json
index 2b270b7a495f0..e08caa778c35b 100644
--- a/package.json
+++ b/package.json
@@ -61,7 +61,7 @@
"dependencies": {
"@astrojs/check": "^0.9.4",
"@astrojs/sitemap": "^3.3.0",
- "@astrojs/starlight": "^0.34.3",
+ "@astrojs/starlight": "^0.34.4",
"@expressive-code/plugin-collapsible-sections": "^0.41.2",
"@lunariajs/core": "https://pkg.pr.new/lunariajs/lunaria/@lunariajs/core@4c8b9b0",
"canvas-confetti": "^1.6.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 8d375e86553f9..837ce197f0c9d 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -15,8 +15,8 @@ importers:
specifier: ^3.3.0
version: 3.3.0
'@astrojs/starlight':
- specifier: ^0.34.3
- version: 0.34.3(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))
+ specifier: ^0.34.4
+ version: 0.34.4(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))
'@expressive-code/plugin-collapsible-sections':
specifier: ^0.41.2
version: 0.41.2
@@ -43,7 +43,7 @@ importers:
version: 0.33.5
starlight-llms-txt:
specifier: ^0.5.1
- version: 0.5.1(@astrojs/starlight@0.34.3(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)))(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))
+ version: 0.5.1(@astrojs/starlight@0.34.4(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)))(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))
devDependencies:
'@11ty/eleventy-fetch':
specifier: ^5.0.1
@@ -310,8 +310,8 @@ packages:
'@astrojs/sitemap@3.3.0':
resolution: {integrity: sha512-nYE4lKQtk+Kbrw/w0G0TTgT724co0jUsU4tPlHY9au5HmTBKbwiCLwO/15b1/y13aZ4Kr9ZbMeMHlXuwn0ty4Q==}
- '@astrojs/starlight@0.34.3':
- resolution: {integrity: sha512-MAuD3NF+E+QXJJuVKofoR6xcPTP4BJmYWeOBd03udVdubNGVnPnSWVZAi+ZtnTofES4+mJdp8BNGf+ubUxkiiA==}
+ '@astrojs/starlight@0.34.4':
+ resolution: {integrity: sha512-NfQ6S2OaDG8aaiE+evVxSMpgqMkXPLa/yCpzG340EX2pRzFxPeTSvpei3Uz9KouevXRCctjHSItKjuZP+2syrQ==}
peerDependencies:
astro: ^5.5.0
@@ -3570,7 +3570,7 @@ snapshots:
remark-parse: 11.0.0
remark-rehype: 11.1.2
remark-smartypants: 3.0.2
- shiki: 3.2.1
+ shiki: 3.6.0
smol-toml: 1.3.1
unified: 11.0.5
unist-util-remove-position: 5.0.0
@@ -3632,9 +3632,9 @@ snapshots:
stream-replace-string: 2.0.0
zod: 3.24.2
- '@astrojs/starlight@0.34.3(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))':
+ '@astrojs/starlight@0.34.4(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))':
dependencies:
- '@astrojs/markdown-remark': 6.3.1
+ '@astrojs/markdown-remark': 6.3.2
'@astrojs/mdx': 4.3.0(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))
'@astrojs/sitemap': 3.3.0
'@pagefind/default-ui': 1.3.0
@@ -6785,10 +6785,10 @@ snapshots:
space-separated-tokens@2.0.2: {}
- starlight-llms-txt@0.5.1(@astrojs/starlight@0.34.3(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)))(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)):
+ starlight-llms-txt@0.5.1(@astrojs/starlight@0.34.4(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)))(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)):
dependencies:
'@astrojs/mdx': 4.0.8(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))
- '@astrojs/starlight': 0.34.3(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))
+ '@astrojs/starlight': 0.34.4(astro@5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1))
'@types/hast': 3.0.4
'@types/micromatch': 4.0.9
astro: 5.5.3(@types/node@20.17.10)(jiti@2.3.3)(rollup@4.34.9)(sass@1.54.3)(typescript@5.6.2)(yaml@2.5.1)
From a16d1454948b95e927a8f42a05ea303981378385 Mon Sep 17 00:00:00 2001
From: HiDeoo <494699+HiDeoo@users.noreply.github.com>
Date: Wed, 18 Jun 2025 15:35:58 +0200
Subject: [PATCH 12/14] feat: add visual diff tool
---
.gitignore | 4 +
astro.config.ts | 2 +
package.json | 9 +-
pnpm-lock.yaml | 78 ++++++++++++++++
visual-diff/diff.setup.ts | 9 ++
visual-diff/diff.test.ts | 156 +++++++++++++++++++++++++++++++
visual-diff/playwright.config.ts | 33 +++++++
7 files changed, 290 insertions(+), 1 deletion(-)
create mode 100644 visual-diff/diff.setup.ts
create mode 100644 visual-diff/diff.test.ts
create mode 100644 visual-diff/playwright.config.ts
diff --git a/.gitignore b/.gitignore
index 0b5141332ec14..a0923cf758530 100644
--- a/.gitignore
+++ b/.gitignore
@@ -39,3 +39,7 @@ sandbox.config.json
# Cached requests
.cache
**/_fonts/brand/
+
+# TODO(HiDeoo) Remove the next entries when removing the `visual-diff` tool
+visual-diff/screenshots/
+test-results/
diff --git a/astro.config.ts b/astro.config.ts
index 59c63519cccd0..d9ff5c9a8c9b1 100644
--- a/astro.config.ts
+++ b/astro.config.ts
@@ -18,6 +18,8 @@ const site = NETLIFY_PREVIEW_SITE || 'https://docs.astro.build/';
// https://astro.build/config
export default defineConfig({
+ // TODO(HiDeoo) Remove this, only used to avoid screenshoting the dev toolbar.
+ devToolbar: { enabled: false },
site,
integrations: [
devServerFileWatcher([
diff --git a/package.json b/package.json
index e08caa778c35b..befac840e4668 100644
--- a/package.json
+++ b/package.json
@@ -2,6 +2,7 @@
"name": "docs",
"version": "0.0.7",
"private": true,
+ "type": "module",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
@@ -19,7 +20,8 @@
"lint:slugcheck": "node ./scripts/lint-slugcheck.mjs",
"lint:eslint": "eslint .",
"netlify:build": "pnpm ${NETLIFY_BUILD_SCRIPT:-build}",
- "lunaria:build": "tsm ./scripts/lunaria.mts"
+ "lunaria:build": "tsm ./scripts/lunaria.mts",
+ "visual-diff": "playwright install --with-deps chromium && playwright test -c visual-diff/playwright.config.ts"
},
"devDependencies": {
"@11ty/eleventy-fetch": "^5.0.1",
@@ -27,10 +29,13 @@
"@docsearch/css": "3.5.1",
"@docsearch/js": "3.5.1",
"@eslint/js": "^9.17.0",
+ "@playwright/test": "^1.53.0",
"@types/canvas-confetti": "^1.6.0",
"@types/hast": "^3.0.4",
"@types/mdast": "^4.0.4",
"@types/node": "^20.17.10",
+ "@types/pixelmatch": "^5.2.6",
+ "@types/pngjs": "^6.0.5",
"@typescript-eslint/parser": "^8.19.1",
"astro": "^5.5.3",
"astro-auto-import": "^0.4.4",
@@ -49,6 +54,8 @@
"kleur": "^4.1.5",
"mdast-util-to-string": "^4.0.0",
"p-retry": "^6.2.1",
+ "pixelmatch": "^7.1.0",
+ "pngjs": "^7.0.0",
"prettier": "^3.4.2",
"prettier-plugin-astro": "^0.14.1",
"rehype": "^13.0.2",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 837ce197f0c9d..b2627e0ce8331 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -60,6 +60,9 @@ importers:
'@eslint/js':
specifier: ^9.17.0
version: 9.17.0
+ '@playwright/test':
+ specifier: ^1.53.0
+ version: 1.53.0
'@types/canvas-confetti':
specifier: ^1.6.0
version: 1.6.0
@@ -72,6 +75,12 @@ importers:
'@types/node':
specifier: ^20.17.10
version: 20.17.10
+ '@types/pixelmatch':
+ specifier: ^5.2.6
+ version: 5.2.6
+ '@types/pngjs':
+ specifier: ^6.0.5
+ version: 6.0.5
'@typescript-eslint/parser':
specifier: ^8.19.1
version: 8.19.1(eslint@9.17.0(jiti@2.3.3))(typescript@5.6.2)
@@ -126,6 +135,12 @@ importers:
p-retry:
specifier: ^6.2.1
version: 6.2.1
+ pixelmatch:
+ specifier: ^7.1.0
+ version: 7.1.0
+ pngjs:
+ specifier: ^7.0.0
+ version: 7.0.0
prettier:
specifier: ^3.4.2
version: 3.4.2
@@ -798,6 +813,11 @@ packages:
resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==}
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
+ '@playwright/test@1.53.0':
+ resolution: {integrity: sha512-15hjKreZDcp7t6TL/7jkAo6Df5STZN09jGiv5dbP9A6vMVncXRqE7/B2SncsyOwrkZRBH2i6/TPOL8BVmm3c7w==}
+ engines: {node: '>=18'}
+ hasBin: true
+
'@rgrove/parse-xml@4.2.0':
resolution: {integrity: sha512-UuBOt7BOsKVOkFXRe4Ypd/lADuNIfqJXv8GvHqtXaTYXPPKkj2nS2zPllVsrtRjcomDhIJVBnZwfmlI222WH8g==}
engines: {node: '>=14.0.0'}
@@ -1029,6 +1049,12 @@ packages:
'@types/node@20.17.10':
resolution: {integrity: sha512-/jrvh5h6NXhEauFFexRin69nA0uHJ5gwk4iDivp/DeoEua3uwCUto6PC86IpRITBOs4+6i2I56K5x5b6WYGXHA==}
+ '@types/pixelmatch@5.2.6':
+ resolution: {integrity: sha512-wC83uexE5KGuUODn6zkm9gMzTwdY5L0chiK+VrKcDfEjzxh1uadlWTvOmAbCpnM9zx/Ww3f8uKlYQVnO/TrqVg==}
+
+ '@types/pngjs@6.0.5':
+ resolution: {integrity: sha512-0k5eKfrA83JOZPppLtS2C7OUtyNAl2wKNxfyYl9Q5g9lPkgBl/9hNyAu6HuEH2J4XmIv2znEpkDd0SaZVxW6iQ==}
+
'@types/retry@0.12.2':
resolution: {integrity: sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==}
@@ -1794,6 +1820,11 @@ packages:
resolution: {integrity: sha512-9UbaD6XdAL97+k/n+N7JwX46K/M6Zc6KcFYskrYL8wbBV/Uyk0CTAMY0VT+qiK5PM7AIc9aTWYtq65U7T+aCNQ==}
engines: {node: '>=8'}
+ fsevents@2.3.2:
+ resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==}
+ engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
+ os: [darwin]
+
fsevents@2.3.3:
resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
@@ -2468,6 +2499,24 @@ packages:
resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==}
engines: {node: '>=12'}
+ pixelmatch@7.1.0:
+ resolution: {integrity: sha512-1wrVzJ2STrpmONHKBy228LM1b84msXDUoAzVEl0R8Mz4Ce6EPr+IVtxm8+yvrqLYMHswREkjYFaMxnyGnaY3Ng==}
+ hasBin: true
+
+ playwright-core@1.53.0:
+ resolution: {integrity: sha512-mGLg8m0pm4+mmtB7M89Xw/GSqoNC+twivl8ITteqvAndachozYe2ZA7srU6uleV1vEdAHYqjq+SV8SNxRRFYBw==}
+ engines: {node: '>=18'}
+ hasBin: true
+
+ playwright@1.53.0:
+ resolution: {integrity: sha512-ghGNnIEYZC4E+YtclRn4/p6oYbdPiASELBIYkBXfaTVKreQUYbMUYQDwS12a8F0/HtIjr/CkGjtwABeFPGcS4Q==}
+ engines: {node: '>=18'}
+ hasBin: true
+
+ pngjs@7.0.0:
+ resolution: {integrity: sha512-LKWqWJRhstyYo9pGvgor/ivk2w94eSjE3RGVuzLGlr3NmD8bf7RcYGze1mNdEHRP6TRP6rMuDHk5t44hnTRyow==}
+ engines: {node: '>=14.19.0'}
+
postcss-nested@6.0.1:
resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==}
engines: {node: '>=12.0'}
@@ -4086,6 +4135,10 @@ snapshots:
'@pkgr/core@0.1.1': {}
+ '@playwright/test@1.53.0':
+ dependencies:
+ playwright: 1.53.0
+
'@rgrove/parse-xml@4.2.0': {}
'@rollup/pluginutils@5.1.4(rollup@4.34.9)':
@@ -4315,6 +4368,14 @@ snapshots:
dependencies:
undici-types: 6.19.8
+ '@types/pixelmatch@5.2.6':
+ dependencies:
+ '@types/node': 20.17.10
+
+ '@types/pngjs@6.0.5':
+ dependencies:
+ '@types/node': 20.17.10
+
'@types/retry@0.12.2': {}
'@types/sax@1.2.4':
@@ -5230,6 +5291,9 @@ snapshots:
flattie@1.1.1: {}
+ fsevents@2.3.2:
+ optional: true
+
fsevents@2.3.3:
optional: true
@@ -6315,6 +6379,20 @@ snapshots:
picomatch@4.0.2: {}
+ pixelmatch@7.1.0:
+ dependencies:
+ pngjs: 7.0.0
+
+ playwright-core@1.53.0: {}
+
+ playwright@1.53.0:
+ dependencies:
+ playwright-core: 1.53.0
+ optionalDependencies:
+ fsevents: 2.3.2
+
+ pngjs@7.0.0: {}
+
postcss-nested@6.0.1(postcss@8.5.3):
dependencies:
postcss: 8.5.3
diff --git a/visual-diff/diff.setup.ts b/visual-diff/diff.setup.ts
new file mode 100644
index 0000000000000..4623614aa907c
--- /dev/null
+++ b/visual-diff/diff.setup.ts
@@ -0,0 +1,9 @@
+import fs from 'node:fs/promises';
+import path from 'node:path';
+
+// Delete the dev and diff screenshots directories before running the tests.
+await fs.rm(path.join('visual-diff', 'screenshots', 'dev'), { force: true, recursive: true });
+await fs.rm(path.join('visual-diff', 'screenshots', 'diff'), { force: true, recursive: true });
+
+// Ensure the diff screenshots directory exists.
+await fs.mkdir(path.join('visual-diff', 'screenshots', 'diff'), { recursive: true });
diff --git a/visual-diff/diff.test.ts b/visual-diff/diff.test.ts
new file mode 100644
index 0000000000000..c32c61396335a
--- /dev/null
+++ b/visual-diff/diff.test.ts
@@ -0,0 +1,156 @@
+import fs from 'node:fs/promises';
+import path from 'node:path';
+import { expect, test, type Page } from '@playwright/test';
+import pixelmatch from 'pixelmatch';
+import { PNG } from 'pngjs';
+
+const prodUrl = new URL('https://docs.astro.build');
+
+// A list of all the routes to visually compare between the production and development environments.
+// This could be based on the sitemap but it was not worth the effort for this PR.
+const routePaths = [
+ '/en/getting-started/',
+ '/en/install-and-setup/',
+ '/en/concepts/islands/',
+ '/en/guides/migrate-to-astro/from-docusaurus/',
+ '/en/guides/routing/',
+ '/en/guides/fonts/',
+ '/en/guides/upgrade-to/v5/',
+ '/en/reference/modules/astro-actions/',
+ '/en/reference/content-loader-reference/',
+ '/en/reference/error-reference/',
+ '/en/reference/errors/cannot-load-font-provider/',
+ '/en/guides/integrations-guide/',
+ '/en/guides/deploy/',
+ '/en/guides/backend/',
+ '/en/tutorial/0-introduction/',
+ '/en/tutorial/0-introduction/1/',
+ '/en/tutorial/1-setup/1/',
+ '/en/tutorial/6-islands/3/',
+];
+
+// The maximum number of mismatched pixels between the production and development screenshots.
+const maxDiffPixels = 10;
+
+for (const routePath of routePaths) {
+ test(`visual-diff: ${routePath}`, async ({ page }) => {
+ const prodScreenshotPath = getScreenshotPath(routePath, 'prod');
+
+ // Take a screenshot of the production route if it doesn't exist.
+ if (!(await exists(prodScreenshotPath))) {
+ await page.goto(new URL(routePath, prodUrl).toString());
+ await takeScreenshot(page, prodScreenshotPath);
+ }
+
+ const devScreenshotPath = getScreenshotPath(routePath, 'dev');
+
+ // Take a screenshot of the development route.
+ await page.goto(routePath);
+ await takeScreenshot(page, devScreenshotPath);
+
+ // Compare the screenshots between the production and development routes.
+ const { diffPixels, diffImage } = await compareScreenshots(
+ prodScreenshotPath,
+ devScreenshotPath
+ );
+
+ // Save the diff image if the number of mismatched pixels is greater than the maximum allowed.
+ if (diffPixels >= maxDiffPixels) {
+ await fs.writeFile(getScreenshotPath(routePath, 'diff'), PNG.sync.write(diffImage));
+ }
+
+ // Assert the number of mismatched pixels is less than the maximum allowed.
+ expect(diffPixels).toBeLessThan(maxDiffPixels);
+ });
+}
+
+async function compareScreenshots(screenshotPath1: string, screenshotPath2: string) {
+ let screenshot1: PNG = await getScreenshot(screenshotPath1);
+ let screenshot2: PNG = await getScreenshot(screenshotPath2);
+
+ let diffSize: ScreenshotSize;
+
+ // If the screenshots have different dimensions, resize them to the largest dimensions so we can
+ // see where the differences start to appear.
+ if (screenshot1.width !== screenshot2.width || screenshot1.height !== screenshot2.height) {
+ diffSize = {
+ width: Math.max(screenshot1.width, screenshot2.width),
+ height: Math.max(screenshot1.height, screenshot2.height),
+ };
+
+ screenshot1 = resizeScreenshot(screenshot1, diffSize);
+ screenshot2 = resizeScreenshot(screenshot2, diffSize);
+ } else {
+ diffSize = { width: screenshot1.width, height: screenshot1.height };
+ }
+
+ const diffImage = new PNG(diffSize);
+
+ const diffPixels = pixelmatch(
+ screenshot1.data,
+ screenshot2.data,
+ diffImage.data,
+ diffSize.width,
+ diffSize.height,
+ { threshold: 0.2 }
+ );
+
+ return { diffPixels, diffImage };
+}
+
+function resizeScreenshot(screenshot: PNG, size: ScreenshotSize) {
+ const resized = new PNG(size);
+ PNG.bitblt(screenshot, resized, 0, 0, screenshot.width, screenshot.height);
+ return resized;
+}
+
+async function getScreenshot(screenshotPath: string) {
+ const data = await fs.readFile(screenshotPath);
+ return PNG.sync.read(data);
+}
+
+async function takeScreenshot(page: Page, screenshotPath: string) {
+ // Ensure all images are loaded before taking the screenshot.
+ for (const lazyImage of await page.locator('img[loading="lazy"]:visible').all()) {
+ await lazyImage.scrollIntoViewIfNeeded();
+ }
+
+ const overviewLink = page.getByRole('link', { name: 'Overview', exact: true });
+
+ // Scroll to the top of the page to ensure the screenshot is consistent.
+ if (await overviewLink.isVisible()) {
+ // Use the Overview link when possible to avoid mismatched pixels due to ToC highlighting.
+ overviewLink.click();
+ } else {
+ await page.evaluate(() => window.scrollTo(0, 0));
+ }
+ await page.waitForTimeout(500);
+
+ await page.screenshot({ path: screenshotPath, fullPage: true });
+}
+
+function getScreenshotPath(routePath: string, type: ScreenshotType) {
+ return path.join(
+ 'visual-diff',
+ 'screenshots',
+ type,
+ routePath.replace(/\//g, '-').replace(/^-/, '').replace(/-$/, '').replace(/^$/, 'index') +
+ '.png'
+ );
+}
+
+async function exists(filePath: string) {
+ try {
+ await fs.access(filePath, fs.constants.F_OK);
+ return true;
+ } catch {
+ return false;
+ }
+}
+
+type ScreenshotType = 'dev' | 'prod' | 'diff';
+
+interface ScreenshotSize {
+ width: number;
+ height: number;
+}
diff --git a/visual-diff/playwright.config.ts b/visual-diff/playwright.config.ts
new file mode 100644
index 0000000000000..a96ebbbebe3f1
--- /dev/null
+++ b/visual-diff/playwright.config.ts
@@ -0,0 +1,33 @@
+import { defineConfig, devices } from '@playwright/test';
+
+const baseURL = 'http://localhost:4321';
+
+export default defineConfig({
+ forbidOnly: !!process.env['CI'],
+ projects: [
+ {
+ name: 'setup diff',
+ testMatch: /diff\.setup\.ts/,
+ },
+ {
+ name: 'Chrome Stable',
+ use: {
+ ...devices['Desktop Chrome'],
+ headless: true,
+ },
+ dependencies: ['setup diff'],
+ },
+ ],
+ testMatch: '*.test.ts',
+ use: {
+ baseURL,
+ },
+ webServer: [
+ {
+ command: 'pnpm run dev',
+ // command: 'pnpm run build && pnpm run preview',
+ reuseExistingServer: !process.env['CI'],
+ url: baseURL,
+ },
+ ],
+});
From 3ed6b4054a81d02c9ad7bcc2765d822e8cc520d3 Mon Sep 17 00:00:00 2001
From: HiDeoo <494699+HiDeoo@users.noreply.github.com>
Date: Thu, 26 Jun 2025 11:23:11 +0200
Subject: [PATCH 13/14] feat: remove visual diff tool
---
.gitignore | 6 +-
astro.config.ts | 2 -
package.json | 9 +-
pnpm-lock.yaml | 78 ----------------
visual-diff/diff.setup.ts | 9 --
visual-diff/diff.test.ts | 156 -------------------------------
visual-diff/playwright.config.ts | 33 -------
7 files changed, 2 insertions(+), 291 deletions(-)
delete mode 100644 visual-diff/diff.setup.ts
delete mode 100644 visual-diff/diff.test.ts
delete mode 100644 visual-diff/playwright.config.ts
diff --git a/.gitignore b/.gitignore
index a0923cf758530..344cf88d858d2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,8 +38,4 @@ sandbox.config.json
# Cached requests
.cache
-**/_fonts/brand/
-
-# TODO(HiDeoo) Remove the next entries when removing the `visual-diff` tool
-visual-diff/screenshots/
-test-results/
+**/_fonts/brand/
\ No newline at end of file
diff --git a/astro.config.ts b/astro.config.ts
index d9ff5c9a8c9b1..59c63519cccd0 100644
--- a/astro.config.ts
+++ b/astro.config.ts
@@ -18,8 +18,6 @@ const site = NETLIFY_PREVIEW_SITE || 'https://docs.astro.build/';
// https://astro.build/config
export default defineConfig({
- // TODO(HiDeoo) Remove this, only used to avoid screenshoting the dev toolbar.
- devToolbar: { enabled: false },
site,
integrations: [
devServerFileWatcher([
diff --git a/package.json b/package.json
index befac840e4668..e08caa778c35b 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,6 @@
"name": "docs",
"version": "0.0.7",
"private": true,
- "type": "module",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
@@ -20,8 +19,7 @@
"lint:slugcheck": "node ./scripts/lint-slugcheck.mjs",
"lint:eslint": "eslint .",
"netlify:build": "pnpm ${NETLIFY_BUILD_SCRIPT:-build}",
- "lunaria:build": "tsm ./scripts/lunaria.mts",
- "visual-diff": "playwright install --with-deps chromium && playwright test -c visual-diff/playwright.config.ts"
+ "lunaria:build": "tsm ./scripts/lunaria.mts"
},
"devDependencies": {
"@11ty/eleventy-fetch": "^5.0.1",
@@ -29,13 +27,10 @@
"@docsearch/css": "3.5.1",
"@docsearch/js": "3.5.1",
"@eslint/js": "^9.17.0",
- "@playwright/test": "^1.53.0",
"@types/canvas-confetti": "^1.6.0",
"@types/hast": "^3.0.4",
"@types/mdast": "^4.0.4",
"@types/node": "^20.17.10",
- "@types/pixelmatch": "^5.2.6",
- "@types/pngjs": "^6.0.5",
"@typescript-eslint/parser": "^8.19.1",
"astro": "^5.5.3",
"astro-auto-import": "^0.4.4",
@@ -54,8 +49,6 @@
"kleur": "^4.1.5",
"mdast-util-to-string": "^4.0.0",
"p-retry": "^6.2.1",
- "pixelmatch": "^7.1.0",
- "pngjs": "^7.0.0",
"prettier": "^3.4.2",
"prettier-plugin-astro": "^0.14.1",
"rehype": "^13.0.2",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index b2627e0ce8331..837ce197f0c9d 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -60,9 +60,6 @@ importers:
'@eslint/js':
specifier: ^9.17.0
version: 9.17.0
- '@playwright/test':
- specifier: ^1.53.0
- version: 1.53.0
'@types/canvas-confetti':
specifier: ^1.6.0
version: 1.6.0
@@ -75,12 +72,6 @@ importers:
'@types/node':
specifier: ^20.17.10
version: 20.17.10
- '@types/pixelmatch':
- specifier: ^5.2.6
- version: 5.2.6
- '@types/pngjs':
- specifier: ^6.0.5
- version: 6.0.5
'@typescript-eslint/parser':
specifier: ^8.19.1
version: 8.19.1(eslint@9.17.0(jiti@2.3.3))(typescript@5.6.2)
@@ -135,12 +126,6 @@ importers:
p-retry:
specifier: ^6.2.1
version: 6.2.1
- pixelmatch:
- specifier: ^7.1.0
- version: 7.1.0
- pngjs:
- specifier: ^7.0.0
- version: 7.0.0
prettier:
specifier: ^3.4.2
version: 3.4.2
@@ -813,11 +798,6 @@ packages:
resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==}
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
- '@playwright/test@1.53.0':
- resolution: {integrity: sha512-15hjKreZDcp7t6TL/7jkAo6Df5STZN09jGiv5dbP9A6vMVncXRqE7/B2SncsyOwrkZRBH2i6/TPOL8BVmm3c7w==}
- engines: {node: '>=18'}
- hasBin: true
-
'@rgrove/parse-xml@4.2.0':
resolution: {integrity: sha512-UuBOt7BOsKVOkFXRe4Ypd/lADuNIfqJXv8GvHqtXaTYXPPKkj2nS2zPllVsrtRjcomDhIJVBnZwfmlI222WH8g==}
engines: {node: '>=14.0.0'}
@@ -1049,12 +1029,6 @@ packages:
'@types/node@20.17.10':
resolution: {integrity: sha512-/jrvh5h6NXhEauFFexRin69nA0uHJ5gwk4iDivp/DeoEua3uwCUto6PC86IpRITBOs4+6i2I56K5x5b6WYGXHA==}
- '@types/pixelmatch@5.2.6':
- resolution: {integrity: sha512-wC83uexE5KGuUODn6zkm9gMzTwdY5L0chiK+VrKcDfEjzxh1uadlWTvOmAbCpnM9zx/Ww3f8uKlYQVnO/TrqVg==}
-
- '@types/pngjs@6.0.5':
- resolution: {integrity: sha512-0k5eKfrA83JOZPppLtS2C7OUtyNAl2wKNxfyYl9Q5g9lPkgBl/9hNyAu6HuEH2J4XmIv2znEpkDd0SaZVxW6iQ==}
-
'@types/retry@0.12.2':
resolution: {integrity: sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==}
@@ -1820,11 +1794,6 @@ packages:
resolution: {integrity: sha512-9UbaD6XdAL97+k/n+N7JwX46K/M6Zc6KcFYskrYL8wbBV/Uyk0CTAMY0VT+qiK5PM7AIc9aTWYtq65U7T+aCNQ==}
engines: {node: '>=8'}
- fsevents@2.3.2:
- resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==}
- engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
- os: [darwin]
-
fsevents@2.3.3:
resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
@@ -2499,24 +2468,6 @@ packages:
resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==}
engines: {node: '>=12'}
- pixelmatch@7.1.0:
- resolution: {integrity: sha512-1wrVzJ2STrpmONHKBy228LM1b84msXDUoAzVEl0R8Mz4Ce6EPr+IVtxm8+yvrqLYMHswREkjYFaMxnyGnaY3Ng==}
- hasBin: true
-
- playwright-core@1.53.0:
- resolution: {integrity: sha512-mGLg8m0pm4+mmtB7M89Xw/GSqoNC+twivl8ITteqvAndachozYe2ZA7srU6uleV1vEdAHYqjq+SV8SNxRRFYBw==}
- engines: {node: '>=18'}
- hasBin: true
-
- playwright@1.53.0:
- resolution: {integrity: sha512-ghGNnIEYZC4E+YtclRn4/p6oYbdPiASELBIYkBXfaTVKreQUYbMUYQDwS12a8F0/HtIjr/CkGjtwABeFPGcS4Q==}
- engines: {node: '>=18'}
- hasBin: true
-
- pngjs@7.0.0:
- resolution: {integrity: sha512-LKWqWJRhstyYo9pGvgor/ivk2w94eSjE3RGVuzLGlr3NmD8bf7RcYGze1mNdEHRP6TRP6rMuDHk5t44hnTRyow==}
- engines: {node: '>=14.19.0'}
-
postcss-nested@6.0.1:
resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==}
engines: {node: '>=12.0'}
@@ -4135,10 +4086,6 @@ snapshots:
'@pkgr/core@0.1.1': {}
- '@playwright/test@1.53.0':
- dependencies:
- playwright: 1.53.0
-
'@rgrove/parse-xml@4.2.0': {}
'@rollup/pluginutils@5.1.4(rollup@4.34.9)':
@@ -4368,14 +4315,6 @@ snapshots:
dependencies:
undici-types: 6.19.8
- '@types/pixelmatch@5.2.6':
- dependencies:
- '@types/node': 20.17.10
-
- '@types/pngjs@6.0.5':
- dependencies:
- '@types/node': 20.17.10
-
'@types/retry@0.12.2': {}
'@types/sax@1.2.4':
@@ -5291,9 +5230,6 @@ snapshots:
flattie@1.1.1: {}
- fsevents@2.3.2:
- optional: true
-
fsevents@2.3.3:
optional: true
@@ -6379,20 +6315,6 @@ snapshots:
picomatch@4.0.2: {}
- pixelmatch@7.1.0:
- dependencies:
- pngjs: 7.0.0
-
- playwright-core@1.53.0: {}
-
- playwright@1.53.0:
- dependencies:
- playwright-core: 1.53.0
- optionalDependencies:
- fsevents: 2.3.2
-
- pngjs@7.0.0: {}
-
postcss-nested@6.0.1(postcss@8.5.3):
dependencies:
postcss: 8.5.3
diff --git a/visual-diff/diff.setup.ts b/visual-diff/diff.setup.ts
deleted file mode 100644
index 4623614aa907c..0000000000000
--- a/visual-diff/diff.setup.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import fs from 'node:fs/promises';
-import path from 'node:path';
-
-// Delete the dev and diff screenshots directories before running the tests.
-await fs.rm(path.join('visual-diff', 'screenshots', 'dev'), { force: true, recursive: true });
-await fs.rm(path.join('visual-diff', 'screenshots', 'diff'), { force: true, recursive: true });
-
-// Ensure the diff screenshots directory exists.
-await fs.mkdir(path.join('visual-diff', 'screenshots', 'diff'), { recursive: true });
diff --git a/visual-diff/diff.test.ts b/visual-diff/diff.test.ts
deleted file mode 100644
index c32c61396335a..0000000000000
--- a/visual-diff/diff.test.ts
+++ /dev/null
@@ -1,156 +0,0 @@
-import fs from 'node:fs/promises';
-import path from 'node:path';
-import { expect, test, type Page } from '@playwright/test';
-import pixelmatch from 'pixelmatch';
-import { PNG } from 'pngjs';
-
-const prodUrl = new URL('https://docs.astro.build');
-
-// A list of all the routes to visually compare between the production and development environments.
-// This could be based on the sitemap but it was not worth the effort for this PR.
-const routePaths = [
- '/en/getting-started/',
- '/en/install-and-setup/',
- '/en/concepts/islands/',
- '/en/guides/migrate-to-astro/from-docusaurus/',
- '/en/guides/routing/',
- '/en/guides/fonts/',
- '/en/guides/upgrade-to/v5/',
- '/en/reference/modules/astro-actions/',
- '/en/reference/content-loader-reference/',
- '/en/reference/error-reference/',
- '/en/reference/errors/cannot-load-font-provider/',
- '/en/guides/integrations-guide/',
- '/en/guides/deploy/',
- '/en/guides/backend/',
- '/en/tutorial/0-introduction/',
- '/en/tutorial/0-introduction/1/',
- '/en/tutorial/1-setup/1/',
- '/en/tutorial/6-islands/3/',
-];
-
-// The maximum number of mismatched pixels between the production and development screenshots.
-const maxDiffPixels = 10;
-
-for (const routePath of routePaths) {
- test(`visual-diff: ${routePath}`, async ({ page }) => {
- const prodScreenshotPath = getScreenshotPath(routePath, 'prod');
-
- // Take a screenshot of the production route if it doesn't exist.
- if (!(await exists(prodScreenshotPath))) {
- await page.goto(new URL(routePath, prodUrl).toString());
- await takeScreenshot(page, prodScreenshotPath);
- }
-
- const devScreenshotPath = getScreenshotPath(routePath, 'dev');
-
- // Take a screenshot of the development route.
- await page.goto(routePath);
- await takeScreenshot(page, devScreenshotPath);
-
- // Compare the screenshots between the production and development routes.
- const { diffPixels, diffImage } = await compareScreenshots(
- prodScreenshotPath,
- devScreenshotPath
- );
-
- // Save the diff image if the number of mismatched pixels is greater than the maximum allowed.
- if (diffPixels >= maxDiffPixels) {
- await fs.writeFile(getScreenshotPath(routePath, 'diff'), PNG.sync.write(diffImage));
- }
-
- // Assert the number of mismatched pixels is less than the maximum allowed.
- expect(diffPixels).toBeLessThan(maxDiffPixels);
- });
-}
-
-async function compareScreenshots(screenshotPath1: string, screenshotPath2: string) {
- let screenshot1: PNG = await getScreenshot(screenshotPath1);
- let screenshot2: PNG = await getScreenshot(screenshotPath2);
-
- let diffSize: ScreenshotSize;
-
- // If the screenshots have different dimensions, resize them to the largest dimensions so we can
- // see where the differences start to appear.
- if (screenshot1.width !== screenshot2.width || screenshot1.height !== screenshot2.height) {
- diffSize = {
- width: Math.max(screenshot1.width, screenshot2.width),
- height: Math.max(screenshot1.height, screenshot2.height),
- };
-
- screenshot1 = resizeScreenshot(screenshot1, diffSize);
- screenshot2 = resizeScreenshot(screenshot2, diffSize);
- } else {
- diffSize = { width: screenshot1.width, height: screenshot1.height };
- }
-
- const diffImage = new PNG(diffSize);
-
- const diffPixels = pixelmatch(
- screenshot1.data,
- screenshot2.data,
- diffImage.data,
- diffSize.width,
- diffSize.height,
- { threshold: 0.2 }
- );
-
- return { diffPixels, diffImage };
-}
-
-function resizeScreenshot(screenshot: PNG, size: ScreenshotSize) {
- const resized = new PNG(size);
- PNG.bitblt(screenshot, resized, 0, 0, screenshot.width, screenshot.height);
- return resized;
-}
-
-async function getScreenshot(screenshotPath: string) {
- const data = await fs.readFile(screenshotPath);
- return PNG.sync.read(data);
-}
-
-async function takeScreenshot(page: Page, screenshotPath: string) {
- // Ensure all images are loaded before taking the screenshot.
- for (const lazyImage of await page.locator('img[loading="lazy"]:visible').all()) {
- await lazyImage.scrollIntoViewIfNeeded();
- }
-
- const overviewLink = page.getByRole('link', { name: 'Overview', exact: true });
-
- // Scroll to the top of the page to ensure the screenshot is consistent.
- if (await overviewLink.isVisible()) {
- // Use the Overview link when possible to avoid mismatched pixels due to ToC highlighting.
- overviewLink.click();
- } else {
- await page.evaluate(() => window.scrollTo(0, 0));
- }
- await page.waitForTimeout(500);
-
- await page.screenshot({ path: screenshotPath, fullPage: true });
-}
-
-function getScreenshotPath(routePath: string, type: ScreenshotType) {
- return path.join(
- 'visual-diff',
- 'screenshots',
- type,
- routePath.replace(/\//g, '-').replace(/^-/, '').replace(/-$/, '').replace(/^$/, 'index') +
- '.png'
- );
-}
-
-async function exists(filePath: string) {
- try {
- await fs.access(filePath, fs.constants.F_OK);
- return true;
- } catch {
- return false;
- }
-}
-
-type ScreenshotType = 'dev' | 'prod' | 'diff';
-
-interface ScreenshotSize {
- width: number;
- height: number;
-}
diff --git a/visual-diff/playwright.config.ts b/visual-diff/playwright.config.ts
deleted file mode 100644
index a96ebbbebe3f1..0000000000000
--- a/visual-diff/playwright.config.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import { defineConfig, devices } from '@playwright/test';
-
-const baseURL = 'http://localhost:4321';
-
-export default defineConfig({
- forbidOnly: !!process.env['CI'],
- projects: [
- {
- name: 'setup diff',
- testMatch: /diff\.setup\.ts/,
- },
- {
- name: 'Chrome Stable',
- use: {
- ...devices['Desktop Chrome'],
- headless: true,
- },
- dependencies: ['setup diff'],
- },
- ],
- testMatch: '*.test.ts',
- use: {
- baseURL,
- },
- webServer: [
- {
- command: 'pnpm run dev',
- // command: 'pnpm run build && pnpm run preview',
- reuseExistingServer: !process.env['CI'],
- url: baseURL,
- },
- ],
-});
From 4030d375e8631947c7e2775f9930923b0422bd7c Mon Sep 17 00:00:00 2001
From: HiDeoo <494699+HiDeoo@users.noreply.github.com>
Date: Thu, 26 Jun 2025 11:23:55 +0200
Subject: [PATCH 14/14] fix: revert .gitignore
---
.gitignore | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index 344cf88d858d2..0b5141332ec14 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,4 +38,4 @@ sandbox.config.json
# Cached requests
.cache
-**/_fonts/brand/
\ No newline at end of file
+**/_fonts/brand/