Merged
Conversation
5bee6f3 to
05a8419
Compare
ai
reviewed
Dec 5, 2019
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 |
Member
There was a problem hiding this comment.
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', |
test/range.test.js
Outdated
|
|
||
| it('selects a range of android browsers', () => { | ||
| expect(browserslist('android 4.3-37')) | ||
| .toEqual([ |
Member
There was a problem hiding this comment.
You can keep toEqual on previous line to make method smaller
Contributor
Author
There was a problem hiding this comment.
😛I am really not good at formatting without the help of prettier. If you are okay with prettier, I would suggest we leave it as-is. I can introduce prettier in a separate PR.
Member
There was a problem hiding this comment.
Don't worry, fix the logic and // eslint-disable and I will fix the formatting.
index.js
Outdated
| } | ||
|
|
||
| function normalizeAndroidVersions (androidVersions, chromeVersions) { | ||
| var firstEvergreen = 37 |
Member
There was a problem hiding this comment.
If we use this bar in multiple places, we need to move it to var ANDROID_FIRST_EVERGREEN constant.
Member
|
Thanks. Released in 4.8.1. |
zhouyu9527
pushed a commit
to zhouyu9527/browserslist
that referenced
this pull request
Jul 5, 2022
* fix: use chrome>=37 data for android * fix browser sorting * refactor: tune android browser versions regex * chore: refine testcase * add testcase * address review comments * oops
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.