You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check this if you would like to implement a PR, we are more than happy to help you go through the process.
What problem are you trying to solve?
When using --allowHigherVersions, (purposedly) missed browser versions are still matched. For example, chrome 114, chrome 116 also matches chrome 115. Basically, it uses the lowest matching browser version, then allows anything newer.
Real example: Queries that include Firefox ESR and some form of non-ESR Firefox (e.g. last 1 firefox version, Firefox ESR) will produce overmatching regular expressions when called with --allowHigherVersions:
which will match any Firefox >= 102 (the older ESR version), although the last 1 firefox version would be 116.
npx browserslist lists these appropriately:
firefox 115
firefox 102
with 116 being the main one, and 102/115 being ESRs.
Describe the solution you'd like
When using --allowHigherVersions or using another switch, base the "higher versions" on the highest available version, i.e. allow gaps in-between (unless such a behaviour was perhaps explicitly asked for).
In this case, it should be something like 102|11[5-9]|1[2-9]\d|[2-9]\d{2}|\d{4,}
Describe alternatives you've considered
Right now, it would be necessary to keep one regex per "separated browser group". However, since Firefox ESRalready returns firefox 102 and firefox 115, this wouldn't work, and require three manual checks (one against firefox 102, one against firefox 105, and another against the other browsers).
Documentation, Adoption, Migration Strategy
No response
The text was updated successfully, but these errors were encountered:
Would you like to work on this feature?
What problem are you trying to solve?
When using
--allowHigherVersions
, (purposedly) missed browser versions are still matched. For example,chrome 114, chrome 116
also matcheschrome 115
. Basically, it uses the lowest matching browser version, then allows anything newer.Real example: Queries that include
Firefox ESR
and some form of non-ESR Firefox (e.g.last 1 firefox version, Firefox ESR
) will produce overmatching regular expressions when called with--allowHigherVersions
:Firefox\/(10[2-9]|1[1-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)
which will match any Firefox >= 102 (the older ESR version), although the last 1 firefox version would be 116.
npx browserslist
lists these appropriately:with 116 being the main one, and 102/115 being ESRs.
Describe the solution you'd like
When using
--allowHigherVersions
or using another switch, base the "higher versions" on the highest available version, i.e. allow gaps in-between (unless such a behaviour was perhaps explicitly asked for).In this case, it should be something like
102|11[5-9]|1[2-9]\d|[2-9]\d{2}|\d{4,}
Describe alternatives you've considered
Right now, it would be necessary to keep one regex per "separated browser group". However, since
Firefox ESR
already returnsfirefox 102
andfirefox 115
, this wouldn't work, and require three manual checks (one againstfirefox 102
, one againstfirefox 105
, and another against the other browsers).Documentation, Adoption, Migration Strategy
No response
The text was updated successfully, but these errors were encountered: