PSPDFKit-labs / browserslist.dev

A website to display compatible browsers from browserslist string.

Home Page:https://browserslist.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Better feedback on valid options

Dreamsorcerer opened this issue · comments

When trying out the 'supports' feature, it seems that it if it fails to recognise a name, it gives no indication.

Expected behaviour would be an invalid configuration error, or atleast some kind of feedback that confirms what it is actually searching.

For example, I wanted to search for this intersection of features:
supports custom-elementsv1 and supports es6-module-dynamic-import and supports es6-class and supports replace-all and supports shadowdomv1

But, when pasting that in, nothing changes. If I remove half the string, then the coverage goes down, which is obviously impossible. It seems that one of the values is not recognised, but it's rather difficult to figure out which one.

In this case it appears to be the replace-all, as it looks like browserlist does not have all features available.

I think the error should be handled by browserslist. right now browserslist isn't throwing a stable error for missing features.

@ritz078 They seem to think the error message is clear: browserslist/browserslist#684 (comment)

Looks like there has been a new PR relating to this. So, maybe now you can use those errors?
browserslist/browserslist#714