Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C-3553] Upgrade all react native deps to latest #7048

Merged
merged 12 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40,691 changes: 13,506 additions & 27,185 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"@types/bn.js": "5.1.0",
"bn.js": "5.1.0",
"moment": "2.24.0",
"react-native-svg": "12.3.0",
"react-native-svg": "13.14.0",
"redux": "4.1.1",
"webpack": "5.88.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/api/topArtists.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const topArtistsApi = createApi({
async fetch(_, context) {
const { env, fetch } = context

const response = await fetch(env.SUGGESTED_FOLLOW_HANDLES)
const response = await fetch(env.SUGGESTED_FOLLOW_HANDLES!)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are all of these effectively guaranteed to be present?

const featuredArtists: ID[] = await response.json()
return await userApiFetch.getUsersByIds(
{ ids: featuredArtists },
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/services/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export type Env = {
EXPLORE_CONTENT_URL?: string
ENVIRONMENT?: Environment
ORACLE_ETH_ADDRESSES?: string
SUGGESTED_FOLLOW_HANDLES: string
SUGGESTED_FOLLOW_HANDLES?: string
GENERAL_ADMISSION?: string
IDENTITY_SERVICE?: string
PUBLIC_HOSTNAME?: string
Expand Down
4 changes: 2 additions & 2 deletions packages/mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ project.ext.envConfigFiles = [
releasecandidaterelease: ".env.prod"
]

apply from: "../../../../node_modules/@sentry/react-native/sentry.gradle"
apply from: "../../node_modules/@sentry/react-native/sentry.gradle"
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"

/**
Expand Down Expand Up @@ -203,7 +203,7 @@ dependencies {
}
}

apply from: "../../../../node_modules/react-native-code-push/android/codepush.gradle"
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
apply from: file("../../../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

// Google Services Gradle plugin
Expand Down
4 changes: 2 additions & 2 deletions packages/mobile/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
<uses-feature android:name="android.hardware.camera.front" android:required="false" />


<application android:usesCleartextTraffic="true" android:name=".MainApplication" android:label="@string/app_name" android:icon="${appIcon}" android:resource="@mipmap/ic_notification" android:allowBackup="false" android:largeHeap="true" android:theme="@style/BootTheme">
<activity android:name=".MainActivity" android:launchMode="singleTask" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode" android:screenOrientation="portrait" android:windowSoftInputMode="adjustResize" android:exported="true">
<application android:usesCleartextTraffic="true" android:name=".MainApplication" android:label="@string/app_name" android:icon="${appIcon}" android:resource="@mipmap/ic_notification" android:allowBackup="false" android:largeHeap="true" android:theme="@style/AppTheme">
<activity android:name=".MainActivity" android:launchMode="singleTask" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode" android:screenOrientation="portrait" android:windowSoftInputMode="adjustResize" android:exported="true" android:theme="@style/BootTheme">
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class MainActivity : ReactActivity() {
}

override fun onCreate(savedInstanceState: Bundle?) {
RNBootSplash.init(this)
RNBootSplash.init(this, R.style.BootTheme)
super.onCreate(null)
RNBars.init(this, "light-content")
TikTokOpenApiFactory.init(TikTokOpenConfig(BuildConfig.TIKTOK_APP_ID))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@
<item name="android:textColorPrimary">@color/colorPrimary</item>
</style>

<!-- BootTheme should inherit from Theme.SplashScreen -->
<style name="BootTheme" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">@color/bootsplash_background</item>
<item name="windowSplashScreenAnimatedIcon">@mipmap/bootsplash_logo</item>
<item name="postSplashScreenTheme">@style/AppTheme</item>
<style name="BootTheme" parent="Theme.BootSplash">
<item name="bootSplashBackground">@color/bootsplash_background</item>
<item name="bootSplashLogo">@mipmap/bootsplash_logo</item>
<item name="postBootSplashTheme">@style/AppTheme</item>


<!-- Bars initial styles: true = dark-content, false = light-content -->
Expand Down
9 changes: 4 additions & 5 deletions packages/mobile/android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@
<item name="android:textColorPrimary">@color/colorPrimary</item>
</style>

<!-- BootTheme should inherit from Theme.SplashScreen -->
<style name="BootTheme" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">@color/bootsplash_background</item>
<item name="windowSplashScreenAnimatedIcon">@mipmap/bootsplash_logo</item>
<item name="postSplashScreenTheme">@style/AppTheme</item>
<style name="BootTheme" parent="Theme.BootSplash">
<item name="bootSplashBackground">@color/bootsplash_background</item>
<item name="bootSplashLogo">@mipmap/bootsplash_logo</item>
<item name="postBootSplashTheme">@style/AppTheme</item>

<!-- Status bar initial style: true = dark-content, false = light-content -->
<item name="android:windowLightStatusBar">false</item>
Expand Down
16 changes: 6 additions & 10 deletions packages/mobile/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,19 @@ rootProject.name = 'AudiusReactNative'
include ':react-native-randombytes'
project(':react-native-randombytes').projectDir = new File(rootProject.projectDir, '../../../node_modules/react-native-randombytes/android')
include ':react-native-fs'
project(':react-native-fs').projectDir = new File(rootProject.projectDir, '../../../node_modules/react-native-fs/android')
include ':react-native-fs'
project(':react-native-fs').projectDir = new File(rootProject.projectDir, '../../../node_modules/react-native-fs/android')
include ':react-native-fs'
project(':react-native-fs').projectDir = new File(rootProject.projectDir, '../../../node_modules/react-native-fs/android')
project(':react-native-fs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fs/android')
include ':react-native-radial-gradient'
project(':react-native-radial-gradient').projectDir = new File(rootProject.projectDir, '../../../node_modules/react-native-radial-gradient/android')
project(':react-native-radial-gradient').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-radial-gradient/android')
include ':react-native-config'
project(':react-native-config').projectDir = new File(rootProject.projectDir, '../../../node_modules/react-native-config/android')
project(':react-native-config').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-config/android')
include ':react-native-google-cast'
project(':react-native-google-cast').projectDir = new File(rootProject.projectDir, '../../../node_modules/react-native-google-cast/android')
project(':react-native-google-cast').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-google-cast/android')
include ':react-native-video'
project(':react-native-video').projectDir = new File(rootProject.projectDir, '../../../node_modules/react-native-video/android-exoplayer')
include ':react-native-notifications'
project(':react-native-notifications').projectDir = new File(rootProject.projectDir, '../../../node_modules/react-native-notifications/lib/android/app')
project(':react-native-notifications').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-notifications/lib/android/app')
apply from: file("../../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app', ':react-native-code-push'
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../../../node_modules/react-native-code-push/android/app')
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app')
includeBuild('../../../node_modules/@react-native/gradle-plugin')

33 changes: 19 additions & 14 deletions packages/mobile/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
# Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
'require.resolve(
"react-native/scripts/react_native_pods.rb",
{paths: [process.argv[1]]},
)', __dir__]).strip
def node_require(script)
# Resolve script with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
"require.resolve(
'#{script}',
{paths: [process.argv[1]]},
)", __dir__]).strip
end

node_require('react-native/scripts/react_native_pods.rb')
node_require('react-native-permissions/scripts/setup.rb')

platform :ios, min_ios_version_supported
platform :ios, 14
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this supposed to be hard coded?

prepare_react_native_project!

setup_permissions([
'Notifications',
'PhotoLibraryAddOnly',
])

flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled(["Debug", "Staging.Debug"], { 'Flipper' => '0.175.0' })

linkage = ENV['USE_FRAMEWORKS']
Expand All @@ -23,14 +33,9 @@ project 'AudiusReactNative',
'Prod.Release' => :release

target 'AudiusReactNative' do
permissions_path = '../../../node_modules/react-native-permissions/ios'
pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications"
pod 'Permission-PhotoLibraryAddOnly', :path => "#{permissions_path}/PhotoLibraryAddOnly"

pod 'SRSRadialGradient', :path => '../../../node_modules/react-native-radial-gradient/ios'
pod 'ffmpeg-kit-react-native', :subspecs => ['https-gpl-lts'], :podspec => '../../../node_modules/ffmpeg-kit-react-native/ffmpeg-kit-react-native.podspec'
pod 'SRSRadialGradient', :path => '../node_modules/react-native-radial-gradient/ios'
pod 'ffmpeg-kit-react-native', :subspecs => ['https-gpl-lts'], :podspec => '../node_modules/ffmpeg-kit-react-native/ffmpeg-kit-react-native.podspec'
pod 'nSure'
# pod 'react-native-flipper', :path => '../../../node_modules/react-native-flipper', :configuration => ['Debug', 'Staging.Debug']

config = use_native_modules!

Expand Down
Loading