Skip to content

Commit

Permalink
chore: Upgrade device-detector to 4.2.3 (#143)
Browse files Browse the repository at this point in the history
* test: update brands.json to 4.2.0

* chore: upgraded to version 4.2.0

* fix: update variableReplacement to support new type of mobile_apps.json

* refactor: pretty the json files for better diff & debug

* chore: upgraded to version 4.2.3

* fix: operating-system parse platform error

* fix: device type of Tizen TV issue

* fix: device type of Desktop x32, Desktop x64, Desktop WOW64

* chore: update available-browsers.json & browser-families.json & mobile-only-browsers.json to v4.2.3

* test: add tests of smartphone & tv-1.json

* test: add desktop cases

* version 3.0.3

* Update README.md

Co-authored-by: Etienne Martin <[email protected]>
  • Loading branch information
seawind543 and etienne-martin authored Apr 5, 2022
1 parent bbcd099 commit f7fe36e
Show file tree
Hide file tree
Showing 91 changed files with 423,836 additions and 98 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Device-detector-js will parse any user agent and detect the browser, operating s

This library is heavily tested and relies on over 10,000 tests to detect thousands of user agent strings, even from rare and obscure browsers and devices.

#### This is a javascript port of [Matomo device-detector](https://github.com/matomo-org/device-detector) (4.1.0).
#### This is a javascript port of [Matomo device-detector](https://github.com/matomo-org/device-detector) (4.2.3).

[![Coveralls github](https://img.shields.io/coveralls/github/etienne-martin/device-detector-js.svg)](https://coveralls.io/github/etienne-martin/device-detector-js)
[![CircleCI build](https://img.shields.io/circleci/project/github/RedSparr0w/node-csgo-parser.svg)](https://circleci.com/gh/etienne-martin/device-detector-js)
Expand Down
2 changes: 1 addition & 1 deletion load-fixtures.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ glob("**/*.yml", {
ensureDirectoryExistence(dest);

const fixture = loadYaml(src);
const json = JSON.stringify(fixture);
const json = JSON.stringify(fixture, null, 2);

fs.writeFileSync(dest, json);
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "device-detector-js",
"version": "3.0.2",
"version": "3.0.3",
"description": "A javascript port of Matomo device-detector",
"homepage": "https://github.com/etienne-martin/device-detector-js#readme",
"keywords": [
Expand Down Expand Up @@ -52,7 +52,7 @@
"build": "tsc --pretty"
},
"napa": {
"device-detector": "https://github.com/matomo-org/device-detector#4.1.0"
"device-detector": "https://github.com/matomo-org/device-detector#4.2.3"
},
"napa-config": {
"cache": false
Expand Down
4,223 changes: 4,222 additions & 1 deletion src/fixtures/Tests/Parser/Client/fixtures/browser.json

Large diffs are not rendered by default.

267 changes: 266 additions & 1 deletion src/fixtures/Tests/Parser/Client/fixtures/feed_reader.json
Original file line number Diff line number Diff line change
@@ -1 +1,266 @@
[{"user_agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.21 (KHTML, like Gecko) akregator/4.11.5 Safari/537.21","client":{"type":"feed reader","name":"Akregator","version":"4.11.5"}},{"user_agent":"Akregator/4.12.3; syndication SUSE","client":{"type":"feed reader","name":"Akregator","version":"4.12.3"}},{"user_agent":"Akregator/1.2.9; librss/remnants","client":{"type":"feed reader","name":"Akregator","version":"1.2.9"}},{"user_agent":"Apple-PubSub/65.28","client":{"type":"feed reader","name":"Apple PubSub","version":"65.28"}},{"user_agent":"FeedDemon/4.5 (http://www.feeddemon.com/; Microsoft Windows)","client":{"type":"feed reader","name":"FeedDemon","version":"4.5"}},{"user_agent":"FeedDemon/4.5 (http://www.feeddemon.com/; Microsoft Windows XP)","client":{"type":"feed reader","name":"FeedDemon","version":"4.5"}},{"user_agent":"FeeddlerPro/2.4 CFNetwork/672.0.8 Darwin/14.0.0","client":{"type":"feed reader","name":"Feeddler RSS Reader","version":"2.4"}},{"user_agent":"FeeddlerRSS/2.4 CFNetwork/548.1.4 Darwin/11.0.0","client":{"type":"feed reader","name":"Feeddler RSS Reader","version":"2.4"}},{"user_agent":"FeeddlerRSS 2.4 (iPad; iPhone OS 5.1.1; en_US)","client":{"type":"feed reader","name":"Feeddler RSS Reader","version":"2.4"}},{"user_agent":"JetBrains Omea Reader 2.2 (http://www.jetbrains.com/omea/reader/)","client":{"type":"feed reader","name":"JetBrains Omea Reader","version":"2.2"}},{"user_agent":"Liferea/1.6.4 (Linux; en_US.UTF-8; http://liferea.sf.net/)","client":{"type":"feed reader","name":"Liferea","version":"1.6.4"}},{"user_agent":"Liferea/1.10-RC1 (Linux; en_GB.UTF-8; http://liferea.sf.net/)","client":{"type":"feed reader","name":"Liferea","version":"1.10"}},{"user_agent":"Liferea/1.10.6 (Linux; en_US.UTF8; http://liferea.sf.net/) AppleWebKit (KHTML, like Gecko)","client":{"type":"feed reader","name":"Liferea","version":"1.10.6"}},{"user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.74.9 (KHTML, like Gecko) Version/6.0 NetNewsWire/4.0.0","client":{"type":"feed reader","name":"NetNewsWire","version":"4.0.0"}},{"user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.74.9 (KHTML, like Gecko) NetNewsWire/3.3.2","client":{"type":"feed reader","name":"NetNewsWire","version":"3.3.2"}},{"user_agent":"NetNewsWire/4.0.0 (Mac OS X; http://netnewswireapp.com/mac/; gzip-happy)","client":{"type":"feed reader","name":"NetNewsWire","version":"4.0.0"}},{"user_agent":"newsbeuter/2.7 (Linux x86_64)","client":{"type":"feed reader","name":"Newsbeuter","version":"2.7"}},{"user_agent":"NewsBlur iPhone App v3.6","client":{"type":"feed reader","name":"NewsBlur Mobile App","version":"3.6"}},{"user_agent":"NewsBlur iPad App v3.6","client":{"type":"feed reader","name":"NewsBlur Mobile App","version":"3.6"}},{"user_agent":"NewsBlur/4.0.1 CFNetwork/672.1.13 Darwin/14.0.0","client":{"type":"feed reader","name":"NewsBlur","version":"4.0.1"}},{"user_agent":"newsbeuter/2.4 (Linux 3.2.0-23-generic; i686; http://www.newsbeuter.org/) libcurl/7.22.0 GnuTLS/2.12.14 zlib/1.2.3.4 libidn/1.23 librtmp/2.3","client":{"type":"feed reader","name":"Newsbeuter","version":"2.4"}},{"user_agent":"Pulp/1.5.2 (iPad; http://www.acrylicapps.com/pulp/)","client":{"type":"feed reader","name":"Pulp","version":"1.5.2"}},{"user_agent":"ReadKit/2.4.0 (Mac OS X Version 10.9.2 (Build 13C64))","client":{"type":"feed reader","name":"ReadKit","version":"2.4.0"}},{"user_agent":"ReadKit/7017 CFNetwork/673.2.1 Darwin/13.1.0 (x86_64) (MacBookPro10%2C1)","client":{"type":"feed reader","name":"ReadKit","version":"7017"}},{"user_agent":"Reeder/3.2 CFNetwork/672.1.12 Darwin/14.0.0","client":{"type":"feed reader","name":"Reeder","version":"3.2"}},{"user_agent":"RssBandit/1.9.0.1002","client":{"type":"feed reader","name":"RSS Bandit","version":"1.9.0.1002"}},{"user_agent":"RssBandit/1.9.0.1002 (.NET CLR 2.0.50727.7512; WinNT 6.2.9200.0; http://www.rssbandit.org)","client":{"type":"feed reader","name":"RSS Bandit","version":"1.9.0.1002"}},{"user_agent":"RSS Junkie Daemon","client":{"type":"feed reader","name":"RSS Junkie","version":""}},{"user_agent":"RSSOwl/2.2.1.201312301314 (Windows; U; en)","client":{"type":"feed reader","name":"RSSOwl","version":"2.2.1.201312301314"}},{"user_agent":"RSSOwl/2.2.1.201312301316 (X11; U; en)","client":{"type":"feed reader","name":"RSSOwl","version":"2.2.1.201312301316"}},{"user_agent":"Stringer (https://github.com/swanson/stringer)","client":{"type":"feed reader","name":"Stringer","version":""}},{"user_agent":"Downcast/1241 CFNetwork/673.4 Darwin/13.3.0 (x86_64) (MacBookAir4%2C2)","client":{"type":"feed reader","name":"Downcast","version":"1241"}},{"user_agent":"iTunes/10.7 Downcast/2.8.24.1002","client":{"type":"feed reader","name":"Downcast","version":"2.8.24.1002"}}]
[
{
"user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.21 (KHTML, like Gecko) akregator/4.11.5 Safari/537.21",
"client": {
"type": "feed reader",
"name": "Akregator",
"version": "4.11.5"
}
},
{
"user_agent": "Akregator/4.12.3; syndication SUSE",
"client": {
"type": "feed reader",
"name": "Akregator",
"version": "4.12.3"
}
},
{
"user_agent": "Akregator/1.2.9; librss/remnants",
"client": {
"type": "feed reader",
"name": "Akregator",
"version": "1.2.9"
}
},
{
"user_agent": "Apple-PubSub/65.28",
"client": {
"type": "feed reader",
"name": "Apple PubSub",
"version": "65.28"
}
},
{
"user_agent": "FeedDemon/4.5 (http://www.feeddemon.com/; Microsoft Windows)",
"client": {
"type": "feed reader",
"name": "FeedDemon",
"version": "4.5"
}
},
{
"user_agent": "FeedDemon/4.5 (http://www.feeddemon.com/; Microsoft Windows XP)",
"client": {
"type": "feed reader",
"name": "FeedDemon",
"version": "4.5"
}
},
{
"user_agent": "FeeddlerPro/2.4 CFNetwork/672.0.8 Darwin/14.0.0",
"client": {
"type": "feed reader",
"name": "Feeddler RSS Reader",
"version": "2.4"
}
},
{
"user_agent": "FeeddlerRSS/2.4 CFNetwork/548.1.4 Darwin/11.0.0",
"client": {
"type": "feed reader",
"name": "Feeddler RSS Reader",
"version": "2.4"
}
},
{
"user_agent": "FeeddlerRSS 2.4 (iPad; iPhone OS 5.1.1; en_US)",
"client": {
"type": "feed reader",
"name": "Feeddler RSS Reader",
"version": "2.4"
}
},
{
"user_agent": "JetBrains Omea Reader 2.2 (http://www.jetbrains.com/omea/reader/)",
"client": {
"type": "feed reader",
"name": "JetBrains Omea Reader",
"version": "2.2"
}
},
{
"user_agent": "Liferea/1.6.4 (Linux; en_US.UTF-8; http://liferea.sf.net/)",
"client": {
"type": "feed reader",
"name": "Liferea",
"version": "1.6.4"
}
},
{
"user_agent": "Liferea/1.10-RC1 (Linux; en_GB.UTF-8; http://liferea.sf.net/)",
"client": {
"type": "feed reader",
"name": "Liferea",
"version": "1.10"
}
},
{
"user_agent": "Liferea/1.10.6 (Linux; en_US.UTF8; http://liferea.sf.net/) AppleWebKit (KHTML, like Gecko)",
"client": {
"type": "feed reader",
"name": "Liferea",
"version": "1.10.6"
}
},
{
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.74.9 (KHTML, like Gecko) Version/6.0 NetNewsWire/4.0.0",
"client": {
"type": "feed reader",
"name": "NetNewsWire",
"version": "4.0.0"
}
},
{
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.74.9 (KHTML, like Gecko) NetNewsWire/3.3.2",
"client": {
"type": "feed reader",
"name": "NetNewsWire",
"version": "3.3.2"
}
},
{
"user_agent": "NetNewsWire/4.0.0 (Mac OS X; http://netnewswireapp.com/mac/; gzip-happy)",
"client": {
"type": "feed reader",
"name": "NetNewsWire",
"version": "4.0.0"
}
},
{
"user_agent": "newsbeuter/2.7 (Linux x86_64)",
"client": {
"type": "feed reader",
"name": "Newsbeuter",
"version": "2.7"
}
},
{
"user_agent": "NewsBlur iPhone App v3.6",
"client": {
"type": "feed reader",
"name": "NewsBlur Mobile App",
"version": "3.6"
}
},
{
"user_agent": "NewsBlur iPad App v3.6",
"client": {
"type": "feed reader",
"name": "NewsBlur Mobile App",
"version": "3.6"
}
},
{
"user_agent": "NewsBlur/4.0.1 CFNetwork/672.1.13 Darwin/14.0.0",
"client": {
"type": "feed reader",
"name": "NewsBlur",
"version": "4.0.1"
}
},
{
"user_agent": "newsbeuter/2.4 (Linux 3.2.0-23-generic; i686; http://www.newsbeuter.org/) libcurl/7.22.0 GnuTLS/2.12.14 zlib/1.2.3.4 libidn/1.23 librtmp/2.3",
"client": {
"type": "feed reader",
"name": "Newsbeuter",
"version": "2.4"
}
},
{
"user_agent": "Pulp/1.5.2 (iPad; http://www.acrylicapps.com/pulp/)",
"client": {
"type": "feed reader",
"name": "Pulp",
"version": "1.5.2"
}
},
{
"user_agent": "ReadKit/2.4.0 (Mac OS X Version 10.9.2 (Build 13C64))",
"client": {
"type": "feed reader",
"name": "ReadKit",
"version": "2.4.0"
}
},
{
"user_agent": "ReadKit/7017 CFNetwork/673.2.1 Darwin/13.1.0 (x86_64) (MacBookPro10%2C1)",
"client": {
"type": "feed reader",
"name": "ReadKit",
"version": "7017"
}
},
{
"user_agent": "Reeder/3.2 CFNetwork/672.1.12 Darwin/14.0.0",
"client": {
"type": "feed reader",
"name": "Reeder",
"version": "3.2"
}
},
{
"user_agent": "RssBandit/1.9.0.1002",
"client": {
"type": "feed reader",
"name": "RSS Bandit",
"version": "1.9.0.1002"
}
},
{
"user_agent": "RssBandit/1.9.0.1002 (.NET CLR 2.0.50727.7512; WinNT 6.2.9200.0; http://www.rssbandit.org)",
"client": {
"type": "feed reader",
"name": "RSS Bandit",
"version": "1.9.0.1002"
}
},
{
"user_agent": "RSS Junkie Daemon",
"client": {
"type": "feed reader",
"name": "RSS Junkie",
"version": ""
}
},
{
"user_agent": "RSSOwl/2.2.1.201312301314 (Windows; U; en)",
"client": {
"type": "feed reader",
"name": "RSSOwl",
"version": "2.2.1.201312301314"
}
},
{
"user_agent": "RSSOwl/2.2.1.201312301316 (X11; U; en)",
"client": {
"type": "feed reader",
"name": "RSSOwl",
"version": "2.2.1.201312301316"
}
},
{
"user_agent": "Stringer (https://github.com/swanson/stringer)",
"client": {
"type": "feed reader",
"name": "Stringer",
"version": ""
}
},
{
"user_agent": "Downcast/1241 CFNetwork/673.4 Darwin/13.3.0 (x86_64) (MacBookAir4%2C2)",
"client": {
"type": "feed reader",
"name": "Downcast",
"version": "1241"
}
},
{
"user_agent": "iTunes/10.7 Downcast/2.8.24.1002",
"client": {
"type": "feed reader",
"name": "Downcast",
"version": "2.8.24.1002"
}
}
]
Loading

0 comments on commit f7fe36e

Please sign in to comment.