Description
Describe the bug
@vue/test-utils doesn't require a specific vue version as peer dependency. In a monorepo with multiple vue versions (possible with pnpm
(and probably yarn
as well) this caused @vue/test-utils to import the wrong vue version when using mount
.
The problem was fixed when adding vue 3.x
as peerDependency to @vue/test-utils using pnpm's packageExtensions
.
To Reproduce
I can't share our code and since I'm not exactly sure what dependency structure is needed I can't take the time to set up a reproduction.
We have a monorepo library with vue2
packages, vue3
packages and shared
packages (with code that can be shared between the two versions).
It seems to me that declaring peer dependencies is a good practice in general.
Expected behavior
I expect @vue/test-utils to always depend on the correct vue version by declaring peer dependencies.