chore(env-utils): cleanup unused or duplicated env utils

This commit is contained in:
Jiri Zbytovsky
2025-06-14 17:35:02 +02:00
committed by Jiri Zbytovsky
parent 040e81cdcf
commit 756fb28cd5
4 changed files with 1 additions and 7 deletions

View File

@@ -26,7 +26,6 @@ const getDeviceType = () => '';
// no need for async fn on native; only for the sake of consistency with Web/Desktop
const getOsVersion = () => Promise.resolve(`${Platform.Version}`);
const getDeprecatedOsVersion = () => `${Platform.Version}`;
const getCpuArch = () => Promise.resolve('');
@@ -95,7 +94,6 @@ export const envUtils: EnvUtils = {
getCommitHash,
getDeviceType,
getOsVersion,
getDeprecatedOsVersion,
getCpuArch,
getSuiteVersion,
isFirefox,

View File

@@ -47,8 +47,6 @@ const getOsVersion = async () => {
return version ?? '';
};
/** @deprecated: Use the async getOsVersion instead. */
const getDeprecatedOsVersion = () => getUserAgentParser().getOS().version || '';
/**
* Similar to `getOsVersion`. Here, the sync fn works everywhere but macOS, hence we use async.
@@ -127,6 +125,7 @@ const getOsName = () => {
return '';
};
// generally works the same as `getOsName`, just with different information source, but does not work in some specific iOS cases
const getOsNameWeb = () => getUserAgentParser().getOS().name?.replaceAll(' ', '');
const getOsFamily = () => {
@@ -161,7 +160,6 @@ export const envUtils: EnvUtils = {
isAndroid,
isChromeOs,
getOsVersion,
getDeprecatedOsVersion,
getCpuArch,
getBrowserName,
getBrowserVersion,

View File

@@ -15,7 +15,6 @@ export const {
getCommitHash,
getDeviceType,
getOsVersion,
getDeprecatedOsVersion,
getCpuArch,
getSuiteVersion,
isFirefox,

View File

@@ -15,7 +15,6 @@ export interface EnvUtils {
getCommitHash: () => string;
getDeviceType: () => string | undefined;
getOsVersion: () => Promise<string>;
getDeprecatedOsVersion: () => string;
getCpuArch: () => Promise<string>;
getSuiteVersion: () => string;
isFirefox: () => boolean;