Skip to content

Actually fix modern config

Catrope requested to merge actually-fix-modern-config into main

fb684d32 attempted to fix the issue where Chrome, Opera and Edge were excluded. However, it did this by including all versions of these browsers, which is also not what we want.

The core of this issue is that browserslist's support for "and" and "or" is pretty limited. It just parses the string from start to end and applies unions (for "or") or intersections (for "and") as it goes. To achieve the result we want, gather all the Chrome, Opera, Edge and Firefox versions first, then intersect those with "last 3 years" at the end.

Current (broken) list: https://browsersl.ist/#q=Last+3+years+and+Chrome+%3E+0%2C+Opera+%3E+0%2C+Edge+%3E+0%2C+Firefox+%3E+0%0ASafari+%3E%3D+11.1%0AiOS+%3E%3D+11.3%0AAndroid+%3E%3D+5

Fixed list with this commit: https://browsersl.ist/#q=Chrome+%3E+0%2C+Opera+%3E+0%2C+Edge+%3E+0%2C+Firefox+%3E+0+and+last+3+years%2C%0ASafari+%3E%3D+11.1%2C%0AiOS+%3E%3D+11.3%2C%0AAndroid+%3E%3D+5%0A

Merge request reports