chore(deps): update dependency vitest to ^0.34.0
This MR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| vitest | devDependencies | minor | ^0.32.2 -> ^0.34.0 |
Release Notes
vitest-dev/vitest (vitest)
v0.34.6
🐞 Bug Fixes
- Overwrite global URL with environment's - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4164 (cbe13)
- Correctly resolve external dependencies loaded by custom environments - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4196 (e3408)
-
runner: The fixture of
test.extendshould be init once time in all test - by @Dunqing in https://github.com/vitest-dev/vitest/issues/4168 (730b2)
View changes on GitHub
v0.34.5
🚀 Features
-
config:
- Add
diffoption - by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4063 (b50cf)
- Add
-
coverage:
- Add
coverage['100']to istanbul provider - by @marcelobotega in https://github.com/vitest-dev/vitest/issues/4109 (a7e09)
- Add
-
vitest:
- Support
vi.waitFormethod - by @Dunqing and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4113 (d79cb) - Allow using unprocessed environment files - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4098 (1aee1)
- Support
vi.waitUntilmethod - by @Dunqing and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4129 (e0ac9)
- Support
🐞 Bug Fixes
- Update HappyDOMOptions to be compatible with v12 - by @anthonyblond in https://github.com/vitest-dev/vitest/issues/4135 (e8797)
- Print value shape when .resolves and .rejects fails - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4137 (e649d)
-
docs:
- Fix lint errors on onConsoleLog example - by @marcelobotega in https://github.com/vitest-dev/vitest/issues/4116 (ba1e7)
-
expect:
- Improve the error message when nothing is thrown when testing
toThrow- by @Dunqing in https://github.com/vitest-dev/vitest/issues/3979 (725a0)
- Improve the error message when nothing is thrown when testing
-
happy-dom:
- Catch errors in happy-dom - by @capricorn86 in https://github.com/vitest-dev/vitest/issues/4140 (c21c0)
-
runner:
- Restore leading space in
testNamePattern- by @segrey in https://github.com/vitest-dev/vitest/issues/4103 and https://github.com/vitest-dev/vitest/issues/4104 (3c305) -
test.extenddoesn't work in hooks without test - by @Dunqing in https://github.com/vitest-dev/vitest/issues/4065 (175c7)
- Restore leading space in
-
snapshot:
- Support mix of normal/with placeholders snapshots - by @RobertPechaCZ in https://github.com/vitest-dev/vitest/issues/4118 (01e01)
-
ui:
- Correctly render ansi diff - by @so1ve and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3810 (8c315)
-
vite-node:
- Export
SourceMapInputto fix CYCLIC_CROSS_CHUNK_REEXPORT - by @Dunqing in https://github.com/vitest-dev/vitest/issues/4128 (ca70a) - Align vite dependency version with vitest - by @sheremet-va (90ff8)
- Export
-
vitest:
- Rerun tests if a file loaded with query changes - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4130 (a084c)
- Inject "define" in workspaces - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4096 (b4d5a)
🏎 Performance
- Use lazy require in vm pool - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4136 (21ba4)
View changes on GitHub
v0.34.4
🐞 Bug Fixes
- Resolving dep optimizer issues with workspace - by @thebanjomatic in https://github.com/vitest-dev/vitest/issues/4036 (0c13c)
- Don't process config file twice - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4077 (a84a8)
-
coverage:
- Log info only when terminal reporter is used - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4027 (9f043)
-
happy-dom:
- Use the nodejs console in happy-dom v11 - by @capricorn86 in https://github.com/vitest-dev/vitest/issues/4090 (59434)
-
runner:
- Incorrect test name pattern matching - by @Dunqing in https://github.com/vitest-dev/vitest/issues/4071 (b5bf3)
-
vite-node:
- Check more precisely for root/base paths - by @danielroe in https://github.com/vitest-dev/vitest/issues/4049 (80741)
-
vitest:
- "vi" doesn't rely on context - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4031 (0d0f3)
- Only override ssr.optimizer instead of the whole ssr object - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4080 (410bc)
- Don't start the server when optimizer is enabled - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4095 (00e81)
- Set SSR env only when transformMode is ssr - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4083 (f8ea7)
- Show error when calling API on files that user has no access to - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4085 (8b39c)
-
web-worker:
- Don't rely on browser API when it's not provided - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4014 (e78a4)
View changes on GitHub
v0.34.3
🚀 Features
-
coverage: Add
allowExternaloption - by @vojvodics and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3894 (c03fa) -
vitest: Export all reporters in
vitest/reporters- by @Dunqing and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3980 (5704b)
🐞 Bug Fixes
- Should remove mockPath from callstack whether success or failed - by @miserylee and lijifei in https://github.com/vitest-dev/vitest/issues/3971 (5eb85)
- Add workspace config files to default coverage excludes - by @FelixGraf and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3973 (20263)
- Report file error as a on JUnit - by @3c1u in https://github.com/vitest-dev/vitest/issues/3997 (00c43)
- jsdom: Correctly resolve buffer on typed arrays - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3998 (b42cf)
- ui: Use web hash history in ui - by @segevfiner and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3481 and https://github.com/vitest-dev/vitest/issues/3487 (8caab)
- vite-node: Inline HMR types - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3993 (dff60)
- vitest: Correctly resolve optimizer status - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3992 (74dc5)
View changes on GitHub
v0.34.2
🚀 Features
- Allow importing CSS and assets inside external dependencies when using
--experimental-vm-threads- by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3880 (f4e6e) -
vitest: Allow calling
ctx.skip()inside the running test - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3966 (5c88d)
🐞 Bug Fixes
- Don't bundle utils' source-map entry - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3865 (a08e5)
- Reduce the memory consumption when running --experimental-vm-threads - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3872 (d1a08)
- Indicator position of error message - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/3855 (3e1e7)
- Don't crash when using --experimental-vm-threads, interop CJS default inside node_modules - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3876 (0c53e)
- Don't crash if total memory is not supported - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3879 (7d1f8)
- Check memory and limit value - by @sheremet-va (f8dfb)
- Update module warning as it is moved into server config - by @jellyfishgh in https://github.com/vitest-dev/vitest/issues/3931 (3a3eb)
- Define process variable and using import.meta.env together did not work - by @Dunqing in https://github.com/vitest-dev/vitest/issues/3944 (e73ca)
- Correctly resolve config in a workspace - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3947 (1c08d)
- Don't crash when calling useFakeTimers in VM pool - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3958 (91fe4)
- Restrict access to file system via API - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3956 (bcb41)
- Typo of mocks plugin name - by @antfu (3073b)
- Build not generated
execute.d.ts- by @btea in https://github.com/vitest-dev/vitest/issues/3970 (0f8e6) -
css:
- Don't mock css-module if
?inlinequery is specified - by @thebanjomatic and Adam Hines in https://github.com/vitest-dev/vitest/issues/3952 (3891d)
- Don't mock css-module if
-
expect:
- Correctly show async matcher diff - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3960 (9423b)
-
snapshots:
- Update inline snapshot correctly - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/3887 (7b740)
-
ui:
- Incorrect duration time in vitest ui - by @Dunqing in https://github.com/vitest-dev/vitest/issues/3945 (35139)
- Add support for ui coverage with subdir option - by @userquin in https://github.com/vitest-dev/vitest/issues/3917 (6ecfc)
-
vitest:
- Use esm module resolution to resolve env - by @danielroe in https://github.com/vitest-dev/vitest/issues/3951 (edb32)
- Allow rewriting process.env.NODE_MODE when using web transform mode - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3957 (eca4b)
- Only consider cwd when using glob - by @g-plane in https://github.com/vitest-dev/vitest/issues/3802 and https://github.com/vitest-dev/vitest/issues/3949 (15b4f)
- Pass environmentOptions to happy-dom integration - by @sheremet-va and Raul de Melo in https://github.com/vitest-dev/vitest/issues/3972 (6a0cb)
-
web:
- Correctly resolve assets in new URL - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3950 (a428f)
🏎 Performance
- dot-renderer: Speed up getTests - by @gtm-nayan in https://github.com/vitest-dev/vitest/issues/3923 (e9404)
View changes on GitHub
v0.34.1
🐞 Bug Fixes
- Pass
--experimental-vm-worker-memory-limittotinypool- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3856 (3c67a)
View changes on GitHub
v0.34.0
🚨 Breaking Changes
- Transform mode affects only test files, not regular files - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3491 (9608b)
-
transformModeis now moved toserver.transformMode. This option is highly discouraged to use. If you need to change the transform mode, use the new optiontestTransformModeinstead to control the mode based on the running test, not the current file path. By default, tests withjsdomorhappy-domusewebtransform mode, and tests usingnodeoredgeenvironment usessrmode. If you have a custom environment, it should providetransformModeproperty.
-
- Custom environment now should be processed before Vitest can consume it. It means that you cannot specify a path to a TS file or use import paths that should be processed by Vite.
- Disable
coverage.reportOnFailureby default - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3615 (0c6f6) - Remove
@vitest/coverage-c8package - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3614 (a90d6)-
@vitest/coverage-c8is no longer supported. Please, use@vitest/coverage-v8instead.
-
- Support running tests using VM context - by @sheremet-va and @dammy001 in https://github.com/vitest-dev/vitest/issues/3203 (b0929)
- To address speed issues in some applications, Vitest now provides
experimentalVmThreadspool to run your tests using VM Sandboxes environment. Make sure you understand all pitfalls of this pool before opening an issue.
- To address speed issues in some applications, Vitest now provides
- Introduce
serveroption - by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3725 (dc4fa)- Most of
deps.options are now moved toserver.depswith a deprecation warning. Please, consider usingdeps.optimizerinstead ofdeps.inline/deps.external. Ideally, we would like to move away from usingserver.deps.inlinealtogether.
- Most of
-
vite-node: Make CLI arguments parsing behavior consistent with node/tsx/ts-node - by @rxliuli in https://github.com/vitest-dev/vitest/issues/3574 (1cd4e)
- You now have to provide CLI arguments before the entry point. For example, instead of
vite-node index.ts --watch, you now have to dovite-node --watch index.ts.
- You now have to provide CLI arguments before the entry point. For example, instead of
- Add preact example, remove optimizer experimental status, enable by default - by @sheremet-va and @eryue0220 in https://github.com/vitest-dev/vitest/issues/3854 (4b946)
-
deps.optimizeris now enabled by default. This means that Vitest will bundle specified dependencies before running your tests. This field inherits options fromoptimizeDepsandssr.optimizeDepswhich are populated by other plugins (like, Svelte).
-
🚀 Features
- Support
describe.sequential- by @fenghan34 and @dammy001 in https://github.com/vitest-dev/vitest/issues/3771 (86934) - Support config junit reporter className with env - by @InfiniteXyy in https://github.com/vitest-dev/vitest/issues/3808 (e8bc4)
- Running vitest with
--related --watchreruns non-affected tests if they were changed during a run - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3844 (c9aea)
🐞 Bug Fixes
- Isolate workers between envs and workspaces - by @AriPerkkio (ed4e0)
- Modify condition - by @btea (a78e6)
- Module Graph view is blocking the Console view - by @g4rry420 (3b5f9)
- Port the latest
defineConfigtype from vite - by @sodatea in https://github.com/vitest-dev/vitest/issues/3804 (9c8e3) - Don't overwrite Node.js URL global - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3828 (cdab4)
- ForceRerunTriggers correctly triggers a rerun - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3829 (17988)
-
browser:
- Don't inline magic-string and estree-walker - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3726 (ee937)
- Multi-suite coverage - by @elby22 in https://github.com/vitest-dev/vitest/issues/3806 (5de9a)
- core:
-
coverage:
- V8 provider to pick source maps without url query params - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3784 (280e6)
- Update
istanbul-lib-instrumentto v6 to fix vulnerable dependency - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3814 (f3bd9) - Exclude vite virtual modules by default - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3794 (3c851)
- node:
-
vite-node:
- Always treat node_modules as modulesDirectory - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3830 (51ab8)
- Normalize drive letter to keep the same reference to a module - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3836 (45521)
- Correctly resolve hmr filepath - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3834 (711a6)
-
watch:
- Clear screen on all terminals - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3661 (8bd26)
🏎 Performance
- Deprecate deps.registerNodeLoader - by @sheremet-va (7f45b)
- This option was introduced to support aliasing inside external packages. Please, use
deps.optimizer.webinstead. If you test Node.js applications, consider adding external packages toserver.deps.inline.
- This option was introduced to support aliasing inside external packages. Please, use
View changes on GitHub
v0.33.0
🚨 Breaking Changes
- Revert default include patterns - by @so1ve #3729
-
0.32.0changed the defaultincludeglobs to be compatible with Jest. After a discussion with the community, we are reverting this change because it turned out to be non-intuitive.
-
🐞 Bug Fixes
- Add missing JSDom living keys - by @DerZade in https://github.com/vitest-dev/vitest/issues/3702 (83a86)
-
vite-node:
- Don't fail when importing Promise module - by @sheremet-va (08192)
- Allow importing node:test - by @sheremet-va (db22c)
View changes on GitHub
Configuration
-
If you want to rebase/retry this MR, check this box
Edited by Renovate Bot