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: show correct stack trace in errors and console #2248

Merged
merged 15 commits into from
Nov 7, 2022

Conversation

sheremet-va
Copy link
Member

@sheremet-va sheremet-va commented Oct 31, 2022

Fixes #2231
Fixes #1331
Fixes #2211
Fixes #2195

We might want to update to @cspotcode/source-map-support, but currently it doesn't work with fastify: cspotcode/node-source-map-support#44

packages/coverage-c8/src/provider.ts Outdated Show resolved Hide resolved
packages/vitest/src/runtime/setup.ts Outdated Show resolved Hide resolved
@sheremet-va sheremet-va changed the title fix: fix stack trace in errors and console fix: show correct stack trace in errors and console Oct 31, 2022
@sheremet-va
Copy link
Member Author

@haikyuu hey, tests with imba are failing with this PR. I checked source maps with https://sokra.github.io/source-map-visualization/#custom and it seems they are wrong? I wonder how it worked before 🤔 Can you help me with figuring this out?

@haikyuu
Copy link
Contributor

haikyuu commented Oct 31, 2022

@sheremet-va let me look at this tomorrow (it's night for me now). Fun thing is that I was planning on fixing source maps in Imba as well.

@antfu antfu modified the milestones: Next, 0.25.0 Nov 1, 2022
@haikyuu
Copy link
Contributor

haikyuu commented Nov 1, 2022

@sheremet-va the sourcemaps in the test seem to be correct here

@sheremet-va
Copy link
Member Author

sheremet-va commented Nov 1, 2022

@sheremet-va the sourcemaps in the test seem to be correct here

This is not what is actually running tho. This is the final code:

/*body*/
const __vite_ssr_import_0__ = await __vite_ssr_import__("/@fs/<path>/Projects/vitest/packages/vitest/dist/index.js");


function add(...args){

        return args.reduce(function(a,b) { return a + b; },0);
}
Object.defineProperty(__vite_ssr_exports__, "add", { enumerable: true, configurable: true, get(){ return add }});;

__vite_ssr_import_0__.it("add",function() {

        __vite_ssr_import_0__.expect(add()).toBe(0);
        __vite_ssr_import_0__.expect(add(1)).toBe(3);
        return __vite_ssr_import_0__.expect(add(1,2,3)).toBe(6);
});

For some reason source map is not updated, when transformed with SSR 🤔 @antfu do you know what can be the cause for this?

@sheremet-va
Copy link
Member Author

sheremet-va commented Nov 1, 2022

Hm, it seems imba files return inlined maps in transformRequest 🤔 So we don't inline updated source map, and use theirs

@haikyuu is there any reason why you inline source maps instead of relying on Vite support?

@haikyuu
Copy link
Contributor

haikyuu commented Nov 1, 2022

@sheremet-va let me check

@sheremet-va
Copy link
Member Author

@sheremet-va let me check

So, I checked other plugins (Vue, for example), and I see they return source map in Rollup convention way inside map property in transform hook, so other tools/plugins can reuse them. I would expect imba to do the same in this case 🤔

I would appose replacing source provided inlined maps, because we might replace our own source maps several times, which might case performance issues.

If I remove inlined source maps from a plugin, tests pass.

@haikyuu
Copy link
Contributor

haikyuu commented Nov 2, 2022

@sheremet-va I tested providing external source maps in the imba plugin. And it works correctly now 💯

@antfu antfu merged commit 90c1801 into vitest-dev:main Nov 7, 2022
renovate bot referenced this pull request in fwouts/previewjs Nov 10, 2022
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [vitest](https://togithub.com/vitest-dev/vitest) | [`0.24.5` ->
`0.25.1`](https://renovatebot.com/diffs/npm/vitest/0.24.5/0.25.1) |
[![age](https://badges.renovateapi.com/packages/npm/vitest/0.25.1/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/vitest/0.25.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/vitest/0.25.1/compatibility-slim/0.24.5)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/vitest/0.25.1/confidence-slim/0.24.5)](https://docs.renovatebot.com/merge-confidence/)
|
| [vitest](https://togithub.com/vitest-dev/vitest) | [`0.24.3` ->
`0.25.1`](https://renovatebot.com/diffs/npm/vitest/0.24.3/0.25.1) |
[![age](https://badges.renovateapi.com/packages/npm/vitest/0.25.1/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/vitest/0.25.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/vitest/0.25.1/compatibility-slim/0.24.3)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/vitest/0.25.1/confidence-slim/0.24.3)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>vitest-dev/vitest</summary>

###
[`v0.25.1`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.25.1)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.25.0...v0.25.1)

#####    🚀 Features

- Add `vi.setConfig` helper  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2293](https://togithub.com/vitest-dev/vitest/issues/2293)
- Allow hooks to be executed in a stack or list  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2294](https://togithub.com/vitest-dev/vitest/issues/2294)

#####    🐞 Bug Fixes

- Always rewrite defined jsdom keys  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2290](https://togithub.com/vitest-dev/vitest/issues/2290)
- Default reporter regression  -  by
[@&#8203;antfu](https://togithub.com/antfu) in
[https://github.com/vitest-dev/vitest/issues/2292](https://togithub.com/vitest-dev/vitest/issues/2292)
- Don't fail `bench` when using options  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[https://github.com/vitest-dev/vitest/issues/2295](https://togithub.com/vitest-dev/vitest/issues/2295)

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.25.0...v0.25.1)

###
[`v0.25.0`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.25.0)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.24.5...v0.25.0)

#####    ✅ Builtin TypeChecking

In v0.25.0, Vitest allows you to write tests for your types, using
`expectTypeOf` or `assertType` syntaxes. By default all tests inside
`*.test-d.ts` files are considered type tests. Run `vitest typecheck` to
run type tests.

```ts
// my.test-d.ts
import { assertType, expectTypeOf } from 'vitest'
import { mount } from './mount.js'

test('my types work properly', () => {
  expectTypeOf(mount).toBeFunction()
  expectTypeOf(mount).parameter(0).toMatchTypeOf<{ name: string }>()

  // @&#8203;ts-expect-error name is a string
  assertType(mount({ name: 42 }))
})
```

Learn more at [the
documentation](https://vitest.dev/guide/testing-types.html) and this
[RFC](https://togithub.com/vitest-dev/vitest/issues/1954)

#####    🚨 Breaking Changes

- Return context in `startVitest()`  -  by
[@&#8203;antfu](https://togithub.com/antfu) in
[https://github.com/vitest-dev/vitest/issues/2072](https://togithub.com/vitest-dev/vitest/issues/2072)

#####    🚀 Features

- `onTestFailed` hook  -  by [@&#8203;antfu](https://togithub.com/antfu)
in
[https://github.com/vitest-dev/vitest/issues/2210](https://togithub.com/vitest-dev/vitest/issues/2210)
- Display error frame if present (like Vite)  -  by
[@&#8203;haikyuu](https://togithub.com/haikyuu) and
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2257](https://togithub.com/vitest-dev/vitest/issues/2257)
- Benchmark table report  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[https://github.com/vitest-dev/vitest/issues/2179](https://togithub.com/vitest-dev/vitest/issues/2179)
- Add typechecking functionality  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) and
[@&#8203;antfu](https://togithub.com/antfu) in
[https://github.com/vitest-dev/vitest/issues/2107](https://togithub.com/vitest-dev/vitest/issues/2107)

#####    🐞 Bug Fixes

- Clear full screen only in watch mode  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va)
[<samp>(c3d89)</samp>](https://togithub.com/vitest-dev/vitest/commit/c3d89504)
- Don't serialize symbols and immutables  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2266](https://togithub.com/vitest-dev/vitest/issues/2266)
- Use --conditions instead of -C  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2267](https://togithub.com/vitest-dev/vitest/issues/2267)
- Show correct stack trace in errors and console  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) and
[@&#8203;antfu](https://togithub.com/antfu) in
[https://github.com/vitest-dev/vitest/issues/2248](https://togithub.com/vitest-dev/vitest/issues/2248)
- Align `.each` behavior with jest  -  by
[@&#8203;bartoszgolebiowski](https://togithub.com/bartoszgolebiowski)
and [@&#8203;antfu](https://togithub.com/antfu) in
[https://github.com/vitest-dev/vitest/issues/2064](https://togithub.com/vitest-dev/vitest/issues/2064)
- Remove undefined values in options  -  by
[@&#8203;g4rry420](https://togithub.com/g4rry420) and
[@&#8203;antfu](https://togithub.com/antfu) in
[https://github.com/vitest-dev/vitest/issues/2281](https://togithub.com/vitest-dev/vitest/issues/2281)
- **coverage**: Istanbul provider to preserve implicit else  -  by
[@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/2275](https://togithub.com/vitest-dev/vitest/issues/2275)

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.24.5...v0.25.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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/fwouts/previewjs).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xOS4wIiwidXBkYXRlZEluVmVyIjoiMzQuMTkuMCJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
ivarconr referenced this pull request in Unleash/unleash Nov 10, 2022
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [vitest](https://togithub.com/vitest-dev/vitest) | [`0.24.3` ->
`0.25.1`](https://renovatebot.com/diffs/npm/vitest/0.24.3/0.25.1) |
[![age](https://badges.renovateapi.com/packages/npm/vitest/0.25.1/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/vitest/0.25.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/vitest/0.25.1/compatibility-slim/0.24.3)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/vitest/0.25.1/confidence-slim/0.24.3)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>vitest-dev/vitest</summary>

###
[`v0.25.1`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.25.1)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.25.0...v0.25.1)

#####    🚀 Features

- Add `vi.setConfig` helper  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2293](https://togithub.com/vitest-dev/vitest/issues/2293)
- Allow hooks to be executed in a stack or list  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2294](https://togithub.com/vitest-dev/vitest/issues/2294)

#####    🐞 Bug Fixes

- Always rewrite defined jsdom keys  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2290](https://togithub.com/vitest-dev/vitest/issues/2290)
- Default reporter regression  -  by
[@&#8203;antfu](https://togithub.com/antfu) in
[https://github.com/vitest-dev/vitest/issues/2292](https://togithub.com/vitest-dev/vitest/issues/2292)
- Don't fail `bench` when using options  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[https://github.com/vitest-dev/vitest/issues/2295](https://togithub.com/vitest-dev/vitest/issues/2295)

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.25.0...v0.25.1)

###
[`v0.25.0`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.25.0)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.24.5...v0.25.0)

#####    ✅ Builtin TypeChecking

In v0.25.0, Vitest allows you to write tests for your types, using
`expectTypeOf` or `assertType` syntaxes. By default all tests inside
`*.test-d.ts` files are considered type tests. Run `vitest typecheck` to
run type tests.

```ts
// my.test-d.ts
import { assertType, expectTypeOf } from 'vitest'
import { mount } from './mount.js'

test('my types work properly', () => {
  expectTypeOf(mount).toBeFunction()
  expectTypeOf(mount).parameter(0).toMatchTypeOf<{ name: string }>()

  // @&#8203;ts-expect-error name is a string
  assertType(mount({ name: 42 }))
})
```

Learn more at [the
documentation](https://vitest.dev/guide/testing-types.html) and this
[RFC](https://togithub.com/vitest-dev/vitest/issues/1954)

#####    🚨 Breaking Changes

- Return context in `startVitest()`  -  by
[@&#8203;antfu](https://togithub.com/antfu) in
[https://github.com/vitest-dev/vitest/issues/2072](https://togithub.com/vitest-dev/vitest/issues/2072)

#####    🚀 Features

- `onTestFailed` hook  -  by [@&#8203;antfu](https://togithub.com/antfu)
in
[https://github.com/vitest-dev/vitest/issues/2210](https://togithub.com/vitest-dev/vitest/issues/2210)
- Display error frame if present (like Vite)  -  by
[@&#8203;haikyuu](https://togithub.com/haikyuu) and
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2257](https://togithub.com/vitest-dev/vitest/issues/2257)
- Benchmark table report  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[https://github.com/vitest-dev/vitest/issues/2179](https://togithub.com/vitest-dev/vitest/issues/2179)
- Add typechecking functionality  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) and
[@&#8203;antfu](https://togithub.com/antfu) in
[https://github.com/vitest-dev/vitest/issues/2107](https://togithub.com/vitest-dev/vitest/issues/2107)

#####    🐞 Bug Fixes

- Clear full screen only in watch mode  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va)
[<samp>(c3d89)</samp>](https://togithub.com/vitest-dev/vitest/commit/c3d89504)
- Don't serialize symbols and immutables  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2266](https://togithub.com/vitest-dev/vitest/issues/2266)
- Use --conditions instead of -C  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2267](https://togithub.com/vitest-dev/vitest/issues/2267)
- Show correct stack trace in errors and console  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) and
[@&#8203;antfu](https://togithub.com/antfu) in
[https://github.com/vitest-dev/vitest/issues/2248](https://togithub.com/vitest-dev/vitest/issues/2248)
- Align `.each` behavior with jest  -  by
[@&#8203;bartoszgolebiowski](https://togithub.com/bartoszgolebiowski)
and [@&#8203;antfu](https://togithub.com/antfu) in
[https://github.com/vitest-dev/vitest/issues/2064](https://togithub.com/vitest-dev/vitest/issues/2064)
- Remove undefined values in options  -  by
[@&#8203;g4rry420](https://togithub.com/g4rry420) and
[@&#8203;antfu](https://togithub.com/antfu) in
[https://github.com/vitest-dev/vitest/issues/2281](https://togithub.com/vitest-dev/vitest/issues/2281)
- **coverage**: Istanbul provider to preserve implicit else  -  by
[@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/2275](https://togithub.com/vitest-dev/vitest/issues/2275)

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.24.5...v0.25.0)

###
[`v0.24.5`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.24.5)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.24.4...v0.24.5)

#####    🚀 Features

- **vite-node**: Trigger beforeFullReload / beforePrune / invalidate
hook  -  by [@&#8203;ycmjason](https://togithub.com/ycmjason) in
[https://github.com/vitest-dev/vitest/issues/2079](https://togithub.com/vitest-dev/vitest/issues/2079)

#####    🐞 Bug Fixes

- Respect folders with dot at the start, when mocking  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2244](https://togithub.com/vitest-dev/vitest/issues/2244)
- Prevent using mocks in rpc  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2254](https://togithub.com/vitest-dev/vitest/issues/2254)
- Show actual unhandled errors, serialize DOMErrors  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2253](https://togithub.com/vitest-dev/vitest/issues/2253)
- Load deps reporter  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[https://github.com/vitest-dev/vitest/issues/2249](https://togithub.com/vitest-dev/vitest/issues/2249)

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.24.4...v0.24.5)

###
[`v0.24.4`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.24.4)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.24.3...v0.24.4)

#####    🚀 Features

- **vite-node**: Don't exit on uncaughtException in watch mode  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[https://github.com/vitest-dev/vitest/issues/2186](https://togithub.com/vitest-dev/vitest/issues/2186)

#####    🐞 Bug Fixes

- Add/Update `repository` properties in `package.json`  -  by
[@&#8203;silverwind](https://togithub.com/silverwind) in
[https://github.com/vitest-dev/vitest/issues/2151](https://togithub.com/vitest-dev/vitest/issues/2151)
- Ignore benchmark.reporters in getSerializableConfig  -  by
[@&#8203;kainstar](https://togithub.com/kainstar) in
[https://github.com/vitest-dev/vitest/issues/2164](https://togithub.com/vitest-dev/vitest/issues/2164)
- Improve config's default exclude  -  by
[@&#8203;haikyuu](https://togithub.com/haikyuu) and
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2188](https://togithub.com/vitest-dev/vitest/issues/2188)
- Always use node condition  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/1919](https://togithub.com/vitest-dev/vitest/issues/1919)
- Clear terminal output before running tests, show errors in correct
order  -  by [@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2228](https://togithub.com/vitest-dev/vitest/issues/2228)
- Improve compatibility with native Node CJS resolution  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2226](https://togithub.com/vitest-dev/vitest/issues/2226)
- Don't use resolved paths if they don't actually exist  -  by
[@&#8203;simon-abbott](https://togithub.com/simon-abbott) in
[https://github.com/vitest-dev/vitest/issues/1868](https://togithub.com/vitest-dev/vitest/issues/1868)
-   **cli**:
- Set inputNamePattern to RegExp source instead of string  -  by
[@&#8203;rafedramzi](https://togithub.com/rafedramzi) in
[https://github.com/vitest-dev/vitest/issues/2201](https://togithub.com/vitest-dev/vitest/issues/2201)
- Normalize argument path  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[https://github.com/vitest-dev/vitest/issues/2180](https://togithub.com/vitest-dev/vitest/issues/2180)
-   **coverage**:
- Trim URL parameters from file paths in istanbul coverage  -  by
[@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/2232](https://togithub.com/vitest-dev/vitest/issues/2232)
- Trim URL parameters from file paths in c8 coverage  -  by
[@&#8203;OrestHk](https://togithub.com/OrestHk) and
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2181](https://togithub.com/vitest-dev/vitest/issues/2181)
-   **reporter**:
- Load custom reporter using `executeFile`  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[https://github.com/vitest-dev/vitest/issues/2184](https://togithub.com/vitest-dev/vitest/issues/2184)
-   **vitest**:
- Return detailed error when using toHaveReturnedWith  -  by
[@&#8203;azaleta](https://togithub.com/azaleta) in
[https://github.com/vitest-dev/vitest/issues/2163](https://togithub.com/vitest-dev/vitest/issues/2163)

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.24.3...v0.24.4)

</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 this update
again.

---

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

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/Unleash/unleash).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xOS4wIiwidXBkYXRlZEluVmVyIjoiMzQuMTkuMCJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
andipaetzold referenced this pull request in andipaetzold/react-firehooks Nov 25, 2022
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@vitest/coverage-c8](https://togithub.com/vitest-dev/vitest) |
[`0.24.3` ->
`0.25.3`](https://renovatebot.com/diffs/npm/@vitest%2fcoverage-c8/0.24.3/0.25.3)
|
[![age](https://badges.renovateapi.com/packages/npm/@vitest%2fcoverage-c8/0.25.3/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@vitest%2fcoverage-c8/0.25.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@vitest%2fcoverage-c8/0.25.3/compatibility-slim/0.24.3)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@vitest%2fcoverage-c8/0.25.3/confidence-slim/0.24.3)](https://docs.renovatebot.com/merge-confidence/)
|
| [vitest](https://togithub.com/vitest-dev/vitest) | [`0.24.3` ->
`0.25.3`](https://renovatebot.com/diffs/npm/vitest/0.24.3/0.25.3) |
[![age](https://badges.renovateapi.com/packages/npm/vitest/0.25.3/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/vitest/0.25.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/vitest/0.25.3/compatibility-slim/0.24.3)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/vitest/0.25.3/confidence-slim/0.24.3)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>vitest-dev/vitest</summary>

###
[`v0.25.3`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.25.3)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.25.2...v0.25.3)

#####    🚀 Features

- Test.each support string template  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[https://github.com/vitest-dev/vitest/issues/2337](https://togithub.com/vitest-dev/vitest/issues/2337)
[<samp>(f7897)</samp>](https://togithub.com/vitest-dev/vitest/commit/f7897765)

#####    🐞 Bug Fixes

- Junit consistently puts "skipped" inside "testcase"  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va)
[<samp>(f7b27)</samp>](https://togithub.com/vitest-dev/vitest/commit/f7b27af0)
- Detect tests in folders starting with `.`  -  by
[@&#8203;sidharthv96](https://togithub.com/sidharthv96) in
[https://github.com/vitest-dev/vitest/issues/2344](https://togithub.com/vitest-dev/vitest/issues/2344)
and
[https://github.com/vitest-dev/vitest/issues/2359](https://togithub.com/vitest-dev/vitest/issues/2359)
[<samp>(c3951)</samp>](https://togithub.com/vitest-dev/vitest/commit/c395177f)
- **cli**: Don't override config by setting cli options to undefined  - 
by [@&#8203;rmehner](https://togithub.com/rmehner) in
[https://github.com/vitest-dev/vitest/issues/2330](https://togithub.com/vitest-dev/vitest/issues/2330)
[<samp>(6ce3e)</samp>](https://togithub.com/vitest-dev/vitest/commit/6ce3ed7f)
- **coverage**: Env-replacer to add filenames into sourcemaps  -  by
[@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/2338](https://togithub.com/vitest-dev/vitest/issues/2338)
[<samp>(a2e9d)</samp>](https://togithub.com/vitest-dev/vitest/commit/a2e9daf6)
- **mocker**: Clear automocked modules on unmock  -  by
[@&#8203;mcous](https://togithub.com/mcous) in
[https://github.com/vitest-dev/vitest/issues/2353](https://togithub.com/vitest-dev/vitest/issues/2353)
[<samp>(60918)</samp>](https://togithub.com/vitest-dev/vitest/commit/609185bd)

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.25.2...v0.25.3)

###
[`v0.25.2`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.25.2)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.25.1...v0.25.2)

#####    🐞 Bug Fixes

- Dates are equal, if both are invalid  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2326](https://togithub.com/vitest-dev/vitest/issues/2326)
- Don't ignore properties, when put on a default function in CJS context
 -  by [@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2325](https://togithub.com/vitest-dev/vitest/issues/2325)

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.25.1...v0.25.2)

###
[`v0.25.1`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.25.1)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.25.0...v0.25.1)

#####    🚀 Features

- Add `vi.setConfig` helper  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2293](https://togithub.com/vitest-dev/vitest/issues/2293)
- Allow hooks to be executed in a stack or list  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2294](https://togithub.com/vitest-dev/vitest/issues/2294)

#####    🐞 Bug Fixes

- Always rewrite defined jsdom keys  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2290](https://togithub.com/vitest-dev/vitest/issues/2290)
- Default reporter regression  -  by
[@&#8203;antfu](https://togithub.com/antfu) in
[https://github.com/vitest-dev/vitest/issues/2292](https://togithub.com/vitest-dev/vitest/issues/2292)
- Don't fail `bench` when using options  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[https://github.com/vitest-dev/vitest/issues/2295](https://togithub.com/vitest-dev/vitest/issues/2295)

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.25.0...v0.25.1)

###
[`v0.25.0`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.25.0)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.24.5...v0.25.0)

#####    ✅ Builtin TypeChecking

In v0.25.0, Vitest allows you to write tests for your types, using
`expectTypeOf` or `assertType` syntaxes. By default all tests inside
`*.test-d.ts` files are considered type tests. Run `vitest typecheck` to
run type tests.

```ts
// my.test-d.ts
import { assertType, expectTypeOf } from 'vitest'
import { mount } from './mount.js'

test('my types work properly', () => {
  expectTypeOf(mount).toBeFunction()
  expectTypeOf(mount).parameter(0).toMatchTypeOf<{ name: string }>()

  // @&#8203;ts-expect-error name is a string
  assertType(mount({ name: 42 }))
})
```

Learn more at [the
documentation](https://vitest.dev/guide/testing-types.html) and this
[RFC](https://togithub.com/vitest-dev/vitest/issues/1954)

#####    🚨 Breaking Changes

- Return context in `startVitest()`  -  by
[@&#8203;antfu](https://togithub.com/antfu) in
[https://github.com/vitest-dev/vitest/issues/2072](https://togithub.com/vitest-dev/vitest/issues/2072)

#####    🚀 Features

- `onTestFailed` hook  -  by [@&#8203;antfu](https://togithub.com/antfu)
in
[https://github.com/vitest-dev/vitest/issues/2210](https://togithub.com/vitest-dev/vitest/issues/2210)
- Display error frame if present (like Vite)  -  by
[@&#8203;haikyuu](https://togithub.com/haikyuu) and
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2257](https://togithub.com/vitest-dev/vitest/issues/2257)
- Benchmark table report  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[https://github.com/vitest-dev/vitest/issues/2179](https://togithub.com/vitest-dev/vitest/issues/2179)
- Add typechecking functionality  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) and
[@&#8203;antfu](https://togithub.com/antfu) in
[https://github.com/vitest-dev/vitest/issues/2107](https://togithub.com/vitest-dev/vitest/issues/2107)

#####    🐞 Bug Fixes

- Clear full screen only in watch mode  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va)
[<samp>(c3d89)</samp>](https://togithub.com/vitest-dev/vitest/commit/c3d89504)
- Don't serialize symbols and immutables  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2266](https://togithub.com/vitest-dev/vitest/issues/2266)
- Use --conditions instead of -C  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2267](https://togithub.com/vitest-dev/vitest/issues/2267)
- Show correct stack trace in errors and console  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) and
[@&#8203;antfu](https://togithub.com/antfu) in
[https://github.com/vitest-dev/vitest/issues/2248](https://togithub.com/vitest-dev/vitest/issues/2248)
- Align `.each` behavior with jest  -  by
[@&#8203;bartoszgolebiowski](https://togithub.com/bartoszgolebiowski)
and [@&#8203;antfu](https://togithub.com/antfu) in
[https://github.com/vitest-dev/vitest/issues/2064](https://togithub.com/vitest-dev/vitest/issues/2064)
- Remove undefined values in options  -  by
[@&#8203;g4rry420](https://togithub.com/g4rry420) and
[@&#8203;antfu](https://togithub.com/antfu) in
[https://github.com/vitest-dev/vitest/issues/2281](https://togithub.com/vitest-dev/vitest/issues/2281)
- **coverage**: Istanbul provider to preserve implicit else  -  by
[@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/2275](https://togithub.com/vitest-dev/vitest/issues/2275)

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.24.5...v0.25.0)

###
[`v0.24.5`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.24.5)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.24.4...v0.24.5)

#####    🚀 Features

- **vite-node**: Trigger beforeFullReload / beforePrune / invalidate
hook  -  by [@&#8203;ycmjason](https://togithub.com/ycmjason) in
[https://github.com/vitest-dev/vitest/issues/2079](https://togithub.com/vitest-dev/vitest/issues/2079)

#####    🐞 Bug Fixes

- Respect folders with dot at the start, when mocking  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2244](https://togithub.com/vitest-dev/vitest/issues/2244)
- Prevent using mocks in rpc  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2254](https://togithub.com/vitest-dev/vitest/issues/2254)
- Show actual unhandled errors, serialize DOMErrors  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2253](https://togithub.com/vitest-dev/vitest/issues/2253)
- Load deps reporter  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[https://github.com/vitest-dev/vitest/issues/2249](https://togithub.com/vitest-dev/vitest/issues/2249)

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.24.4...v0.24.5)

###
[`v0.24.4`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.24.4)

[Compare
Source](https://togithub.com/vitest-dev/vitest/compare/v0.24.3...v0.24.4)

#####    🚀 Features

- **vite-node**: Don't exit on uncaughtException in watch mode  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[https://github.com/vitest-dev/vitest/issues/2186](https://togithub.com/vitest-dev/vitest/issues/2186)

#####    🐞 Bug Fixes

- Add/Update `repository` properties in `package.json`  -  by
[@&#8203;silverwind](https://togithub.com/silverwind) in
[https://github.com/vitest-dev/vitest/issues/2151](https://togithub.com/vitest-dev/vitest/issues/2151)
- Ignore benchmark.reporters in getSerializableConfig  -  by
[@&#8203;kainstar](https://togithub.com/kainstar) in
[https://github.com/vitest-dev/vitest/issues/2164](https://togithub.com/vitest-dev/vitest/issues/2164)
- Improve config's default exclude  -  by
[@&#8203;haikyuu](https://togithub.com/haikyuu) and
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2188](https://togithub.com/vitest-dev/vitest/issues/2188)
- Always use node condition  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/1919](https://togithub.com/vitest-dev/vitest/issues/1919)
- Clear terminal output before running tests, show errors in correct
order  -  by [@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2228](https://togithub.com/vitest-dev/vitest/issues/2228)
- Improve compatibility with native Node CJS resolution  -  by
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2226](https://togithub.com/vitest-dev/vitest/issues/2226)
- Don't use resolved paths if they don't actually exist  -  by
[@&#8203;simon-abbott](https://togithub.com/simon-abbott) in
[https://github.com/vitest-dev/vitest/issues/1868](https://togithub.com/vitest-dev/vitest/issues/1868)
-   **cli**:
- Set inputNamePattern to RegExp source instead of string  -  by
[@&#8203;rafedramzi](https://togithub.com/rafedramzi) in
[https://github.com/vitest-dev/vitest/issues/2201](https://togithub.com/vitest-dev/vitest/issues/2201)
- Normalize argument path  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[https://github.com/vitest-dev/vitest/issues/2180](https://togithub.com/vitest-dev/vitest/issues/2180)
-   **coverage**:
- Trim URL parameters from file paths in istanbul coverage  -  by
[@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in
[https://github.com/vitest-dev/vitest/issues/2232](https://togithub.com/vitest-dev/vitest/issues/2232)
- Trim URL parameters from file paths in c8 coverage  -  by
[@&#8203;OrestHk](https://togithub.com/OrestHk) and
[@&#8203;sheremet-va](https://togithub.com/sheremet-va) in
[https://github.com/vitest-dev/vitest/issues/2181](https://togithub.com/vitest-dev/vitest/issues/2181)
-   **reporter**:
- Load custom reporter using `executeFile`  -  by
[@&#8203;poyoho](https://togithub.com/poyoho) in
[https://github.com/vitest-dev/vitest/issues/2184](https://togithub.com/vitest-dev/vitest/issues/2184)
-   **vitest**:
- Return detailed error when using toHaveReturnedWith  -  by
[@&#8203;azaleta](https://togithub.com/azaleta) in
[https://github.com/vitest-dev/vitest/issues/2163](https://togithub.com/vitest-dev/vitest/issues/2163)

#####     [View changes on
GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.24.3...v0.24.4)

</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 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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/andipaetzold/react-firehooks).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@rcoundon
Copy link

rcoundon commented Dec 2, 2022

We're still seeing problems with line numbers with version 0.25.3. When there's a failure and the line numbers in the stack trace are shown in the console they're way out. Also, when debugging (using both WebStorm and VSC) the debugger doesn't track the executing line.

Is there anything specific we need to do fix this in terms of configuration or do you think there could still be an underlying issue?

@sheremet-va
Copy link
Member Author

We're still seeing problems with line numbers with version 0.25.3. When there's a failure and the line numbers in the stack trace are shown in the console they're way out. Also, when debugging (using both WebStorm and VSC) the debugger doesn't track the executing line.

Is there anything specific we need to do fix this in terms of configuration or do you think there could still be an underlying issue?

Please, just provide reproduction. Small talk doesn’t help fixing the issue. Yes, you might have the problem. If you can give me a small reproducible example, I can check if there is an error and why.

@sheremet-va sheremet-va deleted the fix/source-maps branch December 2, 2022 21:20
@rcoundon
Copy link

rcoundon commented Dec 2, 2022

We're still seeing problems with line numbers with version 0.25.3. When there's a failure and the line numbers in the stack trace are shown in the console they're way out. Also, when debugging (using both WebStorm and VSC) the debugger doesn't track the executing line.
Is there anything specific we need to do fix this in terms of configuration or do you think there could still be an underlying issue?

Please, just provide reproduction. Small talk doesn’t help fixing the issue. Yes, you might have the problem. If you can give me a small reproducible example, I can check if there is an error and why.

Apologies, but that wasn't meant as small talk, I asked a specific question about whether there's anything specific we need to do to make this work. I was also curious if this was supposed to be fixed, and if others were experiencing anything similar since this pull request is showing as merged but not closed.
I'll try to create a reproduction in the meantime.

@rcoundon
Copy link

rcoundon commented Dec 2, 2022

Also, I'm trying to make sense of all the disparate information about this and related issues, for example, this thread and to be honest, I'm a bit lost as to what should and shouldn't work

@sheremet-va
Copy link
Member Author

Also, I'm trying to make sense of all the disparate information about this and related issues, for example, this thread and to be honest, I'm a bit lost as to what should and shouldn't work

Source maps should just work.

@rcoundon
Copy link

rcoundon commented Dec 2, 2022

In this example, the line numbers in the failed tests that are reported are correct, However, step debugging in WebStorm has the selected line jumping about in the file.
In two other projects the reported line numbers are incorrect but I haven't yet managed to isolate that in a small reproduction but I'll keep trying

@rcoundon
Copy link

rcoundon commented Dec 2, 2022

Possibly related to Webstorm rather than vitest - https://youtrack.jetbrains.com/issue/WEB-54437#focus=Comments-27-6696752.0-0

@sheremet-va
Copy link
Member Author

Possibly related to Webstorm rather than vitest - https://youtrack.jetbrains.com/issue/WEB-54437#focus=Comments-27-6696752.0-0

This PR might fix it: #2433

@rcoundon
Copy link

rcoundon commented Dec 5, 2022

I've just tried with v0.25.4 but unfortunately the situation is actually worse in Webstorm. The IDE doesn't hit a breakpoint now regardless of what is or isn't set in the esbuild property of vite.config.ts.

Previously, no esbuild setting at all or sourcemap set to true or 'external' worked.

@sheremet-va
Copy link
Member Author

I've just tried with v0.25.4 but unfortunately the situation is actually worse in Webstorm. The IDE doesn't hit a breakpoint now regardless of what is or isn't set in the esbuild property of vite.config.ts.

Previously, no esbuild setting at all or sourcemap set to true or 'external' worked.

Works fine with provided reproduction 🤷🏻

#2427

@rcoundon
Copy link

rcoundon commented Dec 5, 2022

I've just tried with v0.25.4 but unfortunately the situation is actually worse in Webstorm. The IDE doesn't hit a breakpoint now regardless of what is or isn't set in the esbuild property of vite.config.ts.
Previously, no esbuild setting at all or sourcemap set to true or 'external' worked.

Works fine with provided reproduction 🤷🏻

#2427

I'm afraid it doesn't for me. I've just pushed the update to vitest to here and the breakpoints aren't hit with sourcemap: 'both'

@sheremet-va
Copy link
Member Author

I see that stack trace is correct 🤷🏻 :

Screenshot 2022-12-05 at 21 01 16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants