1
0
mirror of https://github.com/lancedikson/bowser synced 2024-10-27 20:34:22 +00:00

Merge branch '2.7.0' into production

This commit is contained in:
Denis Demchenko 2019-10-02 21:47:13 +03:00
commit d95fe87b06
6 changed files with 1355 additions and 763 deletions

View File

@ -1,5 +1,10 @@
# Bowser Changelog
### 2.7.0 (Oct 2, 2019)
- [FIX] Add support for QQ Browser [#362]
- [FIX] Add support for GSA [#364]
- [FIX] Updated dependencies
### 2.6.0 (Sep 6, 2019)
- [ADD] Define "module" export in package.json [#354]
- [FIX] Fix Tablet PC detection [#334]

1930
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "bowser",
"version": "2.6.1",
"version": "2.7.0",
"description": "Lightweight browser detector",
"keywords": [
"browser",
@ -29,31 +29,31 @@
"url": "git+https://github.com/lancedikson/bowser.git"
},
"devDependencies": {
"@babel/cli": "^7.5.0",
"@babel/core": "^7.5.4",
"@babel/polyfill": "^7.4.4",
"@babel/preset-env": "^7.5.4",
"@babel/register": "^7.4.4",
"ava": "^2.2.0",
"babel-eslint": "^10.0.2",
"@babel/cli": "^7.6.2",
"@babel/core": "^7.6.2",
"@babel/polyfill": "^7.6.0",
"@babel/preset-env": "^7.6.2",
"@babel/register": "^7.6.2",
"ava": "^2.4.0",
"babel-eslint": "^10.0.3",
"babel-loader": "^8.0.6",
"babel-plugin-add-module-exports": "^1.0.2",
"babel-plugin-istanbul": "^5.1.4",
"babel-plugin-istanbul": "^5.2.0",
"compression-webpack-plugin": "^3.0.0",
"coveralls": "^3.0.5",
"coveralls": "^3.0.6",
"docdash": "^1.1.1",
"eslint": "^6.0.1",
"eslint": "^6.5.1",
"eslint-config-airbnb-base": "^13.2.0",
"eslint-plugin-ava": "^7.1.0",
"eslint-plugin-import": "^2.18.0",
"gh-pages": "^2.0.1",
"eslint-plugin-ava": "^8.0.0",
"eslint-plugin-import": "^2.18.2",
"gh-pages": "^2.1.1",
"jsdoc": "^3.6.3",
"nyc": "^14.1.1",
"sinon": "^7.3.2",
"testem": "^2.17.0",
"webpack": "^4.39.1",
"webpack-bundle-analyzer": "^3.3.2",
"webpack-cli": "^3.3.6",
"sinon": "^7.5.0",
"testem": "^3.0.0",
"webpack": "^4.41.0",
"webpack-bundle-analyzer": "^3.5.2",
"webpack-cli": "^3.3.9",
"yamljs": "^0.3.0"
},
"ava": {

View File

@ -11,6 +11,7 @@ export const BROWSER_ALIASES_MAP = {
Firefox: 'firefox',
Focus: 'focus',
Generic: 'generic',
'Google Search': 'google_search',
Googlebot: 'googlebot',
'Internet Explorer': 'ie',
'K-Meleon': 'k_meleon',
@ -23,6 +24,8 @@ export const BROWSER_ALIASES_MAP = {
PhantomJS: 'phantomjs',
Puffin: 'puffin',
QupZilla: 'qupzilla',
QQ: 'qq',
QQLite: 'qqlite',
Safari: 'safari',
Sailfish: 'sailfish',
'Samsung Internet for Android': 'samsung_internet',
@ -50,6 +53,7 @@ export const BROWSER_MAP = {
focus: 'Focus',
generic: 'Generic',
googlebot: 'Googlebot',
google_search: 'Google Search',
ie: 'Internet Explorer',
k_meleon: 'K-Meleon',
maxthon: 'Maxthon',
@ -61,6 +65,8 @@ export const BROWSER_MAP = {
phantomjs: 'PhantomJS',
puffin: 'Puffin',
qupzilla: 'QupZilla',
qq: 'QQ Browser',
qqlite: 'QQ Browser Lite',
safari: 'Safari',
sailfish: 'Sailfish',
samsung_internet: 'Samsung Internet for Android',

View File

@ -288,6 +288,21 @@ const browsersList = [
return browser;
},
},
{
test: [/qqbrowser/i],
describe(ua) {
const browser = {
name: (/qqbrowserlite/i).test(ua) ? 'QQ Browser Lite' : 'QQ Browser',
};
const version = Utils.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
if (version) {
browser.version = version;
}
return browser;
},
},
{
test: [/msie|trident/i],
describe(ua) {
@ -546,6 +561,21 @@ const browsersList = [
return browser;
},
},
{
test: [/GSA/i],
describe(ua) {
const browser = {
name: 'Google Search',
};
const version = Utils.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i, ua);
if (version) {
browser.version = version;
}
return browser;
},
},
/* Android Browser */
{

View File

@ -336,6 +336,23 @@
type: "tv"
engine:
name: "Blink"
Google Search:
-
ua: "Mozilla/5.0 (iPhone; CPU iPhone OS 12_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) GSA/83.0.268992909 Mobile/15E148 Safari/605.1"
spec:
browser:
name: "Google Search"
version: "83.0.268992909"
os:
name: "iOS"
version: "12.4"
platform:
type: "mobile"
vendor: "Apple"
model: "iPhone"
engine:
name: "WebKit"
version: "605.1.15"
Amazon Silk:
-
ua: "Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; KFTT Build/IML74K) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.4 Mobile Safari/535.19 Silk-Accelerated=true"
@ -2799,3 +2816,95 @@
platform:
type: "tv"
engine: {}
QQ Browser:
-
ua: "Mozilla/5.0 (Linux; U; Android 4.4.2; zh-cn; GT-I9500 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 MQQBrowser/5.0 QQ-URL-Manager Mobile Safari/537.36"
spec:
browser:
name: "QQ Browser"
version: "5.0"
os:
name: "Android"
version: "4.4.2"
versionName: "KitKat"
platform:
type: "mobile"
engine:
name: "Blink"
-
ua: "Mozilla/5.0 (iPhone 84; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.0 MQQBrowser/7.8.0 Mobile/14G60 Safari/8536.25 MttCustomUA/2 QBWebViewType/1 WKType/1"
spec:
browser:
name: "QQ Browser"
version: "7.8.0"
os:
name: "iOS"
version: "10.3.3"
platform:
model: "iPhone"
type: "mobile"
vendor: "Apple"
engine:
name: "WebKit"
version: "603.3.8"
-
ua: "Mozilla/5.0 (Linux; U; Android 9; zh-cn; DUK-AL20 Build/HUAWEIDUK-AL20) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/9.6 Mobile Safari/537.36"
spec:
browser:
name: "QQ Browser"
version: "9.6"
os:
name: "Android"
version: "9"
versionName: "Pie"
platform:
type: "mobile"
vendor: "Huawei"
engine:
name: "Blink"
-
ua: "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.104 Safari/537.36 Core/1.53.2141.400 QQBrowser/9.5.10219.400"
spec:
browser:
name: "QQ Browser"
version: "9.5.10219.400"
os:
name: "Windows"
version: "NT 6.1"
versionName: "7"
platform:
type: "desktop"
engine:
name: "Blink"
-
ua: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36 QQBrowser/3.8.3858.400"
spec:
browser:
name: "QQ Browser"
version: "3.8.3858.400"
os:
name: "macOS"
version: "10.10.5"
versionName: "Yosemite"
platform:
type: "desktop"
vendor: "Apple"
engine:
name: "Blink"
QQ Browser Lite:
-
ua: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.3 Safari/605.1.15 QQBrowserLite/1.2.5"
spec:
browser:
name: "QQ Browser Lite"
version: "1.2.5"
os:
name: "macOS"
version: "10.13.6"
versionName: "High Sierra"
platform:
type: "desktop"
vendor: "Apple"
engine:
name: "WebKit"
version: "605.1.15"