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

minor.push is not a function #420

Closed
fdubost opened this issue Apr 20, 2020 · 7 comments
Closed

minor.push is not a function #420

fdubost opened this issue Apr 20, 2020 · 7 comments
Assignees

Comments

@fdubost
Copy link

fdubost commented Apr 20, 2020

Hi,

I'm facing an similar issue than #409 but with minor

TypeError: minor.push is not a function
     at versionsListToRanges (/Users/fdubost/Workspaces/my_project/node_modules/browserslist-useragent-regexp/lib/index.js:1177:17)
     at browsers.forEach (/Users/fdubost/Workspaces/my_project/node_modules/browserslist-useragent-regexp/lib/index.js:1212:24)
     at Map.forEach (<anonymous>)
     at browserVersionsToRanges (/Users/fdubost/Workspaces/my_project/node_modules/browserslist-useragent-regexp/lib/index.js:1211:12)
     at getUserAgentRegExps (/Users/fdubost/Workspaces/my_project/node_modules/browserslist-useragent-regexp/lib/index.js:1511:26)
     at getUserAgentRegExp (/Users/fdubost/Workspaces/my_project/node_modules/browserslist-useragent-regexp/lib/index.js:1525:19)

I'm using:

  • node 10.17.0
  • yarn 1.12.3
  • browsersist-useragent-regexp last version (2.0.2)
  • the browsers configuration is ['Safari < 11']

Thank you!

@dangreen dangreen self-assigned this Apr 21, 2020
@fdubost
Copy link
Author

fdubost commented Apr 21, 2020

Don't know if this is linked, but the regexp doesn't match IE11 user agent Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko with:

[
  ie <= 11,
  'Safari > 8 and Safari < 11'
]

But it matches with:

[
  ie <= 11,
  'Safari 9',
  'Safari 10'
]

@dangreen
Copy link
Member

@fdubost About your second message:

> browserslist "ie <= 11, Safari > 8 and Safari < 11"
safari 10.1
safari 10
safari 9.1
safari 9

This is problem of Browserslist itself. You can create issue about that in Browserslist repo.

As workaround you can use Safari > 8 and Safari < 12, ie <= 11

> browserslist "Safari > 8 and Safari < 12, ie <= 11"
ie 11
ie 10
ie 9
ie 8
ie 7
ie 6
ie 5.5
safari 11.1
safari 11
safari 10.1
safari 10
safari 9.1
safari 9

@fdubost
Copy link
Author

fdubost commented Apr 22, 2020

Done browserslist/browserslist#480 ✅Thanks!

@dangreen dangreen mentioned this issue Apr 22, 2020
@dangreen
Copy link
Member

dangreen commented Apr 22, 2020

@fdubost

v2.0.3

I hope what finally fixed this bug.

@fdubost
Copy link
Author

fdubost commented Apr 23, 2020

Thank you @dangreen ! The error is fixed but I still have an issue: [ Safari < 11 ] catches this user-agent which is a Chrome 80
Mozilla/5.0 (Linux; Android 8.0.0; Bouygtel4K Build/CALIFORNIE; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/80.0.3987.162 Mobile Safari/537.36

@dangreen
Copy link
Member

@fdubost v2.0.4

@fdubost
Copy link
Author

fdubost commented Apr 23, 2020

It seems to work, thank you 🙏 !

@fdubost fdubost closed this as completed Apr 23, 2020
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

2 participants