Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upFix android queries #428
Merged
Fix android queries #428
Conversation
index.js
Outdated
| } | ||
| // here we assume that caniuse version ranges never overlaps, | ||
| // so it is safe to use the left of the range | ||
| // eslint-disable-next-line max-len |
This comment has been minimized.
This comment has been minimized.
ai
Dec 5, 2019
Member
Nope, you can't just disable the rule. Try to reorganize the code to make it more readable.
test/range.test.js
Outdated
| }, | ||
| android: { | ||
| name: 'android', | ||
| released: ['4.2-4.3', '4.4', |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
test/range.test.js
Outdated
| @@ -24,6 +30,13 @@ it('selects versions with query out of range', () => { | |||
| expect(browserslist('ie 1-12')).toEqual(['ie 11', 'ie 10', 'ie 9', 'ie 8']) | |||
| }) | |||
|
|
|||
| it('selects a range of android browsers', () => { | |||
| expect(browserslist('android 4.3-37')) | |||
| .toEqual([ | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
JLHwung
Dec 5, 2019
Author
Contributor
This comment has been minimized.
This comment has been minimized.
ai
Dec 5, 2019
Member
Don't worry, fix the logic and // eslint-disable and I will fix the formatting.
index.js
Outdated
| } | ||
| return browserslist.data[name] | ||
| } | ||
|
|
||
| function normalizeAndroidVersions (androidVersions, chromeVersions) { | ||
| var firstEvergreen = 37 |
This comment has been minimized.
This comment has been minimized.
ai
Dec 5, 2019
Member
If we use this bar in multiple places, we need to move it to var ANDROID_FIRST_EVERGREEN constant.
This comment has been minimized.
This comment has been minimized.
|
Thanks. Released in 4.8.1. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
JLHwung commentedDec 4, 2019
I recommend to review this PR by commits.
The first commits merge chrome >= 37 data to android under the
mobileToDesktopflagThe second commits fixed result sorting issues occured when I wrote test for the first commit.
I propose in In the next major release we should set the defaults of
opts.mobileToDesktopto betrueso that the returned mobile browsers are complete. People can disable this feature if they find things are not going well.