1
0
mirror of https://github.com/lancedikson/bowser synced 2026-02-10 01:50:10 +00:00

Simplify Brave descriptor and use valid version 144

Co-authored-by: naorpeled <6171622+naorpeled@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-02-07 16:27:02 +00:00
parent 83197a0dad
commit 94bd4b51fd
2 changed files with 3 additions and 4 deletions

View File

@ -1031,7 +1031,6 @@ const browsersList = [
name: 'Brave', name: 'Brave',
}; };
// Try Client Hints brand version first
if (parser) { if (parser) {
const hintsVersion = parser.getBrandVersion('Brave'); const hintsVersion = parser.getBrandVersion('Brave');
if (hintsVersion) { if (hintsVersion) {

View File

@ -386,7 +386,7 @@ test('Parser with Edge client hints', (t) => {
const BRAVE_HINTS = { const BRAVE_HINTS = {
brands: [ brands: [
{ brand: 'Brave', version: '1.73.97' }, { brand: 'Brave', version: '144' },
{ brand: 'Chromium', version: '131' }, { brand: 'Chromium', version: '131' },
{ brand: 'Not_A Brand', version: '24' }, { brand: 'Not_A Brand', version: '24' },
], ],
@ -400,7 +400,7 @@ const BRAVE_UA = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (
test('Parser detects Brave from client hints brands', (t) => { test('Parser detects Brave from client hints brands', (t) => {
const p = new Parser(BRAVE_UA, false, BRAVE_HINTS); const p = new Parser(BRAVE_UA, false, BRAVE_HINTS);
t.is(p.getBrowserName(), 'Brave'); t.is(p.getBrowserName(), 'Brave');
t.is(p.getBrowserVersion(), '1.73.97'); t.is(p.getBrowserVersion(), '144');
}); });
test('Parser.hasBrand detects Brave', (t) => { test('Parser.hasBrand detects Brave', (t) => {
@ -411,5 +411,5 @@ test('Parser.hasBrand detects Brave', (t) => {
test('Parser.getBrandVersion returns version for Brave', (t) => { test('Parser.getBrandVersion returns version for Brave', (t) => {
const p = new Parser(BRAVE_UA, false, BRAVE_HINTS); const p = new Parser(BRAVE_UA, false, BRAVE_HINTS);
t.is(p.getBrandVersion('Brave'), '1.73.97'); t.is(p.getBrandVersion('Brave'), '144');
}); });