react-native 0.85.1 → 0.85.3
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/Libraries/Utilities/HMRClient.js +28 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/RCTDevLoadingView.mm +17 -0
- package/React/CoreModules/RCTJscSafeUrl+Internal.h +23 -0
- package/React/CoreModules/RCTJscSafeUrl.mm +38 -0
- package/React/CoreModules/RCTRedBox+Internal.h +42 -0
- package/React/CoreModules/RCTRedBox.mm +30 -454
- package/React/CoreModules/RCTRedBox2AnsiParser+Internal.h +22 -0
- package/React/CoreModules/RCTRedBox2AnsiParser.mm +55 -0
- package/React/CoreModules/RCTRedBox2Controller+Internal.h +34 -0
- package/React/CoreModules/RCTRedBox2Controller.mm +764 -0
- package/React/CoreModules/RCTRedBox2ErrorParser+Internal.h +46 -0
- package/React/CoreModules/RCTRedBox2ErrorParser.mm +57 -0
- package/React/CoreModules/RCTRedBoxController+Internal.h +31 -0
- package/React/CoreModules/RCTRedBoxController.mm +447 -0
- package/React/CoreModules/RCTRedBoxHMRClient+Internal.h +26 -0
- package/React/CoreModules/RCTRedBoxHMRClient.mm +125 -0
- package/React/CoreModules/React-CoreModules.podspec +1 -0
- package/React/DevSupport/RCTFrameTimingsObserver.h +24 -0
- package/React/DevSupport/RCTFrameTimingsObserver.mm +298 -0
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +40 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/InspectorFlags.kt +4 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/inspector/FrameTimingSequence.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/inspector/FrameTimingsObserver.kt +127 -26
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +31 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +51 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +11 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +11 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +56 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +11 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/tracing/PerformanceTracer.kt +39 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.kt +50 -10
- package/ReactAndroid/src/main/jni/CMakeLists.txt +7 -0
- package/ReactAndroid/src/main/jni/react/devsupport/JInspectorFlags.cpp +22 -0
- package/ReactAndroid/src/main/jni/react/devsupport/JInspectorFlags.h +2 -0
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +71 -1
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +16 -1
- package/ReactAndroid/src/main/jni/react/runtime/jni/JReactHostInspectorTarget.cpp +14 -0
- package/ReactAndroid/src/main/jni/react/runtime/jni/JReactHostInspectorTarget.h +18 -4
- package/ReactCommon/React-Fabric.podspec +6 -0
- package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
- package/ReactCommon/jsinspector-modern/HostAgent.cpp +36 -0
- package/ReactCommon/jsinspector-modern/HostTarget.cpp +7 -1
- package/ReactCommon/jsinspector-modern/HostTarget.h +25 -0
- package/ReactCommon/jsinspector-modern/HostTargetTracing.cpp +1 -1
- package/ReactCommon/jsinspector-modern/HostTargetTracing.h +4 -4
- package/ReactCommon/jsinspector-modern/InspectorFlags.cpp +12 -0
- package/ReactCommon/jsinspector-modern/InspectorFlags.h +12 -0
- package/ReactCommon/jsinspector-modern/NetworkIOAgent.cpp +1 -1
- package/ReactCommon/jsinspector-modern/RuntimeAgent.cpp +19 -0
- package/ReactCommon/jsinspector-modern/RuntimeAgent.h +7 -0
- package/ReactCommon/jsinspector-modern/RuntimeTarget.cpp +33 -0
- package/ReactCommon/jsinspector-modern/RuntimeTarget.h +6 -0
- package/ReactCommon/jsinspector-modern/tests/HostTargetTest.cpp +12 -0
- package/ReactCommon/jsinspector-modern/tests/InspectorMocks.h +3 -2
- package/ReactCommon/jsinspector-modern/tests/JsiIntegrationTest.cpp +1 -0
- package/ReactCommon/jsinspector-modern/tests/NetworkReporterTest.cpp +1 -1
- package/ReactCommon/jsinspector-modern/tests/TracingTest.cpp +1 -1
- package/ReactCommon/jsinspector-modern/tests/utils/InspectorFlagOverridesGuard.cpp +10 -0
- package/ReactCommon/jsinspector-modern/tests/utils/InspectorFlagOverridesGuard.h +3 -1
- package/ReactCommon/jsinspector-modern/tracing/CMakeLists.txt +1 -0
- package/ReactCommon/jsinspector-modern/tracing/FrameTimingSequence.h +7 -3
- package/ReactCommon/jsinspector-modern/tracing/HostTracingProfileSerializer.cpp +52 -29
- package/ReactCommon/jsinspector-modern/tracing/HostTracingProfileSerializer.h +6 -6
- package/ReactCommon/jsinspector-modern/tracing/PerformanceTracerSection.h +113 -0
- package/ReactCommon/jsinspector-modern/tracing/React-jsinspectortracing.podspec +1 -0
- package/ReactCommon/jsinspector-modern/tracing/TraceEventGenerator.cpp +12 -5
- package/ReactCommon/jsinspector-modern/tracing/TraceEventGenerator.h +3 -1
- package/ReactCommon/jsinspector-modern/tracing/TraceEventSerializer.cpp +42 -0
- package/ReactCommon/jsinspector-modern/tracing/TraceEventSerializer.h +7 -0
- package/ReactCommon/react/debug/CMakeLists.txt +2 -1
- package/ReactCommon/react/debug/React-debug.podspec +7 -1
- package/ReactCommon/react/debug/redbox/AnsiParser.cpp +139 -0
- package/ReactCommon/react/debug/redbox/AnsiParser.h +35 -0
- package/ReactCommon/react/debug/redbox/JscSafeUrl.cpp +179 -0
- package/ReactCommon/react/debug/redbox/JscSafeUrl.h +27 -0
- package/ReactCommon/react/debug/redbox/RedBoxErrorParser.cpp +171 -0
- package/ReactCommon/react/debug/redbox/RedBoxErrorParser.h +40 -0
- package/ReactCommon/react/debug/redbox/tests/AnsiParserTest.cpp +97 -0
- package/ReactCommon/react/debug/redbox/tests/JscSafeUrlTest.cpp +173 -0
- package/ReactCommon/react/debug/redbox/tests/RedBoxErrorParserTest.cpp +107 -0
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +21 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +26 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +135 -45
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +12 -2
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +21 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +46 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +6 -1
- package/ReactCommon/react/nativemodule/defaults/CMakeLists.txt +1 -0
- package/ReactCommon/react/nativemodule/defaults/DefaultTurboModules.cpp +7 -0
- package/ReactCommon/react/nativemodule/defaults/React-defaultsnativemodule.podspec +1 -0
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +26 -1
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +11 -1
- package/ReactCommon/react/nativemodule/mutationobserver/NativeMutationObserver.h +4 -0
- package/ReactCommon/react/nativemodule/mutationobserver/React-mutationobservernativemodule.podspec +66 -0
- package/ReactCommon/react/performance/timeline/PerformanceObserver.cpp +18 -6
- package/ReactCommon/react/performance/timeline/PerformanceObserver.h +2 -0
- package/ReactCommon/react/renderer/animated/NativeAnimatedNodesManager.cpp +4 -1
- package/ReactCommon/react/renderer/animationbackend/AnimationBackend.cpp +58 -25
- package/ReactCommon/react/renderer/animationbackend/AnimationBackend.h +9 -0
- package/ReactCommon/react/renderer/animationbackend/AnimationChoreographer.h +5 -0
- package/ReactCommon/react/renderer/uimanager/UIManagerAnimationBackend.h +1 -0
- package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm +115 -0
- package/ReactCommon/{jsinspector-modern → react/utils}/Base64.h +2 -2
- package/package.json +11 -11
- package/scripts/cocoapods/utils.rb +1 -0
- package/scripts/react_native_pods.rb +1 -0
- package/scripts/replace-rncore-version.js +72 -15
- package/src/private/featureflags/ReactNativeFeatureFlags.js +26 -1
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +6 -1
- package/src/private/setup/setUpDefaultReactNativeEnvironment.js +6 -0
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
#import <React/RCTConvert.h>
|
|
14
14
|
#import <React/RCTDevMenu.h>
|
|
15
15
|
#import <React/RCTFabricSurface.h>
|
|
16
|
+
#import <React/RCTFrameTimingsObserver.h>
|
|
16
17
|
#import <React/RCTInspectorDevServerHelper.h>
|
|
17
18
|
#import <React/RCTInspectorNetworkHelper.h>
|
|
18
19
|
#import <React/RCTInspectorUtils.h>
|
|
@@ -37,12 +38,52 @@ using namespace facebook::react;
|
|
|
37
38
|
@property (nonatomic, readonly) jsinspector_modern::HostTarget *inspectorTarget;
|
|
38
39
|
@end
|
|
39
40
|
|
|
41
|
+
#if TARGET_OS_IPHONE && defined(REACT_NATIVE_DEBUGGER_ENABLED)
|
|
42
|
+
class RCTHostTracingDelegate : public jsinspector_modern::HostTargetTracingDelegate {
|
|
43
|
+
public:
|
|
44
|
+
explicit RCTHostTracingDelegate(RCTHost *host) : host_(host) {}
|
|
45
|
+
|
|
46
|
+
void onTracingStarted(jsinspector_modern::tracing::Mode /*tracingMode*/, bool screenshotsCategoryEnabled) override
|
|
47
|
+
{
|
|
48
|
+
RCTHost *host = host_;
|
|
49
|
+
if (host == nil || host.inspectorTarget == nullptr) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
__weak RCTHost *weakHost = host;
|
|
53
|
+
|
|
54
|
+
observer_ = [[RCTFrameTimingsObserver alloc]
|
|
55
|
+
initWithScreenshotsEnabled:screenshotsCategoryEnabled
|
|
56
|
+
callback:^(jsinspector_modern::tracing::FrameTimingSequence sequence) {
|
|
57
|
+
RCTHost *strongHost = weakHost;
|
|
58
|
+
if (strongHost != nil && strongHost.inspectorTarget != nullptr) {
|
|
59
|
+
strongHost.inspectorTarget->recordFrameTimings(std::move(sequence));
|
|
60
|
+
}
|
|
61
|
+
}];
|
|
62
|
+
[observer_ start];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
void onTracingStopped() override
|
|
66
|
+
{
|
|
67
|
+
[observer_ stop];
|
|
68
|
+
observer_ = nil;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
private:
|
|
72
|
+
__weak RCTHost *host_;
|
|
73
|
+
RCTFrameTimingsObserver *observer_{nil};
|
|
74
|
+
};
|
|
75
|
+
#endif
|
|
76
|
+
|
|
40
77
|
class RCTHostHostTargetDelegate : public facebook::react::jsinspector_modern::HostTargetDelegate {
|
|
41
78
|
public:
|
|
42
79
|
RCTHostHostTargetDelegate(RCTHost *host)
|
|
43
80
|
: host_(host),
|
|
44
81
|
pauseOverlayController_([[RCTPausedInDebuggerOverlayController alloc] init]),
|
|
45
82
|
networkHelper_([[RCTInspectorNetworkHelper alloc] init])
|
|
83
|
+
#if TARGET_OS_IPHONE && defined(REACT_NATIVE_DEBUGGER_ENABLED)
|
|
84
|
+
,
|
|
85
|
+
tracingDelegate_(host)
|
|
86
|
+
#endif
|
|
46
87
|
{
|
|
47
88
|
}
|
|
48
89
|
|
|
@@ -100,10 +141,84 @@ class RCTHostHostTargetDelegate : public facebook::react::jsinspector_modern::Ho
|
|
|
100
141
|
[networkHelper_ loadNetworkResourceWithParams:params executor:executor];
|
|
101
142
|
}
|
|
102
143
|
|
|
144
|
+
#if TARGET_OS_IPHONE && defined(REACT_NATIVE_DEBUGGER_ENABLED)
|
|
145
|
+
std::optional<std::string> captureScreenshot(const PageCaptureScreenshotRequest &request) override
|
|
146
|
+
{
|
|
147
|
+
UIWindow *keyWindow = nil;
|
|
148
|
+
for (UIScene *scene in UIApplication.sharedApplication.connectedScenes) {
|
|
149
|
+
if (scene.activationState == UISceneActivationStateForegroundActive &&
|
|
150
|
+
[scene isKindOfClass:[UIWindowScene class]]) {
|
|
151
|
+
auto *windowScene = (UIWindowScene *)scene;
|
|
152
|
+
for (UIWindow *win in windowScene.windows) {
|
|
153
|
+
if (win.isKeyWindow) {
|
|
154
|
+
keyWindow = win;
|
|
155
|
+
break;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
if (keyWindow != nil) {
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if (keyWindow == nil) {
|
|
165
|
+
return std::nullopt;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
UIView *rootView = keyWindow.rootViewController.view != nil ? keyWindow.rootViewController.view : keyWindow;
|
|
169
|
+
CGSize viewSize = rootView.bounds.size;
|
|
170
|
+
|
|
171
|
+
UIGraphicsImageRendererFormat *format = [UIGraphicsImageRendererFormat defaultFormat];
|
|
172
|
+
format.scale = 1.0;
|
|
173
|
+
UIGraphicsImageRenderer *renderer = [[UIGraphicsImageRenderer alloc] initWithSize:viewSize format:format];
|
|
174
|
+
|
|
175
|
+
UIImage *image = [renderer imageWithActions:^(UIGraphicsImageRendererContext *context) {
|
|
176
|
+
[rootView drawViewHierarchyInRect:CGRectMake(0, 0, viewSize.width, viewSize.height) afterScreenUpdates:NO];
|
|
177
|
+
}];
|
|
178
|
+
|
|
179
|
+
if (image == nil) {
|
|
180
|
+
return std::nullopt;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
NSData *encodedData = nil;
|
|
184
|
+
std::string formatStr = request.format.value_or("png");
|
|
185
|
+
|
|
186
|
+
if (formatStr == "jpeg") {
|
|
187
|
+
CGFloat quality = request.quality.has_value() ? (*request.quality / 100.0) : 0.8;
|
|
188
|
+
encodedData = UIImageJPEGRepresentation(image, quality);
|
|
189
|
+
} else {
|
|
190
|
+
// Default to PNG for "png" and "webp" (WebP encoding not available via UIKit)
|
|
191
|
+
encodedData = UIImagePNGRepresentation(image);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
if (encodedData == nil) {
|
|
195
|
+
return std::nullopt;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
NSString *base64String = [encodedData base64EncodedStringWithOptions:0];
|
|
199
|
+
return std::string([base64String UTF8String]);
|
|
200
|
+
}
|
|
201
|
+
#endif
|
|
202
|
+
|
|
203
|
+
#if TARGET_OS_IPHONE && defined(REACT_NATIVE_DEBUGGER_ENABLED)
|
|
204
|
+
jsinspector_modern::HostTargetTracingDelegate *getTracingDelegate() override
|
|
205
|
+
{
|
|
206
|
+
auto &inspectorFlags = jsinspector_modern::InspectorFlags::getInstance();
|
|
207
|
+
if (!inspectorFlags.getFrameRecordingEnabled()) {
|
|
208
|
+
return nullptr;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
return &tracingDelegate_;
|
|
212
|
+
}
|
|
213
|
+
#endif
|
|
214
|
+
|
|
103
215
|
private:
|
|
104
216
|
__weak RCTHost *host_;
|
|
105
217
|
RCTPausedInDebuggerOverlayController *pauseOverlayController_;
|
|
106
218
|
RCTInspectorNetworkHelper *networkHelper_;
|
|
219
|
+
#if TARGET_OS_IPHONE && defined(REACT_NATIVE_DEBUGGER_ENABLED)
|
|
220
|
+
RCTHostTracingDelegate tracingDelegate_;
|
|
221
|
+
#endif
|
|
107
222
|
};
|
|
108
223
|
|
|
109
224
|
@implementation RCTHost {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
#include <string>
|
|
11
11
|
#include <string_view>
|
|
12
12
|
|
|
13
|
-
namespace facebook::react
|
|
13
|
+
namespace facebook::react {
|
|
14
14
|
|
|
15
15
|
namespace {
|
|
16
16
|
// Vendored from Folly
|
|
@@ -96,4 +96,4 @@ inline std::string base64Encode(const std::string_view s)
|
|
|
96
96
|
return res;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
} // namespace facebook::react
|
|
99
|
+
} // namespace facebook::react
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.85.
|
|
3
|
+
"version": "0.85.3",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
"featureflags": "node ./scripts/featureflags/index.js"
|
|
150
150
|
},
|
|
151
151
|
"peerDependencies": {
|
|
152
|
-
"@react-native/jest-preset": "0.85.
|
|
152
|
+
"@react-native/jest-preset": "0.85.3",
|
|
153
153
|
"@types/react": "^19.1.1",
|
|
154
154
|
"react": "^19.2.3"
|
|
155
155
|
},
|
|
@@ -162,13 +162,13 @@
|
|
|
162
162
|
}
|
|
163
163
|
},
|
|
164
164
|
"dependencies": {
|
|
165
|
-
"@react-native/assets-registry": "0.85.
|
|
166
|
-
"@react-native/codegen": "0.85.
|
|
167
|
-
"@react-native/community-cli-plugin": "0.85.
|
|
168
|
-
"@react-native/gradle-plugin": "0.85.
|
|
169
|
-
"@react-native/js-polyfills": "0.85.
|
|
170
|
-
"@react-native/normalize-colors": "0.85.
|
|
171
|
-
"@react-native/virtualized-lists": "0.85.
|
|
165
|
+
"@react-native/assets-registry": "0.85.3",
|
|
166
|
+
"@react-native/codegen": "0.85.3",
|
|
167
|
+
"@react-native/community-cli-plugin": "0.85.3",
|
|
168
|
+
"@react-native/gradle-plugin": "0.85.3",
|
|
169
|
+
"@react-native/js-polyfills": "0.85.3",
|
|
170
|
+
"@react-native/normalize-colors": "0.85.3",
|
|
171
|
+
"@react-native/virtualized-lists": "0.85.3",
|
|
172
172
|
"abort-controller": "^3.0.0",
|
|
173
173
|
"anser": "^1.4.9",
|
|
174
174
|
"ansi-regex": "^5.0.0",
|
|
@@ -179,8 +179,8 @@
|
|
|
179
179
|
"hermes-compiler": "250829098.0.10",
|
|
180
180
|
"invariant": "^2.2.4",
|
|
181
181
|
"memoize-one": "^5.0.0",
|
|
182
|
-
"metro-runtime": "^0.84.
|
|
183
|
-
"metro-source-map": "^0.84.
|
|
182
|
+
"metro-runtime": "^0.84.3",
|
|
183
|
+
"metro-source-map": "^0.84.3",
|
|
184
184
|
"nullthrows": "^1.1.1",
|
|
185
185
|
"pretty-format": "^29.7.0",
|
|
186
186
|
"promise": "^8.3.0",
|
|
@@ -61,6 +61,7 @@ class ReactNativePodsUtils
|
|
|
61
61
|
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED=1", "React-jsinspectornetwork", :debug)
|
|
62
62
|
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED=1", "React-RCTNetwork", :debug)
|
|
63
63
|
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED=1", "React-networking", :debug)
|
|
64
|
+
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED=1", "React-RuntimeApple", :debug)
|
|
64
65
|
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY=1", "React-jsinspector", :debug)
|
|
65
66
|
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY=1", "React-jsinspectornetwork", :debug)
|
|
66
67
|
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY=1", "React-RCTNetwork", :debug)
|
|
@@ -157,6 +157,7 @@ def use_react_native! (
|
|
|
157
157
|
pod 'React-microtasksnativemodule', :path => "#{prefix}/ReactCommon/react/nativemodule/microtasks"
|
|
158
158
|
pod 'React-idlecallbacksnativemodule', :path => "#{prefix}/ReactCommon/react/nativemodule/idlecallbacks"
|
|
159
159
|
pod 'React-intersectionobservernativemodule', :path => "#{prefix}/ReactCommon/react/nativemodule/intersectionobserver"
|
|
160
|
+
pod 'React-mutationobservernativemodule', :path => "#{prefix}/ReactCommon/react/nativemodule/mutationobserver"
|
|
160
161
|
pod 'React-webperformancenativemodule', :path => "#{prefix}/ReactCommon/react/nativemodule/webperformance"
|
|
161
162
|
pod 'React-domnativemodule', :path => "#{prefix}/ReactCommon/react/nativemodule/dom"
|
|
162
163
|
pod 'React-defaultsnativemodule', :path => "#{prefix}/ReactCommon/react/nativemodule/defaults"
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
|
|
13
13
|
const {spawnSync} = require('child_process');
|
|
14
14
|
const fs = require('fs');
|
|
15
|
+
const os = require('os');
|
|
16
|
+
const path = require('path');
|
|
15
17
|
const yargs = require('yargs');
|
|
16
18
|
|
|
17
19
|
const LAST_BUILD_FILENAME = 'React-Core-prebuilt/.last_build_configuration';
|
|
@@ -63,22 +65,77 @@ function replaceRNCoreConfiguration(
|
|
|
63
65
|
|
|
64
66
|
const finalLocation = 'React-Core-prebuilt';
|
|
65
67
|
|
|
66
|
-
//
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
68
|
+
// Extract to a temporary directory on a regular filesystem first, then move
|
|
69
|
+
// into the final location. This avoids issues with partial tar extraction on
|
|
70
|
+
// certain filesystems (e.g. EdenFS) where extracting directly can silently
|
|
71
|
+
// produce incomplete results.
|
|
72
|
+
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'rncore-'));
|
|
73
|
+
const tmpExtractDir = path.join(tmpDir, 'React-Core-prebuilt');
|
|
74
|
+
fs.mkdirSync(tmpExtractDir, {recursive: true});
|
|
75
|
+
|
|
76
|
+
try {
|
|
77
|
+
console.log('Extracting the tarball to temp dir', tarballURLPath);
|
|
78
|
+
const result = spawnSync(
|
|
79
|
+
'tar',
|
|
80
|
+
['-xf', tarballURLPath, '-C', tmpExtractDir],
|
|
81
|
+
{
|
|
82
|
+
stdio: 'inherit',
|
|
83
|
+
},
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
if (result.status !== 0) {
|
|
87
|
+
throw new Error(`tar extraction failed with exit code ${result.status}`);
|
|
88
|
+
}
|
|
77
89
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
90
|
+
// Verify extraction produced the expected xcframework structure
|
|
91
|
+
const xcfwPath = path.join(tmpExtractDir, 'React.xcframework');
|
|
92
|
+
const modulemapPath = path.join(xcfwPath, 'Modules', 'module.modulemap');
|
|
93
|
+
if (!fs.existsSync(modulemapPath)) {
|
|
94
|
+
throw new Error(
|
|
95
|
+
`Extraction verification failed: ${modulemapPath} not found`,
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Delete all directories in finalLocation - not files, since we want to
|
|
100
|
+
// keep the React-VFS.yaml file
|
|
101
|
+
const dirs = fs
|
|
102
|
+
.readdirSync(finalLocation, {withFileTypes: true})
|
|
103
|
+
.filter(dirent => dirent.isDirectory());
|
|
104
|
+
for (const dirent of dirs) {
|
|
105
|
+
const direntName =
|
|
106
|
+
typeof dirent.name === 'string' ? dirent.name : dirent.name.toString();
|
|
107
|
+
const dirPath = `${finalLocation}/${direntName}`;
|
|
108
|
+
console.log('Removing directory', dirPath);
|
|
109
|
+
fs.rmSync(dirPath, {force: true, recursive: true});
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Move extracted directories from temp to final location
|
|
113
|
+
const extractedEntries = fs
|
|
114
|
+
.readdirSync(tmpExtractDir, {withFileTypes: true})
|
|
115
|
+
.filter(dirent => dirent.isDirectory());
|
|
116
|
+
for (const dirent of extractedEntries) {
|
|
117
|
+
const direntName =
|
|
118
|
+
typeof dirent.name === 'string' ? dirent.name : dirent.name.toString();
|
|
119
|
+
const src = path.join(tmpExtractDir, direntName);
|
|
120
|
+
const dst = path.join(finalLocation, direntName);
|
|
121
|
+
const mvResult = spawnSync('mv', [src, dst], {stdio: 'inherit'});
|
|
122
|
+
if (mvResult.status !== 0) {
|
|
123
|
+
// Fallback: copy recursively then remove source
|
|
124
|
+
console.log(`mv failed for ${direntName}, falling back to cp -R`);
|
|
125
|
+
const cpResult = spawnSync('cp', ['-R', src, dst], {
|
|
126
|
+
stdio: 'inherit',
|
|
127
|
+
});
|
|
128
|
+
if (cpResult.status !== 0) {
|
|
129
|
+
throw new Error(
|
|
130
|
+
`cp fallback failed with exit code ${cpResult.status}`,
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
} finally {
|
|
136
|
+
// Clean up temp directory
|
|
137
|
+
fs.rmSync(tmpDir, {force: true, recursive: true});
|
|
138
|
+
}
|
|
82
139
|
}
|
|
83
140
|
|
|
84
141
|
function updateLastBuildConfiguration(configuration /*: string */) {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<93e1a6807e31f037c28f28b0cd24cf17>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
* @noformat
|
|
10
10
|
*/
|
|
@@ -89,6 +89,7 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
89
89
|
enableLayoutAnimationsOnIOS: Getter<boolean>,
|
|
90
90
|
enableMainQueueCoordinatorOnIOS: Getter<boolean>,
|
|
91
91
|
enableModuleArgumentNSNullConversionIOS: Getter<boolean>,
|
|
92
|
+
enableMutationObserverByDefault: Getter<boolean>,
|
|
92
93
|
enableNativeCSSParsing: Getter<boolean>,
|
|
93
94
|
enableNetworkEventReporting: Getter<boolean>,
|
|
94
95
|
enablePreparedTextLayout: Getter<boolean>,
|
|
@@ -107,13 +108,17 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
107
108
|
fixTextClippingAndroid15useBoundsForWidth: Getter<boolean>,
|
|
108
109
|
fuseboxAssertSingleHostState: Getter<boolean>,
|
|
109
110
|
fuseboxEnabledRelease: Getter<boolean>,
|
|
111
|
+
fuseboxFrameRecordingEnabled: Getter<boolean>,
|
|
110
112
|
fuseboxNetworkInspectionEnabled: Getter<boolean>,
|
|
113
|
+
fuseboxScreenshotCaptureEnabled: Getter<boolean>,
|
|
111
114
|
hideOffscreenVirtualViewsOnIOS: Getter<boolean>,
|
|
112
115
|
overrideBySynchronousMountPropsAtMountingAndroid: Getter<boolean>,
|
|
113
116
|
perfIssuesEnabled: Getter<boolean>,
|
|
114
117
|
perfMonitorV2Enabled: Getter<boolean>,
|
|
115
118
|
preparedTextCacheSize: Getter<number>,
|
|
116
119
|
preventShadowTreeCommitExhaustion: Getter<boolean>,
|
|
120
|
+
redBoxV2Android: Getter<boolean>,
|
|
121
|
+
redBoxV2IOS: Getter<boolean>,
|
|
117
122
|
shouldPressibilityUseW3CPointerEventsForHover: Getter<boolean>,
|
|
118
123
|
shouldTriggerResponderTransferOnScrollAndroid: Getter<boolean>,
|
|
119
124
|
skipActivityIdentityAssertionOnHostPause: Getter<boolean>,
|
|
@@ -368,6 +373,10 @@ export const enableMainQueueCoordinatorOnIOS: Getter<boolean> = createNativeFlag
|
|
|
368
373
|
* Enable NSNull conversion when handling module arguments on iOS
|
|
369
374
|
*/
|
|
370
375
|
export const enableModuleArgumentNSNullConversionIOS: Getter<boolean> = createNativeFlagGetter('enableModuleArgumentNSNullConversionIOS', false);
|
|
376
|
+
/**
|
|
377
|
+
* Enables the MutationObserver Web API in React Native.
|
|
378
|
+
*/
|
|
379
|
+
export const enableMutationObserverByDefault: Getter<boolean> = createNativeFlagGetter('enableMutationObserverByDefault', false);
|
|
371
380
|
/**
|
|
372
381
|
* Parse CSS strings using the Fabric CSS parser instead of ViewConfig processing
|
|
373
382
|
*/
|
|
@@ -440,10 +449,18 @@ export const fuseboxAssertSingleHostState: Getter<boolean> = createNativeFlagGet
|
|
|
440
449
|
* Flag determining if the React Native DevTools (Fusebox) CDP backend should be enabled in release builds. This flag is global and should not be changed across React Host lifetimes.
|
|
441
450
|
*/
|
|
442
451
|
export const fuseboxEnabledRelease: Getter<boolean> = createNativeFlagGetter('fuseboxEnabledRelease', false);
|
|
452
|
+
/**
|
|
453
|
+
* Enable frame timings and screenshots support in the React Native DevTools CDP backend. This flag is global and should not be changed across React Host lifetimes.
|
|
454
|
+
*/
|
|
455
|
+
export const fuseboxFrameRecordingEnabled: Getter<boolean> = createNativeFlagGetter('fuseboxFrameRecordingEnabled', false);
|
|
443
456
|
/**
|
|
444
457
|
* Enable network inspection support in the React Native DevTools CDP backend. Requires `enableBridgelessArchitecture`. This flag is global and should not be changed across React Host lifetimes.
|
|
445
458
|
*/
|
|
446
459
|
export const fuseboxNetworkInspectionEnabled: Getter<boolean> = createNativeFlagGetter('fuseboxNetworkInspectionEnabled', true);
|
|
460
|
+
/**
|
|
461
|
+
* Enable Page.captureScreenshot CDP method support in the React Native DevTools CDP backend. This flag is global and should not be changed across React Host lifetimes.
|
|
462
|
+
*/
|
|
463
|
+
export const fuseboxScreenshotCaptureEnabled: Getter<boolean> = createNativeFlagGetter('fuseboxScreenshotCaptureEnabled', false);
|
|
447
464
|
/**
|
|
448
465
|
* Hides offscreen VirtualViews on iOS by setting hidden = YES to avoid extra cost of views
|
|
449
466
|
*/
|
|
@@ -468,6 +485,14 @@ export const preparedTextCacheSize: Getter<number> = createNativeFlagGetter('pre
|
|
|
468
485
|
* Enables a new mechanism in ShadowTree to prevent problems caused by multiple threads trying to commit concurrently. If a thread tries to commit a few times unsuccessfully, it will acquire a lock and try again.
|
|
469
486
|
*/
|
|
470
487
|
export const preventShadowTreeCommitExhaustion: Getter<boolean> = createNativeFlagGetter('preventShadowTreeCommitExhaustion', false);
|
|
488
|
+
/**
|
|
489
|
+
* Use the redesigned RedBox error overlay on Android, styled to match the LogBox visual language.
|
|
490
|
+
*/
|
|
491
|
+
export const redBoxV2Android: Getter<boolean> = createNativeFlagGetter('redBoxV2Android', false);
|
|
492
|
+
/**
|
|
493
|
+
* Use the redesigned RedBox error overlay on iOS, styled to match the LogBox visual language.
|
|
494
|
+
*/
|
|
495
|
+
export const redBoxV2IOS: Getter<boolean> = createNativeFlagGetter('redBoxV2IOS', false);
|
|
471
496
|
/**
|
|
472
497
|
* Function used to enable / disable Pressibility from using W3C Pointer Events for its hover callbacks
|
|
473
498
|
*/
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<ae363bbd49937178318598ddd93fa421>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
* @noformat
|
|
10
10
|
*/
|
|
@@ -66,6 +66,7 @@ export interface Spec extends TurboModule {
|
|
|
66
66
|
+enableLayoutAnimationsOnIOS?: () => boolean;
|
|
67
67
|
+enableMainQueueCoordinatorOnIOS?: () => boolean;
|
|
68
68
|
+enableModuleArgumentNSNullConversionIOS?: () => boolean;
|
|
69
|
+
+enableMutationObserverByDefault?: () => boolean;
|
|
69
70
|
+enableNativeCSSParsing?: () => boolean;
|
|
70
71
|
+enableNetworkEventReporting?: () => boolean;
|
|
71
72
|
+enablePreparedTextLayout?: () => boolean;
|
|
@@ -84,13 +85,17 @@ export interface Spec extends TurboModule {
|
|
|
84
85
|
+fixTextClippingAndroid15useBoundsForWidth?: () => boolean;
|
|
85
86
|
+fuseboxAssertSingleHostState?: () => boolean;
|
|
86
87
|
+fuseboxEnabledRelease?: () => boolean;
|
|
88
|
+
+fuseboxFrameRecordingEnabled?: () => boolean;
|
|
87
89
|
+fuseboxNetworkInspectionEnabled?: () => boolean;
|
|
90
|
+
+fuseboxScreenshotCaptureEnabled?: () => boolean;
|
|
88
91
|
+hideOffscreenVirtualViewsOnIOS?: () => boolean;
|
|
89
92
|
+overrideBySynchronousMountPropsAtMountingAndroid?: () => boolean;
|
|
90
93
|
+perfIssuesEnabled?: () => boolean;
|
|
91
94
|
+perfMonitorV2Enabled?: () => boolean;
|
|
92
95
|
+preparedTextCacheSize?: () => number;
|
|
93
96
|
+preventShadowTreeCommitExhaustion?: () => boolean;
|
|
97
|
+
+redBoxV2Android?: () => boolean;
|
|
98
|
+
+redBoxV2IOS?: () => boolean;
|
|
94
99
|
+shouldPressibilityUseW3CPointerEventsForHover?: () => boolean;
|
|
95
100
|
+shouldTriggerResponderTransferOnScrollAndroid?: () => boolean;
|
|
96
101
|
+skipActivityIdentityAssertionOnHostPause?: () => boolean;
|
|
@@ -47,4 +47,10 @@ export default function setUpDefaltReactNativeEnvironment(
|
|
|
47
47
|
) {
|
|
48
48
|
require('./setUpIntersectionObserver').default();
|
|
49
49
|
}
|
|
50
|
+
|
|
51
|
+
if (
|
|
52
|
+
require('../../../src/private/featureflags/ReactNativeFeatureFlags').enableMutationObserverByDefault()
|
|
53
|
+
) {
|
|
54
|
+
require('./setUpMutationObserver').default();
|
|
55
|
+
}
|
|
50
56
|
}
|