-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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: always use node condition #1919
Merged
sheremet-va
merged 8 commits into
vitest-dev:main
from
sheremet-va:fix/hardcode-node-condition
Oct 28, 2022
Merged
fix: always use node condition #1919
sheremet-va
merged 8 commits into
vitest-dev:main
from
sheremet-va:fix/hardcode-node-condition
Oct 28, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Could we include a failing case in the tests or examples? |
I just wanted to run this against CI. For this to properly work we need a fix in Vite. |
Tests should be fixed by vitejs/vite#9860 |
sheremet-va
changed the title
fix: always use node condition
fix: always use node/import condition
Aug 26, 2022
antfu
previously approved these changes
Aug 26, 2022
Waiting for release of Vite 3.2 |
sheremet-va
force-pushed
the
fix/hardcode-node-condition
branch
from
October 28, 2022 14:17
b325199
to
08ba2be
Compare
… decided by Node in runtime
sheremet-va
changed the title
fix: always use node/import condition
fix: always use node condition
Oct 28, 2022
6 tasks
fwouts
referenced
this pull request
in fwouts/previewjs
Oct 31, 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://github.com/vitest-dev/vitest) | [`0.24.3` -> `0.24.4`](https://renovatebot.com/diffs/npm/vitest/0.24.3/0.24.4) | [![age](https://badges.renovateapi.com/packages/npm/vitest/0.24.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/vitest/0.24.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/vitest/0.24.4/compatibility-slim/0.24.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/vitest/0.24.4/confidence-slim/0.24.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>vitest-dev/vitest</summary> ### [`v0.24.4`](https://github.com/vitest-dev/vitest/releases/tag/v0.24.4) [Compare Source](https://github.com/vitest-dev/vitest/compare/v0.24.3...v0.24.4) ##### 🚀 Features - **vite-node**: Don't exit on uncaughtException in watch mode - by [@​poyoho](https://github.com/poyoho) in [https://github.com/vitest-dev/vitest/issues/2186](https://github.com/vitest-dev/vitest/issues/2186) ##### 🐞 Bug Fixes - Add/Update `repository` properties in `package.json` - by [@​silverwind](https://github.com/silverwind) in [https://github.com/vitest-dev/vitest/issues/2151](https://github.com/vitest-dev/vitest/issues/2151) - Ignore benchmark.reporters in getSerializableConfig - by [@​kainstar](https://github.com/kainstar) in [https://github.com/vitest-dev/vitest/issues/2164](https://github.com/vitest-dev/vitest/issues/2164) - Improve config's default exclude - by [@​haikyuu](https://github.com/haikyuu) and [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2188](https://github.com/vitest-dev/vitest/issues/2188) - Always use node condition - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/1919](https://github.com/vitest-dev/vitest/issues/1919) - Clear terminal output before running tests, show errors in correct order - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2228](https://github.com/vitest-dev/vitest/issues/2228) - Improve compatibility with native Node CJS resolution - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2226](https://github.com/vitest-dev/vitest/issues/2226) - Don't use resolved paths if they don't actually exist - by [@​simon-abbott](https://github.com/simon-abbott) in [https://github.com/vitest-dev/vitest/issues/1868](https://github.com/vitest-dev/vitest/issues/1868) - **cli**: - Set inputNamePattern to RegExp source instead of string - by [@​rafedramzi](https://github.com/rafedramzi) in [https://github.com/vitest-dev/vitest/issues/2201](https://github.com/vitest-dev/vitest/issues/2201) - Normalize argument path - by [@​poyoho](https://github.com/poyoho) in [https://github.com/vitest-dev/vitest/issues/2180](https://github.com/vitest-dev/vitest/issues/2180) - **coverage**: - Trim URL parameters from file paths in istanbul coverage - by [@​AriPerkkio](https://github.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/2232](https://github.com/vitest-dev/vitest/issues/2232) - Trim URL parameters from file paths in c8 coverage - by [@​OrestHk](https://github.com/OrestHk) and [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2181](https://github.com/vitest-dev/vitest/issues/2181) - **reporter**: - Load custom reporter using `executeFile` - by [@​poyoho](https://github.com/poyoho) in [https://github.com/vitest-dev/vitest/issues/2184](https://github.com/vitest-dev/vitest/issues/2184) - **vitest**: - Return detailed error when using toHaveReturnedWith - by [@​azaleta](https://github.com/azaleta) in [https://github.com/vitest-dev/vitest/issues/2163](https://github.com/vitest-dev/vitest/issues/2163) ##### [View changes on GitHub](https://github.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/fwouts/previewjs). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC45LjIiLCJ1cGRhdGVkSW5WZXIiOiIzNC45LjIifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1 task
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://github.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://github.com/vitest-dev/vitest/releases/tag/v0.25.1) [Compare Source](https://github.com/vitest-dev/vitest/compare/v0.25.0...v0.25.1) ##### 🚀 Features - Add `vi.setConfig` helper - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2293](https://github.com/vitest-dev/vitest/issues/2293) - Allow hooks to be executed in a stack or list - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2294](https://github.com/vitest-dev/vitest/issues/2294) ##### 🐞 Bug Fixes - Always rewrite defined jsdom keys - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2290](https://github.com/vitest-dev/vitest/issues/2290) - Default reporter regression - by [@​antfu](https://github.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2292](https://github.com/vitest-dev/vitest/issues/2292) - Don't fail `bench` when using options - by [@​poyoho](https://github.com/poyoho) in [https://github.com/vitest-dev/vitest/issues/2295](https://github.com/vitest-dev/vitest/issues/2295) ##### [View changes on GitHub](https://github.com/vitest-dev/vitest/compare/v0.25.0...v0.25.1) ### [`v0.25.0`](https://github.com/vitest-dev/vitest/releases/tag/v0.25.0) [Compare Source](https://github.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 }>() // @​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://github.com/vitest-dev/vitest/issues/1954) ##### 🚨 Breaking Changes - Return context in `startVitest()` - by [@​antfu](https://github.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2072](https://github.com/vitest-dev/vitest/issues/2072) ##### 🚀 Features - `onTestFailed` hook - by [@​antfu](https://github.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2210](https://github.com/vitest-dev/vitest/issues/2210) - Display error frame if present (like Vite) - by [@​haikyuu](https://github.com/haikyuu) and [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2257](https://github.com/vitest-dev/vitest/issues/2257) - Benchmark table report - by [@​poyoho](https://github.com/poyoho) in [https://github.com/vitest-dev/vitest/issues/2179](https://github.com/vitest-dev/vitest/issues/2179) - Add typechecking functionality - by [@​sheremet-va](https://github.com/sheremet-va) and [@​antfu](https://github.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2107](https://github.com/vitest-dev/vitest/issues/2107) ##### 🐞 Bug Fixes - Clear full screen only in watch mode - by [@​sheremet-va](https://github.com/sheremet-va) [<samp>(c3d89)</samp>](https://github.com/vitest-dev/vitest/commit/c3d89504) - Don't serialize symbols and immutables - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2266](https://github.com/vitest-dev/vitest/issues/2266) - Use --conditions instead of -C - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2267](https://github.com/vitest-dev/vitest/issues/2267) - Show correct stack trace in errors and console - by [@​sheremet-va](https://github.com/sheremet-va) and [@​antfu](https://github.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2248](https://github.com/vitest-dev/vitest/issues/2248) - Align `.each` behavior with jest - by [@​bartoszgolebiowski](https://github.com/bartoszgolebiowski) and [@​antfu](https://github.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2064](https://github.com/vitest-dev/vitest/issues/2064) - Remove undefined values in options - by [@​g4rry420](https://github.com/g4rry420) and [@​antfu](https://github.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2281](https://github.com/vitest-dev/vitest/issues/2281) - **coverage**: Istanbul provider to preserve implicit else - by [@​AriPerkkio](https://github.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/2275](https://github.com/vitest-dev/vitest/issues/2275) ##### [View changes on GitHub](https://github.com/vitest-dev/vitest/compare/v0.24.5...v0.25.0) ### [`v0.24.5`](https://github.com/vitest-dev/vitest/releases/tag/v0.24.5) [Compare Source](https://github.com/vitest-dev/vitest/compare/v0.24.4...v0.24.5) ##### 🚀 Features - **vite-node**: Trigger beforeFullReload / beforePrune / invalidate hook - by [@​ycmjason](https://github.com/ycmjason) in [https://github.com/vitest-dev/vitest/issues/2079](https://github.com/vitest-dev/vitest/issues/2079) ##### 🐞 Bug Fixes - Respect folders with dot at the start, when mocking - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2244](https://github.com/vitest-dev/vitest/issues/2244) - Prevent using mocks in rpc - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2254](https://github.com/vitest-dev/vitest/issues/2254) - Show actual unhandled errors, serialize DOMErrors - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2253](https://github.com/vitest-dev/vitest/issues/2253) - Load deps reporter - by [@​poyoho](https://github.com/poyoho) in [https://github.com/vitest-dev/vitest/issues/2249](https://github.com/vitest-dev/vitest/issues/2249) ##### [View changes on GitHub](https://github.com/vitest-dev/vitest/compare/v0.24.4...v0.24.5) ### [`v0.24.4`](https://github.com/vitest-dev/vitest/releases/tag/v0.24.4) [Compare Source](https://github.com/vitest-dev/vitest/compare/v0.24.3...v0.24.4) ##### 🚀 Features - **vite-node**: Don't exit on uncaughtException in watch mode - by [@​poyoho](https://github.com/poyoho) in [https://github.com/vitest-dev/vitest/issues/2186](https://github.com/vitest-dev/vitest/issues/2186) ##### 🐞 Bug Fixes - Add/Update `repository` properties in `package.json` - by [@​silverwind](https://github.com/silverwind) in [https://github.com/vitest-dev/vitest/issues/2151](https://github.com/vitest-dev/vitest/issues/2151) - Ignore benchmark.reporters in getSerializableConfig - by [@​kainstar](https://github.com/kainstar) in [https://github.com/vitest-dev/vitest/issues/2164](https://github.com/vitest-dev/vitest/issues/2164) - Improve config's default exclude - by [@​haikyuu](https://github.com/haikyuu) and [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2188](https://github.com/vitest-dev/vitest/issues/2188) - Always use node condition - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/1919](https://github.com/vitest-dev/vitest/issues/1919) - Clear terminal output before running tests, show errors in correct order - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2228](https://github.com/vitest-dev/vitest/issues/2228) - Improve compatibility with native Node CJS resolution - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2226](https://github.com/vitest-dev/vitest/issues/2226) - Don't use resolved paths if they don't actually exist - by [@​simon-abbott](https://github.com/simon-abbott) in [https://github.com/vitest-dev/vitest/issues/1868](https://github.com/vitest-dev/vitest/issues/1868) - **cli**: - Set inputNamePattern to RegExp source instead of string - by [@​rafedramzi](https://github.com/rafedramzi) in [https://github.com/vitest-dev/vitest/issues/2201](https://github.com/vitest-dev/vitest/issues/2201) - Normalize argument path - by [@​poyoho](https://github.com/poyoho) in [https://github.com/vitest-dev/vitest/issues/2180](https://github.com/vitest-dev/vitest/issues/2180) - **coverage**: - Trim URL parameters from file paths in istanbul coverage - by [@​AriPerkkio](https://github.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/2232](https://github.com/vitest-dev/vitest/issues/2232) - Trim URL parameters from file paths in c8 coverage - by [@​OrestHk](https://github.com/OrestHk) and [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2181](https://github.com/vitest-dev/vitest/issues/2181) - **reporter**: - Load custom reporter using `executeFile` - by [@​poyoho](https://github.com/poyoho) in [https://github.com/vitest-dev/vitest/issues/2184](https://github.com/vitest-dev/vitest/issues/2184) - **vitest**: - Return detailed error when using toHaveReturnedWith - by [@​azaleta](https://github.com/azaleta) in [https://github.com/vitest-dev/vitest/issues/2163](https://github.com/vitest-dev/vitest/issues/2163) ##### [View changes on GitHub](https://github.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://github.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://github.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://github.com/vitest-dev/vitest/releases/tag/v0.25.3) [Compare Source](https://github.com/vitest-dev/vitest/compare/v0.25.2...v0.25.3) ##### 🚀 Features - Test.each support string template - by [@​poyoho](https://github.com/poyoho) in [https://github.com/vitest-dev/vitest/issues/2337](https://github.com/vitest-dev/vitest/issues/2337) [<samp>(f7897)</samp>](https://github.com/vitest-dev/vitest/commit/f7897765) ##### 🐞 Bug Fixes - Junit consistently puts "skipped" inside "testcase" - by [@​sheremet-va](https://github.com/sheremet-va) [<samp>(f7b27)</samp>](https://github.com/vitest-dev/vitest/commit/f7b27af0) - Detect tests in folders starting with `.` - by [@​sidharthv96](https://github.com/sidharthv96) in [https://github.com/vitest-dev/vitest/issues/2344](https://github.com/vitest-dev/vitest/issues/2344) and [https://github.com/vitest-dev/vitest/issues/2359](https://github.com/vitest-dev/vitest/issues/2359) [<samp>(c3951)</samp>](https://github.com/vitest-dev/vitest/commit/c395177f) - **cli**: Don't override config by setting cli options to undefined - by [@​rmehner](https://github.com/rmehner) in [https://github.com/vitest-dev/vitest/issues/2330](https://github.com/vitest-dev/vitest/issues/2330) [<samp>(6ce3e)</samp>](https://github.com/vitest-dev/vitest/commit/6ce3ed7f) - **coverage**: Env-replacer to add filenames into sourcemaps - by [@​AriPerkkio](https://github.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/2338](https://github.com/vitest-dev/vitest/issues/2338) [<samp>(a2e9d)</samp>](https://github.com/vitest-dev/vitest/commit/a2e9daf6) - **mocker**: Clear automocked modules on unmock - by [@​mcous](https://github.com/mcous) in [https://github.com/vitest-dev/vitest/issues/2353](https://github.com/vitest-dev/vitest/issues/2353) [<samp>(60918)</samp>](https://github.com/vitest-dev/vitest/commit/609185bd) ##### [View changes on GitHub](https://github.com/vitest-dev/vitest/compare/v0.25.2...v0.25.3) ### [`v0.25.2`](https://github.com/vitest-dev/vitest/releases/tag/v0.25.2) [Compare Source](https://github.com/vitest-dev/vitest/compare/v0.25.1...v0.25.2) ##### 🐞 Bug Fixes - Dates are equal, if both are invalid - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2326](https://github.com/vitest-dev/vitest/issues/2326) - Don't ignore properties, when put on a default function in CJS context - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2325](https://github.com/vitest-dev/vitest/issues/2325) ##### [View changes on GitHub](https://github.com/vitest-dev/vitest/compare/v0.25.1...v0.25.2) ### [`v0.25.1`](https://github.com/vitest-dev/vitest/releases/tag/v0.25.1) [Compare Source](https://github.com/vitest-dev/vitest/compare/v0.25.0...v0.25.1) ##### 🚀 Features - Add `vi.setConfig` helper - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2293](https://github.com/vitest-dev/vitest/issues/2293) - Allow hooks to be executed in a stack or list - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2294](https://github.com/vitest-dev/vitest/issues/2294) ##### 🐞 Bug Fixes - Always rewrite defined jsdom keys - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2290](https://github.com/vitest-dev/vitest/issues/2290) - Default reporter regression - by [@​antfu](https://github.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2292](https://github.com/vitest-dev/vitest/issues/2292) - Don't fail `bench` when using options - by [@​poyoho](https://github.com/poyoho) in [https://github.com/vitest-dev/vitest/issues/2295](https://github.com/vitest-dev/vitest/issues/2295) ##### [View changes on GitHub](https://github.com/vitest-dev/vitest/compare/v0.25.0...v0.25.1) ### [`v0.25.0`](https://github.com/vitest-dev/vitest/releases/tag/v0.25.0) [Compare Source](https://github.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 }>() // @​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://github.com/vitest-dev/vitest/issues/1954) ##### 🚨 Breaking Changes - Return context in `startVitest()` - by [@​antfu](https://github.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2072](https://github.com/vitest-dev/vitest/issues/2072) ##### 🚀 Features - `onTestFailed` hook - by [@​antfu](https://github.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2210](https://github.com/vitest-dev/vitest/issues/2210) - Display error frame if present (like Vite) - by [@​haikyuu](https://github.com/haikyuu) and [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2257](https://github.com/vitest-dev/vitest/issues/2257) - Benchmark table report - by [@​poyoho](https://github.com/poyoho) in [https://github.com/vitest-dev/vitest/issues/2179](https://github.com/vitest-dev/vitest/issues/2179) - Add typechecking functionality - by [@​sheremet-va](https://github.com/sheremet-va) and [@​antfu](https://github.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2107](https://github.com/vitest-dev/vitest/issues/2107) ##### 🐞 Bug Fixes - Clear full screen only in watch mode - by [@​sheremet-va](https://github.com/sheremet-va) [<samp>(c3d89)</samp>](https://github.com/vitest-dev/vitest/commit/c3d89504) - Don't serialize symbols and immutables - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2266](https://github.com/vitest-dev/vitest/issues/2266) - Use --conditions instead of -C - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2267](https://github.com/vitest-dev/vitest/issues/2267) - Show correct stack trace in errors and console - by [@​sheremet-va](https://github.com/sheremet-va) and [@​antfu](https://github.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2248](https://github.com/vitest-dev/vitest/issues/2248) - Align `.each` behavior with jest - by [@​bartoszgolebiowski](https://github.com/bartoszgolebiowski) and [@​antfu](https://github.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2064](https://github.com/vitest-dev/vitest/issues/2064) - Remove undefined values in options - by [@​g4rry420](https://github.com/g4rry420) and [@​antfu](https://github.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2281](https://github.com/vitest-dev/vitest/issues/2281) - **coverage**: Istanbul provider to preserve implicit else - by [@​AriPerkkio](https://github.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/2275](https://github.com/vitest-dev/vitest/issues/2275) ##### [View changes on GitHub](https://github.com/vitest-dev/vitest/compare/v0.24.5...v0.25.0) ### [`v0.24.5`](https://github.com/vitest-dev/vitest/releases/tag/v0.24.5) [Compare Source](https://github.com/vitest-dev/vitest/compare/v0.24.4...v0.24.5) ##### 🚀 Features - **vite-node**: Trigger beforeFullReload / beforePrune / invalidate hook - by [@​ycmjason](https://github.com/ycmjason) in [https://github.com/vitest-dev/vitest/issues/2079](https://github.com/vitest-dev/vitest/issues/2079) ##### 🐞 Bug Fixes - Respect folders with dot at the start, when mocking - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2244](https://github.com/vitest-dev/vitest/issues/2244) - Prevent using mocks in rpc - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2254](https://github.com/vitest-dev/vitest/issues/2254) - Show actual unhandled errors, serialize DOMErrors - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2253](https://github.com/vitest-dev/vitest/issues/2253) - Load deps reporter - by [@​poyoho](https://github.com/poyoho) in [https://github.com/vitest-dev/vitest/issues/2249](https://github.com/vitest-dev/vitest/issues/2249) ##### [View changes on GitHub](https://github.com/vitest-dev/vitest/compare/v0.24.4...v0.24.5) ### [`v0.24.4`](https://github.com/vitest-dev/vitest/releases/tag/v0.24.4) [Compare Source](https://github.com/vitest-dev/vitest/compare/v0.24.3...v0.24.4) ##### 🚀 Features - **vite-node**: Don't exit on uncaughtException in watch mode - by [@​poyoho](https://github.com/poyoho) in [https://github.com/vitest-dev/vitest/issues/2186](https://github.com/vitest-dev/vitest/issues/2186) ##### 🐞 Bug Fixes - Add/Update `repository` properties in `package.json` - by [@​silverwind](https://github.com/silverwind) in [https://github.com/vitest-dev/vitest/issues/2151](https://github.com/vitest-dev/vitest/issues/2151) - Ignore benchmark.reporters in getSerializableConfig - by [@​kainstar](https://github.com/kainstar) in [https://github.com/vitest-dev/vitest/issues/2164](https://github.com/vitest-dev/vitest/issues/2164) - Improve config's default exclude - by [@​haikyuu](https://github.com/haikyuu) and [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2188](https://github.com/vitest-dev/vitest/issues/2188) - Always use node condition - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/1919](https://github.com/vitest-dev/vitest/issues/1919) - Clear terminal output before running tests, show errors in correct order - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2228](https://github.com/vitest-dev/vitest/issues/2228) - Improve compatibility with native Node CJS resolution - by [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2226](https://github.com/vitest-dev/vitest/issues/2226) - Don't use resolved paths if they don't actually exist - by [@​simon-abbott](https://github.com/simon-abbott) in [https://github.com/vitest-dev/vitest/issues/1868](https://github.com/vitest-dev/vitest/issues/1868) - **cli**: - Set inputNamePattern to RegExp source instead of string - by [@​rafedramzi](https://github.com/rafedramzi) in [https://github.com/vitest-dev/vitest/issues/2201](https://github.com/vitest-dev/vitest/issues/2201) - Normalize argument path - by [@​poyoho](https://github.com/poyoho) in [https://github.com/vitest-dev/vitest/issues/2180](https://github.com/vitest-dev/vitest/issues/2180) - **coverage**: - Trim URL parameters from file paths in istanbul coverage - by [@​AriPerkkio](https://github.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/2232](https://github.com/vitest-dev/vitest/issues/2232) - Trim URL parameters from file paths in c8 coverage - by [@​OrestHk](https://github.com/OrestHk) and [@​sheremet-va](https://github.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2181](https://github.com/vitest-dev/vitest/issues/2181) - **reporter**: - Load custom reporter using `executeFile` - by [@​poyoho](https://github.com/poyoho) in [https://github.com/vitest-dev/vitest/issues/2184](https://github.com/vitest-dev/vitest/issues/2184) - **vitest**: - Return detailed error when using toHaveReturnedWith - by [@​azaleta](https://github.com/azaleta) in [https://github.com/vitest-dev/vitest/issues/2163](https://github.com/vitest-dev/vitest/issues/2163) ##### [View changes on GitHub](https://github.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>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1918