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

feat: allow to use TypeScript in the config file #18300

Merged
merged 7 commits into from
Oct 2, 2021

Conversation

elevatebart
Copy link
Contributor

@elevatebart elevatebart commented Sep 29, 2021

User facing changelog

Before

We could only use JSON and JavaScript to configure cypress

After

We can use TypeScript additionally to JS and JSON

Additional details

I also added cypress.config.ts as a detected default config file

PR Tasks

  • Have tests been added/updated?

@elevatebart elevatebart requested a review from a team as a code owner September 29, 2021 18:36
@elevatebart elevatebart requested review from flotwig and chrisbreiding and removed request for a team September 29, 2021 18:36
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Sep 29, 2021

Thanks for taking the time to open a PR!

@elevatebart elevatebart changed the title feat: allow to use typescritpt in the config file feat: allow to use typescript in the config file Sep 29, 2021
@elevatebart elevatebart changed the title feat: allow to use typescript in the config file feat: allow to use TypeScript in the config file Sep 29, 2021
@cypress
Copy link

cypress bot commented Sep 29, 2021



Test summary

18540 0 214 7Flakiness 3


Run details

Project cypress
Status Passed
Commit c01a09e
Started Oct 1, 2021 9:59 PM
Ended Oct 1, 2021 10:09 PM
Duration 10:36 💡
OS Linux Debian - 10.9
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

commands/net_stubbing_spec.ts Flakiness
1 network stubbing > waiting and aliasing > can timeout waiting on a single request using "alias.request"
cypress/proxy-logging-spec.ts Flakiness
1 Proxy Logging > request logging > xhr log has response body/status code
2 ... > works with forceNetworkError

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

Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

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

@elevatebart I think this is linking to the wrong Jira story.

Is there any conflict resolution logic planned for this PR? If there's a cypress.config.ts and cypress.config.js and cypress.json, how is that meant to resolve in this PR?

I see the TypeScript config file basically working if I pass it with the --config-file argument, but it's not working as a default cypress.config.ts file. It's always creating a cypress.json file when I open the project with the file there.

@elevatebart
Copy link
Contributor Author

Sorry @jennifer-shehane I did not mean to confuse you I should have kept this one as a draft until the other PR was merged. I will resolve the merge conflicts and you will see the resolution logic work.

@jennifer-shehane jennifer-shehane merged commit b4996ff into develop Oct 2, 2021
tgriesser added a commit that referenced this pull request Oct 8, 2021
* develop: (31 commits)
  fix: `everyNthFrame` should only be applied for Chrome 89+ (#18392)
  docs: General updates to contributing guide (#18283)
  chore: Update Chrome (beta) to 95.0.4638.40 (#18389)
  chore: use circleci timings split for e2e tests (#18367)
  fix: fixed title (#18370)
  chore(deps): update dependency electron to v14 🌟 (#18384)
  chore(server): share client route (#18215)
  fix: Prevent Cypress from crashing when argument parsing "spec: {}" (#18312)
  chore: update husky dev dependency to v7 (#18345)
  feat: add defineConfig function to help type config (#18302)
  chore: Update Chrome (stable) to 94.0.4606.71 (#18324)
  feat: allow to use TypeScript in the config file (#18300)
  allow select to be called with empty array (#18329)
  fix(vite-dev-server): windows `supportFile` + preserve optimize entries (#18286)
  chore: fix semantic-release dry run (#18332)
  fix(driver): improve status_code_flags_invalid error message (#18316)
  chore(deps): update dependency electron to v13.5.0 🌟 (#18318)
  chore: Update Chrome (stable) to 94.0.4606.61 and Chrome (beta) to 95.0.4638.32 (#18229)
  fix(proxy-logging): use constant consoleProps object (#18207)
  feat(driver): Add "overwrite" option to cy.screenshot() (#18280)
  ...
tgriesser added a commit that referenced this pull request Oct 8, 2021
* develop: (33 commits)
  fix: remove .json check from require_async, prevent child_process spawn (#18416)
  percy snapshot the tooltip visually, prevent it from being hidden
  fix: `everyNthFrame` should only be applied for Chrome 89+ (#18392)
  docs: General updates to contributing guide (#18283)
  chore: Update Chrome (beta) to 95.0.4638.40 (#18389)
  chore: use circleci timings split for e2e tests (#18367)
  fix: fixed title (#18370)
  chore(deps): update dependency electron to v14 🌟 (#18384)
  chore(server): share client route (#18215)
  fix: Prevent Cypress from crashing when argument parsing "spec: {}" (#18312)
  chore: update husky dev dependency to v7 (#18345)
  feat: add defineConfig function to help type config (#18302)
  chore: Update Chrome (stable) to 94.0.4606.71 (#18324)
  feat: allow to use TypeScript in the config file (#18300)
  allow select to be called with empty array (#18329)
  fix(vite-dev-server): windows `supportFile` + preserve optimize entries (#18286)
  chore: fix semantic-release dry run (#18332)
  fix(driver): improve status_code_flags_invalid error message (#18316)
  chore(deps): update dependency electron to v13.5.0 🌟 (#18318)
  chore: Update Chrome (stable) to 94.0.4606.61 and Chrome (beta) to 95.0.4638.32 (#18229)
  ...
@elevatebart elevatebart deleted the feat/allow-typescript-in-config branch March 24, 2022 18:19
mjhenkes pushed a commit that referenced this pull request Jul 28, 2022
* feat: allow to use typescritpt in the config file

* add end to end test

* test: add test for the default config file ts

* tests: add a tests for language conflict

* fix: only compile typescript if main file is ts

Co-authored-by: Zach Bloomquist <github@chary.us>

Co-authored-by: Zach Bloomquist <github@chary.us>
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.

3 participants