-
Notifications
You must be signed in to change notification settings - Fork 91
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
Add script to cleanup redundant BCD overrides #2333
base: main
Are you sure you want to change the base?
Add script to cleanup redundant BCD overrides #2333
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to suggest renaming this. There are a few possible overrides in a .yml
file: compat_features
, compute_from
, and complete status
block and all of them involve BCD to some extent. And "clean" implies that overrides are necessarily "dirty" (some are not).
My naming ideas are:
- dedupe-compat-tags
- tidy-compat-features
- remove-tagged-compat-features
Ack, my top-of-review comment got lost: Cool! I have some suggestions to make this safer to run and to improve maintainability, but I like the overall shape of this. |
Co-authored-by: James Stuckey Weber <[email protected]>
Co-authored-by: James Stuckey Weber <[email protected]>
…leanup-bcd-overrides
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed a fix to a bug in one of my earlier suggestions. Apart from the renaming question from @ddbeck, the other issue currently is with the output yaml formatting.
Adding a comment to the document adds a line of whitespace which the formatter removes. I think ideally we should run prettier on the output like we do in feature-init
, or perhaps more crudely, update package.json to have-
"cleanup-bcd-overrides": "tsx scripts/cleanup-bcd-overrides.ts; npm run format" },
This PR adds a script that removes the
compat_features
overrides from web-features files when the overrides' data matches the data that comes from BCD tags.