Browser-compat-data: [Schema] Define version number schemas for the different browsers

Created on 3 May 2017  Β·  10Comments  Β·  Source: mdn/browser-compat-data

We need to investigate validating version numbers for different browsers. Otherwise we might end up with inconsistencies like "53.0" and "53", or things like "5.3" which would make no sense for Firefox, for example.

linter schema

Most helpful comment

I agree that Firefox should be "45" and not "45.0". We only add the decimal point once there's a non-zero digit somewhere after it.

All 10 comments

Lets collect valid versions for UAs. I'm afraid we are not able to code this into the schema, but we need to put it somewhere as a reference for contributors and make it part of a review checklist.

Firefox and Firefox for Android

I think we want to use Firefox versions, not Gecko versions. I'm not 100% sure if we want "55.0" or "55". Leaning towards "55" until I hear differently.

Valid

Firefox Desktop: "1" - "60" (and higher), "1.5", "3.5", "3.6"
Firefox for Android: "4" - "60" (and higher)

Invalid

"1.7" (Fx 1)
"1.8" (Fx 1.5)
"1.8.1" (Fx 2)
"1.9" (Fx 3)
"1.9.1" (Fx 3.5)
"1.9.2" (Fx 3.6)
"2.0" (Fx 4)
"25.5", "5.3" etc.

Android WebView, Chrome, Chrome for Android

Chromes wants to display just integers, no "57.0" just "57".

Valid

"1" - "60" (and higher)

Invalid

"5.0", "57.0"

IE and IE mobile

Leaning towards integers for IE as well.

Valid

Desktop: "1", "1.5", "2", "3", "4", "5", "5.5", "6", "7", "8", "9", "10", "11"
IE mobile: "6", "7", "8", "9", "10", "11"

Invalid

"12", "13"
"6.0", "8.0"

Edge and Edge mobile

"The 2-digit EdgeHTML version (12 through 15 so far) is generally how we track web platform support".

Valid

"12", "13", "14", "15"

Invalid

"13.11099", "15.14986", "28", "37", "20"

Safari

I think it makes sense to use "10.0" instead of "10", as there is also "10.1" etc.

Valid

"1.0", "1.1", "1.2", "1.3", "2.0", "3.0", "3.1", "3.2", "4.0", "4.1", "5.0", "5.1", "6.0", "7.0", "8.0", "9.0", "9.1", "10.0", "10.1".

Invalid

"536.25" (webkit versions), "6.1.4", "5.2"

Safari iOs

Valid

Invalid

Opera

Valid

"5.00", "6.00", "7.00", "7.50", "8.00", "8.50", "9.00", "9.50", "10.00", "10.50", "10.60", "11.00", "11.10", "11.50", "11.60", "12.00", "12.10"
"15" - "45" (and higher)

Invalid

"2.4", "2.12" (Presto versions)
"36.0.1985.125" (Chromium versions)

Servo

I think it makes sense to only allow "false", "true", "null" for now as there are no versions, and maybe there won't be any.

Valid

"false", "true", "null"

Invalid

Any numbers

You have the numbering correct for Chrome and Chrome for Android. That scheme also applies to Android Webview.

I agree that Firefox should be "45" and not "45.0". We only add the decimal point once there's a non-zero digit somewhere after it.

I also agree that the time has come to bail on Gecko version numbers. Nobody cares anymore about pre-4.0 Firefoxes. :)

Also Edge is the two-digit EdgeHTML version, according to https://github.com/mozilla/kumascript/pull/131#issuecomment-291992318. So "12", "13", "14", "15".

I agree that we should use "45" not "45.0" for Firefox, but might we sometimes want to include point releases in the compat data? They do exist after all.

Thanks for all the comments! I've updated the overview above.
I think I need help with iOS Safari versions, and the rest could use a double check as well. We discussed that we want to add a validation script to this repository that makes sure versions are valid as per these rules. I'm going to use this issue to gather the version schemas for the first set of browsers which can then be used in such a validation script. If you have more comments on correct versions of browsers, let us know here!

Safari iOS is tied to the operating system. The operating system definitely has point releases. Not sure where to find a full list.

Yes, when it’s a point release, we need to say so. So it would go β€œ45”, then β€œ45.0.1”, then β€œ45.1”, then β€œ46”, etc. Use the minimum number of decimal places possible, preferring zero decimal points when possible.

Eric Shepherd
Senior Technical Writer
Mozilla Developer Network https://developer.mozilla.org/
Blog: https://www.bitstampede.com/
Twitter: https://twitter.com/sheppy

On May 10, 2017, at 12:09 PM, wbamberg notifications@github.com wrote:

I agree that we should use "45" not "45.0" for Firefox, but might we sometimes want to include point releases in the compat data? They do exist after all.

Wikipedia has a list of iOS releases. The format kind of stinks, but it's pretty thorough: https://en.wikipedia.org/wiki/IOS_version_history

The testing infrastructure and an initial set of browsers to validate the version data against landed with PR #439. The remaining work is tracked in issue https://github.com/mdn/browser-compat-data/issues/591.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TomasHubelbauer picture TomasHubelbauer  Β·  4Comments

ghost picture ghost  Β·  3Comments

connorshea picture connorshea  Β·  3Comments

MendyBerger picture MendyBerger  Β·  3Comments

ddbeck picture ddbeck  Β·  3Comments