-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix: handle case of implicit plugins/index.js files during migration #22501
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: handle case of implicit plugins/index.js files during migration #22501
Conversation
Thanks for taking the time to open a PR!
|
Test summaryRun details
View run in Cypress Dashboard ➡️ Flakiness
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 |
|
||
debug('error, could not find path to pluginsFile!') | ||
|
||
throw Error(`Could not find pluginsFile. Received projectRoot ${projectRoot} and pluginPath: ${pluginPath}`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw Error(`Could not find pluginsFile. Received projectRoot ${projectRoot} and pluginPath: ${pluginPath}`) | |
throw Error(`Could not find pluginsFile in %s`, pluginLoc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works good. I appreciate the extra logs in here 👍
…esser/CLOUD-577-spec-list-display-latest-runs-batching * muaz/CLOUD-577-spec-list-display-latest-runs: test: Addressing launchpad test flake in Windows (#22536) address comments from @marktnoonan Address code review comments followup on other comments re: @lmiller1990 PR comments chore(deps): update dependency semantic-release to v19 [security] (#22238) chore: Address skipped specs in server package (#22356) Address code review findings Address code review findings Empty-Commit to generate new percy nonce fix: handle case of implicit plugins/index.js files during migration (#22501)
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
User facing changelog
Fix a bug in migration where the old
pluginsFile
API is not respected during migration, causing the migration tool to hang without a response.Additional details
The migration tool is not respecting when
pluginsFile
points to a directory containingindex.js
. For example:If you set your
cypress.json
toCypress 9 would figure out you wanted
cypress/plugins/index.js
, since we just didrequire(config.pluginsFile)
. It's not really documented, but it worked, so we should respect this during migration.Although this was not explicitly documented, users coming from this usage encounter a migration screen that doesn't show any error, which is a terrible first experience when using Cypress 10, so I think it's better to just support this than error confusingly.
Steps to test
Note:
supportFile
pointing to a directory withindex.js
also worked previously, although not explicitly documented. This throws a reasonable error telling the user the problem, so it's not as problematic as the case ofpluginsFile
, where it just sat on a screen with a spinner.How has the user experience changed?
Can migrate without getting stuck.
PR Tasks
cypress-documentation
?type definitions
?