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: try to only add commonjs when running Cypress config #27484

Merged
merged 13 commits into from
Aug 20, 2023

Conversation

lmiller1990
Copy link
Contributor

@lmiller1990 lmiller1990 commented Aug 8, 2023

Additional details

We hard code module: commonjs. I think it is because we want commonjs to be the default when executing the cypress.config child process.

Hard coding this causes issues when users have projects using the new module: bundler config option in tsconfig.json. I found out we can just still hard code it, but we need to do it a different place, so it is only used when executing the cypress.config child process.

Steps to test

You could verify that the issues this claims to fix are fixed. One way would be adding Cypress in a project with module: bundler in the tsconfig.json, such as the one provided here. #26308

How has the user experience changed?

PR Tasks

@cypress
Copy link

cypress bot commented Aug 8, 2023

19 flaky tests on run #50149 ↗︎

0 10407 1022 0 Flakiness 19

Details:

Merge branch 'develop' into lmiller/move-commonjs-module-hard-code
Project: cypress Commit: 06391eee3a
Status: Passed Duration: 17:19 💡
Started: Aug 18, 2023 6:53 PM Ended: Aug 18, 2023 7:10 PM
Flakiness  commands/net_stubbing.cy.ts • 1 flaky test • 5x-driver-electron

View Output Video

Test Artifacts
network stubbing > intercepting request > can delay and throttle a StaticResponse Output Video
Flakiness  e2e/origin/dependencies.cy.ts • 1 flaky test • 5x-driver-electron

View Output Video

Test Artifacts
cy.origin dependencies > works Output Video
Flakiness  e2e/origin/commands/querying.cy.ts • 1 flaky test • 5x-driver-electron

View Output Video

Test Artifacts
cy.origin querying > .get() Output Video
Flakiness  e2e/origin/commands/assertions.cy.ts • 1 flaky test • 5x-driver-electron

View Output Video

Test Artifacts
cy.origin assertions > .should() and .and() Output Video
Flakiness  e2e/origin/basic_login.cy.ts • 1 flaky test • 5x-driver-electron

View Output Video

Test Artifacts
basic login > visit primary first > logs in with idp redirect Output Video

The first 5 flaky specs are shown, see all 14 specs in Cypress Cloud.

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@jordanpowell88
Copy link
Contributor

Is this working for you @lmiller1990. I'm still running into the issue running this code locally.

@lmiller1990
Copy link
Contributor Author

Not sure, I didn't get a chance to test it thoroughly. Did your commit fix it @jordanpowell88 ?

Does it fix #27448?

Not really ideal, apps with bundler will still be bundled slightly differently, but this at least unblocks latest next.js.

@jordanpowell88
Copy link
Contributor

Not sure, I didn't get a chance to test it thoroughly. Did your commit fix it @jordanpowell88 ?

Does it fix #27448?

Not really ideal, apps with bundler will still be bundled slightly differently, but this at least unblocks latest next.js.

I agree but this does appear to fix the issue. Not sure if their is a better solution

@jordanpowell88 jordanpowell88 force-pushed the lmiller/move-commonjs-module-hard-code branch from 2be6434 to 0bc6c0a Compare August 10, 2023 16:36
@lmiller1990 lmiller1990 requested a review from a team August 17, 2023 04:44
@lmiller1990
Copy link
Contributor Author

@AtofStryker can you please take another look? Thanks!

@AtofStryker AtofStryker self-requested a review August 18, 2023 18:50
@mike-plummer mike-plummer requested a review from a team August 18, 2023 21:06
@lmiller1990 lmiller1990 merged commit 62bf87d into develop Aug 20, 2023
3 checks passed
@lmiller1990 lmiller1990 deleted the lmiller/move-commonjs-module-hard-code branch August 20, 2023 22:46
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Aug 29, 2023

Released in 13.0.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v13.0.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Aug 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants