Skip to content

perf(coverage): istanbul to use magic-string+rolldown for instrumentation - #11648

Merged
sheremet-va merged 1 commit into
vitest-dev:mainfrom
AriPerkkio:perf/coverage-istanbul-upgrades
Oct 20, 2026
Merged

sheremet-va merged 1 commit into
vitest-dev:mainfrom
AriPerkkio:perf/coverage-istanbul-upgrades

Conversation

@AriPerkkio

@AriPerkkio AriPerkkio commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Updates @vitest/istanbul-* packages to latest majors. This speeds up @vitest/coverage-istanbul's instrumentation 5-10x and lowers memory usage a lot. Also trims dependency graphs by dropping Babel and relying on transitive dependencies. See https://github.com/vitest-dev/istanbuljs/releases/tag/v2.0.0.

@netlify

netlify Bot commented Oct 19, 2026

Copy link
Copy Markdown

✅ Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 2979ca5
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/6ad655037e1bd38f94ff6469
😎 Deploy Preview https://deploy-preview-11648--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

Comment thread pnpm-workspace.yaml Resolved
Comment on lines -108 to -126
} else {
const transformMap = new GenMapping(sourceMap)

eachMapping(new TraceMap(sourceMap as any), (mapping) => {
addMapping(transformMap, {
generated: { line: mapping.generatedLine, column: mapping.generatedColumn },
original: { line: mapping.generatedLine, column: mapping.generatedColumn },
content: sourceCode,
name: mapping.name || '',
source: mapping.source || '',
})
})

const encodedMap = toEncodedMap(transformMap)
delete encodedMap.file
delete encodedMap.ignoreList
delete encodedMap.sourceRoot

this.instrumenter.instrumentSync(sourceCode, id, encodedMap as any)

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.

@hi-ogawa hi-ogawa left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🚀

@sheremet-va
sheremet-va merged commit 2470bef into vitest-dev:main Oct 20, 2026
50 of 53 checks passed
@AriPerkkio
AriPerkkio deleted the perf/coverage-istanbul-upgrades branch October 20, 2026 08:42
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants