mdn / browser-compat-data

This repository contains compatibility data for Web technologies as displayed on MDN
https://developer.mozilla.org
Creative Commons Zero v1.0 Universal
4.9k stars 1.97k forks source link

Range linter: Disallow ranged values after 2020-01-01 #23991

Open Elchi3 opened 1 month ago

Elchi3 commented 1 month ago

What type of issue is this?

Linter issue

What is the issue?

Ranged values are currently allowed for browser versions released two years or earlier.

What behavior were you expecting?

If you set the linter to four years or earlier, it still passes. We should enforce that, so that we can make the guarantee that BCD will always report a real (non-ranged) version for as many years as possible.

What version(s) of BCD is the issue present in?

Do you have anything more you want to share?

It doesn't pass for:

cc @foolip @ddbeck

ddbeck commented 1 month ago

We should enforce that, so that we can make the guarantee that BCD will always report a real (non-ranged) version for as many years as possible.

Agreed. Though I'd like to suggest going one step further and pinning those versions that define the 4-year cut off, rather than having a rolling X-year window. That way no new uncertainties would emerge (e.g., a year from now, you wouldn't be allowed to add a ranged value to a 2020 release).

Elchi3 commented 1 month ago

For reference, Philip and Daniel discussed using a cut off before: https://github.com/mdn/browser-compat-data/pull/19146#pullrequestreview-1342350432

queengooborg commented 4 weeks ago

Unfortunately, a recent update to the web extensions data has now introduced a range that is within two years, so we are no longer able to switch to a longer date at this time. Currently, it is only one single range, so we may be able to prioritize researching a proper version number and replace the range.