-
Notifications
You must be signed in to change notification settings - Fork 131
Baseline data incorrect in npm package #2762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
In this example, the baseline high comments apply to the keys immediately below them. But there are more keys and more comments if you scroll down, and the last keys are not baseline high: The last keys are the ones that make the overall |
Gotcha, thanks for explaining. The end result is the same: the baseline value is incorrect in the npm package for most of the features in this file. |
Right, the baseline value in the web-features package only applies to the overall feature itself. It is not meant to be applied to the individual BCD keys that compose the feature, although it would be great to have more data on which BCD keys were considered to compute the baseline value (some of it is tracked in #2248). In most cases, the baseline status of the overall feature will be lower than the baseline status of the individual BCD keys. Wouldn't the compute-baseline package give you what you're looking for, meaning a way to compute a Baseline status for one or more BCD keys? |
@nzakas we actually do have the per key Baseline data available in the releases here on Github. It's in the data.extended.json file. There is a Also, cc @rviscomi who's been looking into the distinction between keys and features. |
Yup, after following this discussion I've staged a PR that uses |
Ah nice, thanks. I'll work with @rviscomi on this. It may be worth calling out this distinction on the |
I think you're right. We initially built this for MDN, since their pages are very granular and that's where the keys originally come from, but there are probably a lot more use cases. |
It looks like the npm package collapses all features in a single YAML file and just uses the baseline status at the top. This results in incorrect baseline status for features where some of the features are low while others are high.
For example,
overflow
is a baseline high status according to this file (in the comments, not at the top):https://github.com/web-platform-dx/web-features/blob/main/features/overflow-shorthand.yml.dist
However, in the npm package, it's listed as baseline low. Here's a printout:
https://gist.github.com/nzakas/5bbc9eab6900d1e401208fa7bcf49500#file-css-web-features-json-L6962-L7004
This problem makes it difficult to perform validation based on baseline status.
The text was updated successfully, but these errors were encountered: