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.95k stars 1.98k forks source link

Linter not catching ancestors falling between multiple support statements #23624

Closed ddbeck closed 3 months ago

ddbeck commented 3 months ago

What type of issue is this?

Linter issue

What is the issue?

The linter is not preventing inconsistent descendant-ancestor versions.

Here api.SharedWorker is supported from Safari 16:

https://github.com/mdn/browser-compat-data/blob/ebb58c142ff3f1dcade8857de96d16fb8e2f80f1/api/SharedWorker.json#L33-L41

But api.SharedWorker.SharedWorker.ecmascript_modules is supported from Safari 15:

https://github.com/mdn/browser-compat-data/blob/ebb58c142ff3f1dcade8857de96d16fb8e2f80f1/api/SharedWorker.json#L155C1-L161C16

What behavior were you expecting?

I was expecting api.SharedWorker.SharedWorker.ecmascript_modules to be supported no earlier than Safari 16.

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

Do you have anything more you want to share?

It's hard to read, but I think test-consistency.ts is not checking that a version is before a version_removed value, only that it's on or after a version_added.

queengooborg commented 3 months ago

Marking as a duplicate of #12982. (But yes, you are correct, the consistency linter doesn't check the version number of version_removed.)