Skip to content

misc: Remove migration UI, warnings, and errors for changes pre-Cypress 10 (v15) #31629

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

Merged
merged 64 commits into from
May 12, 2025

Conversation

jennifer-shehane
Copy link
Member

@jennifer-shehane jennifer-shehane commented May 2, 2025

Additional details

🎉 13,000+ lines of code removed! 🎉

  • Technically, I didn't think this should be considered as 'breaking', it won't break users - there are just some situations that will behave differently in 15 vs 14 when using removed functionality. I've flagged it as 'misc', but open to feedback.
  • Migration UI, warnings and related errors are no longer shown when upgrading from Cypress versions earlier than 10.0.0.
  • Projects with cypress.json files will not be suggested to migrate.
  • Errors and warnings will no longer display for users using configuration values removed in versions before 10.0.0. Including:
    • blacklistHosts
    • componentFolder
    • experimentalComponentTesting
    • experimentalGetCookiesSameSite
    • experimentalNetworkStubbing
    • experimentalRunEvents
    • experimentalSessionSupport
    • experimentalShadowDomSupport
    • firefoxGcInterval
    • ignoreTestFiles
    • integrationFolder
    • pluginsFile
    • testFiles
  • Users using the cypress-plugin-retries package will no longer receive an error to switch to 'retries' configuration.
  • Users passing matchUrlAgainstPath to cy.intercept() will no longer receive an error (removed in 7.0)
  • Users passing --canary will no longer see an error (removed in 4.0)
  • Users registering dev-server:start listeners will no longer receive an error (removed in 10.0)
  • Mention of changes made in Cypress 10.0 were removed from error messages - this is just standard behavior.
  • Removed Cypress 10.0 from the major version welcome screen (summary of major versions) which was released 3 yrs ago.
  • Many of our tests and snapshots were updated to be more accurate - removing old uses of cypress.json in our tests for example.
  • Removed an ENORMOUS amount of system tests that are no longer relevant.

Steps to test

  • Ensure tests pass
  • We want to especially ensure logic around loading config and showing invalid config errors is working as much of this was touched.
  • Also ensure the Welcome screen shows for a major version update

How has the user experience changed?

Migration helpers and related errors are no longer shown when upgrading from Cypress versions earlier than 10.0.0.

PR Tasks

@jennifer-shehane jennifer-shehane self-assigned this May 2, 2025
@jennifer-shehane jennifer-shehane changed the base branch from develop to release/15.0.0 May 2, 2025 16:40
jennifer-shehane and others added 27 commits May 2, 2025 12:41
@jennifer-shehane jennifer-shehane changed the title [WIP] breaking: Remove migration [WIP] misc: Remove migration (v15) May 6, 2025
@jennifer-shehane jennifer-shehane changed the title [WIP] misc: Remove migration (v15) misc: Remove migration (v15) May 6, 2025
@jennifer-shehane jennifer-shehane changed the title misc: Remove migration (v15) misc: Remove migration UI, warnings, and errors for changes pre-Cypress 10 (v15) May 6, 2025
@AtofStryker
Copy link
Contributor

binaries to test are here

@jennifer-shehane jennifer-shehane requested a review from Copilot May 7, 2025 20:35
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes legacy migration UI, warnings, and errors for pre‑Cypress 10 configurations while also cleaning up related code and tests. Key changes include:

  • Deleting the entire MigrationDataSource and LegacyPluginsIpc modules.
  • Removing migration-related logic from data sources, actions, and the project lifecycle manager.
  • Updating tests, snapshots, docs, and CI configurations to reflect these removals.

Reviewed Changes

Copilot reviewed 457 out of 457 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/data-context/src/sources/MigrationDataSource.ts Removed legacy migration data source and related migration functions.
packages/data-context/src/data/index.ts Removed export for LegacyPluginsIpc to clean up unused code.
packages/data-context/src/data/coreDataShape.ts Cleaned out migration interfaces and state from core data structure.
packages/data-context/src/data/ProjectLifecycleManager.ts Removed legacy migration checks and methods; adjusted conditions for configuration processing.
packages/data-context/src/codegen/spec-options.ts Updated import path to use the new util folder instead of migration utilities.
packages/data-context/src/actions/* Removed migration actions from both index and ProjectActions modules.
packages/config/* Updated tests, config options, and snapshots to remove references to deprecated migration options and legacy warnings.
npm/grep/README.md, guides/error-handling.md Updated documentation to refer to the new config file format and error messages.
.circleci/workflows.yml Updated branch filters to reflect the removal of migration-related branches.
Comments suppressed due to low confidence (5)

packages/data-context/src/sources/MigrationDataSource.ts:1

  • Ensure that all references and imports of MigrationDataSource are removed from the codebase so that no broken dependencies remain.
/* Entire file removed */

.circleci/workflows.yml:41

  • The branch filter was updated to 'remove-migration'; please ensure that this change is coordinated with all related CI configurations to avoid unintended build exclusions.
-        - 'remove-migration'

packages/data-context/src/data/ProjectLifecycleManager.ts:761

  • [nitpick] The removal of the migration check in the e2e condition simplifies the logic; please confirm that this change is intended and that no legacy behavior is required for e2e projects.
if (testingType === 'e2e') {

guides/error-handling.md:81

  • [nitpick] The error message now references 'fakeFile' instead of 'pluginsFile'. Confirm that this change in terminology is intentional and that the documentation reflects the new naming convention.
FAKE_ERROR: (arg1: string, arg2: Error) => {

packages/data-context/src/codegen/spec-options.ts:6

  • Verify that updating the import path for getDefaultSpecFileName aligns with the current project structure and that there are no residual dependencies on the old migration utilities path.
import { FileExtension, getDefaultSpecFileName } from '../util/files'

@@ -830,7 +830,8 @@ describe('lib/cypress', () => {
]

renamedConfigs.forEach(function (config) {
it(`logs error and exits when using an old configuration option: ${config.old}`, function () {
// TODO: remove this skip once we have a renamed config option - there are none active now
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure I understand the skip here? We should probably create a git issue and explain this in more detail and link it back here

Copy link
Member Author

@jennifer-shehane jennifer-shehane May 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently we don't have any renamed config option errors that are active. So, we haven't renamed any configurations since 10.x (where there would be a key of newName in the breakingOptions), so I don't have a real use case to test here. There's already a unit test for this behavior, this was checking integration.

@jennifer-shehane jennifer-shehane merged commit 10c6656 into release/15.0.0 May 12, 2025
112 of 123 checks passed
@jennifer-shehane jennifer-shehane deleted the remove-migration branch May 12, 2025 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove migrations scripts for v9 -> v10 upgrades
2 participants