-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
chore: support vite v4 for component testing #25365
Conversation
Test summaryRun details
View run in Cypress Dashboard ➡️ Flakiness
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 |
@@ -76,7 +76,7 @@ export const WIZARD_DEPENDENCY_VITE = { | |||
package: 'vite', | |||
installer: 'vite', | |||
description: 'Vite is dev server that serves your source files over native ES modules', | |||
minVersion: '^=2.0.0 || ^=3.0.0', | |||
minVersion: '^=2.0.0 || ^=3.0.0 || ^=4.0.0', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not specific to this PR, just curious to get some thoughts - as we add more major versions to the support baseline do we want to continue this pattern or would something like this be easier to manage?
>=2.0.0 <5.0.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that's easier, unless we encounter the rare situation where a single major isn't supported, but newer and older versions are (like with Node).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, there isn't an "exclude" operator so we'd end up having to stitch ranges together. In any event, not an issue at the moment just brainstorming a bit.
@@ -1,850 +1,4 @@ | |||
exports['@cypress/vite-dev-server react executes all of the tests for vite3.0.2-react 1'] = ` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This deletion doesn't feel right - I would expect a large addition here for 4.0.4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, looks like I committed the wrong updated snapshot, will come back to this after some IATR stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated!
* develop: (45 commits) fix: re-enable CYPRESS_INTERNAL_VITE_DEV development (#25364) fix: add skip domain injection description (#25463) fix: revert CSP header and script-src addition (#25445) chore: Update v8 snapshot cache (#25401) feat: Do not strip CSP headers from HTTPResponse (#24760) fix: keep spaces in formatted output in test runner (#24687) fix: Restrict dependency versions to known supported ranges (#25380) chore: Update v8 snapshot cache (#25370) feat: experimental skip domain injection (#25307) chore: support vite v4 for component testing (#25365) feat: Use JSX/TSX in generated spec filenames (#25318) docs(angular): Properties that are spied upon have to be defined within `componentProperties` instead of on root level. (#25359) chore: remove lint-changed from scripts/docs (#25308) chore: bump to 12.3.0 [skip ci] (#25355) fix: make NODE_ENV "production" for prod builds of launchpad (#25320) fix: .contains() should only return one element at all times (#25250) feat: add currentRetry to Cypress API (#25297) chore: release @cypress/webpack-dev-server-v3.2.2 chore: release create-cypress-tests-v2.0.1 fix: change wording for spec creation (#25271) ...
@marktnoonan hey thanks for the work here, any chance of a release soon to include this fix? |
@Ancient-Dragon this should be in a release later this month. In the meantime it's safe to just ignore the warning Cypress gives about Vite 4 support and use it. It warns because we don't explicitly support breaking changes to a bundler without testing ourselves. This PR adds some testing that verifies Vite 4 works with Cypress, but didn't require any changes to Cypress code. So you should be good to go. |
User facing changelog
Vite 4+ will no longer show a warning when used for component testing projects.
Additional details
Steps to test
How has the user experience changed?
Previously there were warnings about the dependency in the launchpad, and setup was possible but only by ignoring what Cypress tells you about Vite versions it supports.
PR Tasks
cypress-documentation
?type definitions
?