Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(deps): update dependency vitest to ^0.31.0 (#409)
[![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://github.com/vitest-dev/vitest) | [`^0.30.0` -> `^0.31.0`](https://renovatebot.com/diffs/npm/vitest/0.30.0/0.31.0) | [![age](https://badges.renovateapi.com/packages/npm/vitest/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/vitest/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/vitest/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/vitest/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>vitest-dev/vitest</summary> ### [`v0.31.0`](https://github.com/vitest-dev/vitest/releases/tag/v0.31.0) [Compare Source](https://github.com/vitest-dev/vitest/compare/v0.30.1...v0.31.0) ##### 🚨 Breaking Changes - Update mock implementation to support ESM runtime, introduce "vi.hoisted" - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/3258](https://github.com/vitest-dev/vitest/issues/3258) [<samp>(0c09a)</samp>](https://github.com/vitest-dev/vitest/commit/0c09a40d) - Bypass ESM import order restriction with `vi.hoisted` to run code before imports are executed: ```ts vi.hoisted(() => vi.setSystemTime(new Date(2022, 1, 1))) ``` You can also use it to pass variables to `vi.mock`: ```ts const { mockedMethod } = vi.hoisted(() => { return { mockedMethod: vi.fn() } }) vi.mocked('./path/to/module.js', () => { return { originalMethod: mockedMethod } }) ``` - Move assertion declarations to expect package - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/3294](https://github.com/vitest-dev/vitest/issues/3294) [<samp>(cf3af)</samp>](https://github.com/vitest-dev/vitest/commit/cf3afe2b) - The change should be minor: ```diff - declare namespace Vi { + declare module 'vitest' { interface Assertion<T = any> extends CustomMatchers<T> {} interface AsymmetricMatchersContaining extends CustomMatchers {} } ``` ##### 🚀 Features - Add repeat method to tests - by [@​samkevin1](https://github.com/samkevin1) in [https://github.com/vitest-dev/vitest/issues/2652](https://github.com/vitest-dev/vitest/issues/2652) [<samp>(7c8f0)</samp>](https://github.com/vitest-dev/vitest/commit/7c8f0ba9) - Add an option to hide skipped test lines - by [@​g4rry420](https://github.com/g4rry420) and [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2745](https://github.com/vitest-dev/vitest/issues/2745) [<samp>(9bdb1)</samp>](https://github.com/vitest-dev/vitest/commit/9bdb1603) - **coverage**: Watermarks for c8 - by [@​AriPerkkio](https://github.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/3254](https://github.com/vitest-dev/vitest/issues/3254) [<samp>(730af)</samp>](https://github.com/vitest-dev/vitest/commit/730af0b4) - **ui**: Add html coverage - by [@​userquin](https://github.com/userquin) and [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/3071](https://github.com/vitest-dev/vitest/issues/3071) [<samp>(e24cd)</samp>](https://github.com/vitest-dev/vitest/commit/e24cd9b2) - **watch**: Test run cancelling, feat: `--bail` option for cancelling test run - by [@​AriPerkkio](https://github.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/3163](https://github.com/vitest-dev/vitest/issues/3163) [<samp>(8d460)</samp>](https://github.com/vitest-dev/vitest/commit/8d4606eb) ##### 🐞 Bug Fixes - Don't call global setup teardown twice - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/3188](https://github.com/vitest-dev/vitest/issues/3188) [<samp>(ba3d1)</samp>](https://github.com/vitest-dev/vitest/commit/ba3d1338) - Reporter to log version before provider initalizations - by [@​AriPerkkio](https://github.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/3131](https://github.com/vitest-dev/vitest/issues/3131) [<samp>(481b1)</samp>](https://github.com/vitest-dev/vitest/commit/481b1fd2) - Throw an error if Vitest cannot access its internal state - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/3250](https://github.com/vitest-dev/vitest/issues/3250) [<samp>(fbb14)</samp>](https://github.com/vitest-dev/vitest/commit/fbb1468e) - Warning suppression broken - by [@​IceQub3](https://github.com/IceQub3) in [https://github.com/vitest-dev/vitest/issues/3270](https://github.com/vitest-dev/vitest/issues/3270) and [https://github.com/vitest-dev/vitest/issues/3271](https://github.com/vitest-dev/vitest/issues/3271) [<samp>(036de)</samp>](https://github.com/vitest-dev/vitest/commit/036de797) - Show correct diff in "toHaveBeenCalledWith" - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/3289](https://github.com/vitest-dev/vitest/issues/3289) [<samp>(19fcd)</samp>](https://github.com/vitest-dev/vitest/commit/19fcd8df) - Don't print esm warning, if package name is not found - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/3292](https://github.com/vitest-dev/vitest/issues/3292) [<samp>(62c14)</samp>](https://github.com/vitest-dev/vitest/commit/62c14cba) - Support exactOptionalPropertyTypes - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/3293](https://github.com/vitest-dev/vitest/issues/3293) [<samp>(ba81d)</samp>](https://github.com/vitest-dev/vitest/commit/ba81d8a3) - Don't inline vite hmr and rollup types - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/3291](https://github.com/vitest-dev/vitest/issues/3291) [<samp>(1f118)</samp>](https://github.com/vitest-dev/vitest/commit/1f1189bc) - **browser**: - Failing to load vitest/utils - by [@​userquin](https://github.com/userquin) in [https://github.com/vitest-dev/vitest/issues/3190](https://github.com/vitest-dev/vitest/issues/3190) [<samp>(78bad)</samp>](https://github.com/vitest-dev/vitest/commit/78bad4ab) - **coverage**: - `thresholdAutoUpdate` to work with `perFile` - by [@​AriPerkkio](https://github.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/3182](https://github.com/vitest-dev/vitest/issues/3182) [<samp>(29eeb)</samp>](https://github.com/vitest-dev/vitest/commit/29eebf65) - Throw error if fail to load built-in provider - by [@​AriPerkkio](https://github.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/3217](https://github.com/vitest-dev/vitest/issues/3217) [<samp>(0a287)</samp>](https://github.com/vitest-dev/vitest/commit/0a2875e3) - Stackblitz hangs with c8 - by [@​AriPerkkio](https://github.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/3225](https://github.com/vitest-dev/vitest/issues/3225) [<samp>(d9fda)</samp>](https://github.com/vitest-dev/vitest/commit/d9fda2a1) - C8 to ignore vite's generated helpers - by [@​AriPerkkio](https://github.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/3241](https://github.com/vitest-dev/vitest/issues/3241) [<samp>(21942)</samp>](https://github.com/vitest-dev/vitest/commit/21942db0) - Workspaces c8 source maps - by [@​AriPerkkio](https://github.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/3226](https://github.com/vitest-dev/vitest/issues/3226) [<samp>(efce3)</samp>](https://github.com/vitest-dev/vitest/commit/efce3b4d) - **docs**: - Correct typo and broken link to WebdriverIO - by [@​nathanbabcock](https://github.com/nathanbabcock) in [https://github.com/vitest-dev/vitest/issues/3275](https://github.com/vitest-dev/vitest/issues/3275) [<samp>(c7da1)</samp>](https://github.com/vitest-dev/vitest/commit/c7da155f) - **spy**: - Update to set initial implementation through normal logic - by [@​Codex-](https://github.com/Codex-) in [https://github.com/vitest-dev/vitest/issues/3260](https://github.com/vitest-dev/vitest/issues/3260) and [https://github.com/vitest-dev/vitest/issues/3263](https://github.com/vitest-dev/vitest/issues/3263) [<samp>(c759a)</samp>](https://github.com/vitest-dev/vitest/commit/c759a9aa) - **vite-node**: - Circular imports - by [@​antfu](https://github.com/antfu) in [https://github.com/vitest-dev/vitest/issues/3196](https://github.com/vitest-dev/vitest/issues/3196) [<samp>(cbb59)</samp>](https://github.com/vitest-dev/vitest/commit/cbb593a8) - Add missing `import.meta.hot.send` mock - by [@​antfu](https://github.com/antfu) [<samp>(b1624)</samp>](https://github.com/vitest-dev/vitest/commit/b1624db5) - **vitest**: - Also check for vite relative to vitest package - by [@​JoshuaKGoldberg](https://github.com/JoshuaKGoldberg) and [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/3274](https://github.com/vitest-dev/vitest/issues/3274) [<samp>(a3393)</samp>](https://github.com/vitest-dev/vitest/commit/a3393b15) - **watch**: - Run test files when added to filesystem - by [@​AriPerkkio](https://github.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/3189](https://github.com/vitest-dev/vitest/issues/3189) [<samp>(7b2c8)</samp>](https://github.com/vitest-dev/vitest/commit/7b2c81bc) ##### [View changes on GitHub](https://github.com/vitest-dev/vitest/compare/v0.30.1...v0.31.0) ### [`v0.30.1`](https://github.com/vitest-dev/vitest/releases/tag/v0.30.1) [Compare Source](https://github.com/vitest-dev/vitest/compare/v0.30.0...v0.30.1) ##### 🐞 Bug Fixes - Do not rely on global `performance` and `AggregateError` - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/3171](https://github.com/vitest-dev/vitest/issues/3171) [<samp>(cce45)</samp>](https://github.com/vitest-dev/vitest/commit/cce45496) - Allow workspace without a config in the root - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/3173](https://github.com/vitest-dev/vitest/issues/3173) [<samp>(06852)</samp>](https://github.com/vitest-dev/vitest/commit/06852f18) - `test.each` respects `chaiConfig` - by [@​sheremet-va](https://github.com/sheremet-va) [<samp>(4f6c1)</samp>](https://github.com/vitest-dev/vitest/commit/4f6c1340) - Use relative paths in source map's "sources" field - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/3177](https://github.com/vitest-dev/vitest/issues/3177) [<samp>(6b1b4)</samp>](https://github.com/vitest-dev/vitest/commit/6b1b4e68) - **types**: - Allow augmenting jest namespace for custom assertions - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/3169](https://github.com/vitest-dev/vitest/issues/3169) [<samp>(905ec)</samp>](https://github.com/vitest-dev/vitest/commit/905ec05a) - Publish utils and snapshot .d.ts files for typescript - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/3172](https://github.com/vitest-dev/vitest/issues/3172) [<samp>(7af64)</samp>](https://github.com/vitest-dev/vitest/commit/7af64444) - **snapshot**: - `toMatchFileSnapshot` ensure dir exists - by [@​antfu](https://github.com/antfu) in [https://github.com/vitest-dev/vitest/issues/3155](https://github.com/vitest-dev/vitest/issues/3155) [<samp>(31168)</samp>](https://github.com/vitest-dev/vitest/commit/311682a8) - Improve `skipWriting` check - by [@​antfu](https://github.com/antfu) [<samp>(5436c)</samp>](https://github.com/vitest-dev/vitest/commit/5436c736) - Normalize EOL for `toMatchFileSnapshot` - by [@​antfu](https://github.com/antfu) in [https://github.com/vitest-dev/vitest/issues/3164](https://github.com/vitest-dev/vitest/issues/3164) [<samp>(df3f2)</samp>](https://github.com/vitest-dev/vitest/commit/df3f2b50) ##### [View changes on GitHub](https://github.com/vitest-dev/vitest/compare/v0.30.0...v0.30.1) </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/JoshuaKGoldberg/template-typescript-node-package). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS43MS40IiwidXBkYXRlZEluVmVyIjoiMzUuNzEuNCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
- Loading branch information