Conversation
✅ Deploy Preview for vitest-dev ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
| moduleGraph | ||
| = typeof window.structuredClone !== 'undefined' | ||
| ? window.structuredClone(moduleGraph) | ||
| : toJSON(moduleGraph) |
There was a problem hiding this comment.
As I understood toJSON was used as polyfiil. Should we keep it?
structuredClone available in all major browsers for 3 years already https://caniuse.com/wf-structured-clone
| "test": "vitest" | ||
| }, | ||
| "devDependencies": { | ||
| "@ungap/structured-clone": "^1.3.0", |
There was a problem hiding this comment.
Should it be?
| "@ungap/structured-clone": "^1.3.0", | |
| "@ungap/structured-clone": "catalog:", |
There was a problem hiding this comment.
Yes, let's have it in the catalog file since it's used everywhere
| * Replacer function for serialization methods such as JS.stringify() or | ||
| * flatted.stringify(). | ||
| * flatted.stringify(). // here |
There was a problem hiding this comment.
Not sure how to write that comment correctly because the name of dep is more complicated now
| * Replacer function for serialization methods such as JS.stringify() or | ||
| * flatted.stringify(). | ||
| * flatted.stringify(). //here |
There was a problem hiding this comment.
|
I am not so sure about tests… I tried to run |
Some tests are indeed flaky, but the changes in your PR clearly broke other tests, like reporters: https://github.com/vitest-dev/vitest/actions/runs/18476660566/job/52642594279?pr=8710 The lint stage should also pass without errors |
|
Just in case: I will continue work on it a bit later. I am short on time during few weeks probably. |
|
closed in favor of #9549 |
Description
I noticed that
vitest run --merge-reportstakes a lot of time in our CI. After short profiling I discovered that bottleneck is parsing via flatted.Author of flatted suggests to move to https://github.com/ungap/structured-clone
Here are some benchmarks:
And some profiling via cpupro:
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
pnpm-lock.yamlunless you introduce a new test example.Tests
pnpm test:ci.Documentation
pnpm run docscommand.Changesets
feat:,fix:,perf:,docs:, orchore:.