migrate to `expo-application` (#3417)

* migrate to `expo-application`

* replace additional usage
zio/stable
Hailey 2024-04-04 21:19:28 -07:00 committed by GitHub
parent 0433f8ad68
commit cddbbc4bd4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 15 additions and 21 deletions

View File

@ -106,7 +106,7 @@
"emoji-mart": "^5.5.2",
"eventemitter3": "^5.0.1",
"expo": "^50.0.8",
"expo-application": "~5.8.3",
"expo-application": "^5.8.3",
"expo-build-properties": "^0.11.1",
"expo-camera": "~14.0.4",
"expo-clipboard": "^5.0.1",
@ -174,7 +174,6 @@
"react-native-uitextview": "^1.1.6",
"react-native-url-polyfill": "^1.3.0",
"react-native-uuid": "^2.0.1",
"react-native-version-number": "^0.3.6",
"react-native-web": "~0.19.6",
"react-native-web-linear-gradient": "^1.1.2",
"react-native-web-webview": "^1.0.2",

View File

@ -1,9 +1,9 @@
import VersionNumber from 'react-native-version-number'
import {nativeApplicationVersion, nativeBuildVersion} from 'expo-application'
export const IS_DEV = process.env.EXPO_PUBLIC_ENV === 'development'
export const IS_TESTFLIGHT = process.env.EXPO_PUBLIC_ENV === 'testflight'
const UPDATES_CHANNEL = IS_TESTFLIGHT ? 'testflight' : 'production'
export const appVersion = `${VersionNumber.appVersion} (${
VersionNumber.buildVersion
}, ${IS_DEV ? 'development' : UPDATES_CHANNEL})`
export const appVersion = `${nativeApplicationVersion} (${nativeBuildVersion}, ${
IS_DEV ? 'development' : UPDATES_CHANNEL
})`

View File

@ -1,6 +1,6 @@
import React from 'react'
import {Alert, AppState, AppStateStatus} from 'react-native'
import app from 'react-native-version-number'
import {nativeBuildVersion} from 'expo-application'
import {
checkForUpdateAsync,
fetchUpdateAsync,
@ -21,7 +21,7 @@ async function setExtraParams() {
isIOS ? 'ios-build-number' : 'android-build-number',
// Hilariously, `buildVersion` is not actually a string on Android even though the TS type says it is.
// This just ensures it gets passed as a string
`${app.buildVersion}`,
`${nativeBuildVersion}`,
)
await setExtraParamAsync(
'channel',

View File

@ -4,7 +4,7 @@
*/
import {Platform} from 'react-native'
import app from 'react-native-version-number'
import {nativeApplicationVersion, nativeBuildVersion} from 'expo-application'
import * as info from 'expo-updates'
import {init} from 'sentry-expo'
@ -21,7 +21,7 @@ const buildChannel = (info.channel || 'development') as
* - `dev`
* - `1.57.0`
*/
const release = app.appVersion ?? 'dev'
const release = nativeApplicationVersion ?? 'dev'
/**
* Examples:
@ -33,7 +33,7 @@ const release = app.appVersion ?? 'dev'
* - `android.1.57.0.46`
*/
const dist = `${Platform.OS}.${release}${
app.buildVersion ? `.${app.buildVersion}` : ''
nativeBuildVersion ? `.${nativeBuildVersion}` : ''
}`
init({

View File

@ -11735,16 +11735,16 @@ expect@^29.7.0:
jest-message-util "^29.7.0"
jest-util "^29.7.0"
expo-application@^5.8.3:
version "5.8.3"
resolved "https://registry.yarnpkg.com/expo-application/-/expo-application-5.8.3.tgz#43991bd81d05c987b07b2f430c036cda1572bc62"
integrity sha512-IISxzpPX+Xe4ynnwX8yY52T6dm1g9sME1GCj4lvUlrdc5xeTPM6U35x7Wj82V7lLWBaVGe+/Tg9EeKqfylCEwA==
expo-application@~5.8.0:
version "5.8.0"
resolved "https://registry.yarnpkg.com/expo-application/-/expo-application-5.8.0.tgz#b82cb98a08f91d61f047f6578e883e0deb9661f2"
integrity sha512-nNQ/ayC4P1ue0ZQSmUlG/K2ZHTPwHyYGsb0QtEmCFUCitsjPKIx4coNvAreZMuELvY7pD1zKr+pdtN/ULnljBA==
expo-application@~5.8.3:
version "5.8.3"
resolved "https://registry.yarnpkg.com/expo-application/-/expo-application-5.8.3.tgz#43991bd81d05c987b07b2f430c036cda1572bc62"
integrity sha512-IISxzpPX+Xe4ynnwX8yY52T6dm1g9sME1GCj4lvUlrdc5xeTPM6U35x7Wj82V7lLWBaVGe+/Tg9EeKqfylCEwA==
expo-asset@~9.0.2:
version "9.0.2"
resolved "https://registry.yarnpkg.com/expo-asset/-/expo-asset-9.0.2.tgz#e8a6b6da356d5fc97955599d2fa49af78c7f0bfd"
@ -18697,11 +18697,6 @@ react-native-uuid@^2.0.1:
resolved "https://registry.yarnpkg.com/react-native-uuid/-/react-native-uuid-2.0.1.tgz#ed4e2dfb1683eddb66967eb5dca140dfe1abddb9"
integrity sha512-cptnoIbL53GTCrWlb/+jrDC6tvb7ypIyzbXNJcpR3Vab0mkeaaVd5qnB3f0whXYzS+SMoSQLcUUB0gEWqkPC0g==
react-native-version-number@^0.3.6:
version "0.3.6"
resolved "https://registry.yarnpkg.com/react-native-version-number/-/react-native-version-number-0.3.6.tgz#dd8b1435fc217df0a166d7e4a61fdc993f3e7437"
integrity sha512-TdyXiK90NiwmSbmAUlUBOV6WI1QGoqtvZZzI5zQY4fKl67B3ZrZn/h+Wy/OYIKKFMfePSiyfeIs8LtHGOZ/NgA==
react-native-web-linear-gradient@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/react-native-web-linear-gradient/-/react-native-web-linear-gradient-1.1.2.tgz#33f85f7085a0bb5ffa5106faf02ed105b92a9ed7"