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

Lower typescript target to es2019 from es2020 #1283

Closed
wants to merge 1 commit into from

Conversation

dlemvigh
Copy link

@dlemvigh dlemvigh commented Nov 28, 2022

alfa-cypress was causing errors due to nullish coalescing operator (??).
By lowering the typescript build target to es2019, the issue goes away.

Was able to test it locally, by cloning and building alfa with the lowered build target, and then copy the files to my cypress project.

The first instance of the error is thrown from alfa-css src/value.js.
It is therefor not enough to just lower the build target for just alfa-cypress.

Is there any danger for other projects in lowering the build target to es2019?

@dlemvigh dlemvigh marked this pull request as ready for review November 29, 2022 10:25
@dlemvigh dlemvigh requested review from a team and Jym77 November 29, 2022 10:25
@dlemvigh
Copy link
Author

The issue is simililar to this scottohara/loot#185

It isn't directly an issue with alfa-cypress, but a compatibility issue with cypress

@Jym77
Copy link
Contributor

Jym77 commented Oct 24, 2023

This should have been fixed in Cypress 13: cypress-io/cypress#27438
Leaving this open until we managed to get a proof of concept of it working.

@Jym77 Jym77 marked this pull request as draft October 24, 2023 07:51
@Jym77
Copy link
Contributor

Jym77 commented Sep 5, 2024

Updating Cypress to version 13 resolves the problem as they now accept more modern ES syntax.
See Siteimprove/alfa-examples#39 for a detailed example.

Closing this PR now.

@Jym77 Jym77 closed this Sep 5, 2024
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.

2 participants