testing-library / cypress-testing-library

🐅 Simple and complete custom Cypress commands and utilities that encourage good testing practices.
http://npm.im/@testing-library/cypress
MIT License
1.8k stars 152 forks source link

Update Cypress peer dependency to 13 #259

Closed marktnoonan closed 11 months ago

marktnoonan commented 1 year ago

Hi! Let me know if you want to wait until closer to release to merge this, I just wanted to flag that 13 is coming, I do not have a definitive release date. I have seen no problems with Testing Library in the pre-release of the new version and there's nothing that seems like it would cause a problem. Just wanted to let you know that a new major is coming soon-ish.

What:

Cypress 13 is coming soon, it will include some breaking changes to Cypress but nothing that breaks Cypress Testing Library.

Why: Avoid peer dependency warnings when people upgrade.

How:

Checklist:

nrutman commented 12 months ago

@NicholasBoll any thoughts on getting this merged by the team? It's blocking upgrades to Cypress 13 for anyone who uses Cypress Testing Library.

Lasidar commented 11 months ago

We are waiting on this fix as well for our upgrade to Cypress 13

vicwomg commented 11 months ago

Note that if you're running into issues with cypress-io/github-action , you can temporarily work around it by overriding the install command in the workflow file to ignore peer deps in the install-command parameter:

- name: Cypress e2e run
        id: cypress_e2e_run
        uses: cypress-io/github-action@v6.4.0
        with:
          # Override install because Cypress upgrades break peer deps of other packages
          install-command: npm ci --legacy-peer-deps
          install: true
          browser: chrome
          # `Record: true` sends results to Cypress Dashboard
          record: true
          parallel: true
istr commented 11 months ago

For the time being, you might as well override the peer dependency in your root package.json. Minimal working example:

{
  "devDependencies": {
    "@testing-library/cypress": "9.0.0",
    "cypress": "13.1.0"
  },
  "overrides": {
    "@testing-library/cypress": {
      "cypress": "^13.0.0"
    }
  }
}

Dependency tree:

npm list
cyp-test-foo@ /home/istr/cyp-test-foo
├── @testing-library/cypress@9.0.0 overridden
└── cypress@13.1.0 overridden
ray-peters commented 11 months ago

Hey team, any blockers on this front? Is there anything we can do to help move this update along?

PowerSupply commented 11 months ago

Is this moving forwards?

nrutman commented 11 months ago

@NicholasBoll @kentcdodds is anything holding this up from being merged? It's preventing people from upgrading to Cypress 13 if they use your package.

davepar commented 11 months ago

Also hit this problem after upgrading to Cypress v13.

nrutman commented 11 months ago

Thank you @kentcdodds!!

github-actions[bot] commented 11 months ago

:tada: This PR is included in version 10.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

Kocal commented 11 months ago

Thanks for merging :)