feat: Add PowerShell support to Shiki
Description
This PR addresses issue #6511 by integrating PowerShell (ps1) syntax highlighting support into the Shiki configuration used on the 'Install on Windows using Package Manager' page. It ensures that when Windows is selected from the dropdown, the codebox correctly highlights PowerShell scripts. This enhancement improves readability for PowerShell users
Validation
Before:
After:
Related Issues
closes #6511
Check List
- [x] I have read the Contributing Guidelines and made commit messages that follow the guideline.
- [x] I have run
npx turbo formatto ensure the code follows the style guide. - [x] I have run
npx turbo testto check if all tests are passing. - [x] I have run
npx turbo buildto check if the website builds without errors. - [ ] I've covered new added functionality with unit tests if necessary.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated (UTC) |
|---|---|---|---|
| nodejs-org | ✅ Ready (Inspect) | Visit Preview | Mar 25, 2024 10:32am |
@AugustinMauroy it actually increases the build size by aprox ~ 20 KB
@AugustinMauroy it actually increases the build size by aprox ~ 20 KB
hummmm really interesting. And what do you think about keeping the bash highlight but changing the display name. That way, it doesn't make the bundle bigger and it displays the right language.
@AugustinMauroy so you mean remove PowerShell config but change display name? it won't highlight according to .ps1
with this we are not increasing the bundle size. And we display correct name of "language"
@AugustinMauroy Done
Lighthouse Results
| URL | Performance | Accessibility | Best Practices | SEO | Report |
|---|---|---|---|---|---|
| /en | 🟢 99 | 🟢 90 | 🟢 100 | 🟢 91 | 🔗 |
| /en/about | 🟢 100 | 🟢 91 | 🟢 100 | 🟢 91 | 🔗 |
| /en/about/previous-releases | 🟢 98 | 🟢 90 | 🟢 100 | 🟢 92 | 🔗 |
| /en/download | 🟢 100 | 🟠 89 | 🟢 100 | 🟢 91 | 🔗 |
| /en/blog | 🟢 99 | 🟢 90 | 🟢 100 | 🟢 92 | 🔗 |
Unit Test Coverage Report
| Lines | Statements | Branches | Functions |
|---|---|---|---|
| 80.1% (451/563) | 79.44% (143/180) | 71.17% (79/111) |
Unit Test Report
| Tests | Skipped | Failures | Errors | Time |
|---|---|---|---|---|
| 90 | 0 :zzz: | 0 :x: | 0 :fire: | 4.925s :stopwatch: |
Wait, is the total bundle of the website being increased by 20kb? That's a lot.
Anyhow, that gets gzipped I assume, and might not be such a big deal.
@ovflowd vscode import cost shows after gzip it's 4.7k
Hi @ovflowd @AugustinMauroy @aymen94 can we merge this? or do you have any comments for this PR?