Skip to content

Commit ade8033

Browse files
authored
Replace UA parser (#1458)
1 parent 4f593e1 commit ade8033

File tree

4 files changed

+10
-156
lines changed

4 files changed

+10
-156
lines changed

package-lock.json

+6-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/libs/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
},
1212
"scripts": {
1313
"lint": "eslint ./src",
14-
"test" : "npm run lint"
14+
"test": "npm run lint"
1515
},
1616
"dependencies": {
17-
"ua-parser-js": "^1.0.2",
17+
"bowser": "^2.11.0",
1818
"webextension-polyfill": "^0.10.0"
1919
}
2020
}

packages/libs/src/browser-info.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import parser from 'ua-parser-js';
1+
import * as Bowser from 'bowser';
22

33
// we cache the UA as it used by many modules that need it on file load
44
let ua;
55
const getUA = () => {
66
if (ua) {
77
return ua;
88
}
9-
ua = parser(navigator.userAgent);
9+
ua = Bowser.parse(navigator.userAgent);
1010
return ua;
1111
};
1212

patches/ua-parser-js+1.0.2.patch

-151
This file was deleted.

0 commit comments

Comments
 (0)