Skip to content

Commit

Permalink
DB: Extend and update
Browse files Browse the repository at this point in the history
  • Loading branch information
OlehDutchenko committed Jan 30, 2021
1 parent 046f50e commit 4f50bb4
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 16 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1145,19 +1145,19 @@ if (browserizr.detect(isMacOS)) {

#### isMacOSVersion

##### _versions_

- Snow Leopard
- Lion.Safari
- Mountain Lion
- Mavericks
- Yosemite
- El Capitan
- Sierra
- High Sierra
- Mojave
- Catalina
- Big Sur
_versions:_

- `"Snow Leopard"`
- `"Lion.Safari"`
- `"Mountain Lion"`
- `"Mavericks"`
- `"Yosemite"`
- `"El Capitan"`
- `"Sierra"`
- `"High Sierra"`
- `"Mojave"`
- `"Catalina"`
- `"Big Sur"`

<details>
<summary><em>Detect macOS and wanted OS version</em></summary>
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wezom/browserizr",
"version": "8.0.4",
"version": "8.0.5",
"description": "Detects your browser, device and platform",
"main": "dist/index.js",
"files": [
Expand Down
36 changes: 36 additions & 0 deletions src/__specs__/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,33 @@ export const uaDB = {
}
}
},
v12: {
Chrome: {
v86: {
iPhone: [
'Mozilla/5.0 (iPhone; CPU iPhone OS 12_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/86.0.4240.93 Mobile/15E148 Safari/604.1'
]
}
}
},
v13: {
Chrome: {
v86: {
iPhone: [
'Mozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/86.0.4240.93 Mobile/15E148 Safari/604.1',
'Mozilla/5.0 (iPhone; CPU iPhone OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/86.0.4240.93 Mobile/15E148 Safari/604.1'
]
}
}
},
v14: {
Chrome: {
v86: {
iPhone: [
'Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/86.0.4240.77 Mobile/15E148 Safari/604.1',
'Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/86.0.4240.93 Mobile/15E148 Safari/604.1'
]
},
v87: {
iPad: [
'Mozilla/5.0 (iPad; CPU OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87.0.4280.77 Mobile/15E148 Safari/604.1'
Expand All @@ -142,6 +167,7 @@ export const uaDB = {
'Mozilla/5.0 (iPad; CPU OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15E148 Safari/604.1'
],
iPhone: [
'Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15E148 Safari/604.1',
'Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15E148 Safari/604.1'
],
iPod: [
Expand Down Expand Up @@ -704,6 +730,11 @@ export const uaDB = {
'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36',
'Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36'
]
},
v88: {
Standard: [
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36'
]
}
},
Edge: {
Expand Down Expand Up @@ -761,6 +792,11 @@ export const uaDB = {
Standard: [
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 Edg/87.0.664.57'
]
},
v88: {
Standard: [
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36 Edg/88.0.705.56'
]
}
},
InternetExplorer: {
Expand Down
8 changes: 8 additions & 0 deletions src/__specs__/detect/browsers/chrome-ios-version.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ import { deepFlatFromObject, testVersionsListHelper, uaDB } from '../../db';

describe('Detect Google Chrome iOS Browser versions', () => {
testVersionsListHelper(isChromeIOSVersion, [
{
version: 86,
values: [
...deepFlatFromObject(uaDB.iOS.v12.Chrome.v86),
...deepFlatFromObject(uaDB.iOS.v13.Chrome.v86),
...deepFlatFromObject(uaDB.iOS.v14.Chrome.v86)
]
},
{
version: 87,
values: [...deepFlatFromObject(uaDB.iOS.v14.Chrome.v87)]
Expand Down
4 changes: 4 additions & 0 deletions src/__specs__/detect/browsers/chrome-version.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ describe('Detect Google Chrome Browser versions', () => {
...deepFlatFromObject(uaDB.macOS['Big Sur'].Chrome.v87),
...deepFlatFromObject(uaDB.Windows.v10.Chrome.v87)
]
},
{
version: 88,
values: [...deepFlatFromObject(uaDB.Windows.v10.Chrome.v88)]
}
]);
});
4 changes: 4 additions & 0 deletions src/__specs__/detect/browsers/edge-version.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ describe('Detect Microsoft Edge Browser versions', () => {
...deepFlatFromObject(uaDB.macOS['Big Sur'].Edge.v87),
...deepFlatFromObject(uaDB.Windows.v10.Edge.v87)
]
},
{
version: 88,
values: [...deepFlatFromObject(uaDB.Windows.v10.Edge.v88)]
}
]);
});
8 changes: 8 additions & 0 deletions src/__specs__/detect/os/ios-version.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ describe('Detect iOS versions', () => {
version: 11,
values: [...deepFlatFromObject(uaDB.iOS.v11)]
},
{
version: 12,
values: [...deepFlatFromObject(uaDB.iOS.v12)]
},
{
version: 13,
values: [...deepFlatFromObject(uaDB.iOS.v13)]
},
{
version: 14,
values: [...deepFlatFromObject(uaDB.iOS.v14)]
Expand Down

0 comments on commit 4f50bb4

Please sign in to comment.