3rd-Eden / useragent

Useragent parser for Node.js, ported from browserscope.org
MIT License
897 stars 137 forks source link

No version info for Windows OS #60

Closed yunong closed 8 years ago

yunong commented 9 years ago

Different Windows OS versions return inconsistent results for the os parameter. And as far as I can tell, none of them return the actual version of the OS, they are all 0.0.0

This string returns the family as 'Windows 8.1', with versions as 0.0.0

useragent.parse('Mozilla/5.0 (compatible, MSIE 11, Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko').os
{ family: 'Windows 8.1',
  major: '0',
  minor: '0',
  patch: '0' }

While this string returns family as just Windows.

useragent.parse('Mozilla/5.0 (compatible, MSIE 11, Windows NT 6.4; Trident/7.0; rv:11.0) like Gecko').os
{ family: 'Windows',
  major: '0',
  minor: '0',
  patch: '0' }

In both cases, version information is invalid, and the name of the OS varies. I think the name should always be "Windows", and the version info should properly updated.

slavab89 commented 9 years ago

can confirm. this is a new string from windows 10 and still returns just Windows

Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0
yunong commented 8 years ago

Looks like you've updated your regex yaml to the one that's being regularly updated. This should be fixed now.