-
Notifications
You must be signed in to change notification settings - Fork 244
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
Bug: @vue/test-utils doesn't require a specific vue version as peer dependency #2507
Comments
Hi @Gi11i4m The peer dependency has been removed in #2364 by @qmonmert @qmonmert @lmiller1990 can you explain why this was necessary? |
Reading the commit message it seems like the peer dependencies were not removed for a valid reason. They're definitely not useless. Seeing as @Akryum is describing the exact same problem, is it okay if I open a PR re-adding the peerDependencies, although with a much wider range since that's probably the reason they "generated warnings"? |
@Gi11i4m Yes, feel free to open a PR 👍 |
@Gi11i4m the reason was in this ticket jhipster/jhipster-lite#9030 |
- no peer dependencies causes @vue/test-utils to import stuff from the wrong Vue version in monorepos with multiple Vue versions - too specific peer dependencies causes dependant projects not to be updated or find a valid Vue version so the range has been widened closes 2507
@qmonmert I see. Well, I'm pretty sure the issue could've been fixed as well by setting the peer dependency range to Here's a PR with peer dependencies re-added but with a wide range to assure everyone can still update within their own |
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 probablyyarn
as well) this caused @vue/test-utils to import the wrong vue version when usingmount
.The problem was fixed when adding vue
3.x
as peerDependency to @vue/test-utils using pnpm'spackageExtensions
.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 andshared
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.
The text was updated successfully, but these errors were encountered: