mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-03-21 22:57:17 +01:00
chore(suite): ua-parser-js@2.0.3
This commit is contained in:
committed by
Jan Komárek
parent
c30ec82395
commit
840d5c6202
@@ -72,6 +72,11 @@ export const config = {
|
||||
download: 'https://www.google.com/chrome/',
|
||||
update: 'https://support.google.com/chrome/answer/95414',
|
||||
},
|
||||
mobilechrome: {
|
||||
version: 59,
|
||||
download: 'https://www.google.com/chrome/',
|
||||
update: 'https://support.google.com/chrome/answer/95414',
|
||||
},
|
||||
chromium: {
|
||||
version: 59,
|
||||
download: 'https://www.chromium.org/',
|
||||
@@ -87,6 +92,11 @@ export const config = {
|
||||
download: 'https://www.mozilla.org/en-US/firefox/new/',
|
||||
update: 'https://support.mozilla.org/en-US/kb/update-firefox-latest-version',
|
||||
},
|
||||
mobilefirefox: {
|
||||
version: 54,
|
||||
download: 'https://www.mozilla.org/en-US/firefox/new/',
|
||||
update: 'https://support.mozilla.org/en-US/kb/update-firefox-latest-version',
|
||||
},
|
||||
brave: {
|
||||
// Chromium based
|
||||
version: 59,
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
"prepublish": "yarn tsx ../../scripts/prepublish.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"ua-parser-js": "^1.0.37"
|
||||
"ua-parser-js": "^2.0.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"expo-constants": "*",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import UAParser from 'ua-parser-js';
|
||||
import { UAParser } from 'ua-parser-js';
|
||||
|
||||
import { publicKey } from './jws';
|
||||
import { EnvUtils, Environment } from './types';
|
||||
@@ -43,7 +43,7 @@ const getOsVersion = () => getUserAgentParser().getOS().version || '';
|
||||
const getSuiteVersion = () => process.env.VERSION || '';
|
||||
|
||||
const getBrowserName = () => {
|
||||
const browserName = getUserAgentParser().getBrowser().name;
|
||||
const browserName = getUserAgentParser().getBrowser().name?.replace(' ', '');
|
||||
|
||||
return browserName?.toLowerCase() || '';
|
||||
};
|
||||
@@ -73,14 +73,14 @@ const isMacOs = () => {
|
||||
if (getProcessPlatform() === 'darwin') return true;
|
||||
if (typeof window === 'undefined') return;
|
||||
|
||||
return getPlatform().startsWith('Mac');
|
||||
return getPlatform().toLowerCase().startsWith('mac');
|
||||
};
|
||||
|
||||
const isWindows = () => {
|
||||
if (getProcessPlatform() === 'win32') return true;
|
||||
if (typeof window === 'undefined') return;
|
||||
|
||||
return getPlatform().startsWith('Win');
|
||||
return getPlatform().toLowerCase().startsWith('win');
|
||||
};
|
||||
|
||||
const isIOs = () => ['iPhone', 'iPad', 'iPod'].includes(getPlatform());
|
||||
@@ -92,7 +92,7 @@ const isLinux = () => {
|
||||
// exclude Android and Chrome OS as window.navigator.platform of those OS is Linux
|
||||
if (isAndroid() || isChromeOs()) return false;
|
||||
|
||||
return getPlatform().startsWith('Linux');
|
||||
return getPlatform().toLowerCase().startsWith('linux');
|
||||
};
|
||||
|
||||
const isCodesignBuild = () => process.env.IS_CODESIGN_BUILD === 'true';
|
||||
@@ -108,15 +108,15 @@ const getOsName = () => {
|
||||
return '';
|
||||
};
|
||||
|
||||
const getOsNameWeb = () => getUserAgentParser().getOS().name;
|
||||
const getOsNameWeb = () => getUserAgentParser().getOS().name?.replaceAll(' ', '');
|
||||
|
||||
const getOsFamily = () => {
|
||||
const osName = getUserAgentParser().getOS().name;
|
||||
const osName = getUserAgentParser().getOS().name?.toLowerCase().replaceAll(' ', '');
|
||||
|
||||
if (osName === 'Windows') {
|
||||
if (osName === 'windows') {
|
||||
return 'Windows';
|
||||
}
|
||||
if (osName === 'Mac OS') {
|
||||
if (osName === 'macos') {
|
||||
return 'MacOS';
|
||||
}
|
||||
|
||||
|
||||
39
yarn.lock
39
yarn.lock
@@ -12001,7 +12001,7 @@ __metadata:
|
||||
resolution: "@trezor/env-utils@workspace:packages/env-utils"
|
||||
dependencies:
|
||||
tsx: "npm:^4.19.3"
|
||||
ua-parser-js: "npm:^1.0.37"
|
||||
ua-parser-js: "npm:^2.0.3"
|
||||
peerDependencies:
|
||||
expo-constants: "*"
|
||||
expo-localization: "*"
|
||||
@@ -20204,6 +20204,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"detect-europe-js@npm:^0.1.2":
|
||||
version: 0.1.2
|
||||
resolution: "detect-europe-js@npm:0.1.2"
|
||||
checksum: 10/3d6dcf6ac451baa3050ff00e05cf1841e208bc4f27c69ec2c8df5fdf2375403cf2911f8059c9c18f258d7e176c8d308e4e0e8552500d0e30a9e95a514366ef13
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"detect-file@npm:^1.0.0":
|
||||
version: 1.0.0
|
||||
resolution: "detect-file@npm:1.0.0"
|
||||
@@ -26730,6 +26737,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"is-standalone-pwa@npm:^0.1.1":
|
||||
version: 0.1.1
|
||||
resolution: "is-standalone-pwa@npm:0.1.1"
|
||||
checksum: 10/bbd2ee7cbea985139f66fe8785e7699f52311e9c14d74190659885222b79dd1e8845b02f69b9221a23a2b4b00e8d4bea0a5a2603b2f26cb6d2071d46093ccf84
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"is-stream@npm:^1.1.0":
|
||||
version: 1.1.0
|
||||
resolution: "is-stream@npm:1.1.0"
|
||||
@@ -40730,6 +40744,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"ua-is-frozen@npm:^0.1.2":
|
||||
version: 0.1.2
|
||||
resolution: "ua-is-frozen@npm:0.1.2"
|
||||
checksum: 10/0113bed77d437a3752323175f01057dd01911506225e9d33799799188a89a230ab63d2445b096d4399ea8eb94e3163608f7ac2425fb8edd0844d891490607e14
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"ua-parser-js@npm:^0.7.30, ua-parser-js@npm:^0.7.33":
|
||||
version: 0.7.37
|
||||
resolution: "ua-parser-js@npm:0.7.37"
|
||||
@@ -40737,10 +40758,18 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"ua-parser-js@npm:^1.0.37":
|
||||
version: 1.0.37
|
||||
resolution: "ua-parser-js@npm:1.0.37"
|
||||
checksum: 10/56508f2428ebac64382c4d41da14189e5013e3e2a5f5918aff4bee3ba77df1f4eaad6f81f90c24999f1cf12cc1596764684497fec07e0ff5182ce9a323a8c05b
|
||||
"ua-parser-js@npm:^2.0.3":
|
||||
version: 2.0.3
|
||||
resolution: "ua-parser-js@npm:2.0.3"
|
||||
dependencies:
|
||||
"@types/node-fetch": "npm:^2.6.12"
|
||||
detect-europe-js: "npm:^0.1.2"
|
||||
is-standalone-pwa: "npm:^0.1.1"
|
||||
node-fetch: "npm:^2.7.0"
|
||||
ua-is-frozen: "npm:^0.1.2"
|
||||
bin:
|
||||
ua-parser-js: script/cli.js
|
||||
checksum: 10/f181f1c976d67a2a8cdd396f8c5cecc8bfe4ada7183e7ef06a81a09aa9dc98480048380240f6374189cf2ab7e6275b711f9732e26b7ed2a14f3e4fe3576b8842
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
||||
Reference in New Issue
Block a user