From 94bd4b51fda3c3e3ecf891c7a876da1674ace5bc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 7 Feb 2026 16:27:02 +0000 Subject: [PATCH] Simplify Brave descriptor and use valid version 144 Co-authored-by: naorpeled <6171622+naorpeled@users.noreply.github.com> --- src/parser-browsers.js | 1 - test/unit/parser.js | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/parser-browsers.js b/src/parser-browsers.js index 4d91891..ee58810 100644 --- a/src/parser-browsers.js +++ b/src/parser-browsers.js @@ -1031,7 +1031,6 @@ const browsersList = [ name: 'Brave', }; - // Try Client Hints brand version first if (parser) { const hintsVersion = parser.getBrandVersion('Brave'); if (hintsVersion) { diff --git a/test/unit/parser.js b/test/unit/parser.js index bb3f22e..b86fe25 100644 --- a/test/unit/parser.js +++ b/test/unit/parser.js @@ -386,7 +386,7 @@ test('Parser with Edge client hints', (t) => { const BRAVE_HINTS = { brands: [ - { brand: 'Brave', version: '1.73.97' }, + { brand: 'Brave', version: '144' }, { brand: 'Chromium', version: '131' }, { 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) => { const p = new Parser(BRAVE_UA, false, BRAVE_HINTS); t.is(p.getBrowserName(), 'Brave'); - t.is(p.getBrowserVersion(), '1.73.97'); + t.is(p.getBrowserVersion(), '144'); }); test('Parser.hasBrand detects Brave', (t) => { @@ -411,5 +411,5 @@ test('Parser.hasBrand detects Brave', (t) => { test('Parser.getBrandVersion returns version for Brave', (t) => { const p = new Parser(BRAVE_UA, false, BRAVE_HINTS); - t.is(p.getBrandVersion('Brave'), '1.73.97'); + t.is(p.getBrandVersion('Brave'), '144'); });