-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 optional chaining syntax to fix esm #1234
fix: Remove optional chaining syntax to fix esm #1234
Conversation
Removing the optional chainging "?" syntax from the index file as this can cause compilation breaks.
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 2df7922:
|
Codecov Report
@@ Coverage Diff @@
## main #1234 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 4 4
Lines 192 194 +2
Branches 38 40 +2
=========================================
+ Hits 192 194 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Hi @jacobhaile! |
Thanks for the time @MatanBobi! Does this account for esm files? I upgraded react-testing-library to v14 and I'm seeing my cypress runs impacted because of that optional chaining syntax. I'm on node v16. |
That's a good question @jacobhaile, I must admit I'm not entirely on the ESM train. I'll have to look into it a bit more. Not sure I'll have the time for it soon so I'm opening this PR and if someone has an opinion, they're more than free to post it :) |
@MatanBobi I believe this is correct. @jacobhaile I can't reproduce this issue with Cypress. Can you please share a reproduction? |
I can close out -- I no longer get the error after updating to Cypress v13 |
Thanks for the update @jacobhaile :) |
What: Removing the optional chainging "?" syntax from the index file
Why: The optional chaining syntax can cause compilation breaks
How: Break out the optional changing into an
&&
statementChecklist:
docs site