-
Notifications
You must be signed in to change notification settings - Fork 258
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: Regression in type definitions, types in package have errors #1538
Comments
I am aware that setting
I believe this is a genuine bug since code which has worked perfectly in the last 2.0.0 RC is now no longer working in the final 2.0.0. |
Hi @mgdodge Thanks for the report. Projects usually rely on Anyway, the type definition changed in Vue itself recently (with more generic parameters for DefineComponent, see vuejs/core@98b821d). We probably need to impact some methods of VTU to reflect that. Would you like to give it a try and open a PR if that's something important to you? |
As indicated in my above comment, I was already aware of Regardless, this is a breaking change to me because it requires me to make changes to my code that I would not have had to make otherwise. It is important to me, but I don't know enough about this project to submit a PR at present. I struggle to see what changed between the latest RC and the final version. |
The changes are in Vue itself in the commit I linked. Maybe there are some things we can improve in VTU, like the errors you see in The other errors look a bit dubious, as VTU returns the result of a call to |
The issue is in fact because the latest Vue release changed some types in vuejs/core@8071ef4 I landed a few fixes (#1544 #1545) that should now make the VTU types work with Vue v3.2.36 (but not with Vue v3.2.34 anymore, hence why |
Describe the bug
A typescript error is thrown during type-check of project, caused by bad typescript definitions in
@vue/test-utils
v2.0.0.To Reproduce
Minimal Repro: https://github.com/mgdodge/vue-test-utils-bug
After running
npm ci
to install, repo will have v2.0.0-rc.21 of test-utils. Trying to runnpm run type-check:tests
will pass, types are just fine.Edit package.json to use
"@vue/test-utils": "2.0.0",
runnpm i
to install new version, then runnpm run type-check:tests
again. Type-check will fail due to type errors.Expected behavior
Existing type-check scripts should work - there should not be a regression.
Related information:
@vue/test-utils
version: 2.0.0Vue
version: 3.2.36node
version: 14.18.1npm
(oryarn
) version: 6.14.15Additional context
The text was updated successfully, but these errors were encountered: