Skip to content
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

fix: remove --config-file false references and update types #20643

Merged
merged 9 commits into from
Mar 21, 2022

Conversation

ZachJW34
Copy link
Contributor

@ZachJW34 ZachJW34 commented Mar 16, 2022

User facing changelog

Remove --config-file=false references and throw error if it is passed

Additional details

There are a few places we can throw this error, but I deemed it best to throw early so I could clean up some of the code that had special handling for config-file=false in the cli and server packages and to not spin up any further processes needlessly.

Latest Cypress docs for unification have already been updated to remove config-file=false references.

How has the user experience changed?

Screen Shot 2022-03-16 at 10 36 03 AM

PR Tasks

  • Have tests been added/updated?
  • Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • Has a PR for user-facing changes been opened in cypress-documentation?
  • Have API changes been updated in the type definitions?
  • Have new configuration options been added to the cypress.schema.json?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 16, 2022

Thanks for taking the time to open a PR!

@cypress
Copy link

cypress bot commented Mar 16, 2022



Test summary

17784 0 217 0Flakiness 1


Run details

Project cypress
Status Passed
Commit e836b3f
Started Mar 18, 2022 9:57 PM
Ended Mar 18, 2022 10:10 PM
Duration 12:48 💡
OS Linux Debian - 10.10
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

cypress/e2e/commands/xhr.cy.js Flakiness
1 ... > no status when request isnt forced 404

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@ZachJW34 ZachJW34 marked this pull request as ready for review March 16, 2022 17:29
emilyrohrbough
emilyrohrbough previously approved these changes Mar 16, 2022
emilyrohrbough
emilyrohrbough previously approved these changes Mar 16, 2022
Copy link
Contributor

@lmiller1990 lmiller1990 left a comment

Choose a reason for hiding this comment

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

Cool PR, functionality seems fine, I left a bunch of comments - I think we have some quick wins in terms of code quality here, some related to your PR, some not. If you don't think this is the time and place to do them, all good, let me know and I can give you an approval.

Main comment I'd like to see at least considered/responded to: https://github.com/cypress-io/cypress/pull/20643/files#diff-aa4d6453f80b1103477a0cc93c94f94c5cfb3866d029b1b70708e77be023600bR82

cli/lib/exec/open.js Outdated Show resolved Hide resolved
packages/driver/src/cypress/error_messages.ts Outdated Show resolved Hide resolved
packages/server/lib/project-base.ts Outdated Show resolved Hide resolved
packages/server/lib/project_utils.ts Outdated Show resolved Hide resolved
@@ -2,7 +2,7 @@ export interface CommonModeOptions {
invokedFromCli: boolean
userNodePath?: string
userNodeVersion?: string
configFile?: false | string | null
configFile?: string | null
Copy link
Contributor

Choose a reason for hiding this comment

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

How come this can be null? I wonder if we can do configFile?: string here. Not your change specifically but always good to question and improve code quality.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It can be null here since you can opt to not pass in any value for configFile and if none is passed, we will assume you are using the default and populate it with the detected file. So after ProjectLifeCycleManager runs, configFile will be a string.

@lmiller1990 lmiller1990 self-requested a review March 21, 2022 12:47
@lmiller1990 lmiller1990 merged commit 110f8ae into 10.0-release Mar 21, 2022
@lmiller1990 lmiller1990 deleted the zachw/config-file-false-cleanup branch March 21, 2022 12:49
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.

None yet

3 participants