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 support of MDN database #522

Open
socketpair opened this issue Aug 17, 2020 · 17 comments
Open

Add support of MDN database #522

socketpair opened this issue Aug 17, 2020 · 17 comments

Comments

@socketpair
Copy link

I mean:
https://github.com/mdn/browser-compat-data

Another example:
https://github.com/webhintio/hint

I want browserlists to be able to query browsers by expressions like supports mdn-javascript_builtins_promise_allsettled.

Unfortunately, current DB does not support such detailed requests.

@ai
Copy link
Member

ai commented Aug 17, 2020

Do we have this file in caniuse-db npm package?

@socketpair
Copy link
Author

socketpair commented Aug 17, 2020

@ai No, you don't have:

$ find | fgrep -i promi
./features-json/promise-finally.json
./features-json/promises.json

@socketpair
Copy link
Author

@ai
Copy link
Member

ai commented Aug 17, 2020

Can you create an issue in Can I Use to add this data. I can't do anything without the data source (and losing data by HTTP is not an option for me because of the security risks).

@socketpair
Copy link
Author

socketpair commented Aug 17, 2020

Yes I can... but....there are plenty of other features. Seems caniuse guys simply just do not add detailed information.

https://caniuse.com/#feat=mdn-javascript_builtins_object_fromentries

Is another feature I want to use.

That's why I'm asking you to support the MDN database.

@ai
Copy link
Member

ai commented Aug 17, 2020

That's why I'm asking you to support the MDN database.

How do you see this support implementation?

@socketpair
Copy link
Author

Ummm. Instead of adding, they just refer to MDN database....I think browserslist must support this DB as well.

@socketpair
Copy link
Author

@ai
Browserslist query language should match features from this DB. MDN db has an API.

@ai
Copy link
Member

ai commented Aug 17, 2020

To support any database we need an npm package with data from that database. This npm package should be auto-updated to be sure that the data is always actual.

Do you want to create a npm package with MDN data or try to find any official package?

@socketpair
Copy link
Author

socketpair commented Aug 17, 2020

Well. It's the official package...

https://caniuse.com/#feat=mdn-javascript_builtins_object_fromentries

image

(click on the place like one in the picture)

This is an example of description method I want:

https://github.com/mdn/browser-compat-data/blob/master/javascript/builtins/Object.json#L600

You should not use these files directly of course. There is an API.

@ai
Copy link
Member

ai commented Aug 17, 2020

It's official package

You show a screenshot from website or GitHub repo, but it is not a npm package.

Browserslist can't load data from websites. Browserslist users Can I Use data because they publish this data in caniuse-db npm package.

Can you create an issue in MDN repo to release that data on npm?

@socketpair
Copy link
Author

@ai
Copy link
Member

ai commented Aug 17, 2020

Great. Can you send PR?

@socketpair
Copy link
Author

Sorry, no. It's too hard for me to integrate all these things.

@socketpair
Copy link
Author

@chaffeqa
Copy link

this integration woudl be 🔥 !

like socketpair, i wish i had time to help here :(

@karlhorky
Copy link

@jonathantneal @antross did either of you get further with your solution approaches from #379 ?

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

4 participants