browser-compat-data
browser-compat-data copied to clipboard
Draft: Tag javascript.* tree with snapshots, groups, bundles
This is a draft PR to discuss https://github.com/web-platform-dx/web-features/issues/579
So far it
- tags the
javascript/folder with ECMAScript snapshots - tags Array and Typed Array as higher-level capability groups
- tags Array and Typed Array with bundles (e.g. "Array flattening") representing a bundle of things that got implemented/specified at a particular time. (thanks to James Graham for the term "bundle").
Interesting queries to look at or to review this PR:
Snapshots:
- npm run traverse -- -t web-features-snapshot:ecmascript-1
- npm run traverse -- -t web-features-snapshot:ecmascript-3
- npm run traverse -- -t web-features-snapshot:ecmascript-5
- npm run traverse -- -t web-features-snapshot:ecmascript-2015
- npm run traverse -- -t web-features-snapshot:ecmascript-2016
- ... and more years
Groups:
- npm run traverse -- -t web-features-group:arrays
- npm run traverse -- -t web-features-group:typed-arrays
- npm run traverse -- -t web-features-group:iterators (incomplete group for the moment)
Bundles:
- npm run traverse -- -t web-features-bundle:basic-arrays
- npm run traverse -- -t web-features-bundle:basic-typed-arrays
- npm run traverse -- -t web-features-bundle:array-at
- npm run traverse -- -t web-features-bundle:array-copywithin
- npm run traverse -- -t web-features-bundle:array-fill
- npm run traverse -- -t web-features-bundle:array-find
- npm run traverse -- -t web-features-bundle:array-findlast
- npm run traverse -- -t web-features-bundle:array-flattening
- npm run traverse -- -t web-features-bundle:array-iteration-methods
- npm run traverse -- -t web-features-bundle:array-iterators
- npm run traverse -- -t web-features-bundle:array-from
- npm run traverse -- -t web-features-bundle:array-fromasync
- npm run traverse -- -t web-features-bundle:array-includes
- npm run traverse -- -t web-features-bundle:array-isarray
- npm run traverse -- -t web-features-bundle:array-of
- npm run traverse -- -t web-features-bundle:stable-array-sort
- npm run traverse -- -t web-features-bundle:array-by-copy
Here's a gist that uses this branch to create web-features YAML files: https://gist.github.com/Elchi3/3c59d3b69b2c07806a462a841a229472
cc @ddbeck @foolip
This pull request has merge conflicts that must be resolved before it can be merged.
@Elchi3 do you want manual review of this? Or is it partly produced by a script that we can trust?
On the tags, going forward I would suggest "web-features:array-at" for a feature, "web-features:group:arrays" for groups, and "web-features:snapshot:ecmascript-2022" for snapshots. We could make it "web-features:feature:array-at" but I feel like that's making the common case more verbose and repetetive.
@Elchi3 do you want manual review of this? Or is it partly produced by a script that we can trust?
It's not produced by a script. Sorry :) It was me reading old specifications to determine when a feature was first defined.
On the tags, going forward I would suggest "web-features:array-at" for a feature, "web-features:group:arrays" for groups, and "web-features:snapshot:ecmascript-2022" for snapshots. We could make it "web-features:feature:array-at" but I feel like that's making the common case more verbose and repetetive.
I'm happy to make this change and get rid of the "bundle" terminology.
On groups and snapshots: From BCD's perspective, adding group and snapshot tags is useful to allow advanced data querying (and as a contributor you can see at a glance to which group and to which snapshot a BCD feature belongs), but it is also quite some work to add this to all BCD features. So, I wonder if we want those extra tags along with the standard web-features tag or if we are happy with having group and snapshot attached to web-feature yaml files only.
Actually, I think I would like to land features and snapshots in BCD and leave groups to web-features.
I will update the syntax to be: "web-features:array-at" "web-features:snapshot:ecmascript-2022"
This pull request has merge conflicts that must be resolved before it can be merged.
Thanks Philip! I'm merging this so that I can create more ECMAScript web-features. We can always correct things later and there are a few things not yet tagged with a snapshot but I'm confident about this initial data.