Skip to content
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-new-bcd: filters needed #788

Open
Elchi3 opened this issue Oct 25, 2023 · 4 comments
Open

add-new-bcd: filters needed #788

Elchi3 opened this issue Oct 25, 2023 · 4 comments

Comments

@Elchi3
Copy link
Member

Elchi3 commented Oct 25, 2023

I need the same filtering that update-bcd has in the add-new-bcd script:

Right now I can do:
npm run update-bcd -- -b firefox -r 120-120

But not:
npm run add-new-bcd -- -b firefox -r 120-120

@queengooborg
Copy link
Member

queengooborg commented Oct 29, 2023

The reason that add-new-bcd doesn't have any such filtering is because, unlike update-bcd, add-new-bcd must collect info on all browsers to add a brand new entry. We probably wouldn't want to have all other browsers set to false if they aren't supposed to be when adding a new entry!

Additionally, I personally think that it would be better to run add-new-bcd regardless of what specific browser version a feature was implemented in. My reasoning for this is that often times, a standards spec may add a feature that has already been implemented in all browsers, or a previously non-standard spec became a standard. If we run add-new-bcd based upon the version a feature was added into a browser, there's a high chance we'll end up skipping a feature, and we'll have to go back and run add-new-bcd without filters anyways.

@Elchi3
Copy link
Member Author

Elchi3 commented Oct 30, 2023

The reason that add-new-bcd doesn't have any such filtering is because, unlike update-bcd, add-new-bcd must collect info all browsers to add a brand new entry.

Yes, I see that it must collect info on all browsers but my use case is to create a PR for a new browser release like mdn/browser-compat-data#21083.

We probably wouldn't want to have all other browsers set to false if they aren't supposed to be when adding a new entry!

In this case all browsers would be false but Firefox would be 120. In this scenario I'm not interested in new features that are shipping in Chrome 122 and are false in all other browsers, for example. Does that make sense?

@Elchi3
Copy link
Member Author

Elchi3 commented Nov 2, 2023

For mdn/browser-compat-data#21148 I had to manually filter out the new stuff in Chrome 120. Would have loved if there was a filter.

@Elchi3
Copy link
Member Author

Elchi3 commented Nov 21, 2023

I've worked through almost all of the things that add-new-bcd proposes and I opened PRs to improve the test-builders. I think if these are merged the list of things add-new-bcd proposes should be fairly small, so maybe filters aren't needed then after all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants