migrate to `expo-application` (#3417)
* migrate to `expo-application` * replace additional usagezio/stable
parent
0433f8ad68
commit
cddbbc4bd4
|
@ -106,7 +106,7 @@
|
||||||
"emoji-mart": "^5.5.2",
|
"emoji-mart": "^5.5.2",
|
||||||
"eventemitter3": "^5.0.1",
|
"eventemitter3": "^5.0.1",
|
||||||
"expo": "^50.0.8",
|
"expo": "^50.0.8",
|
||||||
"expo-application": "~5.8.3",
|
"expo-application": "^5.8.3",
|
||||||
"expo-build-properties": "^0.11.1",
|
"expo-build-properties": "^0.11.1",
|
||||||
"expo-camera": "~14.0.4",
|
"expo-camera": "~14.0.4",
|
||||||
"expo-clipboard": "^5.0.1",
|
"expo-clipboard": "^5.0.1",
|
||||||
|
@ -174,7 +174,6 @@
|
||||||
"react-native-uitextview": "^1.1.6",
|
"react-native-uitextview": "^1.1.6",
|
||||||
"react-native-url-polyfill": "^1.3.0",
|
"react-native-url-polyfill": "^1.3.0",
|
||||||
"react-native-uuid": "^2.0.1",
|
"react-native-uuid": "^2.0.1",
|
||||||
"react-native-version-number": "^0.3.6",
|
|
||||||
"react-native-web": "~0.19.6",
|
"react-native-web": "~0.19.6",
|
||||||
"react-native-web-linear-gradient": "^1.1.2",
|
"react-native-web-linear-gradient": "^1.1.2",
|
||||||
"react-native-web-webview": "^1.0.2",
|
"react-native-web-webview": "^1.0.2",
|
||||||
|
|
|
@ -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_DEV = process.env.EXPO_PUBLIC_ENV === 'development'
|
||||||
export const IS_TESTFLIGHT = process.env.EXPO_PUBLIC_ENV === 'testflight'
|
export const IS_TESTFLIGHT = process.env.EXPO_PUBLIC_ENV === 'testflight'
|
||||||
|
|
||||||
const UPDATES_CHANNEL = IS_TESTFLIGHT ? 'testflight' : 'production'
|
const UPDATES_CHANNEL = IS_TESTFLIGHT ? 'testflight' : 'production'
|
||||||
export const appVersion = `${VersionNumber.appVersion} (${
|
export const appVersion = `${nativeApplicationVersion} (${nativeBuildVersion}, ${
|
||||||
VersionNumber.buildVersion
|
IS_DEV ? 'development' : UPDATES_CHANNEL
|
||||||
}, ${IS_DEV ? 'development' : UPDATES_CHANNEL})`
|
})`
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import {Alert, AppState, AppStateStatus} from 'react-native'
|
import {Alert, AppState, AppStateStatus} from 'react-native'
|
||||||
import app from 'react-native-version-number'
|
import {nativeBuildVersion} from 'expo-application'
|
||||||
import {
|
import {
|
||||||
checkForUpdateAsync,
|
checkForUpdateAsync,
|
||||||
fetchUpdateAsync,
|
fetchUpdateAsync,
|
||||||
|
@ -21,7 +21,7 @@ async function setExtraParams() {
|
||||||
isIOS ? 'ios-build-number' : 'android-build-number',
|
isIOS ? 'ios-build-number' : 'android-build-number',
|
||||||
// Hilariously, `buildVersion` is not actually a string on Android even though the TS type says it is.
|
// 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
|
// This just ensures it gets passed as a string
|
||||||
`${app.buildVersion}`,
|
`${nativeBuildVersion}`,
|
||||||
)
|
)
|
||||||
await setExtraParamAsync(
|
await setExtraParamAsync(
|
||||||
'channel',
|
'channel',
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {Platform} from 'react-native'
|
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 * as info from 'expo-updates'
|
||||||
import {init} from 'sentry-expo'
|
import {init} from 'sentry-expo'
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ const buildChannel = (info.channel || 'development') as
|
||||||
* - `dev`
|
* - `dev`
|
||||||
* - `1.57.0`
|
* - `1.57.0`
|
||||||
*/
|
*/
|
||||||
const release = app.appVersion ?? 'dev'
|
const release = nativeApplicationVersion ?? 'dev'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Examples:
|
* Examples:
|
||||||
|
@ -33,7 +33,7 @@ const release = app.appVersion ?? 'dev'
|
||||||
* - `android.1.57.0.46`
|
* - `android.1.57.0.46`
|
||||||
*/
|
*/
|
||||||
const dist = `${Platform.OS}.${release}${
|
const dist = `${Platform.OS}.${release}${
|
||||||
app.buildVersion ? `.${app.buildVersion}` : ''
|
nativeBuildVersion ? `.${nativeBuildVersion}` : ''
|
||||||
}`
|
}`
|
||||||
|
|
||||||
init({
|
init({
|
||||||
|
|
15
yarn.lock
15
yarn.lock
|
@ -11735,16 +11735,16 @@ expect@^29.7.0:
|
||||||
jest-message-util "^29.7.0"
|
jest-message-util "^29.7.0"
|
||||||
jest-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:
|
expo-application@~5.8.0:
|
||||||
version "5.8.0"
|
version "5.8.0"
|
||||||
resolved "https://registry.yarnpkg.com/expo-application/-/expo-application-5.8.0.tgz#b82cb98a08f91d61f047f6578e883e0deb9661f2"
|
resolved "https://registry.yarnpkg.com/expo-application/-/expo-application-5.8.0.tgz#b82cb98a08f91d61f047f6578e883e0deb9661f2"
|
||||||
integrity sha512-nNQ/ayC4P1ue0ZQSmUlG/K2ZHTPwHyYGsb0QtEmCFUCitsjPKIx4coNvAreZMuELvY7pD1zKr+pdtN/ULnljBA==
|
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:
|
expo-asset@~9.0.2:
|
||||||
version "9.0.2"
|
version "9.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/expo-asset/-/expo-asset-9.0.2.tgz#e8a6b6da356d5fc97955599d2fa49af78c7f0bfd"
|
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"
|
resolved "https://registry.yarnpkg.com/react-native-uuid/-/react-native-uuid-2.0.1.tgz#ed4e2dfb1683eddb66967eb5dca140dfe1abddb9"
|
||||||
integrity sha512-cptnoIbL53GTCrWlb/+jrDC6tvb7ypIyzbXNJcpR3Vab0mkeaaVd5qnB3f0whXYzS+SMoSQLcUUB0gEWqkPC0g==
|
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:
|
react-native-web-linear-gradient@^1.1.2:
|
||||||
version "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"
|
resolved "https://registry.yarnpkg.com/react-native-web-linear-gradient/-/react-native-web-linear-gradient-1.1.2.tgz#33f85f7085a0bb5ffa5106faf02ed105b92a9ed7"
|
||||||
|
|
Loading…
Reference in New Issue