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

Replace defunct caniuse jsonp.php?callback #2352

Merged
merged 18 commits into from
Oct 20, 2018
Merged

Replace defunct caniuse jsonp.php?callback #2352

merged 18 commits into from
Oct 20, 2018

Conversation

rejas
Copy link
Member

@rejas rejas commented Jul 26, 2018

I noticed that the integration tests try to use that callback function to get caniuse data and test the browser against it. Seems though that this API is gone for sometime already, openened an issue asking about it.

In the meantime I took the liberty to get the data directly from their github.

Noticed though that running the tests on Firefox they fail for quite some cases. Turns out the code thinks it has to test against the Firefox 3.6 (which obviously isnt correct).

This line:

var versionToUse = _.findLast(_.keys(browserResults), function(ciuVersion) {

seems doesnt return the keys (via _keys()) in the original order so "3.6" is the last one in the retuned value and therefor gets taken in the _findLast call.

ANy advice on how to get the keys in the original order @patrickkettner ?

@rejas
Copy link
Member Author

rejas commented Aug 27, 2018

Fixed the order of the version keys problem.

@rejas rejas requested a review from patrickkettner August 27, 2018 13:58
@rejas
Copy link
Member Author

rejas commented Aug 27, 2018

Fairly done for now, would love to hear feedback from @patrickkettner

Running our tests against the caniuse-db shows that only a few are wrong (unclear on which side):

  • IE11: Caniuse result for svg-img matches Modernizr's result for svgasimg
  • Edge17: Caniuse reported partial support for indexeddb
  • Firefox61: Caniuse result for ambient-light matches Modernizr's result for ambientlight

Will open a seperate ticket for those.

@rejas rejas added this to the Modernizr v3.7 milestone Aug 27, 2018
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

Successfully merging this pull request may close these issues.

1 participant