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

Update babel targets and tests to match support statement (NEWRELIC-5417) #357

Merged
merged 8 commits into from
Jan 6, 2023

Conversation

bjfield
Copy link
Contributor

@bjfield bjfield commented Jan 4, 2023

Overview

Our working support statement is last 10 versions of Chrome, Safari, Firefox, and Edge on mobile and desktop. This PR:

  • Updates the babel targets in the webpack configuration and JIL asset server to include missing ChromeAndroid and iOS specs.
  • Modifies sauce-browsers.js to generate browsers-supported.json using the same browserslist source that we use to calculate version targets for babel transpilation--ensuring version-range parity.
  • Enables Android functional and unit tests. Previously these were disabled, but specifying Android 9 ensures that Sauce defaults to JSON Wire Protocol, which works with our current JIL.

Related Issue(s)

NEWRELIC-5417

Testing

Automated tests should pass prior to merge.

Notes on reintroduced Android Chrome testing support

  • This PR uses browerslist to derive version numbers for testing, and browserslist uses caniuse—which always only has info about the latest ChromeAndroid version. This means "Last 10" for ChromeAndroid is equivalent to "latest" from a transpilation perspective. So we can't trust browserslist to give us a complete version list for Android Chrome.
  • Because Chrome version releases sync between desktop and mobile within a day or two in the real world, our support statement (including last 10 Chrome mobile) effectively means we support, and thus wish to test, the same versions of Chrome on Android mobile as on desktop.
  • SauceLabs has just one version of ChromeAndroid on all their emulators: 100, and it's not the latest (108). So with Sauce the best we can do is test the version they offer.
  • The Sauce api we use to select browsers does not give Chrome version numbers for android, but rather Android version numbers. So we just have to pick a browser-platform definition arbitrarily (version <= 9).
  • Presently, I've confirmed that using an Android 9 browser-platform Sauce definition is compatible with JIL, whereas an Android 12 definition fails with W3C-specific errors. This PR specifies min and max versions for Android both as 9. When W3C compatibility updates are made for JIL, we can test Android 12. However, this will not impact the version of ChromeAndroid we are testing, as Sauce Labs uses the same version of ChromeAndroid on all its emulators (see above).

@bjfield bjfield changed the title Update babel targets to match support statement. Update babel targets to match support statement (NEWRELIC-5417) Jan 4, 2023
@bjfield bjfield marked this pull request as ready for review January 5, 2023 00:20
@bjfield
Copy link
Contributor Author

bjfield commented Jan 5, 2023

Before tests can run on this PR, PR 350 needs to be merged to fix test-server issues. 350 was merged.

@bjfield bjfield force-pushed the chore/NEWRELIC-5417_match-babel-targets-support branch from ca079a2 to 4326e41 Compare January 5, 2023 16:41
patrickhousley
patrickhousley previously approved these changes Jan 5, 2023
Copy link
Contributor

@cwli24 cwli24 left a comment

Choose a reason for hiding this comment

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

GJ

@bjfield bjfield changed the title Update babel targets to match support statement (NEWRELIC-5417) Update babel targets and tests to match support statement (NEWRELIC-5417) Jan 6, 2023
@bjfield bjfield merged commit b42b361 into main Jan 6, 2023
@bjfield bjfield deleted the chore/NEWRELIC-5417_match-babel-targets-support branch January 6, 2023 19:05
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.

4 participants