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

fix(npm/vue): update types #23890

Merged
merged 6 commits into from
Sep 22, 2022
Merged

fix(npm/vue): update types #23890

merged 6 commits into from
Sep 22, 2022

Conversation

lmiller1990
Copy link
Contributor

@lmiller1990 lmiller1990 commented Sep 20, 2022

User facing changelog

Update type definition for mount function exported from cypress/vue.

Additional details

Steps to test

I could not reproduce this type error in the main Cypress repo. It might be possible via system test, but this seems really overkill. I tested by following the reproduction in the issue.

Prep

  1. checkout this branch
  2. yarn install
  3. in npm/vue run yarn build

Reproduction

Now grab the user's reproduction:

Verify Fix

  • manually removing rm -rf node_modules/cypress/vue
  • replace with the new build - eg cp -r ~/path/to/your/monorepo/cli/vue ~/path/to/reproduction/node_modules/cypress/vue
  • run npm run check again - no error

I'd really like to figure out how better to test these types, but I don't know a good solution right now. Vue types are very painful, there's way too many ways to define a component.

How has the user experience changed?

Better and more correct type inference.

PR Tasks

  • Have tests been added/updated?
  • Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • Has a PR for user-facing changes been opened in cypress-documentation?
  • Have API changes been updated in the type definitions?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Sep 20, 2022

Thanks for taking the time to open a PR!

@cypress
Copy link

cypress bot commented Sep 20, 2022



Test summary

4787 0 373 0Flakiness 0


Run details

Project cypress
Status Passed
Commit 36798df
Started Sep 21, 2022 8:06 AM
Ended Sep 21, 2022 8:21 AM
Duration 15:32 💡
OS Linux Debian - 11.3
Browser Electron 102

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

Copy link
Contributor

@mike-plummer mike-plummer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as described 💯 . Definitely painful to have to maintain types this way, but I suppose that's not work-aroundable based on how complex Vue's component defns are

Copy link
Contributor

@astone123 astone123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the type error for me

@lmiller1990 lmiller1990 merged commit eb8ae02 into develop Sep 22, 2022
@lmiller1990 lmiller1990 deleted the issue-23653 branch September 22, 2022 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mount type definitions incompatible with Vue 3.2.38 SFC using <slot>
3 participants