Skip to content

feat: Target modern ES with default preprocessor #15274

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

Merged
merged 6 commits into from
Mar 10, 2021

Conversation

chrisbreiding
Copy link
Contributor

User facing changelog

  • The default preprocessor now targets a more modern version of ECMAScript

Additional details

We now target Chrome 63 for spec code, which is the same as the driver code.

How has the user experience changed?

The generated spec code will look more similar to the source code. This should make the dashboard experience better, in particular, since it displays the generated code for failures.

PR Tasks

  • Have tests been added/updated?
  • Has the original issue or this PR been tagged with a release in ZenHub?
  • N/A Has a PR for user-facing changes been opened in cypress-documentation?
  • N/A Have API changes been updated in the type definitions?
  • N/A Have new configuration options been added to the cypress.schema.json?

Sorry, something went wrong.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 1, 2021

Thanks for taking the time to open a PR!

@chrisbreiding chrisbreiding changed the title Target modern ES with default preprocessor feat: Target modern ES with default preprocessor Mar 1, 2021
@cypress
Copy link

cypress bot commented Mar 1, 2021



Test summary

9394 0 125 3Flakiness 1


Run details

Project cypress
Status Passed
Commit 14b0dc6
Started Mar 10, 2021 2:31 PM
Ended Mar 10, 2021 2:42 PM
Duration 10:49 💡
OS Linux Debian - 10.5
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

cypress/integration/retries.ui.spec.js Flakiness
1 runner/cypress retries.ui.spec > opens attempt on each attempt failure for the screenshot, and closes after test passes

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

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@chrisbreiding chrisbreiding requested review from kuceb and flotwig March 3, 2021 19:32
@@ -433,7 +433,7 @@ describe('runner/cypress retries.ui.spec', { viewportWidth: 600, viewportHeight:
it('throws when set via this.retries in test', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We eval these suite functions, and since they're no longer compiled down to 'suite 1': function () {}, e.g., evaling results in a syntax error if they're not explicitly function expressions.

Copy link
Contributor

@flotwig flotwig left a comment

Choose a reason for hiding this comment

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

looks good 👍

@@ -84,6 +84,7 @@ export const getCommonConfig = () => {
[require.resolve('@babel/plugin-proposal-class-properties'), { loose: true }],
],
presets: [
// the chrome version should be synced with npm/webpack-batteries-included-preprocessor/index.js
Copy link
Contributor

@flotwig flotwig Mar 9, 2021

Choose a reason for hiding this comment

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

...and npm/webpack-batteries-included-preprocessor/index.js should probably be synced with

await criClient.ensureMinimumProtocolVersion('1.3')
.catch((err) => {
throw new Error(`Cypress requires at least Chrome 64.\n\nDetails:\n${err.message}`)
})

64 or 63?

is the minimum possible chrome version documented in a central location anywhere? i guess we can't publicly claim that we support chrome 63/64 though, since we only test on the latest chrome version AFAIK

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interesting, I didn't know about this. Makes sense to bump the other ones to 64 then.

I don't think this is documented at all and we don't have an official minimum version of Chrome. All we can say is we definitely don't support Chrome < 64, but yeah, can't guaranteed Chrome 64+ will work.

@@ -33,7 +33,8 @@ const getDefaultWebpackOptions = (file, options = {}) => {
}],
],
presets: [
[require.resolve('@babel/preset-env'), { modules: 'commonjs' }],
// the chrome version should be synced with packages/web-config/webpack.config.base.ts
Copy link
Contributor

Choose a reason for hiding this comment

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

see other file for comment

@chrisbreiding chrisbreiding merged commit c449775 into 7.0-release Mar 10, 2021
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Apr 5, 2021

Released in 7.0.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Apr 5, 2021
@chrisbreiding chrisbreiding deleted the TR-641-default-target-es6-plus branch April 5, 2022 18:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants