Cypress 10.7: What's New & Safe Upgrade Guide
In this article
Cypress 10.7 is a minor release that focuses on bug fixes and stability improvements rather than introducing major new features. The most notable change is the upgrade of the bundled TypeScript support, along with several fixes for the Cypress Studio feature and the Test Runner's UI. Upgrading safely is straightforward: review the changelog, update your project's dependency, and run your test suite to catch any regressions. This article explains what changed in 10.7, how to upgrade with minimal risk, and answers common questions about the process.
Background: Cypress Versioning and Release Cadence
Cypress follows a semantic versioning scheme (major.minor.patch). Major releases (like 10.0) can include breaking changes, while minor releases (10.x) add features and fixes without breaking existing APIs. Patch releases (10.7.x) are for bug fixes. Cypress typically releases a new minor version every few weeks, and 10.7 was released in early 2022. It's part of the 10.x line, which introduced a new Test Runner UI and the concept of component testing. Understanding this cadence helps set expectations: upgrading from 10.6 to 10.7 is low risk, while upgrading from 9.x to 10.x requires more planning.
What's New in Cypress 10.7
The official changelog for 10.7.0 lists the following key changes:
- TypeScript 4.7 support: Cypress's internal TypeScript compiler was upgraded, allowing users to write test files using newer TypeScript syntax and features.
- Fixes for Cypress Studio: Several bugs were resolved, including issues with recording interactions and handling iframes.
- Test Runner UI fixes: Improved the display of command logs and fixed a problem where the browser window could become unresponsive.
- Other bug fixes: Addressed issues with `cy.intercept()` in certain edge cases, and fixed a memory leak in the dashboard service.
No new commands or major features were added in 10.7. It's a maintenance release aimed at polish.
How to Upgrade Safely: Step-by-Step
Follow these steps to minimize disruption when upgrading from any 10.x version to 10.7:
- Read the changelog: Visit the official Cypress changelog for 10.7.0 and note any breaking changes (there are none for this release, but it's a good habit).
- Back up your project: Ensure your test files and configuration are committed to version control so you can revert if needed.
- Update the dependency: Run
npm install --save-dev cypress@10.7.0(oryarn add --dev cypress@10.7.0). This updates the package.json and lockfile. - Run your tests: Execute your full test suite in headless mode (
npx cypress run) to catch any failures quickly. - Run tests in interactive mode: Launch
npx cypress opento ensure the Test Runner UI works as expected, especially if you use Cypress Studio. - Check for plugin compatibility: If you use third-party plugins (e.g., cypress-cucumber-preprocessor), verify they support 10.7. Most plugins are compatible, but it's worth checking.
- Update CI configuration: If you run Cypress in CI, update the Docker image or npm cache to the new version.
If you're upgrading from a version before 10.0, you'll need to follow the migration guide for 10.0 first, as there were breaking changes (like the removal of the cypress open command's --config flag).
Common Problems and How to Avoid Them
While 10.7 is a minor release, users have reported a few issues after upgrading:
- TypeScript compilation errors: If you use TypeScript, the new compiler might surface stricter type checks. Run
npx tsc --noEmitto catch these before running tests. - Cypress Studio recording failures: If you use Cypress Studio, clear your browser cache and ensure you're using a supported browser (Chrome, Edge, Firefox).
- Slow startup: Some users noticed a slight delay on first launch after upgrading. This is usually temporary as Cypress rebuilds its cache.
If you encounter an issue not listed, search the Cypress GitHub issues or ask in the community forum. The Cypress team is responsive.
Comparing 10.7 to Earlier Versions
If you're on 10.6, the jump to 10.7 is trivial. If you're on 10.0, you'll benefit from numerous fixes and performance improvements that were added in the 10.1–10.6 releases. If you're on 9.x, you'll need to migrate to 10.x, which involves changes to the configuration file (now cypress.config.js instead of cypress.json) and the removal of some deprecated commands. The Cypress team provides a migration guide that walks through each change. For most projects, the migration takes less than an hour.
Cost and Licensing Considerations
Cypress is open-source (MIT license) and free to use. There is also a paid Cypress Cloud service (formerly Dashboard) that provides parallelization, test recording, and analytics. Upgrading to 10.7 does not affect your license. If you use Cypress Cloud, ensure your test runner version is compatible with the service—Cypress Cloud generally supports the latest versions, but you can check the compatibility matrix in the docs.
Frequently Asked Questions
Do I need to update my test code after upgrading to 10.7?
In most cases, no. 10.7 is backward-compatible with 10.x. Your existing tests should run without changes. However, if you use TypeScript, you might need to fix minor type errors if the new compiler is stricter.
Can I skip 10.7 and go directly to 10.8 or 11?
Yes, you can skip minor versions. When you upgrade, you'll get all the changes from the versions you skipped. For example, going from 10.6 to 11.0 will include the 10.7–10.11 changes. However, it's safer to upgrade incrementally to isolate any issues.
Will my Cypress plugins work with 10.7?
Most plugins that support 10.x will work with 10.7. Check the plugin's documentation for any version constraints. If a plugin uses internal APIs, it might break, but this is rare for minor releases.
How do I roll back if something goes wrong?
Simply change the version in your package.json back to the previous version (e.g., cypress@10.6.0) and run npm install. Your test files are unaffected, so you can revert without losing work.
Is Cypress 10.7 still supported?
Cypress provides support for the latest version and a few previous ones. As of 2024, 10.7 is no longer the latest, but you can still use it. However, it's recommended to stay current to receive bug fixes and security updates.