Skip to content

Update to Vitest 5 - #4180

Draft
HiDeoo wants to merge 6 commits into
withastro:mainfrom
HiDeoo:hd/vitest-5
Draft

HiDeoo wants to merge 6 commits into
withastro:mainfrom
HiDeoo:hd/vitest-5

Conversation

@HiDeoo

@HiDeoo HiDeoo commented Sep 3, 2026 •

Copy link
Copy Markdown
Member

Description

This PR updates the monorepo to use Vitest 5.

On top of updating the dependencies and following the migration guide, it also applys the following changes:

  • Enables fsModuleCache which is no longer experimental. On my machine, with a warm cache, this saves about 4 seconds on running all tests.
  • Disables a diagnostic about isolation (the code includes a comment explaining why).
  • Refactors how functional benchmarks are run. Vitest 5 now warns us about issues with the way we were running benchmarks that can make results unreliable. I applied changes following their documentation and try to comment as much as possible the way it works.
    image

I'll undraft the PR once the new packages satisfies our minimumReleaseAge and all remaining tasks are addressed.

Remaining tasks

  • Address all TODO(HiDeoo) comments
  • Wait for @codspeed/vitest-plugin to support Vitest 5 (PR opened)
  • Vitest 5 also includes somes fixes that should allow us to fix our coverage.include and clean up our coverage.exclude settings, but it would probably be best to do this in another PR. I'll investate and report back. (Yes, a dedicated PR makes the most sense.)

@changeset-bot

changeset-bot Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 7c6d095

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify

netlify Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for astro-starlight ready!

Name Link
🔨 Latest commit 7c6d095
🔍 Latest deploy log https://app.netlify.com/projects/astro-starlight/deploys/6abbdc55e7e275000835c7d1
😎 Deploy Preview https://deploy-preview-4180--astro-starlight.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added 🌟 core Changes to Starlight’s main package 🌟 tailwind Changes to Starlight’s Tailwind package 🌟 markdoc Changes to Starlight’s Markdoc package 🌟 docsearch Changes to Starlight’s DocSearch plugin labels Sep 3, 2026
@codspeed

codspeed Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

This PR has no benchmarks

⚠️ No benchmarks were detected in both the base of the PR and the PR.
Please ensure that your benchmarks are correctly instrumented with CodSpeed.

Check out the benchmarks creation guide


Comparing HiDeoo:hd/vitest-5 (7c6d095) with main (3ec633b)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (ad37ca5) during the generation of this report, so 3ec633b was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩


vi.mock('pagefind');

afterEach(() => {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

* main: (34 commits)
  [ci] format
  docs: add Large Print to community themes (withastro#4223)
  [ci] release (withastro#4217)
  Fix file icons generator (withastro#4215)
  perf: avoid repeated sidebar subtree scans (withastro#4149)
  Add benchmark for sidebar sublist processing (withastro#4216)
  i18n: add freshness to Lunaria dashboard (withastro#4192)
  [ci] release (withastro#4212)
  Fix toc highlighting potential page freeze (withastro#4211)
  i18n(de): update `themes.mdx` (withastro#4207)
  i18n(ko-KR): update `themes` (withastro#4210)
  docs: add Pinlyx Docs to the showcase (withastro#4208)
  [ci] release (withastro#4206)
  add Fluxer icon (withastro#4201)
  docs(themes): add Dracula for Starlight (withastro#4205)
  Update Lunaria action version in workflow (withastro#4204)
  docs: deploy docs with built Starlight (withastro#4187)
  ci: fix lunaria workflow (withastro#4203)
  docs: fix repository link in contributing guide (withastro#4202)
  Update Lunaria to v0.2 (withastro#4200)
  ...

This branch has not been deployed

No deployments
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 🌟 docsearch Changes to Starlight’s DocSearch plugin 🌟 markdoc Changes to Starlight’s Markdoc package 🌟 tailwind Changes to Starlight’s Tailwind package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant