Skip to content

Commit d24a6c0

Browse files
authored
chore(deps): upgrade react-native to resolve dependabot alert (#14327)
* chore: upgrade react-native version * chore: upgrade ios example app * chore: upgrade android example app * chore: add vscode setting for final new line * chore: downgrade react native to lowest patched * chore: upgrade beyond additional vuln * chore: revert project new line setting * chore: rerun yarn install * chore: fix formatting * chore: fix formatting * chore: remove @types/react-native
1 parent db70f7b commit d24a6c0

File tree

26 files changed

+679
-1414
lines changed

26 files changed

+679
-1414
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ xcuserdata/
5050
!*.xcworkspace/contents.xcworkspacedata
5151
/*.gcno
5252
**/xcshareddata/WorkspaceSettings.xcsettings
53+
**/.xcode.env.local
5354

5455
### Coverage ###
5556
coverage/

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,4 +145,4 @@
145145
"tar": "6.2.1",
146146
"cross-spawn": "7.0.5"
147147
}
148-
}
148+
}

packages/react-native/example/Gemfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@ source 'https://rubygems.org'
22

33
ruby ">= 2.6.10"
44

5-
gem 'cocoapods', '~> 1.12'
5+
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
6+
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
7+
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
8+
gem 'xcodeproj', '< 1.26.0'
9+
gem 'concurrent-ruby', '<= 1.3.4'

packages/react-native/example/android/app/build.gradle

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
apply plugin: "com.android.application"
2+
apply plugin: "org.jetbrains.kotlin.android"
23
apply plugin: "com.facebook.react"
34

45
react {
6+
/* Autolinking */
7+
autolinkLibrariesWithApp()
58
}
69

10+
711
def enableProguardInReleaseBuilds = false
812

913
def jscFlavor = 'org.webkit:android-jsc:+'
1014

1115
android {
1216
ndkVersion rootProject.ext.ndkVersion
13-
14-
compileSdkVersion rootProject.ext.compileSdkVersion
17+
buildToolsVersion rootProject.ext.buildToolsVersion
18+
compileSdk rootProject.ext.compileSdkVersion
1519

1620
namespace "com.amplifyrtncoreexample"
17-
buildFeatures {
18-
buildConfig = true
19-
}
2021
defaultConfig {
2122
applicationId "com.amplifyrtncoreexample"
2223
minSdkVersion rootProject.ext.minSdkVersion
@@ -47,17 +48,9 @@ android {
4748
dependencies {
4849
implementation("com.facebook.react:react-android")
4950

50-
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
51-
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
52-
exclude group:'com.squareup.okhttp3', module:'okhttp'
53-
}
54-
55-
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
5651
if (hermesEnabled.toBoolean()) {
5752
implementation("com.facebook.react:hermes-android")
5853
} else {
5954
implementation jscFlavor
6055
}
61-
}
62-
63-
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
56+
}

packages/react-native/example/android/app/src/debug/AndroidManifest.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,5 @@
77
<application
88
android:usesCleartextTraffic="true"
99
tools:targetApi="28"
10-
tools:ignore="GoogleAppIndexingWarning">
11-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
12-
</application>
10+
tools:ignore="GoogleAppIndexingWarning" />
1311
</manifest>

packages/react-native/example/android/app/src/debug/java/com/amplifyrtncoreexample/ReactNativeFlipper.java

Lines changed: 0 additions & 75 deletions
This file was deleted.
Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2-
3-
<uses-permission android:name="android.permission.INTERNET" />
4-
5-
<application
6-
android:name=".MainApplication"
7-
android:label="@string/app_name"
8-
android:icon="@mipmap/ic_launcher"
9-
android:roundIcon="@mipmap/ic_launcher_round"
10-
android:allowBackup="false"
11-
android:theme="@style/AppTheme">
12-
<activity
13-
android:name=".MainActivity"
14-
android:label="@string/app_name"
15-
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
16-
android:launchMode="singleTask"
17-
android:windowSoftInputMode="adjustResize"
18-
android:exported="true">
19-
<intent-filter>
20-
<action android:name="android.intent.action.MAIN" />
21-
<category android:name="android.intent.category.LAUNCHER" />
22-
</intent-filter>
23-
</activity>
24-
</application>
25-
</manifest>
2+
<uses-permission android:name="android.permission.INTERNET" />
3+
<application
4+
android:name=".MainApplication"
5+
android:label="@string/app_name"
6+
android:icon="@mipmap/ic_launcher"
7+
android:roundIcon="@mipmap/ic_launcher_round"
8+
android:allowBackup="false"
9+
android:theme="@style/AppTheme"
10+
android:supportsRtl="true">
11+
<activity
12+
android:name=".MainActivity"
13+
android:label="@string/app_name"
14+
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
15+
android:launchMode="singleTask"
16+
android:windowSoftInputMode="adjustResize"
17+
android:exported="true">
18+
<intent-filter>
19+
<action android:name="android.intent.action.MAIN" />
20+
<category android:name="android.intent.category.LAUNCHER" />
21+
</intent-filter>
22+
</activity>
23+
</application>
24+
</manifest>

packages/react-native/example/android/app/src/main/java/com/amplifyrtncoreexample/MainActivity.java

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.amplifyrtncoreexample
2+
3+
import com.facebook.react.ReactActivity
4+
import com.facebook.react.ReactActivityDelegate
5+
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
6+
import com.facebook.react.defaults.DefaultReactActivityDelegate
7+
8+
class MainActivity : ReactActivity() {
9+
10+
override fun getMainComponentName(): String = "AmplifyRTNCoreExample"
11+
12+
override fun createReactActivityDelegate(): ReactActivityDelegate =
13+
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
14+
}

packages/react-native/example/android/app/src/main/java/com/amplifyrtncoreexample/MainApplication.java

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)