Packages

cypress

16.3.0 · 10 Nov 2026MIT7.6M / weekRepositoryHomepagenpmAtom feed

Your version

10.0.0

major1 Jun 2022Where it was published

10.11.0 is the newest release of 10.x.

In short

4 breaking1 deprecated20 new18 changed

  • Breaking

    Read our Migration Guide which explains some breaking changes in more detail.**

  • Breaking

    Using a cypress.json configuration file is no longer supported. Replace this configuration file with a cypress.config.js, cypress.config.ts, cypress.config.cjs, or cypress.config.mjs file. This change provides better flexibility and extensibility of configuration. Cypress throws an error if both a cypress.json file and cypress.config.{cjs,js,mjs,ts}file are found. Addressed in #18221, #18300, #20554, and #20643.

  • Breaking

    A default configuration file is no longer auto-generated by Cypress when a configuration file doesn't exist. Instead, you can run cypress openand set up your project with a specific testing type to have this file generated. The setup customizes the generated configuration by testing-type for the language and dependencies used in your project.

  • Breaking

    The configuration file's JSON schema is no longer supported since the configuration can no longer be provided via a JSON format.

  • Deprecated

    The cypress open-ct and cypress run-ct commands have been deprecated. Use cypress open --component and cypress run --component instead. Addresses #18418.

Release note

10.0.0​

Released Jun 01, 2022

Summary:

Component testing is now beta! We've also reworked the Cypress app from the ground up to modernize the interface, streamline workflows, and integrate better into your overall development experience. Read more about 10.0 in our blog post.

Breaking Changes:

Run cypress open to go through our interactive migration which guides you in updating your files and configuration options. Read our Migration Guide which explains some breaking changes in more detail.**

  • We introduced several breaking changes to the Cypress configuration filedetailed below:

    • Using a cypress.json configuration file is no longer supported. Replace this configuration file with a cypress.config.js, cypress.config.ts, cypress.config.cjs, or cypress.config.mjs file. This change provides better flexibility and extensibility of configuration. Cypress throws an error if both a cypress.json file and cypress.config.{cjs,js,mjs,ts}file are found. Addressed in #18221, #18300, #20554, and #20643.

    • A Cypress configuration file is now required and passing the CLI flag --config-file=false throws an error. Addressed in #20643.

    • A default configuration file is no longer auto-generated by Cypress when a configuration file doesn't exist. Instead, you can run cypress openand set up your project with a specific testing type to have this file generated. The setup customizes the generated configuration by testing-type for the language and dependencies used in your project.

    • The configuration file's JSON schema is no longer supported since the configuration can no longer be provided via a JSON format.

  • Cypress has made several configuration option changes including renaming options, removing options, and only allowing some options within a specific testing type. Run cypress open to have our automated migration update these options for you.

    • Many configuration options are now specific to either end-to-end or component testing. The types have also been updated to match the new structure. Addressed in #20677.

    • The baseUrl and experimentalSessionAndOrigin configuration options are no longer valid as top-level configuration options and can only be defined within the e2e configuration. Addressed in #20589 and #21588.

    • The supportFile and slowTestThreshold options are no longer valid as top-level configuration options and must now be defined within the e2eand/or component configurations.

    • Previously the supportFile option defaulted to cypress/support/index.js. Now the e2e.supportFile option defaults to cypress/support/e2e.{js,jsx,ts,tsx} and the component.supportFile option defaults to cypress/support/component.{js,jsx,ts,tsx}. Addressed in #19776 and #19364.

    • The pluginsFile option was removed. This option should be replaced with the new setupNodeEvents() and devServer() configuration options. Addressed in #18798 and #20560.

    • The testFiles option was removed. This option was replaced with the new specPattern option. Addressed in #19319 and #20565.

    • The integrationFolder and componentFolder options were removed. These options were made obsolete by the new specPattern option. Addressed in #19319.

    • The ignoreTestFiles option was removed. This option was replaced with the new excludeSpecPattern option. Addressed in #19319.

    • The experimentalStudio option was removed with the removal of the experimental Cypress Studio feature. If this option is configured in your project, Cypress displays a warning message. Leave any feedback in the Cypress Studio discussion. Addressed in #20515.

  • During cypress open, the ability to "Run all specs" and "Run filtered specs" has been removed. Leave feedback about the removal in the 'Run all specs' discussion. Your feedback will help us make product decisions around the future of this feature.

  • The experimental Cypress Studio feature has been removed. Leave feedback about the removal in the Cypress Studio discussion. Your feedback will help us make product decisions around the future of this feature. Addressed in #20515.

  • You can no longer run your tests during cypress run or cypress open in browser versions that are not supported by Cypress.

  • Generated screenshots and videos are still created inside their respective folders (screenshotsFolder, videosFolder). However, the paths of generated files inside those folders are stripped of any common ancestor paths shared between spec files found by the specPattern option and may no longer be deterministic. Addressed in #19319.

Deprecations:

  • Deprecated

    The cypress open-ct and cypress run-ct commands have been deprecated. Use cypress open --component and cypress run --component instead. Addresses #18418.

Features:

  • Cypress 10 now includes beta support for component testing. More features around component testing are detailed below:

    • Component testing is now integrated directly into the main app, allowing you to choose which testing experience you want upon launching Cypress. See our current support for frameworks and bundlers. Addressed in #21111.

    • Cypress now guides you through installing the component testing dependencies and project setup necessary to begin component testing in Cypress. Previously this required manual setup and referencing the documentation.

    • When you use the Cypress app during cypress open to configure your project for CT testing, a cy.mount() command is automatically scaffolded for you in a ct.supportFile.

    • You can now create an empty component testing spec file from within the Cypress app directly and preview the specfile upon creation.

    • The following component testing plugins are now shipped with Cypress to enable easy cy.mount() implementation. Your local framework dependencies found in node_modules are referenced to prevent adding additional dependencies or peer-dependencies to your package.json. From now on, the latest plugin version ships with each Cypress release. See our current support for frameworks and bundlers. Addressed in #20930.

      • @cypress/mount-utils@2.0.0

      • @cypress/react@6.0.0

      • @cypress/vue@4.0.0

      • @cypress/vue2@1.0.0

  • We've enhanced how you can set and refresh configuration detailed below:

    • Support for cypress.config.js|ts|cjs|mjs configuration files was added. Addressed in #20643.

    • The Cypress app now refreshes when changes are made in the configuration file instead of closing the app. Addressed in #21160.

  • We've added several new configuration options detailed below:

    • The setupNodeEvents()option is a new testing type specific configuration option. The option must be defined within the e2e and/or component configurations. This option modifies your loaded configuration, listens to events, and registers plugins. This option replaces the pluginsFile option. Addressed in #18798 and #20560.

    • The devServer option is a new component testing specific option that must be defined within the component configuration. This option provides a mechanism for starting a component testing dev-server when tests are running.

    • The specPattern option is a new testing-type specific configuration option that must be defined within the e2e and/or component configurations. This option accepts a glob or an array of globs of the spec files to load. This option simplifies the spec discovery by replacing the componentFolder, integrationFolder, and testFiles options. Addressed in #19319, #20565, and #20853.

      • The e2e.specPattern default value for new projects is cypress/e2e/**.cy.{js,jsx,ts,tsx}. For existing projects, run cypress open to have your spec files automatically migrated to match this specPattern. Addressed in #21193.

      • The component.specPatterndefault value is **/*.cy.{js,jsx,ts,tsx}.

    • The excludeSpecPattern option is a new testing type specific configuration option that must be defined within the e2e and/or component configurations. This option accepts a glob or an array of globs, and ignores the matching spec files that would otherwise be shown in your list of specs. This option replaces the ignoreTestFiles option. Addressed in #19319, #19980, #20763, #20853.

      • The e2e.excludeSpecPatterndefault value is the same as the replaced ignoreTestFiles glob pattern of *.hot-update.js.

      • The component.excludeSpecPatterndefault value is ['**/__snapshots__/*','**/__image_snapshots__/*'] plus the e2e.specPattern glob patterns.

      • The **/node_modules/** pattern is automatically added to both e2e.excludeSpecPattern and component.excludeSpecPattern and can't be overridden. Excluding node_modules is consistent with <10.0 behavior.

    • Intelligent Code Completion was added with the defineConfig() helper function. The helper enables configuration auto-completion and in-line documentation in the configuration file in your IDE. While the helper is not strictly necessary for Cypress to parse your configuration, we recommend wrapping your config object with defineConfig(). Addressed in #18302.

  • We've made some updates to Cypress API commands detailed below:

    • Enhancements were made to provide visual indication of nested commands and logs. With this change, users are now able to click on log groups to print additional log details to the dev tools console.

    • The .within() command was updated to provide visual indication of logs and commands executed in the .within command context. Addresses #20433.

    • The redundant cy.session() log is now removed. Address #7673 in #21457.

    • Users can now add custom cy.hover() and cy.mount() implementation using Cypress.Commands.add() since we don't provide a default implementation. Previously users had to use Cypress.Command.override() to provide the custom implementation. Addresses #18941.

  • We've made some updates to the Cypress CLI detailed below:

    • You can now pass in testing type specific configuration options via the --config CLI flag without nesting JSON. Addressed in #20127.

    • New --e2e and --component CLI flags were added to cypress run and cypress open to allow a user to run or launch Cypress for a specific testing-type. If a testing-type specific CLI flag is not provided when running cypress run, Cypress runs end-to-end tests by default.

    • A warning message is now displayed when cypress open is ran with the --browser CLI flag for a browser that does not exist on the system. Addressed in #18473.

    • If a testing type and browser flag are passed to cypress open when launching a specific project, the browser automatically launches. Addressed in #21538.

  • The cypress open experience has been updated to take you through our Launchpad with many features detailed below:

    • When you launch Cypress via cypress open, Cypress asks whether you want to do end-to-end or component testing and takes you through the configuration necessary to set up your project. Addressed in #18924.

    • Having files scaffolded on new projects during end-to-end testing is now opt in and not automatic. Addressed in #18924.

    • When Cypress detects you have a cypress.json during cypress run, it errors and asks you to run cypress open to migrate. When Cypress detects you have a cypress.json during cypress open, it guides you through project migration to ensure your project continues to work as expected. Addressed in #18924.

  • After launching the browser, there are several new features in our Appdetailed below:

    • The Cypress app has been redesigned so that the Command Log and all associated navigation display with a dark background.

    • You can now change specs or the browser within the same window as running your tests.

    • Many git details are now shown within your current project in Cypress including the current branch and the last commit details of each spec in the spec explorer. Addressed in #20648, #21139, #21436, and #20744

    • When creating a new spec within Cypress, your project's language is detected to provide the correct file extension and the specPattern is checked to ensure the spec is found by Cypress. After creating the spec, you can preview the spec that was generated with the option to immediately run the spec or create another spec. Addressed in #21225, #20567, #20657, #20962.

    • The Settings page has been redesigned to more clearly distinguish between settings that are specific to the project, your device, and the Dashboard.

Bugfixes:

  • An error message is displayed when you add a command using Cypress.Commands.add() that has the same name as an internal reserved Cypress command. Addresses #6146.

  • A one pixel, left, vertical border was removed that was incorrectly included on screenshot artifacts generated from the cy.screenshot() command in component tests. Addressed in #21019.

  • A memory leak was fixed during cypress run for end-to-end tests launched in Chromium and Firefox browsers that reduces the overall time it takes to run a set of specs and aligns with how the browser is launched once for all specs in component testing. With this change, the before:browser:launch node event now properly only fires once per run, instead of firing before each spec. Addressed in #19915.

  • The default webpack configuration's host value was changed from localhost to 127.0.0.1 to support the Node 17+ changes with how DNS names are resolved. Addressed in #21430.

  • Cypress throws a detailed error when some plugin versions are no longer supported in Cypress 10. Addressed in #21169.

Dependencies:

  • Added @cypress/mount-utils@2.0.0 dependency.

  • Added @cypress/react@6.0.0 dependency.

  • Added @cypress/vue@4.0.0 dependency.

  • Added @cypress/vue2@1.0.0 dependency.

Misc:

  • The Plugins concept in Cypress still exists with the intent to tap into, modify, or extend the internal behavior(s) of Cypress. The Plugins concept, however, is expected to be used in conjunction with our new setupNodesEvents configuration option, which was named to reflect that Plugins use Cypress's node events.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.