react-native 0.83.9 → 0.83.10
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/ActionSheetIOS/React-RCTActionSheet.podspec +1 -1
- package/Libraries/Animated/components/AnimatedScrollView.js +1 -1
- package/Libraries/AppDelegate/React-RCTAppDelegate.podspec +1 -1
- package/Libraries/Blob/React-RCTBlob.podspec +1 -1
- package/Libraries/Components/Button.js +2 -2
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +1 -1
- package/Libraries/Components/TextInput/TextInput.flow.js +1 -1
- package/Libraries/Components/Touchable/Touchable.d.ts +1 -1
- package/Libraries/Components/View/ViewAccessibility.d.ts +1 -1
- package/Libraries/Components/View/ViewAccessibility.js +1 -1
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/Timers/JSTimers.js +1 -1
- package/Libraries/Core/setUpNavigator.js +1 -1
- package/Libraries/EventEmitter/RCTNativeAppEventEmitter.d.ts +1 -1
- package/Libraries/FBLazyVector/FBLazyVector.podspec +1 -1
- package/Libraries/Image/ImageSource.d.ts +1 -1
- package/Libraries/Image/RCTImageLoader.mm +1 -1
- package/Libraries/Image/React-RCTImage.podspec +1 -1
- package/Libraries/Interaction/PanResponder.js +1 -1
- package/Libraries/LinkingIOS/React-RCTLinking.podspec +1 -1
- package/Libraries/NativeAnimation/React-RCTAnimation.podspec +1 -1
- package/Libraries/Network/React-RCTNetwork.podspec +1 -1
- package/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +1 -1
- package/Libraries/Renderer/README.md +2 -2
- package/Libraries/Required/RCTRequired.podspec +1 -1
- package/Libraries/Settings/React-RCTSettings.podspec +1 -1
- package/Libraries/Text/React-RCTText.podspec +1 -1
- package/Libraries/TypeSafety/RCTTypeSafety.podspec +1 -1
- package/Libraries/Utilities/PolyfillFunctions.js +1 -1
- package/Libraries/Vibration/React-RCTVibration.podspec +1 -1
- package/README.md +6 -6
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/React-CoreModules.podspec +1 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +1 -1
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +1 -1
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +34 -5
- package/React/React-RCTFBReactNativeSpec.podspec +1 -1
- package/React/React-RCTFabric.podspec +1 -1
- package/React/Runtime/React-RCTRuntime.podspec +1 -1
- package/React/Tests/Mounting/RCTViewComponentViewTests.mm +145 -0
- package/React/Views/ScrollView/RCTScrollView.m +1 -1
- package/React-Core.podspec +1 -1
- package/React.podspec +1 -1
- package/ReactAndroid/build.gradle.kts +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/publish.gradle +5 -5
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/CxxInspectorPackagerConnection.kt +99 -9
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/inspector/InspectorNetworkHelper.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/core/JavaTimerManager.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/intent/IntentModule.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.kt +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactInstance.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextSelectionWatcher.kt +1 -1
- package/ReactAndroid/src/main/jni/react/devsupport/JCxxInspectorPackagerConnectionWebSocket.cpp +29 -2
- package/ReactApple/Libraries/RCTFoundation/RCTDeprecation/RCTDeprecation.podspec +1 -1
- package/ReactApple/RCTSwiftUI/RCTSwiftUI.podspec +1 -1
- package/ReactApple/RCTSwiftUIWrapper/RCTSwiftUIWrapper.podspec +1 -1
- package/ReactCommon/React-Fabric.podspec +1 -1
- package/ReactCommon/React-FabricComponents.podspec +1 -1
- package/ReactCommon/React-FabricImage.podspec +1 -1
- package/ReactCommon/React-Mapbuffer.podspec +1 -1
- package/ReactCommon/ReactCommon.podspec +1 -1
- package/ReactCommon/callinvoker/React-callinvoker.podspec +1 -1
- package/ReactCommon/cxxreact/React-cxxreact.podspec +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
- package/ReactCommon/hermes/React-hermes.podspec +1 -1
- package/ReactCommon/hermes/executor/React-jsitracing.podspec +1 -1
- package/ReactCommon/jserrorhandler/React-jserrorhandler.podspec +1 -1
- package/ReactCommon/jsi/React-jsi.podspec +1 -1
- package/ReactCommon/jsiexecutor/React-jsiexecutor.podspec +1 -1
- package/ReactCommon/jsinspector-modern/InspectorInterfaces.cpp +7 -3
- package/ReactCommon/jsinspector-modern/React-jsinspector.podspec +1 -1
- package/ReactCommon/jsinspector-modern/TracingAgent.cpp +1 -5
- package/ReactCommon/jsinspector-modern/cdp/React-jsinspectorcdp.podspec +1 -1
- package/ReactCommon/jsinspector-modern/network/React-jsinspectornetwork.podspec +1 -1
- package/ReactCommon/jsinspector-modern/tracing/React-jsinspectortracing.podspec +1 -1
- package/ReactCommon/jsitooling/React-jsitooling.podspec +1 -1
- package/ReactCommon/logger/React-logger.podspec +1 -1
- package/ReactCommon/oscompat/React-oscompat.podspec +1 -1
- package/ReactCommon/react/debug/React-debug.podspec +1 -1
- package/ReactCommon/react/debug/redbox/JscSafeUrl.h +1 -1
- package/ReactCommon/react/featureflags/React-featureflags.podspec +1 -1
- package/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp +1 -1
- package/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec +1 -1
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTInteropTurboModule.mm +1 -1
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm +1 -1
- package/ReactCommon/react/nativemodule/defaults/React-defaultsnativemodule.podspec +1 -1
- package/ReactCommon/react/nativemodule/dom/React-domnativemodule.podspec +1 -1
- package/ReactCommon/react/nativemodule/featureflags/React-featureflagsnativemodule.podspec +1 -1
- package/ReactCommon/react/nativemodule/idlecallbacks/React-idlecallbacksnativemodule.podspec +1 -1
- package/ReactCommon/react/nativemodule/intersectionobserver/React-intersectionobservernativemodule.podspec +1 -1
- package/ReactCommon/react/nativemodule/microtasks/React-microtasksnativemodule.podspec +1 -1
- package/ReactCommon/react/nativemodule/mutationobserver/React-mutationobservernativemodule.podspec +1 -1
- package/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec +1 -1
- package/ReactCommon/react/nativemodule/webperformance/React-webperformancenativemodule.podspec +1 -1
- package/ReactCommon/react/networking/React-networking.podspec +1 -1
- package/ReactCommon/react/performance/cdpmetrics/React-performancecdpmetrics.podspec +1 -1
- package/ReactCommon/react/performance/timeline/React-performancetimeline.podspec +1 -1
- package/ReactCommon/react/renderer/animated/internal/primitives.h +1 -1
- package/ReactCommon/react/renderer/consistency/React-rendererconsistency.podspec +1 -1
- package/ReactCommon/react/renderer/css/React-renderercss.podspec +1 -1
- package/ReactCommon/react/renderer/debug/React-rendererdebug.podspec +1 -1
- package/ReactCommon/react/renderer/graphics/React-graphics.podspec +1 -1
- package/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec +1 -1
- package/ReactCommon/react/renderer/mounting/internal/CullingContext.cpp +1 -1
- package/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec +1 -1
- package/ReactCommon/react/runtime/React-RuntimeCore.podspec +1 -1
- package/ReactCommon/react/runtime/React-RuntimeHermes.podspec +1 -1
- package/ReactCommon/react/runtime/platform/ios/React-RuntimeApple.podspec +1 -1
- package/ReactCommon/react/timing/React-timing.podspec +1 -1
- package/ReactCommon/react/utils/React-utils.podspec +1 -1
- package/ReactCommon/reactperflogger/React-perflogger.podspec +1 -1
- package/ReactCommon/runtimeexecutor/React-runtimeexecutor.podspec +1 -1
- package/ReactCommon/yoga/Yoga.podspec +2 -2
- package/ReactCommon/yoga/yoga/algorithm/AbsoluteLayout.cpp +2 -0
- package/ReactCommon/yoga/yoga/algorithm/CalculateLayout.cpp +11 -7
- package/ReactCommon/yoga/yoga/algorithm/CalculateLayout.h +2 -0
- package/ReactCommon/yoga/yoga/node/Node.cpp +6 -1
- package/package.json +10 -10
- package/scripts/cocoapods/rncore.rb +26 -8
- package/scripts/cocoapods/rndependencies.rb +26 -5
- package/scripts/cocoapods/spm.rb +1 -1
- package/scripts/cocoapods/utils.rb +2 -2
- package/scripts/codegen/templates/ReactAppDependencyProvider.podspec.template +1 -1
- package/scripts/codegen/templates/ReactCodegen.podspec.template +1 -1
- package/scripts/ios-configure-glog.sh +1 -1
- package/sdks/hermes-engine/hermes-engine.podspec +6 -1
- package/sdks/hermes-engine/hermes-utils.rb +27 -5
- package/src/private/types/HostInstance.js +1 -1
- package/src/types/globals.d.ts +2 -2
- package/third-party-podspecs/RCT-Folly.podspec +1 -1
- package/third-party-podspecs/ReactNativeDependencies.podspec +1 -1
- package/third-party-podspecs/glog.podspec +1 -1
- package/types/public/ReactNativeTypes.d.ts +2 -2
- package/types_generated/Libraries/Animated/components/AnimatedScrollView.d.ts +2 -2
- package/types_generated/Libraries/Components/Button.d.ts +3 -3
- package/types_generated/Libraries/Components/TextInput/TextInput.flow.d.ts +2 -2
- package/types_generated/Libraries/Components/View/ViewAccessibility.d.ts +4 -4
- package/types_generated/Libraries/Interaction/PanResponder.d.ts +2 -2
- package/types_generated/src/private/types/HostInstance.d.ts +2 -2
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#import <React/RCTViewComponentView.h>
|
|
9
|
+
#import <XCTest/XCTest.h>
|
|
10
|
+
#import <react/renderer/components/view/ViewProps.h>
|
|
11
|
+
#import <react/renderer/components/view/ViewShadowNode.h>
|
|
12
|
+
|
|
13
|
+
using namespace facebook::react;
|
|
14
|
+
|
|
15
|
+
static Props::Shared makeViewProps(bool removeClippedSubviews)
|
|
16
|
+
{
|
|
17
|
+
auto props = std::make_shared<ViewProps>();
|
|
18
|
+
props->removeClippedSubviews = removeClippedSubviews;
|
|
19
|
+
return props;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@interface RCTViewComponentViewTests : XCTestCase
|
|
23
|
+
@end
|
|
24
|
+
|
|
25
|
+
@implementation RCTViewComponentViewTests
|
|
26
|
+
|
|
27
|
+
#pragma mark - removeClippedSubviews toggle
|
|
28
|
+
|
|
29
|
+
- (void)testToggleRemoveClippedSubviewsOffRemountsClippedChildren
|
|
30
|
+
{
|
|
31
|
+
RCTViewComponentView *parent = [RCTViewComponentView new];
|
|
32
|
+
UIView *child1 = [UIView new];
|
|
33
|
+
child1.frame = CGRectMake(0, 0, 50, 50);
|
|
34
|
+
UIView *child2 = [UIView new];
|
|
35
|
+
child2.frame = CGRectMake(0, 200, 50, 50);
|
|
36
|
+
UIView *child3 = [UIView new];
|
|
37
|
+
child3.frame = CGRectMake(0, 400, 50, 50);
|
|
38
|
+
|
|
39
|
+
// Mount children normally
|
|
40
|
+
[parent mountChildComponentView:(id)child1 index:0];
|
|
41
|
+
[parent mountChildComponentView:(id)child2 index:1];
|
|
42
|
+
[parent mountChildComponentView:(id)child3 index:2];
|
|
43
|
+
|
|
44
|
+
XCTAssertEqual(parent.subviews.count, 3u);
|
|
45
|
+
|
|
46
|
+
// Toggle removeClippedSubviews ON via props
|
|
47
|
+
auto propsOn = makeViewProps(true);
|
|
48
|
+
[parent updateProps:propsOn oldProps:ViewShadowNode::defaultSharedProps()];
|
|
49
|
+
|
|
50
|
+
// Simulate clipping: remove child2 and child3 from superview (as updateClippedSubviewsWithClipRect would)
|
|
51
|
+
[child2 removeFromSuperview];
|
|
52
|
+
[child3 removeFromSuperview];
|
|
53
|
+
XCTAssertEqual(parent.subviews.count, 1u);
|
|
54
|
+
XCTAssertNil(child2.superview);
|
|
55
|
+
XCTAssertNil(child3.superview);
|
|
56
|
+
|
|
57
|
+
// Toggle removeClippedSubviews OFF via props
|
|
58
|
+
auto propsOff = makeViewProps(false);
|
|
59
|
+
[parent updateProps:propsOff oldProps:propsOn];
|
|
60
|
+
|
|
61
|
+
// All children should be re-mounted
|
|
62
|
+
XCTAssertEqual(parent.subviews.count, 3u);
|
|
63
|
+
XCTAssertEqual(child1.superview, parent);
|
|
64
|
+
XCTAssertEqual(child2.superview, parent);
|
|
65
|
+
XCTAssertEqual(child3.superview, parent);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
- (void)testToggleRemoveClippedSubviewsOffPreservesOrder
|
|
69
|
+
{
|
|
70
|
+
RCTViewComponentView *parent = [RCTViewComponentView new];
|
|
71
|
+
UIView *child1 = [UIView new];
|
|
72
|
+
child1.frame = CGRectMake(0, 0, 50, 50);
|
|
73
|
+
UIView *child2 = [UIView new];
|
|
74
|
+
child2.frame = CGRectMake(0, 100, 50, 50);
|
|
75
|
+
UIView *child3 = [UIView new];
|
|
76
|
+
child3.frame = CGRectMake(0, 200, 50, 50);
|
|
77
|
+
|
|
78
|
+
[parent mountChildComponentView:(id)child1 index:0];
|
|
79
|
+
[parent mountChildComponentView:(id)child2 index:1];
|
|
80
|
+
[parent mountChildComponentView:(id)child3 index:2];
|
|
81
|
+
|
|
82
|
+
// Toggle ON and clip child1 (first child)
|
|
83
|
+
auto propsOn = makeViewProps(true);
|
|
84
|
+
[parent updateProps:propsOn oldProps:ViewShadowNode::defaultSharedProps()];
|
|
85
|
+
[child1 removeFromSuperview];
|
|
86
|
+
XCTAssertEqual(parent.subviews.count, 2u);
|
|
87
|
+
|
|
88
|
+
// Toggle OFF — all children re-mounted in correct order
|
|
89
|
+
auto propsOff = makeViewProps(false);
|
|
90
|
+
[parent updateProps:propsOff oldProps:propsOn];
|
|
91
|
+
|
|
92
|
+
XCTAssertEqual(parent.subviews.count, 3u);
|
|
93
|
+
XCTAssertEqual(parent.subviews[0], child1);
|
|
94
|
+
XCTAssertEqual(parent.subviews[1], child2);
|
|
95
|
+
XCTAssertEqual(parent.subviews[2], child3);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
- (void)testToggleRemoveClippedSubviewsOffClearsReactSubviews
|
|
99
|
+
{
|
|
100
|
+
RCTViewComponentView *parent = [RCTViewComponentView new];
|
|
101
|
+
UIView *child1 = [UIView new];
|
|
102
|
+
child1.frame = CGRectMake(0, 0, 50, 50);
|
|
103
|
+
|
|
104
|
+
[parent mountChildComponentView:(id)child1 index:0];
|
|
105
|
+
|
|
106
|
+
// Toggle ON
|
|
107
|
+
auto propsOn = makeViewProps(true);
|
|
108
|
+
[parent updateProps:propsOn oldProps:ViewShadowNode::defaultSharedProps()];
|
|
109
|
+
|
|
110
|
+
// Toggle OFF
|
|
111
|
+
auto propsOff = makeViewProps(false);
|
|
112
|
+
[parent updateProps:propsOff oldProps:propsOn];
|
|
113
|
+
|
|
114
|
+
// _reactSubviews should be cleared
|
|
115
|
+
NSMutableArray *reactSubviews = [parent valueForKey:@"_reactSubviews"];
|
|
116
|
+
XCTAssertEqual(reactSubviews.count, 0u);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
- (void)testUnmountAfterToggleOffCleansUpReactSubviews
|
|
120
|
+
{
|
|
121
|
+
RCTViewComponentView *parent = [RCTViewComponentView new];
|
|
122
|
+
UIView *child1 = [UIView new];
|
|
123
|
+
child1.frame = CGRectMake(0, 0, 50, 50);
|
|
124
|
+
UIView *child2 = [UIView new];
|
|
125
|
+
child2.frame = CGRectMake(0, 100, 50, 50);
|
|
126
|
+
|
|
127
|
+
// Toggle ON first, then mount children
|
|
128
|
+
auto propsOn = makeViewProps(true);
|
|
129
|
+
[parent updateProps:propsOn oldProps:ViewShadowNode::defaultSharedProps()];
|
|
130
|
+
[parent mountChildComponentView:(id)child1 index:0];
|
|
131
|
+
[parent mountChildComponentView:(id)child2 index:1];
|
|
132
|
+
|
|
133
|
+
// Toggle OFF — re-mounts children
|
|
134
|
+
auto propsOff = makeViewProps(false);
|
|
135
|
+
[parent updateProps:propsOff oldProps:propsOn];
|
|
136
|
+
|
|
137
|
+
XCTAssertEqual(parent.subviews.count, 2u);
|
|
138
|
+
|
|
139
|
+
// Unmount child2 — should succeed without assert failures
|
|
140
|
+
[parent unmountChildComponentView:(id)child2 index:1];
|
|
141
|
+
XCTAssertEqual(parent.subviews.count, 1u);
|
|
142
|
+
XCTAssertNil(child2.superview);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
@end
|
|
@@ -342,7 +342,7 @@ static inline UIViewAnimationOptions animationOptionsWithCurve(UIViewAnimationCu
|
|
|
342
342
|
if (@available(iOS 14.0, *)) {
|
|
343
343
|
// On iOS when Prefer Cross-Fade Transitions is enabled, the keyboard position
|
|
344
344
|
// & height is reported differently (0 instead of Y position value matching height of frame)
|
|
345
|
-
// Fixes similar issue we saw with https://github.com/
|
|
345
|
+
// Fixes similar issue we saw with https://github.com/react/react-native/pull/34503
|
|
346
346
|
if (UIAccessibilityPrefersCrossFadeTransitions() && endFrame.size.height == 0) {
|
|
347
347
|
newContentOffset.y = 0;
|
|
348
348
|
newEdgeInsets.bottom = 0;
|
package/React-Core.podspec
CHANGED
|
@@ -8,7 +8,7 @@ require "json"
|
|
|
8
8
|
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
9
9
|
version = package['version']
|
|
10
10
|
|
|
11
|
-
source = { :git => 'https://github.com/
|
|
11
|
+
source = { :git => 'https://github.com/react/react-native.git' }
|
|
12
12
|
if version == '1000.0.0'
|
|
13
13
|
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
|
|
14
14
|
source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
|
package/React.podspec
CHANGED
|
@@ -8,7 +8,7 @@ require "json"
|
|
|
8
8
|
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
9
9
|
version = package['version']
|
|
10
10
|
|
|
11
|
-
source = { :git => 'https://github.com/
|
|
11
|
+
source = { :git => 'https://github.com/react/react-native.git' }
|
|
12
12
|
if version == '1000.0.0'
|
|
13
13
|
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
|
|
14
14
|
source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
|
|
@@ -747,7 +747,7 @@ apply(from = "./publish.gradle")
|
|
|
747
747
|
// We need to override the artifact ID as this project is called `ReactAndroid` but
|
|
748
748
|
// the maven coordinates are on `react-android`.
|
|
749
749
|
// Please note that the original coordinates, `react-native`, have been voided
|
|
750
|
-
// as they caused https://github.com/
|
|
750
|
+
// as they caused https://github.com/react/react-native/issues/35210
|
|
751
751
|
publishing {
|
|
752
752
|
publications { getByName("release", MavenPublication::class) { artifactId = "react-android" } }
|
|
753
753
|
}
|
|
@@ -37,7 +37,7 @@ publishing {
|
|
|
37
37
|
pom {
|
|
38
38
|
name = "react-native"
|
|
39
39
|
description = "A framework for building native apps with React"
|
|
40
|
-
url = "https://github.com/
|
|
40
|
+
url = "https://github.com/react/react-native"
|
|
41
41
|
|
|
42
42
|
developers {
|
|
43
43
|
developer {
|
|
@@ -49,15 +49,15 @@ publishing {
|
|
|
49
49
|
licenses {
|
|
50
50
|
license {
|
|
51
51
|
name = "MIT License"
|
|
52
|
-
url = "https://github.com/
|
|
52
|
+
url = "https://github.com/react/react-native/blob/HEAD/LICENSE"
|
|
53
53
|
distribution = "repo"
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
scm {
|
|
58
|
-
url = "https://github.com/
|
|
59
|
-
connection = "scm:git:https://github.com/
|
|
60
|
-
developerConnection = "scm:git:git@github.com:
|
|
58
|
+
url = "https://github.com/react/react-native.git"
|
|
59
|
+
connection = "scm:git:https://github.com/react/react-native.git"
|
|
60
|
+
developerConnection = "scm:git:git@github.com:react/react-native.git"
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
}
|
package/ReactAndroid/src/main/java/com/facebook/react/devsupport/CxxInspectorPackagerConnection.kt
CHANGED
|
@@ -9,12 +9,18 @@ package com.facebook.react.devsupport
|
|
|
9
9
|
|
|
10
10
|
import android.os.Handler
|
|
11
11
|
import android.os.Looper
|
|
12
|
+
import com.facebook.common.logging.FLog
|
|
12
13
|
import com.facebook.jni.HybridData
|
|
13
14
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
14
15
|
import com.facebook.proguard.annotations.DoNotStripAny
|
|
16
|
+
import com.facebook.react.common.annotations.VisibleForTesting
|
|
15
17
|
import com.facebook.react.devsupport.inspector.DevSupportHttpClient
|
|
16
18
|
import com.facebook.soloader.SoLoader
|
|
17
19
|
import java.io.Closeable
|
|
20
|
+
import java.nio.ByteBuffer
|
|
21
|
+
import java.nio.charset.StandardCharsets
|
|
22
|
+
import java.util.ArrayDeque
|
|
23
|
+
import java.util.Queue
|
|
18
24
|
import okhttp3.Request
|
|
19
25
|
import okhttp3.Response
|
|
20
26
|
import okhttp3.WebSocket
|
|
@@ -66,7 +72,7 @@ internal class CxxInspectorPackagerConnection(
|
|
|
66
72
|
*/
|
|
67
73
|
@DoNotStripAny
|
|
68
74
|
private interface IWebSocket : Closeable {
|
|
69
|
-
fun send(
|
|
75
|
+
fun send(chunk: ByteBuffer)
|
|
70
76
|
|
|
71
77
|
/**
|
|
72
78
|
* Close the WebSocket connection. NOTE: There is no close() method in the C++ interface.
|
|
@@ -75,6 +81,95 @@ internal class CxxInspectorPackagerConnection(
|
|
|
75
81
|
override fun close()
|
|
76
82
|
}
|
|
77
83
|
|
|
84
|
+
/**
|
|
85
|
+
* A simple WebSocket wrapper that prevents having more than 16MiB of messages queued
|
|
86
|
+
* simultaneously. This is done to stop OkHttp from closing the WebSocket connection.
|
|
87
|
+
*
|
|
88
|
+
* https://github.com/react/react-native/issues/39651.
|
|
89
|
+
* https://github.com/square/okhttp/blob/4e7dbec1ea6c9cf8d80422ac9d44b9b185c749a3/okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/ws/RealWebSocket.kt#L684.
|
|
90
|
+
*/
|
|
91
|
+
private class InspectorPackagerWebSocketImpl(
|
|
92
|
+
private val nativeWebSocket: WebSocket,
|
|
93
|
+
private val handler: Handler,
|
|
94
|
+
) : IWebSocket {
|
|
95
|
+
private val messageQueue: Queue<Pair<String, Int>> = ArrayDeque()
|
|
96
|
+
private val queueLock = Any()
|
|
97
|
+
private val drainRunnable =
|
|
98
|
+
object : Runnable {
|
|
99
|
+
override fun run() {
|
|
100
|
+
FLog.d(TAG, "Attempting to drain the message queue after ${drainDelayMs}ms")
|
|
101
|
+
tryDrainQueue()
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* We are providing a String to OkHttp's WebSocket, because there is no guarantee that all CDP
|
|
107
|
+
* clients will support binary data format.
|
|
108
|
+
*/
|
|
109
|
+
override fun send(chunk: ByteBuffer) {
|
|
110
|
+
synchronized(queueLock) {
|
|
111
|
+
val messageSize = chunk.capacity()
|
|
112
|
+
val message = StandardCharsets.UTF_8.decode(chunk).toString()
|
|
113
|
+
val currentQueueSize = nativeWebSocket.queueSize()
|
|
114
|
+
|
|
115
|
+
if (currentQueueSize + messageSize > MAX_QUEUE_SIZE) {
|
|
116
|
+
FLog.d(TAG, "Reached queue size limit. Queueing the message.")
|
|
117
|
+
messageQueue.offer(Pair(message, messageSize))
|
|
118
|
+
scheduleDrain()
|
|
119
|
+
} else {
|
|
120
|
+
if (messageQueue.isEmpty()) {
|
|
121
|
+
nativeWebSocket.send(message)
|
|
122
|
+
} else {
|
|
123
|
+
messageQueue.offer(Pair(message, messageSize))
|
|
124
|
+
tryDrainQueue()
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
override fun close() {
|
|
131
|
+
synchronized(queueLock) {
|
|
132
|
+
handler.removeCallbacks(drainRunnable)
|
|
133
|
+
messageQueue.clear()
|
|
134
|
+
nativeWebSocket.close(1000, "End of session")
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
private fun tryDrainQueue() {
|
|
139
|
+
synchronized(queueLock) {
|
|
140
|
+
while (messageQueue.isNotEmpty()) {
|
|
141
|
+
val (nextMessage, nextMessageSize) = messageQueue.peek() ?: break
|
|
142
|
+
val currentQueueSize = nativeWebSocket.queueSize()
|
|
143
|
+
|
|
144
|
+
if (currentQueueSize + nextMessageSize <= MAX_QUEUE_SIZE) {
|
|
145
|
+
messageQueue.poll()
|
|
146
|
+
if (!nativeWebSocket.send(nextMessage)) {
|
|
147
|
+
// The WebSocket is closing, closed, or cancelled.
|
|
148
|
+
handler.removeCallbacks(drainRunnable)
|
|
149
|
+
messageQueue.clear()
|
|
150
|
+
|
|
151
|
+
break
|
|
152
|
+
}
|
|
153
|
+
} else {
|
|
154
|
+
scheduleDrain()
|
|
155
|
+
break
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
private fun scheduleDrain() {
|
|
162
|
+
FLog.d(TAG, "Scheduled a task to drain messages queue.")
|
|
163
|
+
handler.removeCallbacks(drainRunnable)
|
|
164
|
+
handler.postDelayed(drainRunnable, drainDelayMs)
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
companion object {
|
|
168
|
+
private val TAG: String = InspectorPackagerWebSocketImpl::class.java.simpleName
|
|
169
|
+
private const val drainDelayMs: Long = 100
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
78
173
|
/** Java implementation of the C++ InspectorPackagerConnectionDelegate interface. */
|
|
79
174
|
private class DelegateImpl {
|
|
80
175
|
private val httpClient = DevSupportHttpClient.websocketClient
|
|
@@ -124,15 +219,8 @@ internal class CxxInspectorPackagerConnection(
|
|
|
124
219
|
}
|
|
125
220
|
},
|
|
126
221
|
)
|
|
127
|
-
return object : IWebSocket {
|
|
128
|
-
override fun send(message: String) {
|
|
129
|
-
webSocket.send(message)
|
|
130
|
-
}
|
|
131
222
|
|
|
132
|
-
|
|
133
|
-
webSocket.close(1000, "End of session")
|
|
134
|
-
}
|
|
135
|
-
}
|
|
223
|
+
return InspectorPackagerWebSocketImpl(webSocket, handler)
|
|
136
224
|
}
|
|
137
225
|
|
|
138
226
|
@DoNotStrip
|
|
@@ -146,6 +234,8 @@ internal class CxxInspectorPackagerConnection(
|
|
|
146
234
|
SoLoader.loadLibrary("react_devsupportjni")
|
|
147
235
|
}
|
|
148
236
|
|
|
237
|
+
@VisibleForTesting internal const val MAX_QUEUE_SIZE = 16L * 1024 * 1024 // 16MiB
|
|
238
|
+
|
|
149
239
|
@JvmStatic
|
|
150
240
|
private external fun initHybrid(
|
|
151
241
|
url: String,
|
package/ReactAndroid/src/main/java/com/facebook/react/devsupport/inspector/InspectorNetworkHelper.kt
CHANGED
|
@@ -55,7 +55,7 @@ internal object InspectorNetworkHelper {
|
|
|
55
55
|
response.body().use { responseBody ->
|
|
56
56
|
if (responseBody != null) {
|
|
57
57
|
val inputStream = responseBody.byteStream()
|
|
58
|
-
val chunkSize = 1024
|
|
58
|
+
val chunkSize = 8 * 1024 // 8Kb
|
|
59
59
|
val buffer = ByteArray(chunkSize)
|
|
60
60
|
var bytesRead: Int
|
|
61
61
|
|
package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java
CHANGED
|
@@ -1190,8 +1190,8 @@ public class SurfaceMountingManager {
|
|
|
1190
1190
|
// If the view that went offscreen is still being touched, we can't delete it yet.
|
|
1191
1191
|
// We have to delay the deletion till the touch is completed.
|
|
1192
1192
|
// This is causing bugs like those otherwise:
|
|
1193
|
-
// - https://github.com/
|
|
1194
|
-
// - https://github.com/
|
|
1193
|
+
// - https://github.com/react/react-native/issues/44610
|
|
1194
|
+
// - https://github.com/react/react-native/issues/45126
|
|
1195
1195
|
mViewsToDeleteAfterTouchFinishes.add(reactTag);
|
|
1196
1196
|
} else {
|
|
1197
1197
|
// To delete we simply remove the tag from the registry.
|
|
@@ -326,7 +326,7 @@ public open class JavaTimerManager(
|
|
|
326
326
|
|
|
327
327
|
// If the JS thread is busy for multiple frames we cancel any other pending runnable.
|
|
328
328
|
// We also capture the idleCallbackRunnable to tentatively fix:
|
|
329
|
-
// https://github.com/
|
|
329
|
+
// https://github.com/react/react-native/issues/44842
|
|
330
330
|
currentIdleCallbackRunnable?.cancel()
|
|
331
331
|
currentIdleCallbackRunnable = IdleCallbackRunnable(frameTimeNanos)
|
|
332
332
|
reactApplicationContext.runOnJSQueueThread(currentIdleCallbackRunnable)
|
|
@@ -223,7 +223,7 @@ public open class IntentModule(reactContext: ReactApplicationContext) :
|
|
|
223
223
|
}
|
|
224
224
|
ReadableType.Number -> {
|
|
225
225
|
// We cannot know from JS if is an Integer or Double
|
|
226
|
-
// See: https://github.com/
|
|
226
|
+
// See: https://github.com/react/react-native/issues/4141
|
|
227
227
|
// We might need to find a workaround if this is really an issue
|
|
228
228
|
val number = map.getDouble(EXTRA_MAP_KEY_FOR_VALUE)
|
|
229
229
|
intent.putExtra(name, number)
|
|
@@ -165,7 +165,7 @@ public class NetworkingModule(
|
|
|
165
165
|
|
|
166
166
|
@Deprecated(
|
|
167
167
|
"""To be removed in a future release. See
|
|
168
|
-
https://github.com/
|
|
168
|
+
https://github.com/react/react-native/pull/37798#pullrequestreview-1518338914"""
|
|
169
169
|
)
|
|
170
170
|
public interface CustomClientBuilder : com.facebook.react.modules.network.CustomClientBuilder
|
|
171
171
|
|
|
@@ -479,7 +479,7 @@ public class NetworkingModule(
|
|
|
479
479
|
} else {
|
|
480
480
|
// Use getBytes() to convert the body into a byte[], preventing okhttp from
|
|
481
481
|
// appending the character set to the Content-Type header when otherwise unspecified
|
|
482
|
-
// https://github.com/
|
|
482
|
+
// https://github.com/react/react-native/issues/8237
|
|
483
483
|
val charset =
|
|
484
484
|
if (contentMediaType == null) {
|
|
485
485
|
StandardCharsets.UTF_8
|
|
@@ -636,7 +636,7 @@ public class NetworkingModule(
|
|
|
636
636
|
reactApplicationContext,
|
|
637
637
|
requestId,
|
|
638
638
|
devToolsRequestId,
|
|
639
|
-
url,
|
|
639
|
+
response.request().url().toString(),
|
|
640
640
|
response.code(),
|
|
641
641
|
NetworkEventUtil.okHttpHeadersToMap(response.headers()),
|
|
642
642
|
response.body()?.contentLength() ?: 0L,
|
|
@@ -563,7 +563,7 @@ internal class ReactInstance(
|
|
|
563
563
|
// We need to null check here because some Java implementation of the
|
|
564
564
|
// `ViewManagerOnDemandReactPackage` interface could still return null even
|
|
565
565
|
// if the method is marked as returning a non-nullable collection in Kotlin.
|
|
566
|
-
// See https://github.com/
|
|
566
|
+
// See https://github.com/react/react-native/issues/52014
|
|
567
567
|
@Suppress("SENSELESS_COMPARISON")
|
|
568
568
|
if (names == null) {
|
|
569
569
|
RNLog.w(
|
|
@@ -631,7 +631,7 @@ public abstract class BaseViewManager<T extends View, C extends LayoutShadowNode
|
|
|
631
631
|
// The native Android implementation removed the screen density from the
|
|
632
632
|
// calculation, so squaring and a normalization value of
|
|
633
633
|
// sqrt(5) produces an exact replica with iOS.
|
|
634
|
-
// For more information, see https://github.com/
|
|
634
|
+
// For more information, see https://github.com/react/react-native/pull/18302
|
|
635
635
|
float normalizedCameraDistance =
|
|
636
636
|
sanitizeFloatPropertyValue(
|
|
637
637
|
scale * scale * cameraDistance * CAMERA_DISTANCE_NORMALIZATION_MULTIPLIER);
|
package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.kt
CHANGED
|
@@ -425,7 +425,7 @@ constructor(private val fpsListener: FpsListener? = null) :
|
|
|
425
425
|
// be on the wrong side. Thus we are moving it to the other side, when the list
|
|
426
426
|
// is inverted.
|
|
427
427
|
// See also:
|
|
428
|
-
// - https://github.com/
|
|
428
|
+
// - https://github.com/react/react-native/issues/35350
|
|
429
429
|
// - https://issuetracker.google.com/issues/287304310
|
|
430
430
|
if (applyFix) {
|
|
431
431
|
view.verticalScrollbarPosition = View.SCROLLBAR_POSITION_LEFT
|
|
@@ -380,7 +380,7 @@ public class ReactTextView extends AppCompatTextView implements ReactCompoundVie
|
|
|
380
380
|
mContainsImages = update.containsImages();
|
|
381
381
|
// Android's TextView crashes when it tries to relayout if LayoutParams are
|
|
382
382
|
// null; explicitly set the LayoutParams to prevent this crash. See:
|
|
383
|
-
// https://github.com/
|
|
383
|
+
// https://github.com/react/react-native/pull/7011
|
|
384
384
|
if (getLayoutParams() == null) {
|
|
385
385
|
setLayoutParams(EMPTY_LAYOUT_PARAMS);
|
|
386
386
|
}
|
|
@@ -746,7 +746,7 @@ public open class ReactEditText public constructor(context: Context) : AppCompat
|
|
|
746
746
|
/**
|
|
747
747
|
* Remove spans from the SpannableStringBuilder which can be represented by TextAppearance
|
|
748
748
|
* attributes on the underlying EditText. This works around instability on Samsung devices with
|
|
749
|
-
* the presence of spans https://github.com/
|
|
749
|
+
* the presence of spans https://github.com/react/react-native/issues/35936 (S318090)
|
|
750
750
|
*/
|
|
751
751
|
private fun stripStyleEquivalentSpans(sb: SpannableStringBuilder) {
|
|
752
752
|
stripSpansOfKind(sb, ReactAbsoluteSizeSpan::class.java) { span: ReactAbsoluteSizeSpan ->
|
|
@@ -987,7 +987,7 @@ public open class ReactEditText public constructor(context: Context) : AppCompat
|
|
|
987
987
|
val selectionEnd = selectionEnd
|
|
988
988
|
|
|
989
989
|
// Used to ensure that text is selectable inside of removeClippedSubviews
|
|
990
|
-
// See https://github.com/
|
|
990
|
+
// See https://github.com/react/react-native/issues/6805 for original
|
|
991
991
|
// fix that was ported to here.
|
|
992
992
|
super.setTextIsSelectable(true)
|
|
993
993
|
|
package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.kt
CHANGED
|
@@ -414,7 +414,7 @@ public open class ReactTextInputManager public constructor() :
|
|
|
414
414
|
return
|
|
415
415
|
}
|
|
416
416
|
|
|
417
|
-
// Based on https://github.com/
|
|
417
|
+
// Based on https://github.com/react/react-native/pull/31007
|
|
418
418
|
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.P) {
|
|
419
419
|
return
|
|
420
420
|
}
|
|
@@ -770,7 +770,7 @@ public open class ReactTextInputManager public constructor() :
|
|
|
770
770
|
// crash happens when focusing on a email EditText, during which a prompt will be triggered
|
|
771
771
|
// but
|
|
772
772
|
// the system fail to locate it properly. Here is an example post discussing about this
|
|
773
|
-
// issue: https://github.com/
|
|
773
|
+
// issue: https://github.com/react/react-native/issues/27204
|
|
774
774
|
if (shouldHideCursorForEmailTextInput()) {
|
|
775
775
|
view.isCursorVisible = false
|
|
776
776
|
}
|
package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextSelectionWatcher.kt
CHANGED
|
@@ -30,7 +30,7 @@ internal class ReactTextSelectionWatcher(private val editText: ReactEditText) :
|
|
|
30
30
|
// forward it on if we have new values
|
|
31
31
|
|
|
32
32
|
// Apparently Android might call this with an end value that is less than the start value
|
|
33
|
-
// Lets normalize them. See https://github.com/
|
|
33
|
+
// Lets normalize them. See https://github.com/react/react-native/issues/18579
|
|
34
34
|
val realStart = min(start.toDouble(), end.toDouble()).toInt()
|
|
35
35
|
val realEnd = max(start.toDouble(), end.toDouble()).toInt()
|
|
36
36
|
|
package/ReactAndroid/src/main/jni/react/devsupport/JCxxInspectorPackagerConnectionWebSocket.cpp
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
#include <fbjni/ByteBuffer.h>
|
|
9
|
+
|
|
8
10
|
#include "JCxxInspectorPackagerConnectionWebSocket.h"
|
|
9
11
|
|
|
10
12
|
using namespace facebook::jni;
|
|
@@ -12,10 +14,35 @@ using namespace facebook::react::jsinspector_modern;
|
|
|
12
14
|
|
|
13
15
|
namespace facebook::react::jsinspector_modern {
|
|
14
16
|
|
|
17
|
+
namespace {
|
|
18
|
+
|
|
19
|
+
local_ref<JByteBuffer::javaobject> getReadOnlyByteBufferFromStringView(
|
|
20
|
+
std::string_view sv) {
|
|
21
|
+
auto buffer = JByteBuffer::wrapBytes(
|
|
22
|
+
const_cast<uint8_t*>(reinterpret_cast<const uint8_t*>(sv.data())),
|
|
23
|
+
sv.size());
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Return a read-only buffer that shares the underlying contents.
|
|
27
|
+
* This guards from accidential mutations on the Java side, since we did
|
|
28
|
+
* casting above.
|
|
29
|
+
*
|
|
30
|
+
* https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html#asReadOnlyBuffer--
|
|
31
|
+
*/
|
|
32
|
+
static auto method =
|
|
33
|
+
buffer->javaClassStatic()->getMethod<JByteBuffer::javaobject()>(
|
|
34
|
+
"asReadOnlyBuffer");
|
|
35
|
+
return method(buffer);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
} // namespace
|
|
39
|
+
|
|
15
40
|
void JCxxInspectorPackagerConnectionWebSocket::send(std::string_view message) {
|
|
16
41
|
static auto method =
|
|
17
|
-
javaClassStatic()->getMethod<void(
|
|
18
|
-
|
|
42
|
+
javaClassStatic()->getMethod<void(local_ref<JByteBuffer::javaobject>)>(
|
|
43
|
+
"send");
|
|
44
|
+
auto byteBuffer = getReadOnlyByteBufferFromStringView(message);
|
|
45
|
+
method(self(), byteBuffer);
|
|
19
46
|
}
|
|
20
47
|
|
|
21
48
|
void JCxxInspectorPackagerConnectionWebSocket::close() {
|
|
@@ -14,7 +14,7 @@ Pod::Spec.new do |s|
|
|
|
14
14
|
s.author = "Meta Platforms, Inc. and its affiliates"
|
|
15
15
|
s.license = package["license"]
|
|
16
16
|
s.homepage = "https://reactnative.dev/"
|
|
17
|
-
s.source = { :git => 'https://github.com/
|
|
17
|
+
s.source = { :git => 'https://github.com/react/react-native.git', :tag => 'v#{version}' }
|
|
18
18
|
s.summary = "Macros for marking APIs as deprecated"
|
|
19
19
|
s.source_files = podspec_sources(["Exported/*.h", "RCTDeprecation.m"], "Exported/*.h")
|
|
20
20
|
s.pod_target_xcconfig = {
|
|
@@ -8,7 +8,7 @@ require "json"
|
|
|
8
8
|
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
|
|
9
9
|
version = package['version']
|
|
10
10
|
|
|
11
|
-
source = { :git => 'https://github.com/
|
|
11
|
+
source = { :git => 'https://github.com/react/react-native.git' }
|
|
12
12
|
if version == '1000.0.0'
|
|
13
13
|
# This is an unpublished version, use the latest commit hash of the react-native repo, which we're presumably in.
|
|
14
14
|
source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
|
|
@@ -8,7 +8,7 @@ require "json"
|
|
|
8
8
|
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
|
|
9
9
|
version = package['version']
|
|
10
10
|
|
|
11
|
-
source = { :git => 'https://github.com/
|
|
11
|
+
source = { :git => 'https://github.com/react/react-native.git' }
|
|
12
12
|
if version == '1000.0.0'
|
|
13
13
|
# This is an unpublished version, use the latest commit hash of the react-native repo, which we're presumably in.
|
|
14
14
|
source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
|
|
@@ -8,7 +8,7 @@ require "json"
|
|
|
8
8
|
package = JSON.parse(File.read(File.join(__dir__, "..", "package.json")))
|
|
9
9
|
version = package['version']
|
|
10
10
|
|
|
11
|
-
source = { :git => 'https://github.com/
|
|
11
|
+
source = { :git => 'https://github.com/react/react-native.git' }
|
|
12
12
|
if version == '1000.0.0'
|
|
13
13
|
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
|
|
14
14
|
source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
|
|
@@ -8,7 +8,7 @@ require "json"
|
|
|
8
8
|
package = JSON.parse(File.read(File.join(__dir__, "..", "package.json")))
|
|
9
9
|
version = package['version']
|
|
10
10
|
|
|
11
|
-
source = { :git => 'https://github.com/
|
|
11
|
+
source = { :git => 'https://github.com/react/react-native.git' }
|
|
12
12
|
if version == '1000.0.0'
|
|
13
13
|
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
|
|
14
14
|
source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
|
|
@@ -8,7 +8,7 @@ require "json"
|
|
|
8
8
|
package = JSON.parse(File.read(File.join(__dir__, "..", "package.json")))
|
|
9
9
|
version = package['version']
|
|
10
10
|
|
|
11
|
-
source = { :git => 'https://github.com/
|
|
11
|
+
source = { :git => 'https://github.com/react/react-native.git' }
|
|
12
12
|
if version == '1000.0.0'
|
|
13
13
|
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
|
|
14
14
|
source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
|