Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(runner): async assertion auto await should timeout #6391

Conversation

hi-ogawa
Copy link
Contributor

@hi-ogawa hi-ogawa commented Aug 25, 2024

Description

Currently documentation indicates resolves/rejects needs to be manually awaited https://vitest.dev/api/expect.html#resolves, but "auto await" mechanism is added along with toMatchFileSnapshot #3116. It looks like the intent is to make "sync" API, so the documentation is outdated, but I'm not sure if we should encourage this "sync" API because it doesn't feel really intuitive anyway.

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.

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:.

Copy link

netlify bot commented Aug 25, 2024

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit ed3a95b
🔍 Latest deploy log https://app.netlify.com/sites/vitest-dev/deploys/66d1117e2a74a70008b45d4c
😎 Deploy Preview https://deploy-preview-6391--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 site configuration.

@hi-ogawa hi-ogawa marked this pull request as ready for review August 25, 2024 04:39
@@ -1235,6 +1235,35 @@ Repository: sindresorhus/p-locate
---------------------------------------

## package-manager-detector
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This came out when pnpm build, so I committed here.

Comment on lines +44 to +45
// this function name is used to filter error in test/cli/test/fails.test.ts
return (function runWithTimeout(...args: T extends (...args: infer A) => any ? A : never) {
Copy link
Contributor Author

@hi-ogawa hi-ogawa Aug 25, 2024

Choose a reason for hiding this comment

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

I'm not sure but I needed to add this filter for fails.test.ts snapshot since test/cli/fixtures/fails/unhandled.test.ts's stacktrace moved a little and now it points to here

stderr | unhandled.test.ts > unhandled exception
Error: Uncaught [Error: some error]
    ...
    at file:///home/hiroshi/code/others/vitest/packages/runner/dist/index.js:146:14
    at file:///home/hiroshi/code/others/vitest/packages/runner/dist/index.js:529:11
    at runWithTimeout (file:///home/hiroshi/code/others/vitest/packages/runner/dist/index.js:61:7) Error: some error
    at /home/hiroshi/code/others/vitest/test/cli/fixtures/fails/unhandled.test.ts:8:11
    ...

Comment on lines -228 to -235
const result = await Promise.allSettled(test.promises)
const errors = result
.map(r => (r.status === 'rejected' ? r.reason : undefined))
.filter(Boolean)
if (errors.length) {
throw errors
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previously it was waiting for Promise.allSettled, but I think we can simply use Promise.all since just throwing on first rejected promise would match with how test works.

Copy link
Member

Choose a reason for hiding this comment

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

Not really, failTask will fail with every error, not just the first one

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I copied Promise.allSettled.

Comment on lines 5 to 10
exports[`should fail async-assertion.test.ts > async-assertion.test.ts 1`] = `
"AssertionError: expected 'xx' to be 'zz' // Object.is equality
AssertionError: expected 'xx' to be 'yy' // Object.is equality
AssertionError: expected 'xx' to be 'zz' // Object.is equality
AssertionError: expected 'xx' to be 'yy' // Object.is equality"
`;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Errors are doubled since they also treated as unhandled rejections. This is the entire test output:

 ❯ test/async-assertion.test.ts (1)
   × multiple errors

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

 FAIL  test/async-assertion.test.ts > multiple errors
AssertionError: expected 'xx' to be 'yy' // Object.is equality

Expected: "yy"
Received: "xx"

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/2]⎯

 FAIL  test/async-assertion.test.ts > multiple errors
AssertionError: expected 'xx' to be 'zz' // Object.is equality

Expected: "zz"
Received: "xx"

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/2]⎯

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Errors ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

Vitest caught 2 unhandled errors during the test run.
This might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected.

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Rejection ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
AssertionError: expected 'xx' to be 'yy' // Object.is equality

Expected: "yy"
Received: "xx"

 ❯ ../../packages/expect/dist/index.js:1774:31
 ❯ processTicksAndRejections node:internal/process/task_queues:95:5

This error originated in "test/async-assertion.test.ts" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
The latest test that might've caused the error is "multiple errors". It might mean one of the following:
- The error was thrown, while Vitest was running this test.
- If the error occurred after the test had been completed, this was the last documented test before it was thrown.

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Rejection ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
AssertionError: expected 'xx' to be 'zz' // Object.is equality

Expected: "zz"
Received: "xx"

 ❯ ../../packages/expect/dist/index.js:1774:31

This error originated in "test/async-assertion.test.ts" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
The latest test that might've caused the error is "test/async-assertion.test.ts". It might mean one of the following:
- The error was thrown, while Vitest was running this test.
- If the error occurred after the test had been completed, this was the last documented test before it was thrown.
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

 Test Files  1 failed (1)
      Tests  1 failed (1)
     Errors  2 errors
   Start at  16:50:11
   Duration  161ms (transform 19ms, setup 0ms, collect 14ms, tests 11ms, environment 0ms, prepare 37ms)

Copy link
Member

@sheremet-va sheremet-va Aug 29, 2024

Choose a reason for hiding this comment

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

They should be treated as unhandled rejections tho? We are catching them

Were they treated as unhandled rejections before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, this is not ideal but the behavior hasn't changed. It looks like hasn't been tested, so I just added tests.

There is a similar test here

describe('promise auto queuing', () => {
it.fails('fails', () => {
expect(() => new Promise((resolve, reject) => setTimeout(reject, 500)))
.resolves
.toBe('true')
})

but it turned out this is failing for a different reason:

TypeError: You must provide a Promise to expect() when using .resolves, not 'function'.

If I rewrite this test into what's probably intended, then this causes an unhandled rejection so the entire test fails.

Copy link
Contributor Author

@hi-ogawa hi-ogawa Aug 30, 2024

Choose a reason for hiding this comment

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

I don't quite understand, but removing async in a seemingly unrelated place fixed it e7d5597

Comment on lines -228 to -235
const result = await Promise.allSettled(test.promises)
const errors = result
.map(r => (r.status === 'rejected' ? r.reason : undefined))
.filter(Boolean)
if (errors.length) {
throw errors
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I copied Promise.allSettled.

@@ -1045,7 +1045,7 @@ export const JestChaiExpect: ChaiPlugin = (chai, utils) => {
return result instanceof chai.Assertion ? proxy : result
}

return async (...args: any[]) => {
return (...args: any[]) => {
Copy link
Contributor Author

@hi-ogawa hi-ogawa Aug 30, 2024

Choose a reason for hiding this comment

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

I think I understand now. When returning promise from async () => { return somePromise } and somePromise rejects, even if we handle rejections of somePromise (e.g. by somePromise.catch or Promise.allSettlled([somePromise]), somePromise rejection still leaks to the promise returned from async function calls.

@sheremet-va sheremet-va merged commit ad6e72f into vitest-dev:main Sep 3, 2024
13 of 15 checks passed
renovate bot referenced this pull request in line/line-bot-sdk-nodejs Sep 12, 2024
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@vitest/coverage-v8](https://redirect.github.com/vitest-dev/vitest/tree/main/packages/coverage-v8#readme)
([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8))
| [`2.0.5` ->
`2.1.0`](https://renovatebot.com/diffs/npm/@vitest%2fcoverage-v8/2.0.5/2.1.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@vitest%2fcoverage-v8/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@vitest%2fcoverage-v8/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@vitest%2fcoverage-v8/2.0.5/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@vitest%2fcoverage-v8/2.0.5/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [vitest](https://redirect.github.com/vitest-dev/vitest)
([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest))
| [`2.0.5` ->
`2.1.0`](https://renovatebot.com/diffs/npm/vitest/2.0.5/2.1.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/vitest/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vitest/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vitest/2.0.5/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vitest/2.0.5/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>vitest-dev/vitest (@&#8203;vitest/coverage-v8)</summary>

###
[`v2.1.0`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v2.1.0)

This release makes another big change to the Browser Mode by introducing
[locators API](https://vitest.dev/guide/browser/locators.html):

```ts
test('renders blog posts', async () => {
  const screen = page.render(<Blog />)

  await expect.element(screen.getByRole('heading', { name: 'Blog' })).toBeInTheDocument()

  const [firstPost] = screen.getByRole('listitem').all()

  await firstPost.getByRole('button', { name: 'Delete' }).click()

  expect(screen.getByRole('listitem').all()).toHaveLength(3)
})
```

You can use either
[vitest-browser-vue](https://redirect.github.com/vitest-dev/vitest-browser-vue),
[vitest-browser-svelte
](https://redirect.github.com/vitest-dev/vitest-browser-svelte) or
[vitest-browser-react](https://redirect.github.com/vitest-dev/vitest-browser-react)
to render components and make assertions using locators. Locators are
also available on the `page` object from `@vitest/browser/context`.

#####    🚀 Features

-   **api**:
- Make spec into a class instead of a tuple  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6355](https://redirect.github.com/vitest-dev/vitest/issues/6355)
[<samp>(874a1)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/874a121e)
-   **browser**:
- Move page.config to server.config, add more docs  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6252](https://redirect.github.com/vitest-dev/vitest/issues/6252)
[<samp>(af2b8)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/af2b813c)
- Make iframe scalable, improve documentation  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6257](https://redirect.github.com/vitest-dev/vitest/issues/6257)
[<samp>(74ca1)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/74ca11a4)
- Introduce built-in locators  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6084](https://redirect.github.com/vitest-dev/vitest/issues/6084)
[<samp>(3347f)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/3347f83e)
- Support v8 coverage  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6273](https://redirect.github.com/vitest-dev/vitest/issues/6273)
[<samp>(34199)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/34199bdf)
- Support `userEvent.upload` in playwright provider  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6442](https://redirect.github.com/vitest-dev/vitest/issues/6442)
[<samp>(cf148)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/cf148645)
- Support `--inspect`  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6433](https://redirect.github.com/vitest-dev/vitest/issues/6433)
[<samp>(0499a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0499a315)
- Support `--inspect-brk`  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6434](https://redirect.github.com/vitest-dev/vitest/issues/6434)
[<samp>(7ab0f)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7ab0f4a8)
-   **cli**:
- Extend existing list command to output only a list of file names  - 
by [@&#8203;Ma-hawaj](https://redirect.github.com/Ma-hawaj) and
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6392](https://redirect.github.com/vitest-dev/vitest/issues/6392)
[<samp>(008f0)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/008f00b2)
-   **coverage**:
- Add `--exclude-after-remap`  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6309](https://redirect.github.com/vitest-dev/vitest/issues/6309)
[<samp>(5932a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/5932a7f9)
-   **mocker**:
- Introduce
[@&#8203;vitest/mocker](https://redirect.github.com/vitest/mocker)
package, allow `{ spy: true }` instead of a factory  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6289](https://redirect.github.com/vitest-dev/vitest/issues/6289)
[<samp>(95f02)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/95f0203f)
-   **vitest**:
- Add "provide" option  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6253](https://redirect.github.com/vitest-dev/vitest/issues/6253)
[<samp>(4409d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/4409d779)
- Add return type and promisable mockFactory  -  by
[@&#8203;syi0808](https://redirect.github.com/syi0808) and
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6139](https://redirect.github.com/vitest-dev/vitest/issues/6139)
[<samp>(f5e0b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/f5e0b987)
- Add `vi.advanceTimersToNextFrame`  -  by
[@&#8203;bnjm](https://redirect.github.com/bnjm) and
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6347](https://redirect.github.com/vitest-dev/vitest/issues/6347)
[<samp>(8ff63)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/8ff63560)
- Allow env to be stubbed to undefined  -  by
[@&#8203;JSanchezIO](https://redirect.github.com/JSanchezIO) and
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6359](https://redirect.github.com/vitest-dev/vitest/issues/6359)
[<samp>(c3b27)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c3b2757c)

#####    🐞 Bug Fixes

- Correctly resolve nested mocks with `index` file  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6266](https://redirect.github.com/vitest-dev/vitest/issues/6266)
[<samp>(081cf)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/081cfe03)
- Don't panic when coverage.reporter is a string  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6267](https://redirect.github.com/vitest-dev/vitest/issues/6267)
[<samp>(7b37d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7b37d27b)
- Align RawMatcherFn type definition with Jest  -  by
[@&#8203;wheresrhys](https://redirect.github.com/wheresrhys) in
[https://github.com/vitest-dev/vitest/issues/6351](https://redirect.github.com/vitest-dev/vitest/issues/6351)
[<samp>(d09f0)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/d09f00c7)
- Cjs build of vite node server  -  by
[@&#8203;AkaraChen](https://redirect.github.com/AkaraChen) in
[https://github.com/vitest-dev/vitest/issues/6389](https://redirect.github.com/vitest-dev/vitest/issues/6389)
[<samp>(12e70)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/12e702bd)
- Allow inlining vite's cached dependencies  -  by
[@&#8203;chriswheeldon-peakon](https://redirect.github.com/chriswheeldon-peakon)
in
[https://github.com/vitest-dev/vitest/issues/6284](https://redirect.github.com/vitest-dev/vitest/issues/6284)
[<samp>(03208)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/03208017)
- Print unexpected error message if peer dependencies have a different
version  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6446](https://redirect.github.com/vitest-dev/vitest/issues/6446)
[<samp>(b992b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/b992b346)
- Ignore importer when resolving Vitest  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6469](https://redirect.github.com/vitest-dev/vitest/issues/6469)
[<samp>(0b447)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0b447226)
- `expect.getState().testPath` always returns correct path  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6472](https://redirect.github.com/vitest-dev/vitest/issues/6472)
[<samp>(ac698)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/ac698b1c)
- UserEvent works consistently between providers  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6480](https://redirect.github.com/vitest-dev/vitest/issues/6480)
[<samp>(0b4da)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0b4da69e)
-   **browser**:
- Print correct stack trace for unhandled errors  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6134](https://redirect.github.com/vitest-dev/vitest/issues/6134)
[<samp>(1da6c)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1da6cebe)
- Use documentElement as the root for selector  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va)
[<samp>(d8077)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/d807767f)
- Keep querying elements even if locator is created with elementLocator,
add pubic @&#8203;vitest/browser/utils  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6296](https://redirect.github.com/vitest-dev/vitest/issues/6296)
[<samp>(30dc5)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/30dc5793)
- Produce valid config file if preview provider is used  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6305](https://redirect.github.com/vitest-dev/vitest/issues/6305)
[<samp>(7f0ae)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7f0ae292)
- Correctly run in-source tests in the browser  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6440](https://redirect.github.com/vitest-dev/vitest/issues/6440)
[<samp>(c8531)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c853126e)
- Exclude missed packages from optimization, print help message  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6445](https://redirect.github.com/vitest-dev/vitest/issues/6445)
[<samp>(8d883)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/8d883cf0)
- Define mocker as a dependency  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6476](https://redirect.github.com/vitest-dev/vitest/issues/6476)
[<samp>(9560a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/9560ab7f)
-   **coverage**:
- Warn if `vitest` and `@vitest/*` versions don't match  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6317](https://redirect.github.com/vitest-dev/vitest/issues/6317)
[<samp>(e662c)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e662c7b2)
- V8 to support source maps with multiple sources  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) and
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6120](https://redirect.github.com/vitest-dev/vitest/issues/6120)
[<samp>(1f6cb)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1f6cb59f)
- V8 to warn instead of crash when conversion fails  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6318](https://redirect.github.com/vitest-dev/vitest/issues/6318)
[<samp>(91dea)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/91dea8c1)
- Use project specific `vitenode` for uncovered files  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6044](https://redirect.github.com/vitest-dev/vitest/issues/6044)
[<samp>(da52d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/da52d23f)
-   **runner**:
- Use `performance.now` instead of `Date.now` for duration  -  by
[@&#8203;LuciNyan](https://redirect.github.com/LuciNyan) in
[https://github.com/vitest-dev/vitest/issues/6382](https://redirect.github.com/vitest-dev/vitest/issues/6382)
[<samp>(fe489)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/fe489432)
- Async assertion auto await should timeout  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[https://github.com/vitest-dev/vitest/issues/6391](https://redirect.github.com/vitest-dev/vitest/issues/6391)
[<samp>(ad6e7)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/ad6e72fc)
-   **snapshot**:
- Reject multiple `toMatchInlineSnapshot` updates at the same location
 -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[https://github.com/vitest-dev/vitest/issues/6332](https://redirect.github.com/vitest-dev/vitest/issues/6332)
[<samp>(1606f)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1606f34f)
- Improve inline snapshot inside loop rejection  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[https://github.com/vitest-dev/vitest/issues/6339](https://redirect.github.com/vitest-dev/vitest/issues/6339)
[<samp>(e0368)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e03683c5)
-   **typecheck**:
- Run both runtime and typecheck tests if `typecheck.include` overlaps
with `include`  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6256](https://redirect.github.com/vitest-dev/vitest/issues/6256)
[<samp>(153ff)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/153ff01b)
-   **types**:
- Allow Callbacks Passed to before\*/after\* to Return Anything  -  by
[@&#8203;LuciNyan](https://redirect.github.com/LuciNyan) in
[https://github.com/vitest-dev/vitest/issues/6393](https://redirect.github.com/vitest-dev/vitest/issues/6393)
[<samp>(f6217)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/f6217a22)
-   **ui**:
- Remove "filters" flickering  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6463](https://redirect.github.com/vitest-dev/vitest/issues/6463)
[<samp>(0223b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0223bb79)
- Render project name consistently  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6329](https://redirect.github.com/vitest-dev/vitest/issues/6329)
[<samp>(94a18)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/94a186ec)
-   **vite-node**:
- Disable watcher if hmr is disabled  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6251](https://redirect.github.com/vitest-dev/vitest/issues/6251)
[<samp>(c51c6)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c51c67aa)
- Fix watch on vite 6  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[https://github.com/vitest-dev/vitest/issues/6422](https://redirect.github.com/vitest-dev/vitest/issues/6422)
[<samp>(c3ac4)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c3ac43c1)
-   **vitest**:
- Update json reporter output  -  by
[@&#8203;Emiyaaaaa](https://redirect.github.com/Emiyaaaaa) in
[https://github.com/vitest-dev/vitest/issues/6064](https://redirect.github.com/vitest-dev/vitest/issues/6064)
[<samp>(c9979)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c997937b)
- Add more type guards for --merge-reports  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6307](https://redirect.github.com/vitest-dev/vitest/issues/6307)
[<samp>(0a5d8)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0a5d8169)
- Always resolve vitest to the root version  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6369](https://redirect.github.com/vitest-dev/vitest/issues/6369)
[<samp>(163d7)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/163d7624)
- Dispose vmForks listeners to avoid memory leak  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6448](https://redirect.github.com/vitest-dev/vitest/issues/6448)
[<samp>(2673c)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/2673c3bb)
-   **workspace**:
- Correctly resolve workspace globs and file paths  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6316](https://redirect.github.com/vitest-dev/vitest/issues/6316)
[<samp>(afdcb)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/afdcb8f2)

#####     [View changes on
GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v2.0.5...v2.1.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/line/line-bot-sdk-nodejs).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC43NC4xIiwidXBkYXRlZEluVmVyIjoiMzguNzQuMSIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6WyJkZXBlbmRlbmN5IHVwZ3JhZGUiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot added a commit to mmkal/eslint-plugin-mmkal that referenced this pull request Sep 12, 2024
##### [v2.1.0](https://github.com/vitest-dev/vitest/releases/tag/v2.1.0)

This release makes another big change to the Browser Mode by introducing [locators API](https://vitest.dev/guide/browser/locators.html):

```ts
test('renders blog posts', async () => {
  const screen = page.render(<Blog />)

  await expect.element(screen.getByRole('heading', { name: 'Blog' })).toBeInTheDocument()

  const [firstPost] = screen.getByRole('listitem').all()

  await firstPost.getByRole('button', { name: 'Delete' }).click()

  expect(screen.getByRole('listitem').all()).toHaveLength(3)
})
```

You can use either [vitest-browser-vue](https://github.com/vitest-dev/vitest-browser-vue), [vitest-browser-svelte ](https://github.com/vitest-dev/vitest-browser-svelte) or [vitest-browser-react](https://github.com/vitest-dev/vitest-browser-react) to render components and make assertions using locators. Locators are also available on the `page` object from `@vitest/browser/context`.

#####    🚀 Features

-   **api**:
    -   Make spec into a class instead of a tuple  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6355 [<samp>(874a1)</samp>](vitest-dev/vitest@874a121e)
-   **browser**:
    -   Move page.config to server.config, add more docs  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6252 [<samp>(af2b8)</samp>](vitest-dev/vitest@af2b813c)
    -   Make iframe scalable, improve documentation  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6257 [<samp>(74ca1)</samp>](vitest-dev/vitest@74ca11a4)
    -   Introduce built-in locators  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6084 [<samp>(3347f)</samp>](vitest-dev/vitest@3347f83e)
    -   Support v8 coverage  -  by [@AriPerkkio](https://github.com/AriPerkkio) in vitest-dev/vitest#6273 [<samp>(34199)</samp>](vitest-dev/vitest@34199bdf)
    -   Support `userEvent.upload` in playwright provider  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6442 [<samp>(cf148)</samp>](vitest-dev/vitest@cf148645)
    -   Support `--inspect`  -  by [@AriPerkkio](https://github.com/AriPerkkio) in vitest-dev/vitest#6433 [<samp>(0499a)</samp>](vitest-dev/vitest@0499a315)
    -   Support `--inspect-brk`  -  by [@AriPerkkio](https://github.com/AriPerkkio) in vitest-dev/vitest#6434 [<samp>(7ab0f)</samp>](vitest-dev/vitest@7ab0f4a8)
-   **cli**:
    -   Extend existing list command to output only a list of file names  -  by [@Ma-hawaj](https://github.com/Ma-hawaj) and [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6392 [<samp>(008f0)</samp>](vitest-dev/vitest@008f00b2)
-   **coverage**:
    -   Add `--exclude-after-remap`  -  by [@AriPerkkio](https://github.com/AriPerkkio) in vitest-dev/vitest#6309 [<samp>(5932a)</samp>](vitest-dev/vitest@5932a7f9)
-   **mocker**:
    -   Introduce [@vitest/mocker](https://github.com/vitest/mocker) package, allow `{ spy: true }` instead of a factory  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6289 [<samp>(95f02)</samp>](vitest-dev/vitest@95f0203f)
-   **vitest**:
    -   Add "provide" option  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6253 [<samp>(4409d)</samp>](vitest-dev/vitest@4409d779)
    -   Add return type and promisable mockFactory  -  by [@syi0808](https://github.com/syi0808) and [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6139 [<samp>(f5e0b)</samp>](vitest-dev/vitest@f5e0b987)
    -   Add `vi.advanceTimersToNextFrame`  -  by [@bnjm](https://github.com/bnjm) and [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6347 [<samp>(8ff63)</samp>](vitest-dev/vitest@8ff63560)
    -   Allow env to be stubbed to undefined  -  by [@JSanchezIO](https://github.com/JSanchezIO) and [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6359 [<samp>(c3b27)</samp>](vitest-dev/vitest@c3b2757c)

#####    🐞 Bug Fixes

-   Correctly resolve nested mocks with `index` file  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6266 [<samp>(081cf)</samp>](vitest-dev/vitest@081cfe03)
-   Don't panic when coverage.reporter is a string  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6267 [<samp>(7b37d)</samp>](vitest-dev/vitest@7b37d27b)
-   Align RawMatcherFn type definition with Jest  -  by [@wheresrhys](https://github.com/wheresrhys) in vitest-dev/vitest#6351 [<samp>(d09f0)</samp>](vitest-dev/vitest@d09f00c7)
-   Cjs build of vite node server  -  by [@AkaraChen](https://github.com/AkaraChen) in vitest-dev/vitest#6389 [<samp>(12e70)</samp>](vitest-dev/vitest@12e702bd)
-   Allow inlining vite's cached dependencies  -  by [@chriswheeldon-peakon](https://github.com/chriswheeldon-peakon) in vitest-dev/vitest#6284 [<samp>(03208)</samp>](vitest-dev/vitest@03208017)
-   Print unexpected error message if peer dependencies have a different version  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6446 [<samp>(b992b)</samp>](vitest-dev/vitest@b992b346)
-   Ignore importer when resolving Vitest  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6469 [<samp>(0b447)</samp>](vitest-dev/vitest@0b447226)
-   `expect.getState().testPath` always returns correct path  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6472 [<samp>(ac698)</samp>](vitest-dev/vitest@ac698b1c)
-   UserEvent works consistently between providers  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6480 [<samp>(0b4da)</samp>](vitest-dev/vitest@0b4da69e)
-   **browser**:
    -   Print correct stack trace for unhandled errors  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6134 [<samp>(1da6c)</samp>](vitest-dev/vitest@1da6cebe)
    -   Use documentElement as the root for selector  -  by [@sheremet-va](https://github.com/sheremet-va) [<samp>(d8077)</samp>](vitest-dev/vitest@d807767f)
    -   Keep querying elements even if locator is created with elementLocator, add pubic @vitest/browser/utils  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6296 [<samp>(30dc5)</samp>](vitest-dev/vitest@30dc5793)
    -   Produce valid config file if preview provider is used  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6305 [<samp>(7f0ae)</samp>](vitest-dev/vitest@7f0ae292)
    -   Correctly run in-source tests in the browser  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6440 [<samp>(c8531)</samp>](vitest-dev/vitest@c853126e)
    -   Exclude missed packages from optimization, print help message  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6445 [<samp>(8d883)</samp>](vitest-dev/vitest@8d883cf0)
    -   Define mocker as a dependency  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6476 [<samp>(9560a)</samp>](vitest-dev/vitest@9560ab7f)
-   **coverage**:
    -   Warn if `vitest` and `@vitest/*` versions don't match  -  by [@AriPerkkio](https://github.com/AriPerkkio) in vitest-dev/vitest#6317 [<samp>(e662c)</samp>](vitest-dev/vitest@e662c7b2)
    -   V8 to support source maps with multiple sources  -  by [@AriPerkkio](https://github.com/AriPerkkio) and [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6120 [<samp>(1f6cb)</samp>](vitest-dev/vitest@1f6cb59f)
    -   V8 to warn instead of crash when conversion fails  -  by [@AriPerkkio](https://github.com/AriPerkkio) in vitest-dev/vitest#6318 [<samp>(91dea)</samp>](vitest-dev/vitest@91dea8c1)
    -   Use project specific `vitenode` for uncovered files  -  by [@AriPerkkio](https://github.com/AriPerkkio) in vitest-dev/vitest#6044 [<samp>(da52d)</samp>](vitest-dev/vitest@da52d23f)
-   **runner**:
    -   Use `performance.now` instead of `Date.now` for duration  -  by [@LuciNyan](https://github.com/LuciNyan) in vitest-dev/vitest#6382 [<samp>(fe489)</samp>](vitest-dev/vitest@fe489432)
    -   Async assertion auto await should timeout  -  by [@hi-ogawa](https://github.com/hi-ogawa) in vitest-dev/vitest#6391 [<samp>(ad6e7)</samp>](vitest-dev/vitest@ad6e72fc)
-   **snapshot**:
    -   Reject multiple `toMatchInlineSnapshot` updates at the same location  -  by [@hi-ogawa](https://github.com/hi-ogawa) in vitest-dev/vitest#6332 [<samp>(1606f)</samp>](vitest-dev/vitest@1606f34f)
    -   Improve inline snapshot inside loop rejection  -  by [@hi-ogawa](https://github.com/hi-ogawa) in vitest-dev/vitest#6339 [<samp>(e0368)</samp>](vitest-dev/vitest@e03683c5)
-   **typecheck**:
    -   Run both runtime and typecheck tests if `typecheck.include` overlaps with `include`  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6256 [<samp>(153ff)</samp>](vitest-dev/vitest@153ff01b)
-   **types**:
    -   Allow Callbacks Passed to before\*/after\* to Return Anything  -  by [@LuciNyan](https://github.com/LuciNyan) in vitest-dev/vitest#6393 [<samp>(f6217)</samp>](vitest-dev/vitest@f6217a22)
-   **ui**:
    -   Remove "filters" flickering  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6463 [<samp>(0223b)</samp>](vitest-dev/vitest@0223bb79)
    -   Render project name consistently  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6329 [<samp>(94a18)</samp>](vitest-dev/vitest@94a186ec)
-   **vite-node**:
    -   Disable watcher if hmr is disabled  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6251 [<samp>(c51c6)</samp>](vitest-dev/vitest@c51c67aa)
    -   Fix watch on vite 6  -  by [@hi-ogawa](https://github.com/hi-ogawa) in vitest-dev/vitest#6422 [<samp>(c3ac4)</samp>](vitest-dev/vitest@c3ac43c1)
-   **vitest**:
    -   Update json reporter output  -  by [@Emiyaaaaa](https://github.com/Emiyaaaaa) in vitest-dev/vitest#6064 [<samp>(c9979)</samp>](vitest-dev/vitest@c997937b)
    -   Add more type guards for --merge-reports  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6307 [<samp>(0a5d8)</samp>](vitest-dev/vitest@0a5d8169)
    -   Always resolve vitest to the root version  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6369 [<samp>(163d7)</samp>](vitest-dev/vitest@163d7624)
    -   Dispose vmForks listeners to avoid memory leak  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6448 [<samp>(2673c)</samp>](vitest-dev/vitest@2673c3bb)
-   **workspace**:
    -   Correctly resolve workspace globs and file paths  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6316 [<samp>(afdcb)</samp>](vitest-dev/vitest@afdcb8f2)

#####     [View changes on GitHub](vitest-dev/vitest@v2.0.5...v2.1.0)
github-merge-queue bot referenced this pull request in BSStudio/bss-web-graphql-backend Sep 12, 2024
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@vitest/coverage-v8](https://redirect.github.com/vitest-dev/vitest/tree/main/packages/coverage-v8#readme)
([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8))
| [`2.0.5` ->
`2.1.0`](https://renovatebot.com/diffs/npm/@vitest%2fcoverage-v8/2.0.5/2.1.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@vitest%2fcoverage-v8/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@vitest%2fcoverage-v8/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@vitest%2fcoverage-v8/2.0.5/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@vitest%2fcoverage-v8/2.0.5/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@vitest/ui](https://redirect.github.com/vitest-dev/vitest/tree/main/packages/ui#readme)
([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/ui))
| [`2.0.5` ->
`2.1.0`](https://renovatebot.com/diffs/npm/@vitest%2fui/2.0.5/2.1.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/@vitest%2fui/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@vitest%2fui/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@vitest%2fui/2.0.5/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@vitest%2fui/2.0.5/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [vitest](https://redirect.github.com/vitest-dev/vitest)
([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest))
| [`2.0.5` ->
`2.1.0`](https://renovatebot.com/diffs/npm/vitest/2.0.5/2.1.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/vitest/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vitest/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vitest/2.0.5/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vitest/2.0.5/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>vitest-dev/vitest (@&#8203;vitest/coverage-v8)</summary>

###
[`v2.1.0`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v2.1.0)

[Compare
Source](https://redirect.github.com/vitest-dev/vitest/compare/v2.0.5...v2.1.0)

This release makes another big change to the Browser Mode by introducing
[locators API](https://vitest.dev/guide/browser/locators.html):

```ts
test('renders blog posts', async () => {
  const screen = page.render(<Blog />)

  await expect.element(screen.getByRole('heading', { name: 'Blog' })).toBeInTheDocument()

  const [firstPost] = screen.getByRole('listitem').all()

  await firstPost.getByRole('button', { name: 'Delete' }).click()

  expect(screen.getByRole('listitem').all()).toHaveLength(3)
})
```

You can use either
[vitest-browser-vue](https://redirect.github.com/vitest-dev/vitest-browser-vue),
[vitest-browser-svelte
](https://redirect.github.com/vitest-dev/vitest-browser-svelte) or
[vitest-browser-react](https://redirect.github.com/vitest-dev/vitest-browser-react)
to render components and make assertions using locators. Locators are
also available on the `page` object from `@vitest/browser/context`.

#####    🚀 Features

-   **api**:
- Make spec into a class instead of a tuple  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6355](https://redirect.github.com/vitest-dev/vitest/issues/6355)
[<samp>(874a1)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/874a121e)
-   **browser**:
- Move page.config to server.config, add more docs  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6252](https://redirect.github.com/vitest-dev/vitest/issues/6252)
[<samp>(af2b8)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/af2b813c)
- Make iframe scalable, improve documentation  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6257](https://redirect.github.com/vitest-dev/vitest/issues/6257)
[<samp>(74ca1)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/74ca11a4)
- Introduce built-in locators  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6084](https://redirect.github.com/vitest-dev/vitest/issues/6084)
[<samp>(3347f)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/3347f83e)
- Support v8 coverage  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6273](https://redirect.github.com/vitest-dev/vitest/issues/6273)
[<samp>(34199)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/34199bdf)
- Support `userEvent.upload` in playwright provider  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6442](https://redirect.github.com/vitest-dev/vitest/issues/6442)
[<samp>(cf148)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/cf148645)
- Support `--inspect`  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6433](https://redirect.github.com/vitest-dev/vitest/issues/6433)
[<samp>(0499a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0499a315)
- Support `--inspect-brk`  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6434](https://redirect.github.com/vitest-dev/vitest/issues/6434)
[<samp>(7ab0f)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7ab0f4a8)
-   **cli**:
- Extend existing list command to output only a list of file names  - 
by [@&#8203;Ma-hawaj](https://redirect.github.com/Ma-hawaj) and
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6392](https://redirect.github.com/vitest-dev/vitest/issues/6392)
[<samp>(008f0)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/008f00b2)
-   **coverage**:
- Add `--exclude-after-remap`  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6309](https://redirect.github.com/vitest-dev/vitest/issues/6309)
[<samp>(5932a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/5932a7f9)
-   **mocker**:
- Introduce
[@&#8203;vitest/mocker](https://redirect.github.com/vitest/mocker)
package, allow `{ spy: true }` instead of a factory  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6289](https://redirect.github.com/vitest-dev/vitest/issues/6289)
[<samp>(95f02)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/95f0203f)
-   **vitest**:
- Add "provide" option  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6253](https://redirect.github.com/vitest-dev/vitest/issues/6253)
[<samp>(4409d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/4409d779)
- Add return type and promisable mockFactory  -  by
[@&#8203;syi0808](https://redirect.github.com/syi0808) and
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6139](https://redirect.github.com/vitest-dev/vitest/issues/6139)
[<samp>(f5e0b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/f5e0b987)
- Add `vi.advanceTimersToNextFrame`  -  by
[@&#8203;bnjm](https://redirect.github.com/bnjm) and
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6347](https://redirect.github.com/vitest-dev/vitest/issues/6347)
[<samp>(8ff63)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/8ff63560)
- Allow env to be stubbed to undefined  -  by
[@&#8203;JSanchezIO](https://redirect.github.com/JSanchezIO) and
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6359](https://redirect.github.com/vitest-dev/vitest/issues/6359)
[<samp>(c3b27)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c3b2757c)

#####    🐞 Bug Fixes

- Correctly resolve nested mocks with `index` file  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6266](https://redirect.github.com/vitest-dev/vitest/issues/6266)
[<samp>(081cf)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/081cfe03)
- Don't panic when coverage.reporter is a string  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6267](https://redirect.github.com/vitest-dev/vitest/issues/6267)
[<samp>(7b37d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7b37d27b)
- Align RawMatcherFn type definition with Jest  -  by
[@&#8203;wheresrhys](https://redirect.github.com/wheresrhys) in
[https://github.com/vitest-dev/vitest/issues/6351](https://redirect.github.com/vitest-dev/vitest/issues/6351)
[<samp>(d09f0)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/d09f00c7)
- Cjs build of vite node server  -  by
[@&#8203;AkaraChen](https://redirect.github.com/AkaraChen) in
[https://github.com/vitest-dev/vitest/issues/6389](https://redirect.github.com/vitest-dev/vitest/issues/6389)
[<samp>(12e70)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/12e702bd)
- Allow inlining vite's cached dependencies  -  by
[@&#8203;chriswheeldon-peakon](https://redirect.github.com/chriswheeldon-peakon)
in
[https://github.com/vitest-dev/vitest/issues/6284](https://redirect.github.com/vitest-dev/vitest/issues/6284)
[<samp>(03208)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/03208017)
- Print unexpected error message if peer dependencies have a different
version  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6446](https://redirect.github.com/vitest-dev/vitest/issues/6446)
[<samp>(b992b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/b992b346)
- Ignore importer when resolving Vitest  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6469](https://redirect.github.com/vitest-dev/vitest/issues/6469)
[<samp>(0b447)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0b447226)
- `expect.getState().testPath` always returns correct path  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6472](https://redirect.github.com/vitest-dev/vitest/issues/6472)
[<samp>(ac698)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/ac698b1c)
- UserEvent works consistently between providers  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6480](https://redirect.github.com/vitest-dev/vitest/issues/6480)
[<samp>(0b4da)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0b4da69e)
-   **browser**:
- Print correct stack trace for unhandled errors  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6134](https://redirect.github.com/vitest-dev/vitest/issues/6134)
[<samp>(1da6c)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1da6cebe)
- Use documentElement as the root for selector  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va)
[<samp>(d8077)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/d807767f)
- Keep querying elements even if locator is created with elementLocator,
add pubic @&#8203;vitest/browser/utils  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6296](https://redirect.github.com/vitest-dev/vitest/issues/6296)
[<samp>(30dc5)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/30dc5793)
- Produce valid config file if preview provider is used  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6305](https://redirect.github.com/vitest-dev/vitest/issues/6305)
[<samp>(7f0ae)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7f0ae292)
- Correctly run in-source tests in the browser  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6440](https://redirect.github.com/vitest-dev/vitest/issues/6440)
[<samp>(c8531)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c853126e)
- Exclude missed packages from optimization, print help message  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6445](https://redirect.github.com/vitest-dev/vitest/issues/6445)
[<samp>(8d883)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/8d883cf0)
- Define mocker as a dependency  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6476](https://redirect.github.com/vitest-dev/vitest/issues/6476)
[<samp>(9560a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/9560ab7f)
-   **coverage**:
- Warn if `vitest` and `@vitest/*` versions don't match  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6317](https://redirect.github.com/vitest-dev/vitest/issues/6317)
[<samp>(e662c)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e662c7b2)
- V8 to support source maps with multiple sources  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) and
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6120](https://redirect.github.com/vitest-dev/vitest/issues/6120)
[<samp>(1f6cb)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1f6cb59f)
- V8 to warn instead of crash when conversion fails  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6318](https://redirect.github.com/vitest-dev/vitest/issues/6318)
[<samp>(91dea)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/91dea8c1)
- Use project specific `vitenode` for uncovered files  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6044](https://redirect.github.com/vitest-dev/vitest/issues/6044)
[<samp>(da52d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/da52d23f)
-   **runner**:
- Use `performance.now` instead of `Date.now` for duration  -  by
[@&#8203;LuciNyan](https://redirect.github.com/LuciNyan) in
[https://github.com/vitest-dev/vitest/issues/6382](https://redirect.github.com/vitest-dev/vitest/issues/6382)
[<samp>(fe489)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/fe489432)
- Async assertion auto await should timeout  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[https://github.com/vitest-dev/vitest/issues/6391](https://redirect.github.com/vitest-dev/vitest/issues/6391)
[<samp>(ad6e7)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/ad6e72fc)
-   **snapshot**:
- Reject multiple `toMatchInlineSnapshot` updates at the same location
 -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[https://github.com/vitest-dev/vitest/issues/6332](https://redirect.github.com/vitest-dev/vitest/issues/6332)
[<samp>(1606f)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1606f34f)
- Improve inline snapshot inside loop rejection  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[https://github.com/vitest-dev/vitest/issues/6339](https://redirect.github.com/vitest-dev/vitest/issues/6339)
[<samp>(e0368)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e03683c5)
-   **typecheck**:
- Run both runtime and typecheck tests if `typecheck.include` overlaps
with `include`  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6256](https://redirect.github.com/vitest-dev/vitest/issues/6256)
[<samp>(153ff)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/153ff01b)
-   **types**:
- Allow Callbacks Passed to before\*/after\* to Return Anything  -  by
[@&#8203;LuciNyan](https://redirect.github.com/LuciNyan) in
[https://github.com/vitest-dev/vitest/issues/6393](https://redirect.github.com/vitest-dev/vitest/issues/6393)
[<samp>(f6217)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/f6217a22)
-   **ui**:
- Remove "filters" flickering  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6463](https://redirect.github.com/vitest-dev/vitest/issues/6463)
[<samp>(0223b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0223bb79)
- Render project name consistently  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6329](https://redirect.github.com/vitest-dev/vitest/issues/6329)
[<samp>(94a18)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/94a186ec)
-   **vite-node**:
- Disable watcher if hmr is disabled  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6251](https://redirect.github.com/vitest-dev/vitest/issues/6251)
[<samp>(c51c6)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c51c67aa)
- Fix watch on vite 6  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[https://github.com/vitest-dev/vitest/issues/6422](https://redirect.github.com/vitest-dev/vitest/issues/6422)
[<samp>(c3ac4)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c3ac43c1)
-   **vitest**:
- Update json reporter output  -  by
[@&#8203;Emiyaaaaa](https://redirect.github.com/Emiyaaaaa) in
[https://github.com/vitest-dev/vitest/issues/6064](https://redirect.github.com/vitest-dev/vitest/issues/6064)
[<samp>(c9979)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c997937b)
- Add more type guards for --merge-reports  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6307](https://redirect.github.com/vitest-dev/vitest/issues/6307)
[<samp>(0a5d8)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0a5d8169)
- Always resolve vitest to the root version  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6369](https://redirect.github.com/vitest-dev/vitest/issues/6369)
[<samp>(163d7)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/163d7624)
- Dispose vmForks listeners to avoid memory leak  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6448](https://redirect.github.com/vitest-dev/vitest/issues/6448)
[<samp>(2673c)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/2673c3bb)
-   **workspace**:
- Correctly resolve workspace globs and file paths  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6316](https://redirect.github.com/vitest-dev/vitest/issues/6316)
[<samp>(afdcb)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/afdcb8f2)

#####     [View changes on
GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v2.0.5...v2.1.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/BSStudio/bss-web-graphql-backend).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC43NC4xIiwidXBkYXRlZEluVmVyIjoiMzguNzQuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot added a commit to mmkal/expect-type that referenced this pull request Sep 12, 2024
##### [v2.1.0](https://github.com/vitest-dev/vitest/releases/tag/v2.1.0)

This release makes another big change to the Browser Mode by introducing [locators API](https://vitest.dev/guide/browser/locators.html):

```ts
test('renders blog posts', async () => {
  const screen = page.render(<Blog />)

  await expect.element(screen.getByRole('heading', { name: 'Blog' })).toBeInTheDocument()

  const [firstPost] = screen.getByRole('listitem').all()

  await firstPost.getByRole('button', { name: 'Delete' }).click()

  expect(screen.getByRole('listitem').all()).toHaveLength(3)
})
```

You can use either [vitest-browser-vue](https://github.com/vitest-dev/vitest-browser-vue), [vitest-browser-svelte ](https://github.com/vitest-dev/vitest-browser-svelte) or [vitest-browser-react](https://github.com/vitest-dev/vitest-browser-react) to render components and make assertions using locators. Locators are also available on the `page` object from `@vitest/browser/context`.

#####    🚀 Features

-   **api**:
    -   Make spec into a class instead of a tuple  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6355 [<samp>(874a1)</samp>](vitest-dev/vitest@874a121e)
-   **browser**:
    -   Move page.config to server.config, add more docs  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6252 [<samp>(af2b8)</samp>](vitest-dev/vitest@af2b813c)
    -   Make iframe scalable, improve documentation  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6257 [<samp>(74ca1)</samp>](vitest-dev/vitest@74ca11a4)
    -   Introduce built-in locators  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6084 [<samp>(3347f)</samp>](vitest-dev/vitest@3347f83e)
    -   Support v8 coverage  -  by [@AriPerkkio](https://github.com/AriPerkkio) in vitest-dev/vitest#6273 [<samp>(34199)</samp>](vitest-dev/vitest@34199bdf)
    -   Support `userEvent.upload` in playwright provider  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6442 [<samp>(cf148)</samp>](vitest-dev/vitest@cf148645)
    -   Support `--inspect`  -  by [@AriPerkkio](https://github.com/AriPerkkio) in vitest-dev/vitest#6433 [<samp>(0499a)</samp>](vitest-dev/vitest@0499a315)
    -   Support `--inspect-brk`  -  by [@AriPerkkio](https://github.com/AriPerkkio) in vitest-dev/vitest#6434 [<samp>(7ab0f)</samp>](vitest-dev/vitest@7ab0f4a8)
-   **cli**:
    -   Extend existing list command to output only a list of file names  -  by [@Ma-hawaj](https://github.com/Ma-hawaj) and [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6392 [<samp>(008f0)</samp>](vitest-dev/vitest@008f00b2)
-   **coverage**:
    -   Add `--exclude-after-remap`  -  by [@AriPerkkio](https://github.com/AriPerkkio) in vitest-dev/vitest#6309 [<samp>(5932a)</samp>](vitest-dev/vitest@5932a7f9)
-   **mocker**:
    -   Introduce [@vitest/mocker](https://github.com/vitest/mocker) package, allow `{ spy: true }` instead of a factory  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6289 [<samp>(95f02)</samp>](vitest-dev/vitest@95f0203f)
-   **vitest**:
    -   Add "provide" option  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6253 [<samp>(4409d)</samp>](vitest-dev/vitest@4409d779)
    -   Add return type and promisable mockFactory  -  by [@syi0808](https://github.com/syi0808) and [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6139 [<samp>(f5e0b)</samp>](vitest-dev/vitest@f5e0b987)
    -   Add `vi.advanceTimersToNextFrame`  -  by [@bnjm](https://github.com/bnjm) and [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6347 [<samp>(8ff63)</samp>](vitest-dev/vitest@8ff63560)
    -   Allow env to be stubbed to undefined  -  by [@JSanchezIO](https://github.com/JSanchezIO) and [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6359 [<samp>(c3b27)</samp>](vitest-dev/vitest@c3b2757c)

#####    🐞 Bug Fixes

-   Correctly resolve nested mocks with `index` file  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6266 [<samp>(081cf)</samp>](vitest-dev/vitest@081cfe03)
-   Don't panic when coverage.reporter is a string  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6267 [<samp>(7b37d)</samp>](vitest-dev/vitest@7b37d27b)
-   Align RawMatcherFn type definition with Jest  -  by [@wheresrhys](https://github.com/wheresrhys) in vitest-dev/vitest#6351 [<samp>(d09f0)</samp>](vitest-dev/vitest@d09f00c7)
-   Cjs build of vite node server  -  by [@AkaraChen](https://github.com/AkaraChen) in vitest-dev/vitest#6389 [<samp>(12e70)</samp>](vitest-dev/vitest@12e702bd)
-   Allow inlining vite's cached dependencies  -  by [@chriswheeldon-peakon](https://github.com/chriswheeldon-peakon) in vitest-dev/vitest#6284 [<samp>(03208)</samp>](vitest-dev/vitest@03208017)
-   Print unexpected error message if peer dependencies have a different version  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6446 [<samp>(b992b)</samp>](vitest-dev/vitest@b992b346)
-   Ignore importer when resolving Vitest  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6469 [<samp>(0b447)</samp>](vitest-dev/vitest@0b447226)
-   `expect.getState().testPath` always returns correct path  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6472 [<samp>(ac698)</samp>](vitest-dev/vitest@ac698b1c)
-   UserEvent works consistently between providers  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6480 [<samp>(0b4da)</samp>](vitest-dev/vitest@0b4da69e)
-   **browser**:
    -   Print correct stack trace for unhandled errors  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6134 [<samp>(1da6c)</samp>](vitest-dev/vitest@1da6cebe)
    -   Use documentElement as the root for selector  -  by [@sheremet-va](https://github.com/sheremet-va) [<samp>(d8077)</samp>](vitest-dev/vitest@d807767f)
    -   Keep querying elements even if locator is created with elementLocator, add pubic @vitest/browser/utils  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6296 [<samp>(30dc5)</samp>](vitest-dev/vitest@30dc5793)
    -   Produce valid config file if preview provider is used  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6305 [<samp>(7f0ae)</samp>](vitest-dev/vitest@7f0ae292)
    -   Correctly run in-source tests in the browser  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6440 [<samp>(c8531)</samp>](vitest-dev/vitest@c853126e)
    -   Exclude missed packages from optimization, print help message  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6445 [<samp>(8d883)</samp>](vitest-dev/vitest@8d883cf0)
    -   Define mocker as a dependency  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6476 [<samp>(9560a)</samp>](vitest-dev/vitest@9560ab7f)
-   **coverage**:
    -   Warn if `vitest` and `@vitest/*` versions don't match  -  by [@AriPerkkio](https://github.com/AriPerkkio) in vitest-dev/vitest#6317 [<samp>(e662c)</samp>](vitest-dev/vitest@e662c7b2)
    -   V8 to support source maps with multiple sources  -  by [@AriPerkkio](https://github.com/AriPerkkio) and [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6120 [<samp>(1f6cb)</samp>](vitest-dev/vitest@1f6cb59f)
    -   V8 to warn instead of crash when conversion fails  -  by [@AriPerkkio](https://github.com/AriPerkkio) in vitest-dev/vitest#6318 [<samp>(91dea)</samp>](vitest-dev/vitest@91dea8c1)
    -   Use project specific `vitenode` for uncovered files  -  by [@AriPerkkio](https://github.com/AriPerkkio) in vitest-dev/vitest#6044 [<samp>(da52d)</samp>](vitest-dev/vitest@da52d23f)
-   **runner**:
    -   Use `performance.now` instead of `Date.now` for duration  -  by [@LuciNyan](https://github.com/LuciNyan) in vitest-dev/vitest#6382 [<samp>(fe489)</samp>](vitest-dev/vitest@fe489432)
    -   Async assertion auto await should timeout  -  by [@hi-ogawa](https://github.com/hi-ogawa) in vitest-dev/vitest#6391 [<samp>(ad6e7)</samp>](vitest-dev/vitest@ad6e72fc)
-   **snapshot**:
    -   Reject multiple `toMatchInlineSnapshot` updates at the same location  -  by [@hi-ogawa](https://github.com/hi-ogawa) in vitest-dev/vitest#6332 [<samp>(1606f)</samp>](vitest-dev/vitest@1606f34f)
    -   Improve inline snapshot inside loop rejection  -  by [@hi-ogawa](https://github.com/hi-ogawa) in vitest-dev/vitest#6339 [<samp>(e0368)</samp>](vitest-dev/vitest@e03683c5)
-   **typecheck**:
    -   Run both runtime and typecheck tests if `typecheck.include` overlaps with `include`  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6256 [<samp>(153ff)</samp>](vitest-dev/vitest@153ff01b)
-   **types**:
    -   Allow Callbacks Passed to before\*/after\* to Return Anything  -  by [@LuciNyan](https://github.com/LuciNyan) in vitest-dev/vitest#6393 [<samp>(f6217)</samp>](vitest-dev/vitest@f6217a22)
-   **ui**:
    -   Remove "filters" flickering  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6463 [<samp>(0223b)</samp>](vitest-dev/vitest@0223bb79)
    -   Render project name consistently  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6329 [<samp>(94a18)</samp>](vitest-dev/vitest@94a186ec)
-   **vite-node**:
    -   Disable watcher if hmr is disabled  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6251 [<samp>(c51c6)</samp>](vitest-dev/vitest@c51c67aa)
    -   Fix watch on vite 6  -  by [@hi-ogawa](https://github.com/hi-ogawa) in vitest-dev/vitest#6422 [<samp>(c3ac4)</samp>](vitest-dev/vitest@c3ac43c1)
-   **vitest**:
    -   Update json reporter output  -  by [@Emiyaaaaa](https://github.com/Emiyaaaaa) in vitest-dev/vitest#6064 [<samp>(c9979)</samp>](vitest-dev/vitest@c997937b)
    -   Add more type guards for --merge-reports  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6307 [<samp>(0a5d8)</samp>](vitest-dev/vitest@0a5d8169)
    -   Always resolve vitest to the root version  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6369 [<samp>(163d7)</samp>](vitest-dev/vitest@163d7624)
    -   Dispose vmForks listeners to avoid memory leak  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6448 [<samp>(2673c)</samp>](vitest-dev/vitest@2673c3bb)
-   **workspace**:
    -   Correctly resolve workspace globs and file paths  -  by [@sheremet-va](https://github.com/sheremet-va) in vitest-dev/vitest#6316 [<samp>(afdcb)</samp>](vitest-dev/vitest@afdcb8f2)

#####     [View changes on GitHub](vitest-dev/vitest@v2.0.5...v2.1.0)
renovate bot referenced this pull request in ayushmanchhabra/vsx Sep 12, 2024
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@vitest/coverage-v8](https://redirect.github.com/vitest-dev/vitest/tree/main/packages/coverage-v8#readme)
([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8))
| [`^2.0.5` ->
`^2.1.0`](https://renovatebot.com/diffs/npm/@vitest%2fcoverage-v8/2.0.5/2.1.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@vitest%2fcoverage-v8/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@vitest%2fcoverage-v8/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@vitest%2fcoverage-v8/2.0.5/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@vitest%2fcoverage-v8/2.0.5/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [vitest](https://redirect.github.com/vitest-dev/vitest)
([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest))
| [`^2.0.5` ->
`^2.1.0`](https://renovatebot.com/diffs/npm/vitest/2.0.5/2.1.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/vitest/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vitest/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vitest/2.0.5/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vitest/2.0.5/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>vitest-dev/vitest (@&#8203;vitest/coverage-v8)</summary>

###
[`v2.1.0`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v2.1.0)

[Compare
Source](https://redirect.github.com/vitest-dev/vitest/compare/v2.0.5...v2.1.0)

This release makes another big change to the Browser Mode by introducing
[locators API](https://vitest.dev/guide/browser/locators.html):

```ts
test('renders blog posts', async () => {
  const screen = page.render(<Blog />)

  await expect.element(screen.getByRole('heading', { name: 'Blog' })).toBeInTheDocument()

  const [firstPost] = screen.getByRole('listitem').all()

  await firstPost.getByRole('button', { name: 'Delete' }).click()

  expect(screen.getByRole('listitem').all()).toHaveLength(3)
})
```

You can use either
[vitest-browser-vue](https://redirect.github.com/vitest-dev/vitest-browser-vue),
[vitest-browser-svelte
](https://redirect.github.com/vitest-dev/vitest-browser-svelte) or
[vitest-browser-react](https://redirect.github.com/vitest-dev/vitest-browser-react)
to render components and make assertions using locators. Locators are
also available on the `page` object from `@vitest/browser/context`.

#####    🚀 Features

-   **api**:
- Make spec into a class instead of a tuple  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6355](https://redirect.github.com/vitest-dev/vitest/issues/6355)
[<samp>(874a1)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/874a121e)
-   **browser**:
- Move page.config to server.config, add more docs  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6252](https://redirect.github.com/vitest-dev/vitest/issues/6252)
[<samp>(af2b8)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/af2b813c)
- Make iframe scalable, improve documentation  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6257](https://redirect.github.com/vitest-dev/vitest/issues/6257)
[<samp>(74ca1)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/74ca11a4)
- Introduce built-in locators  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6084](https://redirect.github.com/vitest-dev/vitest/issues/6084)
[<samp>(3347f)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/3347f83e)
- Support v8 coverage  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6273](https://redirect.github.com/vitest-dev/vitest/issues/6273)
[<samp>(34199)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/34199bdf)
- Support `userEvent.upload` in playwright provider  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6442](https://redirect.github.com/vitest-dev/vitest/issues/6442)
[<samp>(cf148)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/cf148645)
- Support `--inspect`  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6433](https://redirect.github.com/vitest-dev/vitest/issues/6433)
[<samp>(0499a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0499a315)
- Support `--inspect-brk`  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6434](https://redirect.github.com/vitest-dev/vitest/issues/6434)
[<samp>(7ab0f)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7ab0f4a8)
-   **cli**:
- Extend existing list command to output only a list of file names  - 
by [@&#8203;Ma-hawaj](https://redirect.github.com/Ma-hawaj) and
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6392](https://redirect.github.com/vitest-dev/vitest/issues/6392)
[<samp>(008f0)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/008f00b2)
-   **coverage**:
- Add `--exclude-after-remap`  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6309](https://redirect.github.com/vitest-dev/vitest/issues/6309)
[<samp>(5932a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/5932a7f9)
-   **mocker**:
- Introduce
[@&#8203;vitest/mocker](https://redirect.github.com/vitest/mocker)
package, allow `{ spy: true }` instead of a factory  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6289](https://redirect.github.com/vitest-dev/vitest/issues/6289)
[<samp>(95f02)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/95f0203f)
-   **vitest**:
- Add "provide" option  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6253](https://redirect.github.com/vitest-dev/vitest/issues/6253)
[<samp>(4409d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/4409d779)
- Add return type and promisable mockFactory  -  by
[@&#8203;syi0808](https://redirect.github.com/syi0808) and
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6139](https://redirect.github.com/vitest-dev/vitest/issues/6139)
[<samp>(f5e0b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/f5e0b987)
- Add `vi.advanceTimersToNextFrame`  -  by
[@&#8203;bnjm](https://redirect.github.com/bnjm) and
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6347](https://redirect.github.com/vitest-dev/vitest/issues/6347)
[<samp>(8ff63)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/8ff63560)
- Allow env to be stubbed to undefined  -  by
[@&#8203;JSanchezIO](https://redirect.github.com/JSanchezIO) and
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6359](https://redirect.github.com/vitest-dev/vitest/issues/6359)
[<samp>(c3b27)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c3b2757c)

#####    🐞 Bug Fixes

- Correctly resolve nested mocks with `index` file  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6266](https://redirect.github.com/vitest-dev/vitest/issues/6266)
[<samp>(081cf)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/081cfe03)
- Don't panic when coverage.reporter is a string  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6267](https://redirect.github.com/vitest-dev/vitest/issues/6267)
[<samp>(7b37d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7b37d27b)
- Align RawMatcherFn type definition with Jest  -  by
[@&#8203;wheresrhys](https://redirect.github.com/wheresrhys) in
[https://github.com/vitest-dev/vitest/issues/6351](https://redirect.github.com/vitest-dev/vitest/issues/6351)
[<samp>(d09f0)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/d09f00c7)
- Cjs build of vite node server  -  by
[@&#8203;AkaraChen](https://redirect.github.com/AkaraChen) in
[https://github.com/vitest-dev/vitest/issues/6389](https://redirect.github.com/vitest-dev/vitest/issues/6389)
[<samp>(12e70)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/12e702bd)
- Allow inlining vite's cached dependencies  -  by
[@&#8203;chriswheeldon-peakon](https://redirect.github.com/chriswheeldon-peakon)
in
[https://github.com/vitest-dev/vitest/issues/6284](https://redirect.github.com/vitest-dev/vitest/issues/6284)
[<samp>(03208)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/03208017)
- Print unexpected error message if peer dependencies have a different
version  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6446](https://redirect.github.com/vitest-dev/vitest/issues/6446)
[<samp>(b992b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/b992b346)
- Ignore importer when resolving Vitest  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6469](https://redirect.github.com/vitest-dev/vitest/issues/6469)
[<samp>(0b447)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0b447226)
- `expect.getState().testPath` always returns correct path  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6472](https://redirect.github.com/vitest-dev/vitest/issues/6472)
[<samp>(ac698)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/ac698b1c)
- UserEvent works consistently between providers  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6480](https://redirect.github.com/vitest-dev/vitest/issues/6480)
[<samp>(0b4da)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0b4da69e)
-   **browser**:
- Print correct stack trace for unhandled errors  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6134](https://redirect.github.com/vitest-dev/vitest/issues/6134)
[<samp>(1da6c)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1da6cebe)
- Use documentElement as the root for selector  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va)
[<samp>(d8077)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/d807767f)
- Keep querying elements even if locator is created with elementLocator,
add pubic @&#8203;vitest/browser/utils  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6296](https://redirect.github.com/vitest-dev/vitest/issues/6296)
[<samp>(30dc5)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/30dc5793)
- Produce valid config file if preview provider is used  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6305](https://redirect.github.com/vitest-dev/vitest/issues/6305)
[<samp>(7f0ae)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7f0ae292)
- Correctly run in-source tests in the browser  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6440](https://redirect.github.com/vitest-dev/vitest/issues/6440)
[<samp>(c8531)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c853126e)
- Exclude missed packages from optimization, print help message  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6445](https://redirect.github.com/vitest-dev/vitest/issues/6445)
[<samp>(8d883)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/8d883cf0)
- Define mocker as a dependency  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6476](https://redirect.github.com/vitest-dev/vitest/issues/6476)
[<samp>(9560a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/9560ab7f)
-   **coverage**:
- Warn if `vitest` and `@vitest/*` versions don't match  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6317](https://redirect.github.com/vitest-dev/vitest/issues/6317)
[<samp>(e662c)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e662c7b2)
- V8 to support source maps with multiple sources  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) and
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6120](https://redirect.github.com/vitest-dev/vitest/issues/6120)
[<samp>(1f6cb)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1f6cb59f)
- V8 to warn instead of crash when conversion fails  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6318](https://redirect.github.com/vitest-dev/vitest/issues/6318)
[<samp>(91dea)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/91dea8c1)
- Use project specific `vitenode` for uncovered files  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6044](https://redirect.github.com/vitest-dev/vitest/issues/6044)
[<samp>(da52d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/da52d23f)
-   **runner**:
- Use `performance.now` instead of `Date.now` for duration  -  by
[@&#8203;LuciNyan](https://redirect.github.com/LuciNyan) in
[https://github.com/vitest-dev/vitest/issues/6382](https://redirect.github.com/vitest-dev/vitest/issues/6382)
[<samp>(fe489)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/fe489432)
- Async assertion auto await should timeout  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[https://github.com/vitest-dev/vitest/issues/6391](https://redirect.github.com/vitest-dev/vitest/issues/6391)
[<samp>(ad6e7)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/ad6e72fc)
-   **snapshot**:
- Reject multiple `toMatchInlineSnapshot` updates at the same location
 -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[https://github.com/vitest-dev/vitest/issues/6332](https://redirect.github.com/vitest-dev/vitest/issues/6332)
[<samp>(1606f)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1606f34f)
- Improve inline snapshot inside loop rejection  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[https://github.com/vitest-dev/vitest/issues/6339](https://redirect.github.com/vitest-dev/vitest/issues/6339)
[<samp>(e0368)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e03683c5)
-   **typecheck**:
- Run both runtime and typecheck tests if `typecheck.include` overlaps
with `include`  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6256](https://redirect.github.com/vitest-dev/vitest/issues/6256)
[<samp>(153ff)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/153ff01b)
-   **types**:
- Allow Callbacks Passed to before\*/after\* to Return Anything  -  by
[@&#8203;LuciNyan](https://redirect.github.com/LuciNyan) in
[https://github.com/vitest-dev/vitest/issues/6393](https://redirect.github.com/vitest-dev/vitest/issues/6393)
[<samp>(f6217)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/f6217a22)
-   **ui**:
- Remove "filters" flickering  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6463](https://redirect.github.com/vitest-dev/vitest/issues/6463)
[<samp>(0223b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0223bb79)
- Render project name consistently  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6329](https://redirect.github.com/vitest-dev/vitest/issues/6329)
[<samp>(94a18)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/94a186ec)
-   **vite-node**:
- Disable watcher if hmr is disabled  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6251](https://redirect.github.com/vitest-dev/vitest/issues/6251)
[<samp>(c51c6)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c51c67aa)
- Fix watch on vite 6  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[https://github.com/vitest-dev/vitest/issues/6422](https://redirect.github.com/vitest-dev/vitest/issues/6422)
[<samp>(c3ac4)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c3ac43c1)
-   **vitest**:
- Update json reporter output  -  by
[@&#8203;Emiyaaaaa](https://redirect.github.com/Emiyaaaaa) in
[https://github.com/vitest-dev/vitest/issues/6064](https://redirect.github.com/vitest-dev/vitest/issues/6064)
[<samp>(c9979)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c997937b)
- Add more type guards for --merge-reports  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6307](https://redirect.github.com/vitest-dev/vitest/issues/6307)
[<samp>(0a5d8)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0a5d8169)
- Always resolve vitest to the root version  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6369](https://redirect.github.com/vitest-dev/vitest/issues/6369)
[<samp>(163d7)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/163d7624)
- Dispose vmForks listeners to avoid memory leak  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6448](https://redirect.github.com/vitest-dev/vitest/issues/6448)
[<samp>(2673c)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/2673c3bb)
-   **workspace**:
- Correctly resolve workspace globs and file paths  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6316](https://redirect.github.com/vitest-dev/vitest/issues/6316)
[<samp>(afdcb)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/afdcb8f2)

#####     [View changes on
GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v2.0.5...v2.1.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/ayushmanchhabra/vsx).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC43NC4xIiwidXBkYXRlZEluVmVyIjoiMzguNzQuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot referenced this pull request in Johannes-Andersen/Johannes Sep 12, 2024
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@vitest/coverage-v8](https://redirect.github.com/vitest-dev/vitest/tree/main/packages/coverage-v8#readme)
([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8))
| [`2.0.5` ->
`2.1.0`](https://renovatebot.com/diffs/npm/@vitest%2fcoverage-v8/2.0.5/2.1.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@vitest%2fcoverage-v8/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@vitest%2fcoverage-v8/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@vitest%2fcoverage-v8/2.0.5/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@vitest%2fcoverage-v8/2.0.5/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [vitest](https://redirect.github.com/vitest-dev/vitest)
([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest))
| [`2.0.5` ->
`2.1.0`](https://renovatebot.com/diffs/npm/vitest/2.0.5/2.1.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/vitest/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vitest/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vitest/2.0.5/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vitest/2.0.5/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>vitest-dev/vitest (@&#8203;vitest/coverage-v8)</summary>

###
[`v2.1.0`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v2.1.0)

[Compare
Source](https://redirect.github.com/vitest-dev/vitest/compare/v2.0.5...v2.1.0)

This release makes another big change to the Browser Mode by introducing
[locators API](https://vitest.dev/guide/browser/locators.html):

```ts
test('renders blog posts', async () => {
  const screen = page.render(<Blog />)

  await expect.element(screen.getByRole('heading', { name: 'Blog' })).toBeInTheDocument()

  const [firstPost] = screen.getByRole('listitem').all()

  await firstPost.getByRole('button', { name: 'Delete' }).click()

  expect(screen.getByRole('listitem').all()).toHaveLength(3)
})
```

You can use either
[vitest-browser-vue](https://redirect.github.com/vitest-dev/vitest-browser-vue),
[vitest-browser-svelte
](https://redirect.github.com/vitest-dev/vitest-browser-svelte) or
[vitest-browser-react](https://redirect.github.com/vitest-dev/vitest-browser-react)
to render components and make assertions using locators. Locators are
also available on the `page` object from `@vitest/browser/context`.

#####    🚀 Features

-   **api**:
- Make spec into a class instead of a tuple  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6355](https://redirect.github.com/vitest-dev/vitest/issues/6355)
[<samp>(874a1)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/874a121e)
-   **browser**:
- Move page.config to server.config, add more docs  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6252](https://redirect.github.com/vitest-dev/vitest/issues/6252)
[<samp>(af2b8)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/af2b813c)
- Make iframe scalable, improve documentation  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6257](https://redirect.github.com/vitest-dev/vitest/issues/6257)
[<samp>(74ca1)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/74ca11a4)
- Introduce built-in locators  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6084](https://redirect.github.com/vitest-dev/vitest/issues/6084)
[<samp>(3347f)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/3347f83e)
- Support v8 coverage  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6273](https://redirect.github.com/vitest-dev/vitest/issues/6273)
[<samp>(34199)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/34199bdf)
- Support `userEvent.upload` in playwright provider  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6442](https://redirect.github.com/vitest-dev/vitest/issues/6442)
[<samp>(cf148)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/cf148645)
- Support `--inspect`  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6433](https://redirect.github.com/vitest-dev/vitest/issues/6433)
[<samp>(0499a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0499a315)
- Support `--inspect-brk`  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6434](https://redirect.github.com/vitest-dev/vitest/issues/6434)
[<samp>(7ab0f)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7ab0f4a8)
-   **cli**:
- Extend existing list command to output only a list of file names  - 
by [@&#8203;Ma-hawaj](https://redirect.github.com/Ma-hawaj) and
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6392](https://redirect.github.com/vitest-dev/vitest/issues/6392)
[<samp>(008f0)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/008f00b2)
-   **coverage**:
- Add `--exclude-after-remap`  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6309](https://redirect.github.com/vitest-dev/vitest/issues/6309)
[<samp>(5932a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/5932a7f9)
-   **mocker**:
- Introduce
[@&#8203;vitest/mocker](https://redirect.github.com/vitest/mocker)
package, allow `{ spy: true }` instead of a factory  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6289](https://redirect.github.com/vitest-dev/vitest/issues/6289)
[<samp>(95f02)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/95f0203f)
-   **vitest**:
- Add "provide" option  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6253](https://redirect.github.com/vitest-dev/vitest/issues/6253)
[<samp>(4409d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/4409d779)
- Add return type and promisable mockFactory  -  by
[@&#8203;syi0808](https://redirect.github.com/syi0808) and
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6139](https://redirect.github.com/vitest-dev/vitest/issues/6139)
[<samp>(f5e0b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/f5e0b987)
- Add `vi.advanceTimersToNextFrame`  -  by
[@&#8203;bnjm](https://redirect.github.com/bnjm) and
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6347](https://redirect.github.com/vitest-dev/vitest/issues/6347)
[<samp>(8ff63)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/8ff63560)
- Allow env to be stubbed to undefined  -  by
[@&#8203;JSanchezIO](https://redirect.github.com/JSanchezIO) and
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6359](https://redirect.github.com/vitest-dev/vitest/issues/6359)
[<samp>(c3b27)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c3b2757c)

#####    🐞 Bug Fixes

- Correctly resolve nested mocks with `index` file  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6266](https://redirect.github.com/vitest-dev/vitest/issues/6266)
[<samp>(081cf)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/081cfe03)
- Don't panic when coverage.reporter is a string  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6267](https://redirect.github.com/vitest-dev/vitest/issues/6267)
[<samp>(7b37d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7b37d27b)
- Align RawMatcherFn type definition with Jest  -  by
[@&#8203;wheresrhys](https://redirect.github.com/wheresrhys) in
[https://github.com/vitest-dev/vitest/issues/6351](https://redirect.github.com/vitest-dev/vitest/issues/6351)
[<samp>(d09f0)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/d09f00c7)
- Cjs build of vite node server  -  by
[@&#8203;AkaraChen](https://redirect.github.com/AkaraChen) in
[https://github.com/vitest-dev/vitest/issues/6389](https://redirect.github.com/vitest-dev/vitest/issues/6389)
[<samp>(12e70)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/12e702bd)
- Allow inlining vite's cached dependencies  -  by
[@&#8203;chriswheeldon-peakon](https://redirect.github.com/chriswheeldon-peakon)
in
[https://github.com/vitest-dev/vitest/issues/6284](https://redirect.github.com/vitest-dev/vitest/issues/6284)
[<samp>(03208)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/03208017)
- Print unexpected error message if peer dependencies have a different
version  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6446](https://redirect.github.com/vitest-dev/vitest/issues/6446)
[<samp>(b992b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/b992b346)
- Ignore importer when resolving Vitest  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6469](https://redirect.github.com/vitest-dev/vitest/issues/6469)
[<samp>(0b447)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0b447226)
- `expect.getState().testPath` always returns correct path  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6472](https://redirect.github.com/vitest-dev/vitest/issues/6472)
[<samp>(ac698)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/ac698b1c)
- UserEvent works consistently between providers  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6480](https://redirect.github.com/vitest-dev/vitest/issues/6480)
[<samp>(0b4da)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0b4da69e)
-   **browser**:
- Print correct stack trace for unhandled errors  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6134](https://redirect.github.com/vitest-dev/vitest/issues/6134)
[<samp>(1da6c)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1da6cebe)
- Use documentElement as the root for selector  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va)
[<samp>(d8077)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/d807767f)
- Keep querying elements even if locator is created with elementLocator,
add pubic @&#8203;vitest/browser/utils  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6296](https://redirect.github.com/vitest-dev/vitest/issues/6296)
[<samp>(30dc5)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/30dc5793)
- Produce valid config file if preview provider is used  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6305](https://redirect.github.com/vitest-dev/vitest/issues/6305)
[<samp>(7f0ae)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7f0ae292)
- Correctly run in-source tests in the browser  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6440](https://redirect.github.com/vitest-dev/vitest/issues/6440)
[<samp>(c8531)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c853126e)
- Exclude missed packages from optimization, print help message  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6445](https://redirect.github.com/vitest-dev/vitest/issues/6445)
[<samp>(8d883)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/8d883cf0)
- Define mocker as a dependency  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6476](https://redirect.github.com/vitest-dev/vitest/issues/6476)
[<samp>(9560a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/9560ab7f)
-   **coverage**:
- Warn if `vitest` and `@vitest/*` versions don't match  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6317](https://redirect.github.com/vitest-dev/vitest/issues/6317)
[<samp>(e662c)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e662c7b2)
- V8 to support source maps with multiple sources  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) and
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6120](https://redirect.github.com/vitest-dev/vitest/issues/6120)
[<samp>(1f6cb)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1f6cb59f)
- V8 to warn instead of crash when conversion fails  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6318](https://redirect.github.com/vitest-dev/vitest/issues/6318)
[<samp>(91dea)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/91dea8c1)
- Use project specific `vitenode` for uncovered files  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/6044](https://redirect.github.com/vitest-dev/vitest/issues/6044)
[<samp>(da52d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/da52d23f)
-   **runner**:
- Use `performance.now` instead of `Date.now` for duration  -  by
[@&#8203;LuciNyan](https://redirect.github.com/LuciNyan) in
[https://github.com/vitest-dev/vitest/issues/6382](https://redirect.github.com/vitest-dev/vitest/issues/6382)
[<samp>(fe489)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/fe489432)
- Async assertion auto await should timeout  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[https://github.com/vitest-dev/vitest/issues/6391](https://redirect.github.com/vitest-dev/vitest/issues/6391)
[<samp>(ad6e7)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/ad6e72fc)
-   **snapshot**:
- Reject multiple `toMatchInlineSnapshot` updates at the same location
 -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[https://github.com/vitest-dev/vitest/issues/6332](https://redirect.github.com/vitest-dev/vitest/issues/6332)
[<samp>(1606f)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1606f34f)
- Improve inline snapshot inside loop rejection  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[https://github.com/vitest-dev/vitest/issues/6339](https://redirect.github.com/vitest-dev/vitest/issues/6339)
[<samp>(e0368)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e03683c5)
-   **typecheck**:
- Run both runtime and typecheck tests if `typecheck.include` overlaps
with `include`  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6256](https://redirect.github.com/vitest-dev/vitest/issues/6256)
[<samp>(153ff)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/153ff01b)
-   **types**:
- Allow Callbacks Passed to before\*/after\* to Return Anything  -  by
[@&#8203;LuciNyan](https://redirect.github.com/LuciNyan) in
[https://github.com/vitest-dev/vitest/issues/6393](https://redirect.github.com/vitest-dev/vitest/issues/6393)
[<samp>(f6217)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/f6217a22)
-   **ui**:
- Remove "filters" flickering  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6463](https://redirect.github.com/vitest-dev/vitest/issues/6463)
[<samp>(0223b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0223bb79)
- Render project name consistently  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6329](https://redirect.github.com/vitest-dev/vitest/issues/6329)
[<samp>(94a18)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/94a186ec)
-   **vite-node**:
- Disable watcher if hmr is disabled  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6251](https://redirect.github.com/vitest-dev/vitest/issues/6251)
[<samp>(c51c6)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c51c67aa)
- Fix watch on vite 6  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[https://github.com/vitest-dev/vitest/issues/6422](https://redirect.github.com/vitest-dev/vitest/issues/6422)
[<samp>(c3ac4)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c3ac43c1)
-   **vitest**:
- Update json reporter output  -  by
[@&#8203;Emiyaaaaa](https://redirect.github.com/Emiyaaaaa) in
[https://github.com/vitest-dev/vitest/issues/6064](https://redirect.github.com/vitest-dev/vitest/issues/6064)
[<samp>(c9979)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c997937b)
- Add more type guards for --merge-reports  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6307](https://redirect.github.com/vitest-dev/vitest/issues/6307)
[<samp>(0a5d8)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0a5d8169)
- Always resolve vitest to the root version  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6369](https://redirect.github.com/vitest-dev/vitest/issues/6369)
[<samp>(163d7)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/163d7624)
- Dispose vmForks listeners to avoid memory leak  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6448](https://redirect.github.com/vitest-dev/vitest/issues/6448)
[<samp>(2673c)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/2673c3bb)
-   **workspace**:
- Correctly resolve workspace globs and file paths  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/6316](https://redirect.github.com/vitest-dev/vitest/issues/6316)
[<samp>(afdcb)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/afdcb8f2)

#####     [View changes on
GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v2.0.5...v2.1.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/Johannes-Andersen/Johannes).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC43NC4xIiwidXBkYXRlZEluVmVyIjoiMzguNzQuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsidHlwZS9kZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Saul-Mirone referenced this pull request in toeverything/blocksuite Sep 13, 2024
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@nx/vite](https://nx.dev) ([source](https://redirect.github.com/nrwl/nx/tree/HEAD/packages/vite)) | [`19.7.2` -> `19.7.3`](https://renovatebot.com/diffs/npm/@nx%2fvite/19.7.2/19.7.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@nx%2fvite/19.7.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@nx%2fvite/19.7.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@nx%2fvite/19.7.2/19.7.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@nx%2fvite/19.7.2/19.7.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@vitest/browser](https://redirect.github.com/vitest-dev/vitest/tree/main/packages/browser#readme) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/browser)) | [`2.0.5` -> `2.1.0`](https://renovatebot.com/diffs/npm/@vitest%2fbrowser/2.0.5/2.1.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@vitest%2fbrowser/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@vitest%2fbrowser/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@vitest%2fbrowser/2.0.5/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@vitest%2fbrowser/2.0.5/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@vitest/coverage-istanbul](https://redirect.github.com/vitest-dev/vitest/tree/main/packages/coverage-istanbul#readme) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-istanbul)) | [`2.0.5` -> `2.1.0`](https://renovatebot.com/diffs/npm/@vitest%2fcoverage-istanbul/2.0.5/2.1.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@vitest%2fcoverage-istanbul/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@vitest%2fcoverage-istanbul/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@vitest%2fcoverage-istanbul/2.0.5/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@vitest%2fcoverage-istanbul/2.0.5/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@vitest/ui](https://redirect.github.com/vitest-dev/vitest/tree/main/packages/ui#readme) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/ui)) | [`2.0.5` -> `2.1.0`](https://renovatebot.com/diffs/npm/@vitest%2fui/2.0.5/2.1.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@vitest%2fui/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@vitest%2fui/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@vitest%2fui/2.0.5/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@vitest%2fui/2.0.5/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [happy-dom](https://redirect.github.com/capricorn86/happy-dom) | [`15.7.3` -> `15.7.4`](https://renovatebot.com/diffs/npm/happy-dom/15.7.3/15.7.4) | [![age](https://developer.mend.io/api/mc/badges/age/npm/happy-dom/15.7.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/happy-dom/15.7.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/happy-dom/15.7.3/15.7.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/happy-dom/15.7.3/15.7.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [husky](https://redirect.github.com/typicode/husky) | [`9.1.5` -> `9.1.6`](https://renovatebot.com/diffs/npm/husky/9.1.5/9.1.6) | [![age](https://developer.mend.io/api/mc/badges/age/npm/husky/9.1.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/husky/9.1.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/husky/9.1.5/9.1.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/husky/9.1.5/9.1.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [nx](https://nx.dev) ([source](https://redirect.github.com/nrwl/nx/tree/HEAD/packages/nx)) | [`19.7.2` -> `19.7.3`](https://renovatebot.com/diffs/npm/nx/19.7.2/19.7.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/nx/19.7.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/nx/19.7.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/nx/19.7.2/19.7.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/nx/19.7.2/19.7.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [rollup](https://rollupjs.org/) ([source](https://redirect.github.com/rollup/rollup)) | [`4.21.2` -> `4.21.3`](https://renovatebot.com/diffs/npm/rollup/4.21.2/4.21.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/rollup/4.21.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/rollup/4.21.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/rollup/4.21.2/4.21.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/rollup/4.21.2/4.21.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [shiki](https://redirect.github.com/shikijs/shiki) ([source](https://redirect.github.com/shikijs/shiki/tree/HEAD/packages/shiki)) | [`1.17.0` -> `1.17.5`](https://renovatebot.com/diffs/npm/shiki/1.17.0/1.17.5) | [![age](https://developer.mend.io/api/mc/badges/age/npm/shiki/1.17.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/shiki/1.17.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/shiki/1.17.0/1.17.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/shiki/1.17.0/1.17.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [tsx](https://tsx.is) ([source](https://redirect.github.com/privatenumber/tsx)) | [`4.19.0` -> `4.19.1`](https://renovatebot.com/diffs/npm/tsx/4.19.0/4.19.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/tsx/4.19.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/tsx/4.19.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/tsx/4.19.0/4.19.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/tsx/4.19.0/4.19.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [vitest](https://redirect.github.com/vitest-dev/vitest) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | [`2.0.5` -> `2.1.0`](https://renovatebot.com/diffs/npm/vitest/2.0.5/2.1.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/vitest/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vitest/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vitest/2.0.5/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vitest/2.0.5/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>nrwl/nx (@&#8203;nx/vite)</summary>

### [`v19.7.3`](https://redirect.github.com/nrwl/nx/releases/tag/19.7.3)

[Compare Source](https://redirect.github.com/nrwl/nx/compare/19.7.2...19.7.3)

##### 19.7.3 (2024-09-12)

##### 🚀 Features

-   **core:** import warns when source and destination directories are different ([#&#8203;27875](https://redirect.github.com/nrwl/nx/pull/27875))

##### 🩹 Fixes

-   **core:** handle sync generator failures ([#&#8203;27650](https://redirect.github.com/nrwl/nx/pull/27650))
-   **core:** handle --no-interative for create-nx-workspace ([#&#8203;27702](https://redirect.github.com/nrwl/nx/pull/27702))
-   **core:** respect filenames of inputs when computing task hash ([#&#8203;27873](https://redirect.github.com/nrwl/nx/pull/27873))
-   **core:** handleErrors should display error cause if it exists ([#&#8203;27886](https://redirect.github.com/nrwl/nx/pull/27886))
-   **gradle:** fix gradle app deps ([#&#8203;27865](https://redirect.github.com/nrwl/nx/pull/27865))
-   **js:** keep refs to ignored files and allow opting out of pruning stale refs in typescript sync generator ([#&#8203;27636](https://redirect.github.com/nrwl/nx/pull/27636))
-   **misc:** createNodesV2 plugins should show inference capabilities ([#&#8203;27896](https://redirect.github.com/nrwl/nx/pull/27896))
-   **nx-cloud:** include nxCloudId when generating connect urls ([#&#8203;27882](https://redirect.github.com/nrwl/nx/pull/27882))
-   **webpack:** handle relative paths for additionalEntryPath ([#&#8203;27885](https://redirect.github.com/nrwl/nx/pull/27885))

##### ❤️  Thank You

-   Craigory Coppola [@&#8203;AgentEnder](https://redirect.github.com/AgentEnder)
-   Emily Xiong [@&#8203;xiongemi](https://redirect.github.com/xiongemi)
-   Jack Hsu [@&#8203;jaysoo](https://redirect.github.com/jaysoo)
-   Leosvel Pérez Espinosa [@&#8203;leosvelperez](https://redirect.github.com/leosvelperez)
-   Louie Weng [@&#8203;lourw](https://redirect.github.com/lourw)
-   Nate Jacobs [@&#8203;iAmNathanJ](https://redirect.github.com/iAmNathanJ)

</details>

<details>
<summary>vitest-dev/vitest (@&#8203;vitest/browser)</summary>

### [`v2.1.0`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v2.1.0)

[Compare Source](https://redirect.github.com/vitest-dev/vitest/compare/v2.0.5...v2.1.0)

This release makes another big change to the Browser Mode by introducing [locators API](https://vitest.dev/guide/browser/locators.html):

```ts
test('renders blog posts', async () => {
  const screen = page.render(<Blog />)

  await expect.element(screen.getByRole('heading', { name: 'Blog' })).toBeInTheDocument()

  const [firstPost] = screen.getByRole('listitem').all()

  await firstPost.getByRole('button', { name: 'Delete' }).click()

  expect(screen.getByRole('listitem').all()).toHaveLength(3)
})
```

You can use either [vitest-browser-vue](https://redirect.github.com/vitest-dev/vitest-browser-vue), [vitest-browser-svelte ](https://redirect.github.com/vitest-dev/vitest-browser-svelte) or [vitest-browser-react](https://redirect.github.com/vitest-dev/vitest-browser-react) to render components and make assertions using locators. Locators are also available on the `page` object from `@vitest/browser/context`.

#####    🚀 Features

-   **api**:
    -   Make spec into a class instead of a tuple  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6355](https://redirect.github.com/vitest-dev/vitest/issues/6355) [<samp>(874a1)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/874a121e)
-   **browser**:
    -   Move page.config to server.config, add more docs  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6252](https://redirect.github.com/vitest-dev/vitest/issues/6252) [<samp>(af2b8)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/af2b813c)
    -   Make iframe scalable, improve documentation  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6257](https://redirect.github.com/vitest-dev/vitest/issues/6257) [<samp>(74ca1)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/74ca11a4)
    -   Introduce built-in locators  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6084](https://redirect.github.com/vitest-dev/vitest/issues/6084) [<samp>(3347f)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/3347f83e)
    -   Support v8 coverage  -  by [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/6273](https://redirect.github.com/vitest-dev/vitest/issues/6273) [<samp>(34199)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/34199bdf)
    -   Support `userEvent.upload` in playwright provider  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6442](https://redirect.github.com/vitest-dev/vitest/issues/6442) [<samp>(cf148)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/cf148645)
    -   Support `--inspect`  -  by [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/6433](https://redirect.github.com/vitest-dev/vitest/issues/6433) [<samp>(0499a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0499a315)
    -   Support `--inspect-brk`  -  by [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/6434](https://redirect.github.com/vitest-dev/vitest/issues/6434) [<samp>(7ab0f)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7ab0f4a8)
-   **cli**:
    -   Extend existing list command to output only a list of file names  -  by [@&#8203;Ma-hawaj](https://redirect.github.com/Ma-hawaj) and [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6392](https://redirect.github.com/vitest-dev/vitest/issues/6392) [<samp>(008f0)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/008f00b2)
-   **coverage**:
    -   Add `--exclude-after-remap`  -  by [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/6309](https://redirect.github.com/vitest-dev/vitest/issues/6309) [<samp>(5932a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/5932a7f9)
-   **mocker**:
    -   Introduce [@&#8203;vitest/mocker](https://redirect.github.com/vitest/mocker) package, allow `{ spy: true }` instead of a factory  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6289](https://redirect.github.com/vitest-dev/vitest/issues/6289) [<samp>(95f02)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/95f0203f)
-   **vitest**:
    -   Add "provide" option  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6253](https://redirect.github.com/vitest-dev/vitest/issues/6253) [<samp>(4409d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/4409d779)
    -   Add return type and promisable mockFactory  -  by [@&#8203;syi0808](https://redirect.github.com/syi0808) and [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6139](https://redirect.github.com/vitest-dev/vitest/issues/6139) [<samp>(f5e0b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/f5e0b987)
    -   Add `vi.advanceTimersToNextFrame`  -  by [@&#8203;bnjm](https://redirect.github.com/bnjm) and [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6347](https://redirect.github.com/vitest-dev/vitest/issues/6347) [<samp>(8ff63)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/8ff63560)
    -   Allow env to be stubbed to undefined  -  by [@&#8203;JSanchezIO](https://redirect.github.com/JSanchezIO) and [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6359](https://redirect.github.com/vitest-dev/vitest/issues/6359) [<samp>(c3b27)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c3b2757c)

#####    🐞 Bug Fixes

-   Correctly resolve nested mocks with `index` file  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6266](https://redirect.github.com/vitest-dev/vitest/issues/6266) [<samp>(081cf)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/081cfe03)
-   Don't panic when coverage.reporter is a string  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6267](https://redirect.github.com/vitest-dev/vitest/issues/6267) [<samp>(7b37d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7b37d27b)
-   Align RawMatcherFn type definition with Jest  -  by [@&#8203;wheresrhys](https://redirect.github.com/wheresrhys) in [https://github.com/vitest-dev/vitest/issues/6351](https://redirect.github.com/vitest-dev/vitest/issues/6351) [<samp>(d09f0)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/d09f00c7)
-   Cjs build of vite node server  -  by [@&#8203;AkaraChen](https://redirect.github.com/AkaraChen) in [https://github.com/vitest-dev/vitest/issues/6389](https://redirect.github.com/vitest-dev/vitest/issues/6389) [<samp>(12e70)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/12e702bd)
-   Allow inlining vite's cached dependencies  -  by [@&#8203;chriswheeldon-peakon](https://redirect.github.com/chriswheeldon-peakon) in [https://github.com/vitest-dev/vitest/issues/6284](https://redirect.github.com/vitest-dev/vitest/issues/6284) [<samp>(03208)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/03208017)
-   Print unexpected error message if peer dependencies have a different version  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6446](https://redirect.github.com/vitest-dev/vitest/issues/6446) [<samp>(b992b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/b992b346)
-   Ignore importer when resolving Vitest  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6469](https://redirect.github.com/vitest-dev/vitest/issues/6469) [<samp>(0b447)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0b447226)
-   `expect.getState().testPath` always returns correct path  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6472](https://redirect.github.com/vitest-dev/vitest/issues/6472) [<samp>(ac698)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/ac698b1c)
-   UserEvent works consistently between providers  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6480](https://redirect.github.com/vitest-dev/vitest/issues/6480) [<samp>(0b4da)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0b4da69e)
-   **browser**:
    -   Print correct stack trace for unhandled errors  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6134](https://redirect.github.com/vitest-dev/vitest/issues/6134) [<samp>(1da6c)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1da6cebe)
    -   Use documentElement as the root for selector  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) [<samp>(d8077)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/d807767f)
    -   Keep querying elements even if locator is created with elementLocator, add pubic @&#8203;vitest/browser/utils  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6296](https://redirect.github.com/vitest-dev/vitest/issues/6296) [<samp>(30dc5)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/30dc5793)
    -   Produce valid config file if preview provider is used  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6305](https://redirect.github.com/vitest-dev/vitest/issues/6305) [<samp>(7f0ae)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7f0ae292)
    -   Correctly run in-source tests in the browser  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6440](https://redirect.github.com/vitest-dev/vitest/issues/6440) [<samp>(c8531)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c853126e)
    -   Exclude missed packages from optimization, print help message  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6445](https://redirect.github.com/vitest-dev/vitest/issues/6445) [<samp>(8d883)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/8d883cf0)
    -   Define mocker as a dependency  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6476](https://redirect.github.com/vitest-dev/vitest/issues/6476) [<samp>(9560a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/9560ab7f)
-   **coverage**:
    -   Warn if `vitest` and `@vitest/*` versions don't match  -  by [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/6317](https://redirect.github.com/vitest-dev/vitest/issues/6317) [<samp>(e662c)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e662c7b2)
    -   V8 to support source maps with multiple sources  -  by [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) and [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6120](https://redirect.github.com/vitest-dev/vitest/issues/6120) [<samp>(1f6cb)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1f6cb59f)
    -   V8 to warn instead of crash when conversion fails  -  by [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/6318](https://redirect.github.com/vitest-dev/vitest/issues/6318) [<samp>(91dea)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/91dea8c1)
    -   Use project specific `vitenode` for uncovered files  -  by [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/6044](https://redirect.github.com/vitest-dev/vitest/issues/6044) [<samp>(da52d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/da52d23f)
-   **runner**:
    -   Use `performance.now` instead of `Date.now` for duration  -  by [@&#8203;LuciNyan](https://redirect.github.com/LuciNyan) in [https://github.com/vitest-dev/vitest/issues/6382](https://redirect.github.com/vitest-dev/vitest/issues/6382) [<samp>(fe489)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/fe489432)
    -   Async assertion auto await should timeout  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/6391](https://redirect.github.com/vitest-dev/vitest/issues/6391) [<samp>(ad6e7)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/ad6e72fc)
-   **snapshot**:
    -   Reject multiple `toMatchInlineSnapshot` updates at the same location  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/6332](https://redirect.github.com/vitest-dev/vitest/issues/6332) [<samp>(1606f)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1606f34f)
    -   Improve inline snapshot inside loop rejection  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/6339](https://redirect.github.com/vitest-dev/vitest/issues/6339) [<samp>(e0368)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e03683c5)
-   **typecheck**:
    -   Run both runtime and typecheck tests if `typecheck.include` overlaps with `include`  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6256](https://redirect.github.com/vitest-dev/vitest/issues/6256) [<samp>(153ff)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/153ff01b)
-   **types**:
    -   Allow Callbacks Passed to before\*/after\* to Return Anything  -  by [@&#8203;LuciNyan](https://redirect.github.com/LuciNyan) in [https://github.com/vitest-dev/vitest/issues/6393](https://redirect.github.com/vitest-dev/vitest/issues/6393) [<samp>(f6217)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/f6217a22)
-   **ui**:
    -   Remove "filters" flickering  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6463](https://redirect.github.com/vitest-dev/vitest/issues/6463) [<samp>(0223b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0223bb79)
    -   Render project name consistently  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6329](https://redirect.github.com/vitest-dev/vitest/issues/6329) [<samp>(94a18)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/94a186ec)
-   **vite-node**:
    -   Disable watcher if hmr is disabled  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6251](https://redirect.github.com/vitest-dev/vitest/issues/6251) [<samp>(c51c6)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c51c67aa)
    -   Fix watch on vite 6  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/6422](https://redirect.github.com/vitest-dev/vitest/issues/6422) [<samp>(c3ac4)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c3ac43c1)
-   **vitest**:
    -   Update json reporter output  -  by [@&#8203;Emiyaaaaa](https://redirect.github.com/Emiyaaaaa) in [https://github.com/vitest-dev/vitest/issues/6064](https://redirect.github.com/vitest-dev/vitest/issues/6064) [<samp>(c9979)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c997937b)
    -   Add more type guards for --merge-reports  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6307](https://redirect.github.com/vitest-dev/vitest/issues/6307) [<samp>(0a5d8)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0a5d8169)
    -   Always resolve vitest to the root version  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6369](https://redirect.github.com/vitest-dev/vitest/issues/6369) [<samp>(163d7)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/163d7624)
    -   Dispose vmForks listeners to avoid memory leak  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6448](https://redirect.github.com/vitest-dev/vitest/issues/6448) [<samp>(2673c)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/2673c3bb)
-   **workspace**:
    -   Correctly resolve workspace globs and file paths  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/6316](https://redirect.github.com/vitest-dev/vitest/issues/6316) [<samp>(afdcb)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/afdcb8f2)

#####     [View changes on GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v2.0.5...v2.1.0)

</details>

<details>
<summary>capricorn86/happy-dom (happy-dom)</summary>

### [`v15.7.4`](https://redirect.github.com/capricorn86/happy-dom/compare/v15.7.3...afd256b2e4f0260adb22432c1a354f558cda6623)

[Compare Source](https://redirect.github.com/capricorn86/happy-dom/compare/v15.7.3...v15.7.4)

</details>

<details>
<summary>typicode/husky (husky)</summary>

### [`v9.1.6`](https://redirect.github.com/typicode/husky/compare/v9.1.5...a2d942a670b3d6a04578005a0fd2dc310e511849)

[Compare Source](https://redirect.github.com/typicode/husky/compare/v9.1.5...v9.1.6)

</details>

<details>
<summary>rollup/rollup (rollup)</summary>

### [`v4.21.3`](https://redirect.github.com/rollup/rollup/blob/HEAD/CHANGELOG.md#4213)

[Compare Source](https://redirect.github.com/rollup/rollup/compare/v4.21.2...v4.21.3)

*2024-09-12*

##### Bug Fixes

-   Always respect side effects in left-hand side of optional chain ([#&#8203;5642](https://redirect.github.com/rollup/rollup/issues/5642))
-   Update stack trace for augmented errors to not hide relevant information ([#&#8203;5640](https://redirect.github.com/rollup/rollup/issues/5640))

##### Pull Requests

-   [#&#8203;5636](https://redirect.github.com/rollup/rollup/pull/5636): chore(deps): lock file maintenance minor/patch updates ([@&#8203;renovate](https://redirect.github.com/renovate)\[bot])
-   [#&#8203;5637](https://redirect.github.com/rollup/rollup/pull/5637): chore(deps): lock file maintenance ([@&#8203;renovate](https://redirect.github.com/renovate)\[bot])
-   [#&#8203;5640](https://redirect.github.com/rollup/rollup/pull/5640): fix: keep the message of stack up-to-date ([@&#8203;TrickyPi](https://redirect.github.com/TrickyPi))
-   [#&#8203;5642](https://redirect.github.com/rollup/rollup/pull/5642): fix: include left-side effect of optional chaining in the end of hasEffectsAsChainElement ([@&#8203;TrickyPi](https://redirect.github.com/TrickyPi))

</details>

<details>
<summary>shikijs/shiki (shiki)</summary>

### [`v1.17.5`](https://redirect.github.com/shikijs/shiki/releases/tag/v1.17.5)

[Compare Source](https://redirect.github.com/shikijs/shiki/compare/v1.17.4...v1.17.5)

#####    🚀 Features

-   Update grammars  -  by [@&#8203;antfu](https://redirect.github.com/antfu) [<samp>(b61e4)</samp>](https://redirect.github.com/shikijs/shiki/commit/b61e4e31)
-   **engine-js**:
    -   Supports contiguous anchor simulation  -  by [@&#8203;antfu](https://redirect.github.com/antfu) [<samp>(43ecc)</samp>](https://redirect.github.com/shikijs/shiki/commit/43ecce79)
    -   Introduce `simulation` option  -  by [@&#8203;antfu](https://redirect.github.com/antfu) [<samp>(adf99)</samp>](https://redirect.github.com/shikijs/shiki/commit/adf99f2f)

#####     [View changes on GitHub](https://redirect.github.com/shikijs/shiki/compare/v1.17.4...v1.17.5)

### [`v1.17.4`](https://redirect.github.com/shikijs/shiki/releases/tag/v1.17.4)

[Compare Source](https://redirect.github.com/shikijs/shiki/compare/v1.17.0...v1.17.4)

*No significant changes*

#####     [View changes on GitHub](https://redirect.github.com/shikijs/shiki/compare/v1.17.3...v1.17.4)

</details>

<details>
<summary>privatenumber/tsx (tsx)</summary>

### [`v4.19.1`](https://redirect.github.com/privatenumber/tsx/compare/v4.19.0...0329bfc731346d6c8b6055c7f2882e5c3155a7ec)

[Compare Source](https://redirect.github.com/privatenumber/tsx/compare/v4.19.0...v4.19.1)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/blocksuite).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC43NC4xIiwidXBkYXRlZEluVmVyIjoiMzguNzQuMSIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6W119-->
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.

Test with expect(promise).resolves with promise that never resolves and without await hangs
2 participants