corona-warn-app / cwa-website

Corona-Warn-App website. The CWA development ended on May 31, 2023. You still can warn other users until April 30, 2023. More information:
https://coronawarn.app/en/faq/#ramp_down
Apache License 2.0
522 stars 225 forks source link

Outdated `.browserslistrc` #3247

Closed MikeMcC399 closed 1 year ago

MikeMcC399 commented 1 year ago

Where to find the issue

.browserslistrc

Describe the issue

.browserslistrc contains the list of browsers to be considered for compatibility reasons:

# Browsers that we support
last 2 versions
ie >= 9
ios >= 7
android >= 4.4

This list is outdated.

  1. Microsoft supports only Internet Explorer 11 on desktops in a limited fashion. Earlier versions are only supported on Windows Servers and Windows Embedded systems which are not relevant for CWA.
  2. CWA supports iOS from version 12.5 onwards (see https://www.coronawarn.app/en/faq/results/#minimum_requirements)
  3. CWA supports Android from version 6 onwards (see https://www.coronawarn.app/en/faq/results/#minimum_requirements)

Steps to reproduce

npx browserslist shows which browsers are currently considered

and_chr 106
and_ff 105
and_qq 13.1
and_uc 13.4
android 106
android 4.4.3-4.4.4
android 4.4
baidu 13.18
bb 10
bb 7
chrome 107
chrome 106
edge 106
edge 105
firefox 106
firefox 105
ie 11
ie 10
ie 9
ie_mob 11
ie_mob 10
ios_saf 16.1
ios_saf 16.0
ios_saf 15.6
ios_saf 15.5
ios_saf 15.4
ios_saf 15.2-15.3
ios_saf 15.0-15.1
ios_saf 14.5-14.8
ios_saf 14.0-14.4
ios_saf 13.4-13.7
ios_saf 13.3
ios_saf 13.2
ios_saf 13.0-13.1
ios_saf 12.2-12.5
ios_saf 12.0-12.1
ios_saf 11.3-11.4
ios_saf 11.0-11.2
ios_saf 10.3
ios_saf 10.0-10.2
ios_saf 9.3
ios_saf 9.0-9.2
ios_saf 8.1-8.4
ios_saf 8
ios_saf 7.0-7.1
kaios 2.5
op_mini all
op_mob 64
op_mob 12.1
opera 91
opera 90
safari 16.1
safari 16.0
samsung 18.0
samsung 17.0

Suggestion

  1. Update the database with
    npx browserslist@latest --update-db

  2. Change the list .browserslistrc to:

# Browsers that we support
last 2 versions
ie >= 11
ios >= 12
android >= 5

by changing:

MikeMcC399 commented 1 year ago
brianebeling commented 1 year ago

Hey @MikeMcC399, thanks for the report. Is there anything specific this will improve? Unfortunately I haven't worked with browserlist yet and a quick research suggested it helps with polyfills and tooling.

So I was just wondering:

I doubt it breaks anything though - you would have most likely added it to your issue.

MikeMcC399 commented 1 year ago

@brianebeling

Is there anything specific this will improve?

See below for the benefits taken from https://github.com/browserslist/update-db#readme.

Are there improvement for the user?

Correct support for latest browser versions. (See below again.) cwa-website uses autoprefixer which uses browserslist. I checked the performance with Lighthouse, however the change does not seem to bring any performance benefits. The size of the style.css file is unchanged.

Can this change break anything, be it development related or user related?

There is no change to the successful outcome of running the Cypress test suite npm test after making this change.

Benefits

Why You Need to Call it Regularly

npx update-browserslist-db@latest updates caniuse-lite version in your npm, yarn or pnpm lock file.

This update will bring data about new browsers to polyfills tools like Autoprefixer or Babel and reduce already unnecessary polyfills.

You need to do it regularly for three reasons:

  1. To use the latest browser’s versions and statistics in queries like last 2 versions or >1%. For example, if you created your project 2 years ago and did not update your dependencies, last 1 version will return 2 year old browsers.
  2. Actual browsers data will lead to using less polyfills. It will reduce size of JS and CSS files and improve website performance.
  3. caniuse-lite deduplication: to synchronize version in different tools.
brianebeling commented 1 year ago

Thanks a bunch! That clears it up. Then I see no issue merging it.