-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: upgrade example apps to RN 0.73
- upgrade to RN 0.73 in example apps - upgrade other example apps dependencies - add patches to make Swift modules working with RN 0.73 - add patch to make react-native-safe-area-context working on Fabric Android - format android code with ktfmt
- Loading branch information
1 parent
aff4bba
commit 4c27518
Showing
118 changed files
with
9,695 additions
and
8,676 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
.yarn/patches/react-native-bootsplash-npm-5.1.3-cc4ad003e2.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
diff --git a/ios/RNBootSplash.mm b/ios/RNBootSplash.mm | ||
index ff5361cfa3c6016d59c9cfc313dee6ddd4076855..d1201cca64945eb64c2a829408cf95b91ee4a99f 100755 | ||
--- a/ios/RNBootSplash.mm | ||
+++ b/ios/RNBootSplash.mm | ||
@@ -3,7 +3,7 @@ | ||
#import <React/RCTUtils.h> | ||
|
||
#if RCT_NEW_ARCH_ENABLED | ||
-#import <React/RCTFabricSurfaceHostingProxyRootView.h> | ||
+#import <React/RCTSurfaceHostingProxyRootView.h> | ||
#import <React/RCTSurfaceHostingView.h> | ||
#else | ||
#import <React/RCTRootView.h> | ||
@@ -90,8 +90,8 @@ + (void)initWithStoryboard:(NSString * _Nonnull)storyboardName | ||
}]; | ||
|
||
#ifdef RCT_NEW_ARCH_ENABLED | ||
- if (rootView != nil && [rootView isKindOfClass:[RCTFabricSurfaceHostingProxyRootView class]]) { | ||
- RCTFabricSurfaceHostingProxyRootView *proxy = (RCTFabricSurfaceHostingProxyRootView *)rootView; | ||
+ if (rootView != nil && [rootView isKindOfClass:[RCTSurfaceHostingProxyRootView class]]) { | ||
+ RCTSurfaceHostingProxyRootView *proxy = (RCTSurfaceHostingProxyRootView *)rootView; | ||
_rootView = (RCTSurfaceHostingView *)proxy.surface.view; | ||
#else | ||
if (rootView != nil && [rootView isKindOfClass:[RCTRootView class]]) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/scripts/react_native_pods.rb b/scripts/react_native_pods.rb | ||
index d29dca30081bfb9e9191121d2652d92e6ae89ee1..dcd8c88051630522fa7a6c29d8289d9bc4041ae9 100644 | ||
--- a/scripts/react_native_pods.rb | ||
+++ b/scripts/react_native_pods.rb | ||
@@ -153,7 +153,7 @@ def use_react_native! ( | ||
pod 'Yoga', :path => "#{prefix}/ReactCommon/yoga", :modular_headers => true | ||
|
||
pod 'DoubleConversion', :podspec => "#{prefix}/third-party-podspecs/DoubleConversion.podspec" | ||
- pod 'glog', :podspec => "#{prefix}/third-party-podspecs/glog.podspec" | ||
+ pod 'glog', :podspec => "#{prefix}/third-party-podspecs/glog.podspec", :modular_headers => true | ||
pod 'boost', :podspec => "#{prefix}/third-party-podspecs/boost.podspec" | ||
pod 'RCT-Folly', :podspec => "#{prefix}/third-party-podspecs/RCT-Folly.podspec", :modular_headers => true | ||
|
73 changes: 73 additions & 0 deletions
73
.yarn/patches/react-native-safe-area-context-npm-4.8.1-4992e203d8.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
diff --git a/android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaView.kt b/android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaView.kt | ||
index ca5646c2ba2377dea71ce06f8dfc8b7021d85c3c..5fefd448a35aaa48c9e52e454b7ba47cb209f548 100644 | ||
--- a/android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaView.kt | ||
+++ b/android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaView.kt | ||
@@ -4,27 +4,30 @@ import android.content.Context | ||
import android.util.Log | ||
import android.view.View | ||
import android.view.ViewTreeObserver | ||
-import com.facebook.react.bridge.Arguments | ||
-import com.facebook.react.uimanager.FabricViewStateManager | ||
-import com.facebook.react.uimanager.FabricViewStateManager.HasFabricViewStateManager | ||
+import com.facebook.react.bridge.WritableNativeMap | ||
+import com.facebook.react.uimanager.StateWrapper | ||
import com.facebook.react.uimanager.UIManagerModule | ||
import com.facebook.react.views.view.ReactViewGroup | ||
-import java.util.* | ||
+import java.util.EnumSet | ||
import java.util.concurrent.locks.ReentrantLock | ||
import kotlin.concurrent.withLock | ||
|
||
private const val MAX_WAIT_TIME_NANO = 500000000L // 500ms | ||
|
||
class SafeAreaView(context: Context?) : | ||
- ReactViewGroup(context), ViewTreeObserver.OnPreDrawListener, HasFabricViewStateManager { | ||
+ ReactViewGroup(context), ViewTreeObserver.OnPreDrawListener { | ||
private var mMode = SafeAreaViewMode.PADDING | ||
private var mInsets: EdgeInsets? = null | ||
private var mEdges: SafeAreaViewEdges? = null | ||
private var mProviderView: View? = null | ||
- private val mFabricViewStateManager = FabricViewStateManager() | ||
+ private var mStateWrapper: StateWrapper? = null | ||
|
||
- override fun getFabricViewStateManager(): FabricViewStateManager { | ||
- return mFabricViewStateManager | ||
+ fun getStateWrapper(): StateWrapper? { | ||
+ return mStateWrapper | ||
+ } | ||
+ | ||
+ fun setStateWrapper(stateWrapper: StateWrapper?) { | ||
+ mStateWrapper = stateWrapper | ||
} | ||
|
||
private fun updateInsets() { | ||
@@ -37,12 +40,10 @@ class SafeAreaView(context: Context?) : | ||
SafeAreaViewEdgeModes.ADDITIVE, | ||
SafeAreaViewEdgeModes.ADDITIVE, | ||
SafeAreaViewEdgeModes.ADDITIVE) | ||
- if (mFabricViewStateManager.hasStateWrapper()) { | ||
- mFabricViewStateManager.setState { | ||
- val map = Arguments.createMap() | ||
- map.putMap("insets", edgeInsetsToJsMap(insets)) | ||
- map | ||
- } | ||
+ if (mStateWrapper != null) { | ||
+ val map = WritableNativeMap() | ||
+ map.putMap("insets", edgeInsetsToJsMap(insets)) | ||
+ mStateWrapper?.updateState(map) | ||
} else { | ||
val localData = SafeAreaViewLocalData(insets = insets, mode = mMode, edges = edges) | ||
val reactContext = getReactContext(this) | ||
diff --git a/android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaViewManager.kt b/android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaViewManager.kt | ||
index 114e89268d12678fa5c74ef24bb6bb03b934bdd6..362ea992103737a23222452426d0a74f235fc001 100644 | ||
--- a/android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaViewManager.kt | ||
+++ b/android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaViewManager.kt | ||
@@ -64,7 +64,7 @@ class SafeAreaViewManager : ReactViewManager(), RNCSafeAreaViewManagerInterface< | ||
props: ReactStylesDiffMap?, | ||
stateWrapper: StateWrapper? | ||
): Any? { | ||
- (view as SafeAreaView).fabricViewStateManager.setStateWrapper(stateWrapper) | ||
+ (view as SafeAreaView).setStateWrapper(stateWrapper) | ||
return null | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* eslint-disable */ | ||
//prettier-ignore | ||
module.exports = { | ||
name: "@yarnpkg/plugin-after-install", | ||
factory: function (require) { | ||
"use strict";var plugin=(()=>{var s=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var r=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(o,e)=>(typeof require<"u"?require:o)[e]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var I=(t,o)=>{for(var e in o)s(t,e,{get:o[e],enumerable:!0})},h=(t,o,e,a)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of x(o))!C.call(t,n)&&n!==e&&s(t,n,{get:()=>o[n],enumerable:!(a=g(o,n))||a.enumerable});return t};var k=t=>h(s({},"__esModule",{value:!0}),t);var P={};I(P,{default:()=>y});var d=r("@yarnpkg/core");var f=r("@yarnpkg/core"),c={afterInstall:{description:"Hook that will always run after install",type:f.SettingsType.STRING,default:""}};var p=r("clipanion"),u=r("@yarnpkg/core");var m=r("@yarnpkg/shell"),l=async(t,o)=>{let e=t.get("afterInstall"),a=!!t.projectCwd?.endsWith(`dlx-${process.pid}`);return e&&!a?(o&&console.log("Running `afterInstall` hook..."),(0,m.execute)(e,[],{cwd:t.projectCwd||void 0})):0};var i=class extends p.Command{async execute(){let o=await u.Configuration.find(this.context.cwd,this.context.plugins);return l(o,!1)}};i.paths=[["after-install"]];var w={configuration:c,commands:[i],hooks:{afterAllInstalled:async(t,o)=>{if(o?.mode===d.InstallMode.UpdateLockfile)return;if(await l(t.configuration,!0))throw new Error("The `afterInstall` hook failed, see output above.")}}},y=w;return k(P);})(); | ||
return plugin; | ||
} | ||
}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.