Repository navigation
⚠️ Breaking change
Plain object and array props are no longer made deeply reactive. Tests relying on in-place mutations must wrap values in reactive() before mounting, or pass a new value to setProps. Passing the same mutated object to setProps does not trigger a re-render. Already-reactive props stay reactive. See #2951 and the migration guidance.
What's Changed
- feat(types): infer emitted event names and payload types by @niukanen1 in #2948
- feat: add TeleportStub and support custom components as built-in stubs by @simonyang08 in #2946
- feat: add VueWrapper.emit by @ValentinYoushkevich in #2998
- fix: keep the namespace prefix in attributes() by @MaxFreedomPollard in #2941
- fix: store props in shallow reactive to avoid deep propagation by @ackwell in #2951
- fix(types): infer emitted payloads for components with props by @ValentinYoushkevich in #2957
- fix: skip global mocks mixin when mocks are empty by @cexbrayat in #2962
- fix: record emitted events once when a devtools hook is installed by @ValentinYoushkevich in #2965
- fix(types): accept union-typed props in mount by @giaBaoJS in #2967
- fix: find elements and components inside multi-root functional components by @ValentinYoushkevich in #2971
- fix(#2333): keep props from mixins and extends in stubs by @ValentinYoushkevich in #2963
- fix: do not crash stubs on props without primitive conversion by @ValentinYoushkevich in #2975
- fix: support attachTo on Vue versions before 3.5 by @ValentinYoushkevich in #2974
- fix: apply global mocks named after internal instance fields by @ValentinYoushkevich in #2977
- fix: clear events emitted during unmount from the emitted history by @ondrhn in #2985
- fix: findComponent by selector on a functional root component by @ValentinYoushkevich in #2978
- fix: keep Map and Set values in setData by @mkantautas in #2980
- fix: stub directives registered with a camelCase or kebab-case name by @MaxFreedomPollard in #2982
- fix: use Vite mode to select the built package for tests by @cexbrayat in #2995
- fix: update the content of a teleport stubbed with a component by @ValentinYoushkevich in #2993
- fix: do not crash findComponent if ref points to an svg element by @NgoQuocViet2001 in #2983
- fix(stubs): skip component name lookups on re-render by @ondrhn in #2987
- fix(types): keep VueWrapper for findComponent with an any-typed selector by @ondrhn in #2973
- fix(#2541): stub globally registered components by their registration key by @ValentinYoushkevich in #2996
- fix: only apply stubs to the app being rendered by @ValentinYoushkevich in #2997
- fix: infer resolved types for defaulted wrapper props by @mvanhorn in #3003
- fix: render slots passed to a stubbed teleport or keep-alive by @ValentinYoushkevich in #3013
- fix(#2135): do not warn when mounting option slots are called outside render by @ValentinYoushkevich in #3014
New Contributors
- @MaxFreedomPollard made their first contribution in #2941
- @niukanen1 made their first contribution in #2948
- @ackwell made their first contribution in #2951
- @ValentinYoushkevich made their first contribution in #2957
- @Glandos made their first contribution in #2962
- @giaBaoJS made their first contribution in #2967
- @ondrhn made their first contribution in #2985
- @mkantautas made their first contribution in #2980
- @NgoQuocViet2001 made their first contribution in #2983
- @SuperDJ made their first contribution in #3010
Full Changelog: v2.5.1...v2.6.0