Skip to content

Conversation

@sheremet-va
Copy link
Member

@sheremet-va sheremet-va commented Nov 25, 2025

Description

Resolves #8026
Continues #8027

TODO:

  • Make sure the module graph works with fsModuleCahe
  • Make imports clickable so it's possible to walk the module graph from the Module Info modal
  • Support browser mode (later)

Example in UI:

Tis PR:

  • Limits how many levels of the module graph is visible. It's 2 by default. This is done to reduce the amount of nodes and the "bouncing" effect it brings. Hopefully 2 is good enough
  • Adds the "Show full graph" button
  • Adds the "Show/hide import breakdown" button (the color depends on the longest loading module)
  • Adds a small legend on how to use the module graph
  • Adds an import breakdown popup to see the list of modules that takes the longest time to load
  • Adds inlined/external/cached badges in Module Info
  • Adds self/total/transform badges that show the amount of time it took to import/transform the file
  • Makes import source clickable (the string in import from 'here') allowing to traverse the module graph from the Module Info dialog
  • Shows how long it took to load the import/export
Screenshot 2025-11-26 at 15 23 27

Example in CLI:

Screenshot 2025-11-26 at 15 29 51

In UI you can just click to expand, but in CLI I am not sure how we can print the whole test path because it will break the output... I hope this is good enough, but I am willing to change it

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.
  • Please check Allow edits by maintainers to make review process faster. Note that this option is not available for repositories that are owned by Github organizations.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

@sheremet-va sheremet-va marked this pull request as draft November 25, 2025 20:05
@sheremet-va sheremet-va requested review from macarie, poyoho and userquin and removed request for poyoho November 26, 2025 14:27
@userquin
Copy link
Member

I'll try to review the PR later

@netlify
Copy link

netlify bot commented Nov 28, 2025

Deploy Preview for vitest-dev ready!

Name Link
🔨 Latest commit 70ef779
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/692dbad5fe64e400082251f4
😎 Deploy Preview https://deploy-preview-9105--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

Copy link
Member

@macarie macarie left a comment

Choose a reason for hiding this comment

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

Just a couple considerations from my side, looking good otherwise

@sheremet-va sheremet-va marked this pull request as ready for review December 1, 2025 14:25
@sheremet-va sheremet-va merged commit 122ff32 into vitest-dev:main Dec 2, 2025
15 of 16 checks passed
@sheremet-va sheremet-va deleted the feat/reporters-print-imports branch December 2, 2025 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ability to report on collect time

3 participants