Skip to content

Commit

Permalink
[Issue-1780] Update react-native version 0.75
Browse files Browse the repository at this point in the history
  • Loading branch information
dominhquang committed Sep 9, 2024
1 parent 573ea8a commit bdb661a
Show file tree
Hide file tree
Showing 6 changed files with 3,217 additions and 3,007 deletions.
2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ enableProgressBars: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.4.1.cjs
yarnPath: .yarn/releases/yarn-3.6.4.cjs
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
buildscript {
ext {
buildToolsVersion = "34.0.0"
minSdkVersion = 21
minSdkVersion = 23
compileSdkVersion = 34
targetSdkVersion = 34
androidXBrowser = "1.4.0"
Expand Down
1 change: 1 addition & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ newArchEnabled=false
# Use this property to enable or disable the Hermes JS engine.
# If set to false, you will be using JSC instead.
hermesEnabled=true
android.enableJetifier=true
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"@react-native-community/segmented-control": "^2.2.2",
"@react-native-community/slider": "^4.4.2",
"@react-native-masked-view/masked-view": "^0.2.9",
"@react-native/gradle-plugin": "^0.75.2",
"@react-navigation/bottom-tabs": "^6.5.3",
"@react-navigation/drawer": "^6.6.2",
"@react-navigation/material-top-tabs": "^6.6.3",
Expand Down Expand Up @@ -147,7 +148,7 @@
"@babel/preset-env": "^7.20.2",
"@babel/runtime": "^7.20.6",
"@polkadot/types": "12.0.1",
"@react-native/eslint-config": "^0.75.2",
"@react-native/eslint-config": "^0.72.2",
"@react-native/metro-config": "^0.75.2",
"@react-native/typescript-config": "0.75.2",
"@subwallet/chain-list": "0.2.82",
Expand All @@ -174,7 +175,7 @@
"babel-plugin-transform-remove-console": "^6.9.4",
"crypto-browserify": "^3.12.0",
"discord-webhook-node": "^1.1.8",
"eslint": "^8.29.0",
"eslint": "^8.57.0",
"html-webpack-plugin": "^5.5.0",
"https-browserify": "^1.0.0",
"husky": "^8.0.3",
Expand Down Expand Up @@ -209,5 +210,5 @@
"engines": {
"node": ">=18"
},
"packageManager": "yarn@3.0.1"
"packageManager": "yarn@3.6.4"
}
262 changes: 262 additions & 0 deletions patches/react-native+0.75.2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,262 @@
diff --git a/node_modules/react-native/React/Fabric/RCTThirdPartyFabricComponentsProvider.h b/node_modules/react-native/React/Fabric/RCTThirdPartyFabricComponentsProvider.h
new file mode 100644
index 0000000..d8804a5
--- /dev/null
+++ b/node_modules/react-native/React/Fabric/RCTThirdPartyFabricComponentsProvider.h
@@ -0,0 +1,83 @@
+
+/*
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
+ *
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
+ * once the code is regenerated.
+ *
+ * @generated by GenerateRCTThirdPartyFabricComponentsProviderH
+ */
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wreturn-type-c-linkage"
+
+#import <React/RCTComponentViewProtocol.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+Class<RCTComponentViewProtocol> RCTThirdPartyFabricComponentsProvider(const char *name);
+#if RCT_NEW_ARCH_ENABLED
+#ifndef RCT_DYNAMIC_FRAMEWORKS
+
+
+#if !TARGET_OS_OSX && !TARGET_OS_TV && !TARGET_OS_VISION
+
+#endif
+
+#if !TARGET_OS_OSX && !TARGET_OS_TV && !TARGET_OS_VISION
+Class<RCTComponentViewProtocol> RNGoogleSigninButtonCls(void) __attribute__((used)); // 2
+#endif
+
+Class<RCTComponentViewProtocol> RNGestureHandlerButtonCls(void) __attribute__((used)); // 3
+Class<RCTComponentViewProtocol> RNGestureHandlerRootViewCls(void) __attribute__((used)); // 3
+
+#if !TARGET_OS_OSX
+Class<RCTComponentViewProtocol> RNSFullWindowOverlayCls(void) __attribute__((used)); // 5
+Class<RCTComponentViewProtocol> RNSModalScreenCls(void) __attribute__((used)); // 5
+Class<RCTComponentViewProtocol> RNSScreenContainerCls(void) __attribute__((used)); // 5
+Class<RCTComponentViewProtocol> RNSScreenCls(void) __attribute__((used)); // 5
+Class<RCTComponentViewProtocol> RNSScreenNavigationContainerCls(void) __attribute__((used)); // 5
+Class<RCTComponentViewProtocol> RNSScreenStackHeaderConfigCls(void) __attribute__((used)); // 5
+Class<RCTComponentViewProtocol> RNSScreenStackHeaderSubviewCls(void) __attribute__((used)); // 5
+Class<RCTComponentViewProtocol> RNSScreenStackCls(void) __attribute__((used)); // 5
+Class<RCTComponentViewProtocol> RNSSearchBarCls(void) __attribute__((used)); // 5
+#endif
+
+Class<RCTComponentViewProtocol> RNSVGCircleCls(void) __attribute__((used)); // 6
+Class<RCTComponentViewProtocol> RNSVGClipPathCls(void) __attribute__((used)); // 6
+Class<RCTComponentViewProtocol> RNSVGDefsCls(void) __attribute__((used)); // 6
+Class<RCTComponentViewProtocol> RNSVGEllipseCls(void) __attribute__((used)); // 6
+Class<RCTComponentViewProtocol> RNSVGFeColorMatrixCls(void) __attribute__((used)); // 6
+Class<RCTComponentViewProtocol> RNSVGFeGaussianBlurCls(void) __attribute__((used)); // 6
+Class<RCTComponentViewProtocol> RNSVGFeMergeCls(void) __attribute__((used)); // 6
+Class<RCTComponentViewProtocol> RNSVGFeOffsetCls(void) __attribute__((used)); // 6
+Class<RCTComponentViewProtocol> RNSVGFilterCls(void) __attribute__((used)); // 6
+Class<RCTComponentViewProtocol> RNSVGForeignObjectCls(void) __attribute__((used)); // 6
+Class<RCTComponentViewProtocol> RNSVGGroupCls(void) __attribute__((used)); // 6
+Class<RCTComponentViewProtocol> RNSVGImageCls(void) __attribute__((used)); // 6
+Class<RCTComponentViewProtocol> RNSVGSvgViewCls(void) __attribute__((used)); // 6
+Class<RCTComponentViewProtocol> RNSVGLinearGradientCls(void) __attribute__((used)); // 6
+Class<RCTComponentViewProtocol> RNSVGLineCls(void) __attribute__((used)); // 6
+Class<RCTComponentViewProtocol> RNSVGMarkerCls(void) __attribute__((used)); // 6
+Class<RCTComponentViewProtocol> RNSVGMaskCls(void) __attribute__((used)); // 6
+Class<RCTComponentViewProtocol> RNSVGPathCls(void) __attribute__((used)); // 6
+Class<RCTComponentViewProtocol> RNSVGPatternCls(void) __attribute__((used)); // 6
+Class<RCTComponentViewProtocol> RNSVGRadialGradientCls(void) __attribute__((used)); // 6
+Class<RCTComponentViewProtocol> RNSVGRectCls(void) __attribute__((used)); // 6
+Class<RCTComponentViewProtocol> RNSVGSymbolCls(void) __attribute__((used)); // 6
+Class<RCTComponentViewProtocol> RNSVGTextCls(void) __attribute__((used)); // 6
+Class<RCTComponentViewProtocol> RNSVGTextPathCls(void) __attribute__((used)); // 6
+Class<RCTComponentViewProtocol> RNSVGTSpanCls(void) __attribute__((used)); // 6
+Class<RCTComponentViewProtocol> RNSVGUseCls(void) __attribute__((used)); // 6
+
+#endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#pragma GCC diagnostic pop
+
diff --git a/node_modules/react-native/React/Fabric/RCTThirdPartyFabricComponentsProvider.mm b/node_modules/react-native/React/Fabric/RCTThirdPartyFabricComponentsProvider.mm
new file mode 100644
index 0000000..adf2d19
--- /dev/null
+++ b/node_modules/react-native/React/Fabric/RCTThirdPartyFabricComponentsProvider.mm
@@ -0,0 +1,120 @@
+
+/**
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
+ *
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
+ * once the code is regenerated.
+ *
+ * @generated by GenerateRCTThirdPartyFabricComponentsProviderCpp
+ */
+
+// OSS-compatibility layer
+
+#import "RCTThirdPartyFabricComponentsProvider.h"
+
+#import <string>
+#import <unordered_map>
+
+Class<RCTComponentViewProtocol> RCTThirdPartyFabricComponentsProvider(const char *name) {
+ static std::unordered_map<std::string, Class (*)(void)> sFabricComponentsClassMap = {
+ #if RCT_NEW_ARCH_ENABLED
+ #ifndef RCT_DYNAMIC_FRAMEWORKS
+
+#if !TARGET_OS_OSX && !TARGET_OS_TV && !TARGET_OS_VISION
+
+#endif
+
+#if !TARGET_OS_OSX && !TARGET_OS_TV && !TARGET_OS_VISION
+
+ {"RNGoogleSigninButton", RNGoogleSigninButtonCls}, // 2
+#endif
+
+
+ {"RNGestureHandlerButton", RNGestureHandlerButtonCls}, // 3
+
+ {"RNGestureHandlerRootView", RNGestureHandlerRootViewCls}, // 3
+
+#if !TARGET_OS_OSX
+
+ {"RNSFullWindowOverlay", RNSFullWindowOverlayCls}, // 5
+
+ {"RNSModalScreen", RNSModalScreenCls}, // 5
+
+ {"RNSScreenContainer", RNSScreenContainerCls}, // 5
+
+ {"RNSScreen", RNSScreenCls}, // 5
+
+ {"RNSScreenNavigationContainer", RNSScreenNavigationContainerCls}, // 5
+
+ {"RNSScreenStackHeaderConfig", RNSScreenStackHeaderConfigCls}, // 5
+
+ {"RNSScreenStackHeaderSubview", RNSScreenStackHeaderSubviewCls}, // 5
+
+ {"RNSScreenStack", RNSScreenStackCls}, // 5
+
+ {"RNSSearchBar", RNSSearchBarCls}, // 5
+#endif
+
+
+ {"RNSVGCircle", RNSVGCircleCls}, // 6
+
+ {"RNSVGClipPath", RNSVGClipPathCls}, // 6
+
+ {"RNSVGDefs", RNSVGDefsCls}, // 6
+
+ {"RNSVGEllipse", RNSVGEllipseCls}, // 6
+
+ {"RNSVGFeColorMatrix", RNSVGFeColorMatrixCls}, // 6
+
+ {"RNSVGFeGaussianBlur", RNSVGFeGaussianBlurCls}, // 6
+
+ {"RNSVGFeMerge", RNSVGFeMergeCls}, // 6
+
+ {"RNSVGFeOffset", RNSVGFeOffsetCls}, // 6
+
+ {"RNSVGFilter", RNSVGFilterCls}, // 6
+
+ {"RNSVGForeignObject", RNSVGForeignObjectCls}, // 6
+
+ {"RNSVGGroup", RNSVGGroupCls}, // 6
+
+ {"RNSVGImage", RNSVGImageCls}, // 6
+
+ {"RNSVGSvgView", RNSVGSvgViewCls}, // 6
+
+ {"RNSVGLinearGradient", RNSVGLinearGradientCls}, // 6
+
+ {"RNSVGLine", RNSVGLineCls}, // 6
+
+ {"RNSVGMarker", RNSVGMarkerCls}, // 6
+
+ {"RNSVGMask", RNSVGMaskCls}, // 6
+
+ {"RNSVGPath", RNSVGPathCls}, // 6
+
+ {"RNSVGPattern", RNSVGPatternCls}, // 6
+
+ {"RNSVGRadialGradient", RNSVGRadialGradientCls}, // 6
+
+ {"RNSVGRect", RNSVGRectCls}, // 6
+
+ {"RNSVGSymbol", RNSVGSymbolCls}, // 6
+
+ {"RNSVGText", RNSVGTextCls}, // 6
+
+ {"RNSVGTextPath", RNSVGTextPathCls}, // 6
+
+ {"RNSVGTSpan", RNSVGTSpanCls}, // 6
+
+ {"RNSVGUse", RNSVGUseCls}, // 6
+ #endif
+ #endif
+ };
+
+ auto p = sFabricComponentsClassMap.find(name);
+ if (p != sFabricComponentsClassMap.end()) {
+ auto classFunc = p->second;
+ return classFunc();
+ }
+ return nil;
+}
diff --git a/node_modules/react-native/ReactAndroid/api/ReactAndroid.api b/node_modules/react-native/ReactAndroid/api/ReactAndroid.api
index e647de2..6a14ffd 100644
--- a/node_modules/react-native/ReactAndroid/api/ReactAndroid.api
+++ b/node_modules/react-native/ReactAndroid/api/ReactAndroid.api
@@ -6459,9 +6459,9 @@ public class com/facebook/react/views/imagehelper/ImageSource {
public final fun getSize ()D
public final fun getSource ()Ljava/lang/String;
public static final fun getTransparentBitmapImageSource (Landroid/content/Context;)Lcom/facebook/react/views/imagehelper/ImageSource;
- public final fun getUri ()Landroid/net/Uri;
+ public fun getUri ()Landroid/net/Uri;
public fun hashCode ()I
- public final fun isResource ()Z
+ public fun isResource ()Z
}

public final class com/facebook/react/views/imagehelper/ImageSource$Companion {
diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ImageSource.kt b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ImageSource.kt
index 583b4a0..947044c 100644
--- a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ImageSource.kt
+++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ImageSource.kt
@@ -23,12 +23,14 @@ constructor(
) {

/** Get the URI for this image - can be either a parsed network URI or a resource URI. */
- public val uri: Uri = computeUri(context)
+ public open val uri: Uri = computeUri(context)
/** Get the area of this image. */
public val size: Double = width * height
/** Get whether this image source represents an Android resource or a network URI. */
- public var isResource: Boolean = false
- private set
+ public open val isResource: Boolean
+ get() = _isResource
+
+ private var _isResource: Boolean = false

override fun equals(other: Any?): Boolean {
if (this === other) {
@@ -58,7 +60,7 @@ constructor(
}

private fun computeLocalUri(context: Context): Uri {
- isResource = true
+ _isResource = true
return ResourceDrawableIdHelper.instance.getResourceDrawableUri(context, source)
}

Loading

0 comments on commit bdb661a

Please sign in to comment.