Update dependency vitest to ^0.34.0
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
vitest | devDependencies | minor | ^0.31.0 -> ^0.34.0 |
⚠ Dependency Lookup Warnings ⚠
Warnings were logged while processing this repo. Please check the logs for more information.
Release Notes
vitest-dev/vitest
v0.34.1
🐞 Bug Fixes
- Pass
--experimental-vm-worker-memory-limit
totinypool
- 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)
-
transformMode
is now moved toserver.transformMode
. This option is highly discouraged to use. If you need to change the transform mode, use the new optiontestTransformMode
instead to control the mode based on the running test, not the current file path. By default, tests withjsdom
orhappy-dom
useweb
transform mode, and tests usingnode
oredge
environment usessr
mode. If you have a custom environment, it should providetransformMode
property.
-
- Disable
coverage.reportOnFailure
by default - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3615 (0c6f6) - Remove
@vitest/coverage-c8
package - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3614 (a90d6)-
@vitest/coverage-c8
is no longer supported. Please, use@vitest/coverage-v8
instead.
-
- 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
experimentalVmThreads
pool 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
server
option - by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3725 (dc4fa)- Most of
deps.
options are now moved toserver.deps
with a deprecation warning. Please, consider usingdeps.optimizer
instead ofdeps.inline
/deps.external
. Ideally, we would like to move away from usingserver.deps.inline
altogether.
- 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.optimizer
is now enabled by default. This means that Vitest will bundle specified dependencies before running your tests. This field inherits options fromoptimizeDeps
andssr.optimizeDeps
which 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 --watch
reruns 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
defineConfig
type 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-instrument
to 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.web
instead. 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.0
changed the defaultinclude
globs 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
v0.32.4
🐞 Bug Fixes
- browser: Correctly optimize CJS dependencies - by @sheremet-va (3d090)
View changes on GitHub
v0.32.3
🚀 Features
- Add
concurrent
option tosequence
config - by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3604 (f427f) - Introduce global configuration for retry setting - by @imentu and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3598 and https://github.com/vitest-dev/vitest/issues/3603 (9a117)
- Don't rely on util package in @vitest/utils - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3685 (f91da)
- Support accessing other fixtures in fixture function - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/3651 (1621c)
- Support use function/class as
bench
name - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/3711 (a749a) - reporters: Show full test suite when testing 1 spec file at a time - by @Dunqing in https://github.com/vitest-dev/vitest/issues/3543 (7531c)
-
runner: Support
test.extend
- by @fenghan34 in https://github.com/vitest-dev/vitest/issues/3554 (2db1a)
🐞 Bug Fixes
- Remove "concordance" from dependencies list - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3597 (969dc)
- Show diff correctly - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3620 (73dd4)
- Util import - by @fubhy in https://github.com/vitest-dev/vitest/issues/3621 (2fb4c)
- Compat with frozen Math - by @turadg in https://github.com/vitest-dev/vitest/issues/3527 (0db67)
-
CTRL+C
to terminate run - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3642 (fa663) - Run mode stuck in TTY terminals - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3690 (141a8)
- Use first stack frame in json reporter - by @tim-smart in https://github.com/vitest-dev/vitest/issues/3645 (80ea7)
- Print actual number for
toBeCalledTimes
- by @antfu in https://github.com/vitest-dev/vitest/issues/3696 (d3640) -
benchmark:
- Don't fail when running correct benchmarks - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3629 (edad9)
-
browser:
- Correctly print diff - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3627 (d756e)
- Esm injector doesn't replace class expressions - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3641 (5c0ac)
- Transform superclass identifier - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3681 (a1e04)
-
coverage:
-
v8
to prevent crash on dynamic CJS files - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3657 (40f18)
-
-
runner:
- Make the default value of
retry
andrepeats
0 - by @Dunqing in https://github.com/vitest-dev/vitest/issues/3638 (6d146)
- Make the default value of
-
utils:
- Respect all flags in format function - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3695 (91e16)
-
watch:
- Cancel using
h
key - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3618 (60c36)
- Cancel using
View changes on GitHub
v0.32.2
🐞 Bug Fixes
- browser: Don't fail on importing diff-sequences - by @sheremet-va (00b0e)
View changes on GitHub
v0.32.1
🚀 Features
- Export
registerConsoleShortcuts
fromvitest/node
- by @deot in https://github.com/vitest-dev/vitest/issues/3563 (bc49b) -
expect: Support
expect.unreachable
- by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3556 (8e385) -
runner:
describe
/test
name support anonymous function - by @btea in https://github.com/vitest-dev/vitest/issues/3562 (3d436)
🐞 Bug Fixes
- Avoid call stack recursion with large error (fix: #3060) - by @nathanmmiller and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3078 and https://github.com/vitest-dev/vitest/issues/3060 (02196)
- Automatically remove define related configuration - by @btea in https://github.com/vitest-dev/vitest/issues/3552 (368b8)
- Import
performance
fromperf_hooks
- by @Max10240 and wangbaolong.wbl in https://github.com/vitest-dev/vitest/issues/3578 and https://github.com/vitest-dev/vitest/issues/3579 (24ec8) - Revert concordance diff, use jest's diff output - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3582 (9c7ea)
- Typo in config suggestion - by @Krisell in https://github.com/vitest-dev/vitest/issues/3583 (68985)
-
browser:
- Change optimized deps to use
vitest
- by @userquin in https://github.com/vitest-dev/vitest/issues/3580 (b4ac8) - Access vi_inject only if it was injected - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3587 (d9e14)
- Change optimized deps to use
-
mocker:
- Respect namespace import when hoisting vi.mock - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3547 (158c4)
-
ui:
- Navigate to dashboard when re-running tests from coverage page - by @userquin in https://github.com/vitest-dev/vitest/issues/3529 (bc283)
-
vite-node:
- Correctly resolve virtual modules - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3544 (0cbb0)
- Fix errors caused by commonjs export circular references - by @rxliuli in https://github.com/vitest-dev/vitest/issues/3570 (b097c)
View changes on GitHub
v0.32.0
🚨 Breaking Changes
- Throw an error, if the module cannot be resolved - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3307 (1ad63)
- Vitest used to fall back to the original import when it could not resolve it to the file path or the virtual module. This leads to hard-to-find module graph mismatches if you had incorrect alias or relied on relative imports to be resolved to the project root (which is usual behavior in TypeScript) because the code accidentally "worked". With this release, Vitest will now throw an error if it cannot resolve the module - there are possible edge cases that are not covered yet, so if you have any problems with this, please open a separate issue with reproduction.
- Improve globs - by @nickmccurdy in https://github.com/vitest-dev/vitest/issues/3392 (19ecc)
- Vitest now has glob patterns similar to Jest for better compatibility. It's possible that some files will be considered test files when previously they were not. For example, Vitest now considers
test.js
to be a test file. Also any file in__tests__
is now considered to be a test, not just files withtest
orspec
suffix.
- Vitest now has glob patterns similar to Jest for better compatibility. It's possible that some files will be considered test files when previously they were not. For example, Vitest now considers
- Add
@vitest/coverage-v8
package - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3339 (82112)- Vitest now uses v8 code coverage directly for better performance.
@vitest/coverage-c8
is deprecated as Vitest no longer uses c8 package for coverage output. It will not be updated anymore, and Vitest will fail in the next version if the user hasc8
as their coverage provider. Please, install the new@vitest/coverage-v8
package if you previously used@vitest/coverage-c8
.
- Vitest now uses v8 code coverage directly for better performance.
-
mocker: Don't restore mock to the original if the module is automocked - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3518 (c1004)
-
spy.mockRestore
on auto-mocked named exports will no longer restore their implementation to the actual function. This behavior better matches what Jest does.
-
🚀 Features
- Support ssr optimizer - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3490 (89842)
- Image type add apng - by @btea in https://github.com/vitest-dev/vitest/issues/3498 (a53c2)
-
expect: Support
expect.soft
- by @Dunqing in https://github.com/vitest-dev/vitest/issues/3507 (7c687) -
runner: Support using function/class as
describe
/test
name - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/3497 (15253)
🐞 Bug Fixes
- The cli option is passed to coverage.exclude - by @btea in https://github.com/vitest-dev/vitest/issues/3506 (c37cd)
- optimizer: Always respect optimizeDeps even if include/exclude is overridden - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3488 (eb285)
- runner: Ensure Vitest is deduped - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3489 (2deb7)
- ui: Don't cache coverage assets - by @userquin in https://github.com/vitest-dev/vitest/issues/3508 (952b5)
- vite-node: Circular import stuck - by @Dunqing in https://github.com/vitest-dev/vitest/issues/3480 (50f07)
- watch: Junit reporter fails to re-generate report - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3496 (5b73c)
View changes on GitHub
v0.31.4
🚀 Features
- Enable experimentalOptimizer - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3413 (5a894)
🐞 Bug Fixes
- vite-node: Deps.inline doesn't work - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3485 (be930)
View changes on GitHub
v0.31.3
🚀 Features
- Support
VITE_NODE_DEPS_MODULE_DIRECTORIES
from .npmrc - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3471 (393bf)
🐞 Bug Fixes
- logger: Print unhandled errors before summary - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3474 (4c9a7)
- runner: Suite options do not propagate to nested suites (fix: #3467) - by @xsjcTony in https://github.com/vitest-dev/vitest/issues/3473 and https://github.com/vitest-dev/vitest/issues/3467 (9fb9d)
- vite-node: Clear importers when invalidating module - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3475 (add29)
View changes on GitHub
v0.31.2
🚀 Features
- Throw error if using inline snapshot inside of
test.each
ordescribe.each
- by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3360 (7c2f7) - Pass down meta information to Node.js process - by @sheremet-va and @dammy001 in https://github.com/vitest-dev/vitest/issues/3449 (e39ad)
-
coverage: Add
reportOnFailure
option - by @AriPerkkio and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3453 (1988f) - dev: Add moduleDirectories option to the vitest config - by @fooddilsn and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3337 (b3602)
🐞 Bug Fixes
- Don't print empty diff - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3437 (32b53)
- Don't restore methods in automocked dependencies - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3438 (d1afd)
- Dot reporter scrollback buffer spam - by @gtm-nayan in https://github.com/vitest-dev/vitest/issues/3415 (e6792)
- Gracefully exit when first
SIGINT
is received - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3407 (a2cc2) -
rejects
&resolves
breaks with thenable objects - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/3456 (4e996) - Prevent
birpc
timeouts whenMath.random
mock is not restored - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3460 (cd5d5) - Assertion diff message now handle non writable property correctly - by @PCreations in https://github.com/vitest-dev/vitest/issues/3422 (f75ab)
- Extend logging of process timeout errors - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3452 (42643)
- Support requiring files with
less
extension - by @rluvaton in https://github.com/vitest-dev/vitest/issues/3465 (4d045) -
cli:
- Improve colors used when erroring - by @ghiscoding and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3349 (16681)
-
runner:
- Suite timeout does not take effect - by @btea in https://github.com/vitest-dev/vitest/issues/3455 (82547)
-
spy:
- Don't print received calls if there are no calls - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3405 (41e11)
-
typecheck:
- Show tsc errors not related to test files - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3441 (a1da5)
-
types:
- Fix
PartialMock
with async TReturns - by @ghry5 in https://github.com/vitest-dev/vitest/issues/3462 (b664d)
- Fix
-
vite-node:
- Circular import stuck - by @Dunqing in https://github.com/vitest-dev/vitest/issues/3418 (632ee)
- Coerce to string in import(dep) - by @jcbhmr and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3430 (b72eb)
- Don't remove sourcemap string in source code - by @rxliuli and @sheremet-va in https://github.com/vitest-dev/vitest/issues/2918 and https://github.com/vitest-dev/vitest/issues/3379 (02dc9)
- Don't externalize "dist" by default - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3446 (306b2)
View changes on GitHub
v0.31.1
🚀 Features
-
watch: Press
r
should rerun current pattern tests - by @Dunqing and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3305 (69d27)
🐞 Bug Fixes
- Make sure thrown error is an object - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3298 (a93be)
- Remove duplicate type - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3303 (5382e)
- Throw an error, if tests are collected with a different vitest version - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3301 (708b1)
- Support application/x-gzip metadata in html report - by @mzanelee and Michael Lee in https://github.com/vitest-dev/vitest/issues/3333 (5bf7e)
- Correctly restore vi.fn implementation - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3341 (2aff8)
- Display error message correctly - by @btea in https://github.com/vitest-dev/vitest/issues/3314 (a5b3d)
- Exclude
cwd
from test name filter - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3353 (324a9) - Check error type before modifying it - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3385 (c44d9)
-
toMatchInlineSnapshot
fails when file path includes parentheses - by @pacexy in https://github.com/vitest-dev/vitest/issues/3370 and https://github.com/vitest-dev/vitest/issues/3371 (dcf13) - Stop spying on a method, when it's restored - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3386 (2cb1a)
- Test repeats - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/3369 (fb8fc)
-
browser:
- Throw an error if test failed to load - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3390 (b354b)
- Keep default export when rewriting exports - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3389 (6501d)
-
cli:
- Improve cac errors when mixing boolean and dot notation - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3302 (93fbd)
-
reporter:
- Prevent deleting test reports stored in coverage directory - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3331 (ddbba)
-
typecheck:
- Correctly resolve custom tsconfig path - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3342 (c53ae)
-
vite-node:
- Allow returning id not wrapped in promise - by @danielroe in https://github.com/vitest-dev/vitest/issues/3312 (9836c)
View changes on GitHub
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.