Skip to content
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

Open
Gi11i4m opened this issue Sep 5, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Gi11i4m
Copy link

Gi11i4m commented Sep 5, 2024

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.

@Gi11i4m Gi11i4m added the bug Something isn't working label Sep 5, 2024
@cexbrayat
Copy link
Member

Hi @Gi11i4m

The peer dependency has been removed in #2364 by @qmonmert

@qmonmert @lmiller1990 can you explain why this was necessary?

@Gi11i4m
Copy link
Author

Gi11i4m commented Sep 17, 2024

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"?

@cexbrayat
Copy link
Member

@Gi11i4m Yes, feel free to open a PR 👍

@qmonmert
Copy link
Contributor

@Gi11i4m the reason was in this ticket jhipster/jhipster-lite#9030

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants