Skip to content

Commit 10c6656

Browse files
jennifer-shehanecypress-bot[bot]AtofStryker
authored
misc: Remove migration UI, warnings, and errors for changes pre-Cypress 10 (v15) (#31629)
* begin removing migration code * remove migration query * add back actions * remove more migration references * more migration removals * remove call to migration * remove gqp-Migration file * updates to remove migration * update type * remove a lot more migration code - especially errors * Remove other errors/warnins for versions before 10.x * update error snapshots * fix some tests * index on remove-migration: 49fa75a Merge branch 'remove-migration' of https://github.com/cypress-io/cypress into remove-migration * index on remove-migration: 49fa75a Merge branch 'remove-migration' of https://github.com/cypress-io/cypress into remove-migration * index on remove-migration: 49fa75a Merge branch 'remove-migration' of https://github.com/cypress-io/cypress into remove-migration * remove more system tests and references * fix call to refreshMetaState which was lost at initialization * rearrange some system tests to not be dependent on migration * update welcome version test * fix wording of messaging * skip irrelevant test * fix failing assertion * remove tests around cypress-plugin-retries * Remove test from config_spec * Remove screenshot from snapshot * fix tests + remove more migration projects * remove + update system tests * remove + update system tests * remove some invalid dev-server: start errors * remove references and tests around pluginsFile which was removed * remove some more invalid config examples * Add changelog entry * fix changelog link * fix unit test * index on remove-migration: 490ddb1 Merge branch 'release/15.0.0' into remove-migration * index on remove-migration: 490ddb1 Merge branch 'release/15.0.0' into remove-migration * index on remove-migration: 490ddb1 Merge branch 'release/15.0.0' into remove-migration * run all binary/windows tests on this branch * Update packages/scaffold-config/test/unit/detect.spec.ts Co-authored-by: Bill Glesias <[email protected]> * Update packages/scaffold-config/test/unit/detect.spec.ts Co-authored-by: Bill Glesias <[email protected]> --------- Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com> Co-authored-by: Bill Glesias <[email protected]>
1 parent f79d1fa commit 10c6656

File tree

457 files changed

+240
-13359
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

457 files changed

+240
-13359
lines changed

.circleci/workflows.yml

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ mainBuildFilters: &mainBuildFilters
3838
- /^release\/\d+\.\d+\.\d+$/
3939
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
4040
- 'update-v8-snapshot-cache-on-develop'
41-
- 'breaking/remove_webpack_4'
41+
- 'remove-migration'
4242

4343
# usually we don't build Mac app - it takes a long time
4444
# but sometimes we want to really confirm we are doing the right thing
@@ -49,7 +49,7 @@ macWorkflowFilters: &darwin-workflow-filters
4949
- equal: [ develop, << pipeline.git.branch >> ]
5050
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
5151
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
52-
- equal: [ 'breaking/remove_webpack_4', << pipeline.git.branch >> ]
52+
- equal: [ 'remove-migration', << pipeline.git.branch >> ]
5353
- matches:
5454
pattern: /^release\/\d+\.\d+\.\d+$/
5555
value: << pipeline.git.branch >>
@@ -60,7 +60,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
6060
- equal: [ develop, << pipeline.git.branch >> ]
6161
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
6262
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
63-
- equal: [ 'breaking/remove_webpack_4', << pipeline.git.branch >> ]
63+
- equal: [ 'remove-migration', << pipeline.git.branch >> ]
6464
- matches:
6565
pattern: /^release\/\d+\.\d+\.\d+$/
6666
value: << pipeline.git.branch >>
@@ -83,7 +83,7 @@ windowsWorkflowFilters: &windows-workflow-filters
8383
- equal: [ develop, << pipeline.git.branch >> ]
8484
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
8585
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
86-
- equal: [ 'breaking/remove_webpack_4', << pipeline.git.branch >> ]
86+
- equal: [ 'remove-migration', << pipeline.git.branch >> ]
8787
- matches:
8888
pattern: /^release\/\d+\.\d+\.\d+$/
8989
value: << pipeline.git.branch >>
@@ -157,7 +157,7 @@ commands:
157157
name: Set environment variable to determine whether or not to persist artifacts
158158
command: |
159159
echo "Setting SHOULD_PERSIST_ARTIFACTS variable"
160-
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "breaking/remove_webpack_4" ]]; then
160+
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "remove-migration" ]]; then
161161
export SHOULD_PERSIST_ARTIFACTS=true
162162
fi' >> "$BASH_ENV"
163163
# You must run `setup_should_persist_artifacts` command and be using bash before running this command
@@ -1160,23 +1160,6 @@ commands:
11601160
CYPRESS_INSTALL_BINARY=~/cypress/cypress.zip npm install --legacy-peer-deps ~/cypress/cypress.tgz
11611161
fi
11621162
working_directory: /tmp/<<parameters.repo>>
1163-
- run:
1164-
name: Scaffold new config file
1165-
working_directory: /tmp/<<parameters.repo>>
1166-
environment:
1167-
CYPRESS_INTERNAL_FORCE_SCAFFOLD: "1"
1168-
command: |
1169-
if [[ -f cypress.json ]]; then
1170-
rm -rf cypress.json
1171-
echo 'module.exports = { e2e: {} }' > cypress.config.js
1172-
fi
1173-
- run:
1174-
name: Rename support file
1175-
working_directory: /tmp/<<parameters.repo>>
1176-
command: |
1177-
if [[ -f cypress/support/index.js ]]; then
1178-
mv cypress/support/index.js cypress/support/e2e.js
1179-
fi
11801163
- run:
11811164
name: Print Cypress version
11821165
working_directory: /tmp/<<parameters.repo>>

cli/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ _Released 07/01/2025 (PENDING)_
1818

1919
- [`tsx`](https://tsx.is/) is now used in all cases to run the Cypress config, replacing [ts-node](https://github.com/TypeStrong/ts-node) for TypeScript and Node for commonjs/ESM. This should allow for more interoperability for users who are using any variant of ES Modules. Addresses [#8090](https://github.com/cypress-io/cypress/issues/8090), [#15724](https://github.com/cypress-io/cypress/issues/15724), [#21805](https://github.com/cypress-io/cypress/issues/21805), [#22273](https://github.com/cypress-io/cypress/issues/22273), [#22747](https://github.com/cypress-io/cypress/issues/22747), [#23141](https://github.com/cypress-io/cypress/issues/23141), [#25958](https://github.com/cypress-io/cypress/issues/25958), [#25959](https://github.com/cypress-io/cypress/issues/25959), [#26606](https://github.com/cypress-io/cypress/issues/26606), [#27359](https://github.com/cypress-io/cypress/issues/27359), [#27450](https://github.com/cypress-io/cypress/issues/27450), [#28442](https://github.com/cypress-io/cypress/issues/28442), [#30318](https://github.com/cypress-io/cypress/issues/30318), [#30718](https://github.com/cypress-io/cypress/issues/30718), [#30907](https://github.com/cypress-io/cypress/issues/30907), [#30915](https://github.com/cypress-io/cypress/issues/30915), [#30925](https://github.com/cypress-io/cypress/issues/30925), [#30954](https://github.com/cypress-io/cypress/issues/30954) and [#31185](https://github.com/cypress-io/cypress/issues/31185).
2020

21+
**Misc:**
22+
23+
- Migration helpers and related errors are no longer shown when upgrading from Cypress versions earlier than 10.0.0. To migrate from a pre-10.0.0 version, upgrade one major version at a time to receive the appropriate guidance. Addresses [#31345](https://github.com/cypress-io/cypress/issues/31345). Addressed in [https://github.com/cypress-io/cypress/pull/31629/](https://github.com/cypress-io/cypress/pull/31629/).
24+
2125
## 14.3.3
2226

2327
_Released 5/6/2025_

cli/types/tests/plugins-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// checking types passed to cypress/plugins/index.js file
1+
// checking types passed through setupNodeEvents
22

33
// does nothing
44
const pluginConfig: Cypress.PluginConfig = (on, config) => {}

guides/error-handling.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Clear, consistent, errors are one of the important parts of the Cypress experien
44

55
### @packages/errors
66

7-
All error related logic for the server should be added to `@packages/errors`. This logic has been separated out from the `@packages/server` to enable strict type checking & use in other packages we have added in the `10.0-release` branch.
7+
All error related logic for the server should be added to `@packages/errors`.
88

99
### Errors Development Workflow
1010

@@ -78,15 +78,15 @@ In this case, `arg1` will be highlighted in yellow when printed to the terminal.
7878

7979

8080
```ts
81-
PLUGINS_FILE_ERROR: (arg1: string, arg2: Error) => {
81+
FAKE_ERROR: (arg1: string, arg2: Error) => {
8282
return errTemplate`\
83-
The plugins file is missing or invalid.
83+
The fake file is missing or invalid.
8484
85-
Your \`pluginsFile\` is set to ${arg1}, but either the file is missing, it contains a syntax error, or threw an error when required. The \`pluginsFile\` must be a \`.js\`, \`.ts\`, or \`.coffee\` file.
85+
Your \`fakeFile\` is set to ${arg1}, but either the file is missing, it contains a syntax error, or threw an error when required. The \`fakeFile\` must be a \`.js\`, \`.ts\`, or \`.coffee\` file.
8686
87-
Or you might have renamed the extension of your \`pluginsFile\`. If that's the case, restart the test runner.
87+
Or you might have renamed the extension of your \`fakeFile\`. If that's the case, restart the test runner.
8888
89-
Please fix this, or set \`pluginsFile\` to \`false\` if a plugins file is not necessary for your project.
89+
Please fix this, or set \`fakeFile\` to \`false\` if a plugins file is not necessary for your project.
9090
9191
${details(arg2)}
9292
`

npm/grep/README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,16 @@ $ npx cypress run --env grepTags=@smoke,grepFilterSpecs=true
143143
$ npx cypress run --env grepUntagged=true
144144
```
145145

146-
You can use any way to modify the environment values `grep` and `grepTags`, except the run-time `Cypress.env('grep')` (because it is too late at run-time). You can set the `grep` value in the `cypress.json` file to run only tests with the substring `viewport` in their names
146+
You can use any way to modify the environment values `grep` and `grepTags`, except the run-time `Cypress.env('grep')` (because it is too late at run-time). You can set the `grep` value in the `cypress.config.js` file to run only tests with the substring `viewport` in their names
147147

148-
```json
149-
{
150-
"env": {
151-
"grep": "viewport"
152-
}
153-
}
148+
```js
149+
const { defineConfig } = require('cypress')
150+
151+
module.exports = defineConfig({
152+
env: {
153+
grep: "viewport"
154+
},
155+
})
154156
```
155157

156158
You can also set the `env.grep` object in the plugin file, but remember to return the changed config object:

packages/config/__snapshots__/index.spec.ts.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,7 @@
11
exports['config/src/index .getBreakingKeys returns list of breaking config keys 1'] = [
2-
'blacklistHosts',
3-
'componentFolder',
4-
'experimentalComponentTesting',
5-
'experimentalGetCookiesSameSite',
62
'experimentalJustInTimeCompile',
7-
'experimentalNetworkStubbing',
8-
'experimentalRunEvents',
9-
'experimentalSessionSupport',
103
'experimentalSessionAndOrigin',
11-
'experimentalShadowDomSupport',
124
'experimentalSkipDomainInjection',
13-
'firefoxGcInterval',
14-
'ignoreTestFiles',
15-
'integrationFolder',
16-
'pluginsFile',
17-
'testFiles',
185
'videoUploadOnPasses',
196
]
207

packages/config/src/options.ts

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,15 @@ import type { TestingType } from '@packages/types'
99
import * as validate from './validation'
1010

1111
const BREAKING_OPTION_ERROR_KEY: Readonly<AllCypressErrorNames[]> = [
12-
'COMPONENT_FOLDER_REMOVED',
13-
'INTEGRATION_FOLDER_REMOVED',
1412
'CONFIG_FILE_INVALID_ROOT_CONFIG',
1513
'CONFIG_FILE_INVALID_ROOT_CONFIG_E2E',
1614
'CONFIG_FILE_INVALID_ROOT_CONFIG_COMPONENT',
1715
'CONFIG_FILE_INVALID_TESTING_TYPE_CONFIG_COMPONENT',
1816
'CONFIG_FILE_INVALID_TESTING_TYPE_CONFIG_E2E',
19-
'EXPERIMENTAL_COMPONENT_TESTING_REMOVED',
20-
'EXPERIMENTAL_SAMESITE_REMOVED',
21-
'EXPERIMENTAL_NETWORK_STUBBING_REMOVED',
22-
'EXPERIMENTAL_RUN_EVENTS_REMOVED',
23-
'EXPERIMENTAL_SESSION_SUPPORT_REMOVED',
2417
'EXPERIMENTAL_SESSION_AND_ORIGIN_REMOVED',
2518
'EXPERIMENTAL_SINGLE_TAB_RUN_MODE',
26-
'EXPERIMENTAL_SHADOW_DOM_REMOVED',
27-
'FIREFOX_GC_INTERVAL_REMOVED',
28-
'PLUGINS_FILE_CONFIG_OPTION_REMOVED',
2919
'VIDEO_UPLOAD_ON_PASSES_REMOVED',
3020
'RENAMED_CONFIG_OPTION',
31-
'TEST_FILES_RENAMED',
3221
] as const
3322

3423
type ValidationOptions = {
@@ -617,74 +606,17 @@ export const options: Array<DriverConfigOption | RuntimeConfigOption> = [
617606
*/
618607
export const breakingOptions: Readonly<BreakingOption[]> = [
619608
{
620-
name: 'blacklistHosts',
621-
errorKey: 'RENAMED_CONFIG_OPTION',
622-
newName: 'blockHosts',
623-
isWarning: false,
624-
}, {
625-
name: 'componentFolder',
626-
errorKey: 'COMPONENT_FOLDER_REMOVED',
627-
isWarning: false,
628-
}, {
629-
name: 'experimentalComponentTesting',
630-
errorKey: 'EXPERIMENTAL_COMPONENT_TESTING_REMOVED',
631-
isWarning: false,
632-
}, {
633-
name: 'experimentalGetCookiesSameSite',
634-
errorKey: 'EXPERIMENTAL_SAMESITE_REMOVED',
635-
isWarning: true,
636-
}, {
637609
name: 'experimentalJustInTimeCompile',
638610
errorKey: 'EXPERIMENTAL_JIT_COMPILE_REMOVED',
639611
isWarning: true,
640-
},
641-
{
642-
name: 'experimentalNetworkStubbing',
643-
errorKey: 'EXPERIMENTAL_NETWORK_STUBBING_REMOVED',
644-
isWarning: true,
645-
}, {
646-
name: 'experimentalRunEvents',
647-
errorKey: 'EXPERIMENTAL_RUN_EVENTS_REMOVED',
648-
isWarning: true,
649-
}, {
650-
name: 'experimentalSessionSupport',
651-
errorKey: 'EXPERIMENTAL_SESSION_SUPPORT_REMOVED',
652-
isWarning: true,
653612
}, {
654613
name: 'experimentalSessionAndOrigin',
655614
errorKey: 'EXPERIMENTAL_SESSION_AND_ORIGIN_REMOVED',
656615
isWarning: true,
657-
}, {
658-
name: 'experimentalShadowDomSupport',
659-
errorKey: 'EXPERIMENTAL_SHADOW_DOM_REMOVED',
660-
isWarning: true,
661616
}, {
662617
name: 'experimentalSkipDomainInjection',
663618
errorKey: 'EXPERIMENTAL_SKIP_DOMAIN_INJECTION_REMOVED',
664619
isWarning: false,
665-
}, {
666-
name: 'firefoxGcInterval',
667-
errorKey: 'FIREFOX_GC_INTERVAL_REMOVED',
668-
isWarning: true,
669-
}, {
670-
name: 'ignoreTestFiles',
671-
errorKey: 'TEST_FILES_RENAMED',
672-
newName: 'excludeSpecPattern',
673-
isWarning: false,
674-
}, {
675-
name: 'integrationFolder',
676-
errorKey: 'INTEGRATION_FOLDER_REMOVED',
677-
isWarning: false,
678-
}, {
679-
name: 'pluginsFile',
680-
errorKey: 'PLUGINS_FILE_CONFIG_OPTION_REMOVED',
681-
isWarning: false,
682-
},
683-
{
684-
name: 'testFiles',
685-
errorKey: 'TEST_FILES_RENAMED',
686-
newName: 'specPattern',
687-
isWarning: false,
688620
}, {
689621
name: 'videoUploadOnPasses',
690622
errorKey: 'VIDEO_UPLOAD_ON_PASSES_REMOVED',

packages/config/test/index.spec.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ describe('config/src/index', () => {
1414
it('returns filter config only containing allowed keys', () => {
1515
const keys = configUtil.allowed({
1616
'baseUrl': 'https://url.com',
17-
'blacklistHosts': 'breaking option',
17+
'videoUploadOnPasses': true,
1818
'devServerPublicPathRoute': 'internal key',
1919
'random': 'not a config option',
2020
})
2121

2222
expect(keys).to.deep.eq({
2323
'baseUrl': 'https://url.com',
24-
'blacklistHosts': 'breaking option',
24+
'videoUploadOnPasses': true,
2525
})
2626
})
2727
})
@@ -30,7 +30,7 @@ describe('config/src/index', () => {
3030
it('returns list of breaking config keys', () => {
3131
const breakingKeys = configUtil.getBreakingKeys()
3232

33-
expect(breakingKeys).to.include('blacklistHosts')
33+
expect(breakingKeys).to.include('videoUploadOnPasses')
3434
snapshot(breakingKeys)
3535
})
3636
})
@@ -154,12 +154,12 @@ describe('config/src/index', () => {
154154
const errorFn = sinon.spy()
155155

156156
configUtil.validateNoBreakingConfig({
157-
'experimentalNetworkStubbing': 'should break',
157+
'experimentalSessionAndOrigin': 'should break',
158158
configFile: 'config.js',
159159
}, warningFn, errorFn, 'e2e')
160160

161-
expect(warningFn).to.have.been.calledOnceWith('EXPERIMENTAL_NETWORK_STUBBING_REMOVED', {
162-
name: 'experimentalNetworkStubbing',
161+
expect(warningFn).to.have.been.calledOnceWith('EXPERIMENTAL_SESSION_AND_ORIGIN_REMOVED', {
162+
name: 'experimentalSessionAndOrigin',
163163
newName: undefined,
164164
value: undefined,
165165
testingType: 'e2e',
@@ -174,14 +174,14 @@ describe('config/src/index', () => {
174174
const errorFn = sinon.spy()
175175

176176
configUtil.validateNoBreakingConfig({
177-
'blacklistHosts': 'should break',
177+
experimentalSkipDomainInjection: true,
178178
configFile: 'config.js',
179179
}, warningFn, errorFn, 'e2e')
180180

181181
expect(warningFn).to.have.been.callCount(0)
182-
expect(errorFn).to.have.been.calledOnceWith('RENAMED_CONFIG_OPTION', {
183-
name: 'blacklistHosts',
184-
newName: 'blockHosts',
182+
expect(errorFn).to.have.been.calledOnceWith('EXPERIMENTAL_SKIP_DOMAIN_INJECTION_REMOVED', {
183+
name: 'experimentalSkipDomainInjection',
184+
newName: undefined,
185185
value: undefined,
186186
testingType: 'e2e',
187187
configFile: 'config.js',

0 commit comments

Comments
 (0)