Skip to content

Commit 9665385

Browse files
authored
0 6 1 (#62)
* Version 0.6.1 * Add 0.6.1 to the changelog
1 parent 9bf7a5f commit 9665385

File tree

5 files changed

+624
-257
lines changed

5 files changed

+624
-257
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#### 0.6.1 (2022-04-07)
2+
3+
- **Database:** Added Chrome 99 and 100 ([a770c30](https://github.com/WhichBrowser/Parser-JavaScript/commit/a770c30d29045893797b79f6c623b9ab8ebb8cc0))
4+
- **Fixes:** Chrome 100+ was being detected as a browser in Camouflage mode. Fixes [#61](https://github.com/WhichBrowser/Parser-JavaScript/issues/61)
5+
16
#### 0.6.0 (2022-02-16)
27

38
- **Database:** Synced the JavaScript version of WhichBrowser with the latest changes happened in WhichBrowser-PHP until [WhichBrowser-PHP@d082883](https://github.com/WhichBrowser/Parser-PHP/commit/d0828833c1e2e05654b72e78d6944732adeb606b) [[diff](https://github.com/WhichBrowser/Parser-PHP/compare/0ef1a43950f14c65a760fe8123b4401e2b315bc3...d082883)].

data/browsers-chrome.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ module.exports = {
101101
'96.0.4664': 'stable',
102102
'97.0.4692': 'stable',
103103
'98.0.4758': 'stable',
104+
'99.0.4844': 'stable',
105+
'100.0.4896': 'stable',
104106
},
105107
MOBILE: {
106108
'16.0.912': 'beta',
@@ -176,5 +178,7 @@ module.exports = {
176178
'96.0.4664': 'stable',
177179
'97.0.4692': 'stable',
178180
'98.0.4758': 'stable',
181+
'99.0.4844': 'stable',
182+
'100.0.4896': 'stable',
179183
},
180184
};

src/Analyser/Camouflage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class Camouflage {
9999
if (this.data.isBrowser('Chrome')) {
100100
if (
101101
/(?:Chrome|CrMo|CriOS)\//u.test(ua) &&
102-
!/(?:Chrome|CrMo|CriOS)\/([0-9]{1,2}\.[0-9]\.[0-9]{3,4}\.[0-9]+)/u.test(ua)
102+
!/(?:Chrome|CrMo|CriOS)\/([0-9]{1,3}\.[0-9]\.[0-9]{3,4}\.[0-9]+)/u.test(ua)
103103
) {
104104
this.data.features.push('wrongVersion');
105105
this.data.camouflage = true;

test/data/desktop/browser-chrome.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,17 @@
198198
device: { type: desktop, manufacturer: Apple, model: Macintosh },
199199
}
200200
readable: "Chrome 98 on macOS Monterey 12.2"
201+
- headers: "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36"
202+
result:
203+
{
204+
browser: { name: Chrome, version: "100", type: browser },
205+
engine: { name: Blink },
206+
os:
207+
{
208+
name: "OS X",
209+
alias: macOS,
210+
version: { value: "10.15", nickname: "Catalina" },
211+
},
212+
device: { type: desktop, manufacturer: Apple, model: Macintosh },
213+
}
214+
readable: "Chrome 100 on macOS Catalina 10.15"

0 commit comments

Comments
 (0)