Open stefpb opened 1 year ago
The peer dependency is marked as optional using peerDependenciesMeta
(see https://github.com/vuejs/test-utils/blob/main/package.json#L72-L74)
Maybe that should not be the case as it used to compile slots (I don't remember why it was marked optional).
Would you like to open a PR to remove the optional from the pakage.json file and see if that fixes the issue? We would greatly appreciate it
Thanks for your answer. Now it looks like that this commit https://github.com/vuejs/test-utils/commit/b08b1f04681c703d1fd14f07272337f4e9ff2bfc leads to this problem. But yes, how i can double check this?
git revert b08b1f04681c703d1fd14f07272337f4e9ff2bfc
but now i don't know how i change this line https://github.com/stefpb/vue-test-utils-yarn-issue/blob/main/Dockerfile#L21 to say yarn to load the library from there :/
Yes, it's hard to test. But I think you can safely open a PR to remove compiler-dom
from peerDependencies
and peerDependenciesMeta
, as the dependency is in fact mandatory.
Unfortantely this Pull-Request (https://github.com/vuejs/test-utils/pull/2114) is not solving #2107. With 2.4.1 i have still this issue: https://github.com/stefpb/vue-test-utils-yarn-issue/tree/main
My intention was to revert https://github.com/vuejs/test-utils/commit/b08b1f04681c703d1fd14f07272337f4e9ff2bfc as you can see in https://github.com/vuejs/test-utils/pull/2113. Could you also restore the optional dependencies to the original state, as was intended?
If this fixes it, I say we go for it. Can you make a fresh PR @stefpb? I don't really know the intricacies of optionalDeps vs peer etc, it sounds like this is something you know well and have a fix for.
PR has been submitted. If a new release is available, I'll test that version here: https://github.com/stefpb/vue-test-utils-yarn-issue/blob/main/Dockerfile#L21
Any updates on planned fixes for this?
Checking the current package.json @vue/compiler-dom is still listed as a devDependency
in lieu of either dependency
or peerDependency
In order to fix this issue with Yarn (in PNP mode) I had to add the following to my .yarnrc.yml to fake the dependencies so that things work.
packageExtensions:
"@vue/test-utils@*":
dependencies:
"@vue/compiler-dom": "3.3.13"
"@vue/server-renderer": "3.3.13"
Describe the bug with
yarn berry
i have an issue with the version2.4.0
.To Reproduce https://github.com/stefpb/vue-test-utils-yarn-issue
Expected behavior
test-runner passed
Related information: Look to my minimal repo.