react-native 0.71.10 → 0.71.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTJavaScriptLoader.mm +11 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/CxxBridge/RCTCxxBridge.mm +9 -4
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java +10 -1
- package/ReactAndroid/src/main/java/com/facebook/react/animated/FrameBasedAnimationDriver.java +14 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewBackgroundDrawable.java +4 -4
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/package.json +8 -8
- package/scripts/cocoapods/utils.rb +12 -0
- package/scripts/react_native_pods.rb +1 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/template/package.json +2 -2
|
@@ -312,7 +312,17 @@ static void attemptAsynchronousLoadOfBundleAtURL(
|
|
|
312
312
|
return;
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
-
|
|
315
|
+
// Prefer `Content-Location` as the canonical source URL, if given, or fall back to scriptURL.
|
|
316
|
+
NSURL *sourceURL = scriptURL;
|
|
317
|
+
NSString *contentLocationHeader = headers[@"Content-Location"];
|
|
318
|
+
if (contentLocationHeader) {
|
|
319
|
+
NSURL *contentLocationURL = [NSURL URLWithString:contentLocationHeader relativeToURL:scriptURL];
|
|
320
|
+
if (contentLocationURL) {
|
|
321
|
+
sourceURL = contentLocationURL;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
RCTSource *source = RCTSourceCreate(sourceURL, data, data.length);
|
|
316
326
|
parseHeaders(headers, source);
|
|
317
327
|
onComplete(nil, source);
|
|
318
328
|
}
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -474,6 +474,7 @@ struct RCTInstanceCallback : public InstanceCallback {
|
|
|
474
474
|
// Load the source asynchronously, then store it for later execution.
|
|
475
475
|
dispatch_group_enter(prepareBridge);
|
|
476
476
|
__block NSData *sourceCode;
|
|
477
|
+
__block NSURL *sourceURL = self.bundleURL;
|
|
477
478
|
|
|
478
479
|
#if (RCT_DEV | RCT_ENABLE_LOADING_VIEW) && __has_include(<React/RCTDevLoadingViewProtocol.h>)
|
|
479
480
|
{
|
|
@@ -489,6 +490,9 @@ struct RCTInstanceCallback : public InstanceCallback {
|
|
|
489
490
|
}
|
|
490
491
|
|
|
491
492
|
sourceCode = source.data;
|
|
493
|
+
if (source.url) {
|
|
494
|
+
sourceURL = source.url;
|
|
495
|
+
}
|
|
492
496
|
dispatch_group_leave(prepareBridge);
|
|
493
497
|
}
|
|
494
498
|
onProgress:^(RCTLoadingProgress *progressData) {
|
|
@@ -503,7 +507,7 @@ struct RCTInstanceCallback : public InstanceCallback {
|
|
|
503
507
|
dispatch_group_notify(prepareBridge, dispatch_get_global_queue(QOS_CLASS_USER_INTERACTIVE, 0), ^{
|
|
504
508
|
RCTCxxBridge *strongSelf = weakSelf;
|
|
505
509
|
if (sourceCode && strongSelf.loading) {
|
|
506
|
-
[strongSelf executeSourceCode:sourceCode sync:NO];
|
|
510
|
+
[strongSelf executeSourceCode:sourceCode withSourceURL:sourceURL sync:NO];
|
|
507
511
|
}
|
|
508
512
|
});
|
|
509
513
|
RCT_PROFILE_END_EVENT(RCTProfileTagAlways, @"");
|
|
@@ -1049,7 +1053,7 @@ struct RCTInstanceCallback : public InstanceCallback {
|
|
|
1049
1053
|
[_displayLink registerModuleForFrameUpdates:module withModuleData:moduleData];
|
|
1050
1054
|
}
|
|
1051
1055
|
|
|
1052
|
-
- (void)executeSourceCode:(NSData *)sourceCode sync:(BOOL)sync
|
|
1056
|
+
- (void)executeSourceCode:(NSData *)sourceCode withSourceURL:(NSURL *)url sync:(BOOL)sync
|
|
1053
1057
|
{
|
|
1054
1058
|
// This will get called from whatever thread was actually executing JS.
|
|
1055
1059
|
dispatch_block_t completion = ^{
|
|
@@ -1074,12 +1078,13 @@ struct RCTInstanceCallback : public InstanceCallback {
|
|
|
1074
1078
|
};
|
|
1075
1079
|
|
|
1076
1080
|
if (sync) {
|
|
1077
|
-
[self executeApplicationScriptSync:sourceCode url:
|
|
1081
|
+
[self executeApplicationScriptSync:sourceCode url:url];
|
|
1078
1082
|
completion();
|
|
1079
1083
|
} else {
|
|
1080
|
-
[self enqueueApplicationScript:sourceCode url:
|
|
1084
|
+
[self enqueueApplicationScript:sourceCode url:url onComplete:completion];
|
|
1081
1085
|
}
|
|
1082
1086
|
|
|
1087
|
+
// Use the original request URL here - HMRClient uses this to derive the /hot URL and entry point.
|
|
1083
1088
|
[self.devSettings setupHMRClientWithBundleURL:self.bundleURL];
|
|
1084
1089
|
}
|
|
1085
1090
|
|
|
@@ -14,6 +14,7 @@ import static com.facebook.systrace.Systrace.TRACE_TAG_REACT_JAVA_BRIDGE;
|
|
|
14
14
|
|
|
15
15
|
import android.app.Activity;
|
|
16
16
|
import android.content.Context;
|
|
17
|
+
import android.content.ContextWrapper;
|
|
17
18
|
import android.graphics.Canvas;
|
|
18
19
|
import android.graphics.Insets;
|
|
19
20
|
import android.graphics.Point;
|
|
@@ -916,6 +917,14 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
|
|
|
916
917
|
checkForDeviceDimensionsChanges();
|
|
917
918
|
}
|
|
918
919
|
|
|
920
|
+
private Activity getActivity() {
|
|
921
|
+
Context context = getContext();
|
|
922
|
+
while (!(context instanceof Activity) && context instanceof ContextWrapper) {
|
|
923
|
+
context = ((ContextWrapper) context).getBaseContext();
|
|
924
|
+
}
|
|
925
|
+
return (Activity) context;
|
|
926
|
+
}
|
|
927
|
+
|
|
919
928
|
@RequiresApi(api = Build.VERSION_CODES.R)
|
|
920
929
|
private void checkForKeyboardEvents() {
|
|
921
930
|
getRootView().getWindowVisibleDisplayFrame(mVisibleViewArea);
|
|
@@ -933,7 +942,7 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
|
|
|
933
942
|
Insets barInsets = rootInsets.getInsets(WindowInsets.Type.systemBars());
|
|
934
943
|
int height = imeInsets.bottom - barInsets.bottom;
|
|
935
944
|
|
|
936
|
-
int softInputMode = (
|
|
945
|
+
int softInputMode = getActivity().getWindow().getAttributes().softInputMode;
|
|
937
946
|
int screenY =
|
|
938
947
|
softInputMode == WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING
|
|
939
948
|
? mVisibleViewArea.bottom - height
|
package/ReactAndroid/src/main/java/com/facebook/react/animated/FrameBasedAnimationDriver.java
CHANGED
|
@@ -7,9 +7,12 @@
|
|
|
7
7
|
|
|
8
8
|
package com.facebook.react.animated;
|
|
9
9
|
|
|
10
|
+
import com.facebook.common.logging.FLog;
|
|
10
11
|
import com.facebook.react.bridge.ReadableArray;
|
|
11
12
|
import com.facebook.react.bridge.ReadableMap;
|
|
12
13
|
import com.facebook.react.bridge.ReadableType;
|
|
14
|
+
import com.facebook.react.common.ReactConstants;
|
|
15
|
+
import com.facebook.react.common.build.ReactBuildConfig;
|
|
13
16
|
|
|
14
17
|
/**
|
|
15
18
|
* Implementation of {@link AnimationDriver} which provides a support for simple time-based
|
|
@@ -70,7 +73,17 @@ class FrameBasedAnimationDriver extends AnimationDriver {
|
|
|
70
73
|
long timeFromStartMillis = (frameTimeNanos - mStartFrameTimeNanos) / 1000000;
|
|
71
74
|
int frameIndex = (int) Math.round(timeFromStartMillis / FRAME_TIME_MILLIS);
|
|
72
75
|
if (frameIndex < 0) {
|
|
73
|
-
|
|
76
|
+
String message =
|
|
77
|
+
"Calculated frame index should never be lower than 0. Called with frameTimeNanos "
|
|
78
|
+
+ frameTimeNanos
|
|
79
|
+
+ " and mStartFrameTimeNanos "
|
|
80
|
+
+ mStartFrameTimeNanos;
|
|
81
|
+
if (ReactBuildConfig.DEBUG) {
|
|
82
|
+
throw new IllegalStateException(message);
|
|
83
|
+
} else {
|
|
84
|
+
FLog.w(ReactConstants.TAG, message);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
74
87
|
} else if (mHasFinished) {
|
|
75
88
|
// nothing to do here
|
|
76
89
|
return;
|
package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewBackgroundDrawable.java
CHANGED
|
@@ -791,7 +791,7 @@ public class ReactViewBackgroundDrawable extends Drawable {
|
|
|
791
791
|
|
|
792
792
|
/** Compute mInnerTopLeftCorner */
|
|
793
793
|
mInnerTopLeftCorner.x = mInnerClipTempRectForBorderRadius.left;
|
|
794
|
-
mInnerTopLeftCorner.y = mInnerClipTempRectForBorderRadius.top
|
|
794
|
+
mInnerTopLeftCorner.y = mInnerClipTempRectForBorderRadius.top;
|
|
795
795
|
|
|
796
796
|
getEllipseIntersectionWithLine(
|
|
797
797
|
// Ellipse Bounds
|
|
@@ -817,7 +817,7 @@ public class ReactViewBackgroundDrawable extends Drawable {
|
|
|
817
817
|
}
|
|
818
818
|
|
|
819
819
|
mInnerBottomLeftCorner.x = mInnerClipTempRectForBorderRadius.left;
|
|
820
|
-
mInnerBottomLeftCorner.y = mInnerClipTempRectForBorderRadius.bottom
|
|
820
|
+
mInnerBottomLeftCorner.y = mInnerClipTempRectForBorderRadius.bottom;
|
|
821
821
|
|
|
822
822
|
getEllipseIntersectionWithLine(
|
|
823
823
|
// Ellipse Bounds
|
|
@@ -843,7 +843,7 @@ public class ReactViewBackgroundDrawable extends Drawable {
|
|
|
843
843
|
}
|
|
844
844
|
|
|
845
845
|
mInnerTopRightCorner.x = mInnerClipTempRectForBorderRadius.right;
|
|
846
|
-
mInnerTopRightCorner.y = mInnerClipTempRectForBorderRadius.top
|
|
846
|
+
mInnerTopRightCorner.y = mInnerClipTempRectForBorderRadius.top;
|
|
847
847
|
|
|
848
848
|
getEllipseIntersectionWithLine(
|
|
849
849
|
// Ellipse Bounds
|
|
@@ -869,7 +869,7 @@ public class ReactViewBackgroundDrawable extends Drawable {
|
|
|
869
869
|
}
|
|
870
870
|
|
|
871
871
|
mInnerBottomRightCorner.x = mInnerClipTempRectForBorderRadius.right;
|
|
872
|
-
mInnerBottomRightCorner.y = mInnerClipTempRectForBorderRadius.bottom
|
|
872
|
+
mInnerBottomRightCorner.y = mInnerClipTempRectForBorderRadius.bottom;
|
|
873
873
|
|
|
874
874
|
getEllipseIntersectionWithLine(
|
|
875
875
|
// Ellipse Bounds
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.71.
|
|
3
|
+
"version": "0.71.11",
|
|
4
4
|
"bin": "./cli.js",
|
|
5
5
|
"description": "A framework for building native apps using React",
|
|
6
6
|
"license": "MIT",
|
|
@@ -110,9 +110,9 @@
|
|
|
110
110
|
},
|
|
111
111
|
"dependencies": {
|
|
112
112
|
"@jest/create-cache-key-function": "^29.2.1",
|
|
113
|
-
"@react-native-community/cli": "10.2.
|
|
113
|
+
"@react-native-community/cli": "10.2.4",
|
|
114
114
|
"@react-native-community/cli-platform-android": "10.2.0",
|
|
115
|
-
"@react-native-community/cli-platform-ios": "10.2.
|
|
115
|
+
"@react-native-community/cli-platform-ios": "10.2.4",
|
|
116
116
|
"@react-native/assets": "1.0.0",
|
|
117
117
|
"@react-native/normalize-color": "2.1.0",
|
|
118
118
|
"@react-native/polyfills": "2.0.0",
|
|
@@ -125,9 +125,9 @@
|
|
|
125
125
|
"jest-environment-node": "^29.2.1",
|
|
126
126
|
"jsc-android": "^250231.0.0",
|
|
127
127
|
"memoize-one": "^5.0.0",
|
|
128
|
-
"metro-react-native-babel-transformer": "0.73.
|
|
129
|
-
"metro-runtime": "0.73.
|
|
130
|
-
"metro-source-map": "0.73.
|
|
128
|
+
"metro-react-native-babel-transformer": "0.73.10",
|
|
129
|
+
"metro-runtime": "0.73.10",
|
|
130
|
+
"metro-source-map": "0.73.10",
|
|
131
131
|
"mkdirp": "^0.5.1",
|
|
132
132
|
"nullthrows": "^1.1.1",
|
|
133
133
|
"pretty-format": "^26.5.2",
|
|
@@ -182,8 +182,8 @@
|
|
|
182
182
|
"jest": "^29.2.1",
|
|
183
183
|
"jest-junit": "^10.0.0",
|
|
184
184
|
"jscodeshift": "^0.13.1",
|
|
185
|
-
"metro-babel-register": "0.73.
|
|
186
|
-
"metro-memory-fs": "0.73.
|
|
185
|
+
"metro-babel-register": "0.73.10",
|
|
186
|
+
"metro-memory-fs": "0.73.10",
|
|
187
187
|
"mkdirp": "^0.5.1",
|
|
188
188
|
"mock-fs": "^5.1.4",
|
|
189
189
|
"prettier": "^2.4.1",
|
|
@@ -131,6 +131,18 @@ class ReactNativePodsUtils
|
|
|
131
131
|
end
|
|
132
132
|
end
|
|
133
133
|
|
|
134
|
+
def self.apply_xcode_15_patch(installer)
|
|
135
|
+
installer.target_installation_results.pod_target_installation_results
|
|
136
|
+
.each do |pod_name, target_installation_result|
|
|
137
|
+
target_installation_result.native_target.build_configurations.each do |config|
|
|
138
|
+
# unary_function and binary_function are no longer provided in C++17 and newer standard modes as part of Xcode 15. They can be re-enabled with setting _LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION
|
|
139
|
+
# Ref: https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Deprecations
|
|
140
|
+
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= '$(inherited) '
|
|
141
|
+
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << '"_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION" '
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
|
|
134
146
|
private
|
|
135
147
|
|
|
136
148
|
def self.fix_library_search_path(config)
|
|
@@ -223,6 +223,7 @@ def react_native_post_install(installer, react_native_path = "../node_modules/re
|
|
|
223
223
|
ReactNativePodsUtils.exclude_i386_architecture_while_using_hermes(installer)
|
|
224
224
|
ReactNativePodsUtils.fix_library_search_paths(installer)
|
|
225
225
|
ReactNativePodsUtils.set_node_modules_user_settings(installer, react_native_path)
|
|
226
|
+
ReactNativePodsUtils.apply_xcode_15_patch(installer)
|
|
226
227
|
|
|
227
228
|
NewArchitectureHelper.set_clang_cxx_language_standard_if_needed(installer)
|
|
228
229
|
is_new_arch_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == "1"
|
|
Binary file
|
package/template/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"react": "18.2.0",
|
|
14
|
-
"react-native": "0.71.
|
|
14
|
+
"react-native": "0.71.11"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@babel/core": "^7.20.0",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"babel-jest": "^29.2.1",
|
|
26
26
|
"eslint": "^8.19.0",
|
|
27
27
|
"jest": "^29.2.1",
|
|
28
|
-
"metro-react-native-babel-preset": "0.73.
|
|
28
|
+
"metro-react-native-babel-preset": "0.73.10",
|
|
29
29
|
"prettier": "^2.4.1",
|
|
30
30
|
"react-test-renderer": "18.2.0",
|
|
31
31
|
"typescript": "4.8.4"
|