cypress-io / github-action

GitHub Action for running Cypress end-to-end & component tests

Home Page:https://on.cypress.io/guides/continuous-integration/github-actions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update Vite examples to v5

MikeMcC399 opened this issue · comments

Suggestion

This is an enhancement suggestion to update the following examples, currently using Vite v4, to use Vite v5 (see announcement Vite 5.0 is out! Nov 16, 2023):

Directory Current Vite Version
examples/component-tests 4.5.x
examples/wait-on-vite 4.5.x

Reason

cypress-io/github-action examples should show successful use with latest published version of Vite

Prerequisites

Component Testing example

  • examples/component-tests

  • Update @vitejs/plugin-react to minimum v4.2.0 to avoid peer dependency warning regarding Vite v5

  • Rename examples/component-tests/vite.config.js to vite.config.mjs (see Deprecate CJS Node API)

  • Resolve Cypress feature request cypress-io/cypress#28347. Without this enhancement to Cypress, npx cypress run --component does successfully run, however it outputs the following warnings:

    The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
    We detected that you have versions of dependencies that are not officially supported:
    
    - `vite`. Expected ^2.0.0 || ^3.0.0 || ^4.0.0, found 5.0.0.
    
    If you're experiencing problems, downgrade dependencies and restart Cypress.
    

E2E example