react-native 0.89.0-rc.0 → 0.89.0-rc.1
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/WebSocket/WebSocket.js +3 -1
- package/React/Base/RCTVersion.m +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.kt +5 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Canary_Android.kt +1 -3
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactCommon/jsinspector-modern/RuntimeTargetNetwork.cpp +22 -3
- package/ReactCommon/jsinspector-modern/tests/NetworkReporterTest.cpp +69 -0
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +2 -2
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSCanary.h +1 -5
- package/ReactCommon/react/utils/ReactNativeVersion.h +1 -1
- package/package.json +10 -10
- package/sdks/.hermesv1version +1 -1
- package/sdks/hermes-engine/version.properties +1 -1
- package/src/private/featureflags/ReactNativeFeatureFlags.js +2 -2
|
@@ -29,7 +29,7 @@ export default class ReactNativeVersion {
|
|
|
29
29
|
static major: number = 0;
|
|
30
30
|
static minor: number = 89;
|
|
31
31
|
static patch: number = 0;
|
|
32
|
-
static prerelease: string | null = 'rc.
|
|
32
|
+
static prerelease: string | null = 'rc.1';
|
|
33
33
|
|
|
34
34
|
static getVersionString(): string {
|
|
35
35
|
return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
|
|
@@ -143,8 +143,10 @@ class WebSocket extends EventTarget {
|
|
|
143
143
|
);
|
|
144
144
|
this._socketId = nextWebSocketId++;
|
|
145
145
|
this._registerEvents();
|
|
146
|
+
// Skip this constructor's own frame so that the request initiator stack
|
|
147
|
+
// starts at the caller of `new WebSocket()`.
|
|
146
148
|
const devToolsRequestId =
|
|
147
|
-
global.__NETWORK_REPORTER__?.createDevToolsRequestId();
|
|
149
|
+
global.__NETWORK_REPORTER__?.createDevToolsRequestId(1);
|
|
148
150
|
NativeWebSocketModule.connect(
|
|
149
151
|
url,
|
|
150
152
|
protocolList,
|
package/React/Base/RCTVersion.m
CHANGED
package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.kt
CHANGED
|
@@ -335,7 +335,11 @@ internal constructor(
|
|
|
335
335
|
logViewHierarchy(parentView, false)
|
|
336
336
|
}
|
|
337
337
|
|
|
338
|
-
|
|
338
|
+
var currParentView = view.parent
|
|
339
|
+
if (currParentView is ViewGroup && currParentView.indexOfChild(view) == -1) {
|
|
340
|
+
currParentView.endViewTransition(view)
|
|
341
|
+
currParentView = view.parent
|
|
342
|
+
}
|
|
339
343
|
if (currParentView != null) {
|
|
340
344
|
val actualParentId = if (currParentView is ViewGroup) currParentView.id else View.NO_ID
|
|
341
345
|
ReactSoftExceptionLogger.logSoftException(
|
|
@@ -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<<a6e126a832b5fd1f74aa8f2d02280f2e>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -157,7 +157,7 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
|
|
157
157
|
|
|
158
158
|
override fun fuseboxScreenshotCaptureEnabled(): Boolean = true
|
|
159
159
|
|
|
160
|
-
override fun fuseboxWebSocketEventsEnabled(): Boolean =
|
|
160
|
+
override fun fuseboxWebSocketEventsEnabled(): Boolean = true
|
|
161
161
|
|
|
162
162
|
override fun keepTimersRunningWhileHostPausedAndroid(): Boolean = false
|
|
163
163
|
|
|
@@ -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<<fd455a2209f9998345d96f9e81697113>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -37,8 +37,6 @@ public open class ReactNativeFeatureFlagsOverrides_RNOSS_Canary_Android : ReactN
|
|
|
37
37
|
|
|
38
38
|
override fun fuseboxFrameRecordingEnabled(): Boolean = true
|
|
39
39
|
|
|
40
|
-
override fun fuseboxWebSocketEventsEnabled(): Boolean = true
|
|
41
|
-
|
|
42
40
|
override fun useNativeViewConfigsInBridgelessMode(): Boolean = true
|
|
43
41
|
|
|
44
42
|
override fun useTurboModuleInterop(): Boolean = true
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
|
|
12
12
|
#include <react/utils/Uuid.h>
|
|
13
13
|
|
|
14
|
+
#include <algorithm>
|
|
15
|
+
|
|
14
16
|
using namespace facebook::jsi;
|
|
15
17
|
using namespace std::string_literals;
|
|
16
18
|
|
|
@@ -44,8 +46,16 @@ void RuntimeTarget::installNetworkReporterAPI() {
|
|
|
44
46
|
auto jsiCreateDevToolsRequestId = [selfWeak = weak_from_this()](
|
|
45
47
|
Runtime& runtime,
|
|
46
48
|
const Value& /*thisVal*/,
|
|
47
|
-
const Value*
|
|
48
|
-
size_t
|
|
49
|
+
const Value* args,
|
|
50
|
+
size_t count) -> Value {
|
|
51
|
+
// Optional `framesToSkip` argument: the number of leading JS call frames
|
|
52
|
+
// that belong to the calling API's own implementation (e.g. the `WebSocket`
|
|
53
|
+
// constructor), which are omitted from the recorded initiator stack so
|
|
54
|
+
// that its top frame is the code that invoked the API.
|
|
55
|
+
size_t framesToSkip = 0;
|
|
56
|
+
if (count > 0 && args[0].isNumber()) {
|
|
57
|
+
framesToSkip = static_cast<size_t>(std::max(0.0, args[0].asNumber()));
|
|
58
|
+
}
|
|
49
59
|
std::optional<std::string> devToolsRequestId;
|
|
50
60
|
tryExecuteSync(selfWeak, [&](RuntimeTarget& self) {
|
|
51
61
|
devToolsRequestId = self.createNetworkRequestId();
|
|
@@ -58,6 +68,15 @@ void RuntimeTarget::installNetworkReporterAPI() {
|
|
|
58
68
|
auto stackTrace = self.delegate_.captureStackTrace(runtime);
|
|
59
69
|
auto cdpStackTrace = self.delegate_.serializeStackTrace(*stackTrace);
|
|
60
70
|
if (cdpStackTrace) {
|
|
71
|
+
if (framesToSkip > 0) {
|
|
72
|
+
if (auto* callFrames = cdpStackTrace->get_ptr("callFrames");
|
|
73
|
+
callFrames != nullptr && callFrames->isArray()) {
|
|
74
|
+
callFrames->erase(
|
|
75
|
+
callFrames->begin(),
|
|
76
|
+
callFrames->begin() +
|
|
77
|
+
std::min(framesToSkip, callFrames->size()));
|
|
78
|
+
}
|
|
79
|
+
}
|
|
61
80
|
NetworkHandler::getInstance().recordRequestInitiatorStack(
|
|
62
81
|
*devToolsRequestId, std::move(*cdpStackTrace));
|
|
63
82
|
}
|
|
@@ -81,7 +100,7 @@ void RuntimeTarget::installNetworkReporterAPI() {
|
|
|
81
100
|
Function::createFromHostFunction(
|
|
82
101
|
runtime,
|
|
83
102
|
PropNameID::forAscii(runtime, "createDevToolsRequestId"),
|
|
84
|
-
|
|
103
|
+
1,
|
|
85
104
|
jsiCreateDevToolsRequestId));
|
|
86
105
|
networkReporterApi = objectFreeze(runtime, std::move(networkReporterApi));
|
|
87
106
|
globalObj.setProperty(runtime, "__NETWORK_REPORTER__", networkReporterApi);
|
|
@@ -625,6 +625,75 @@ TEST_P(NetworkReporterTest, testWebSocketCreatedWithInitiator) {
|
|
|
625
625
|
})");
|
|
626
626
|
}
|
|
627
627
|
|
|
628
|
+
TEST_P(NetworkReporterTest, testWebSocketCreatedWithInitiatorFramesToSkip) {
|
|
629
|
+
InSequence s;
|
|
630
|
+
|
|
631
|
+
this->expectMessageFromPage(JsonEq(R"({
|
|
632
|
+
"id": 0,
|
|
633
|
+
"result": {}
|
|
634
|
+
})"));
|
|
635
|
+
this->toPage_->sendMessage(R"({
|
|
636
|
+
"id": 0,
|
|
637
|
+
"method": "Debugger.enable"
|
|
638
|
+
})");
|
|
639
|
+
|
|
640
|
+
this->expectMessageFromPage(JsonEq(R"({
|
|
641
|
+
"id": 1,
|
|
642
|
+
"result": {}
|
|
643
|
+
})"));
|
|
644
|
+
this->toPage_->sendMessage(R"({
|
|
645
|
+
"id": 1,
|
|
646
|
+
"method": "Network.enable"
|
|
647
|
+
})");
|
|
648
|
+
|
|
649
|
+
auto& runtime = engineAdapter_->getRuntime();
|
|
650
|
+
|
|
651
|
+
// `apiShim` stands in for an API implementation (such as the `WebSocket`
|
|
652
|
+
// constructor) that asks for its own frame to be omitted.
|
|
653
|
+
auto requestId = this->eval(R"( // line 0
|
|
654
|
+
function apiShim() { // line 1
|
|
655
|
+
return globalThis.__NETWORK_REPORTER__.createDevToolsRequestId(1); // line 2
|
|
656
|
+
} // line 3
|
|
657
|
+
function openSocket() { // line 4
|
|
658
|
+
return apiShim(); // line 5
|
|
659
|
+
} // line 6
|
|
660
|
+
openSocket(); // line 7
|
|
661
|
+
|
|
662
|
+
//# sourceURL=webSocketInitiatorFramesToSkipTest.js
|
|
663
|
+
)")
|
|
664
|
+
.asString(runtime)
|
|
665
|
+
.utf8(runtime);
|
|
666
|
+
|
|
667
|
+
this->expectMessageFromPage(JsonParsed(AllOf(
|
|
668
|
+
AtJsonPtr("/method", "Network.webSocketCreated"),
|
|
669
|
+
AtJsonPtr("/params/requestId", requestId),
|
|
670
|
+
AtJsonPtr("/params/url", "wss://example.com/frames-to-skip"),
|
|
671
|
+
AtJsonPtr("/params/initiator/type", "script"),
|
|
672
|
+
AtJsonPtr(
|
|
673
|
+
"/params/initiator/stack/callFrames",
|
|
674
|
+
AllOf(
|
|
675
|
+
Each(AtJsonPtr("/url", "webSocketInitiatorFramesToSkipTest.js")),
|
|
676
|
+
ElementsAre(
|
|
677
|
+
AllOf(
|
|
678
|
+
AtJsonPtr("/functionName", "openSocket"),
|
|
679
|
+
AtJsonPtr("/lineNumber", 5)),
|
|
680
|
+
AllOf(
|
|
681
|
+
AtJsonPtr("/functionName", "global"),
|
|
682
|
+
AtJsonPtr("/lineNumber", 7))))))));
|
|
683
|
+
|
|
684
|
+
NetworkReporter::getInstance().reportWebSocketCreated(
|
|
685
|
+
requestId, "wss://example.com/frames-to-skip");
|
|
686
|
+
|
|
687
|
+
this->expectMessageFromPage(JsonEq(R"({
|
|
688
|
+
"id": 2,
|
|
689
|
+
"result": {}
|
|
690
|
+
})"));
|
|
691
|
+
this->toPage_->sendMessage(R"({
|
|
692
|
+
"id": 2,
|
|
693
|
+
"method": "Network.disable"
|
|
694
|
+
})");
|
|
695
|
+
}
|
|
696
|
+
|
|
628
697
|
TEST_P(NetworkReporterTest, testNetworkEventsWhenDisabled) {
|
|
629
698
|
EXPECT_FALSE(NetworkReporter::getInstance().isDebuggingEnabled());
|
|
630
699
|
|
|
@@ -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<<0218b6cf490454e1ccd93001208a58be>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -298,7 +298,7 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
|
|
298
298
|
}
|
|
299
299
|
|
|
300
300
|
bool fuseboxWebSocketEventsEnabled() override {
|
|
301
|
-
return
|
|
301
|
+
return true;
|
|
302
302
|
}
|
|
303
303
|
|
|
304
304
|
bool keepTimersRunningWhileHostPausedAndroid() override {
|
|
@@ -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<<739fbf5a89bc456157ea470c43745e9d>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -57,10 +57,6 @@ class ReactNativeFeatureFlagsOverridesOSSCanary : public ReactNativeFeatureFlags
|
|
|
57
57
|
return true;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
bool fuseboxWebSocketEventsEnabled() override {
|
|
61
|
-
return true;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
60
|
bool useNativeViewConfigsInBridgelessMode() override {
|
|
65
61
|
return true;
|
|
66
62
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.89.0-rc.
|
|
3
|
+
"version": "0.89.0-rc.1",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -150,22 +150,22 @@
|
|
|
150
150
|
}
|
|
151
151
|
},
|
|
152
152
|
"dependencies": {
|
|
153
|
-
"@react-native/asset-utils": "0.89.0-rc.
|
|
154
|
-
"@react-native/codegen": "0.89.0-rc.
|
|
155
|
-
"@react-native/community-cli-plugin": "0.89.0-rc.
|
|
156
|
-
"@react-native/gradle-plugin": "0.89.0-rc.
|
|
157
|
-
"@react-native/normalize-colors": "0.89.0-rc.
|
|
158
|
-
"@react-native/virtualized-lists": "0.89.0-rc.
|
|
153
|
+
"@react-native/asset-utils": "0.89.0-rc.1",
|
|
154
|
+
"@react-native/codegen": "0.89.0-rc.1",
|
|
155
|
+
"@react-native/community-cli-plugin": "0.89.0-rc.1",
|
|
156
|
+
"@react-native/gradle-plugin": "0.89.0-rc.1",
|
|
157
|
+
"@react-native/normalize-colors": "0.89.0-rc.1",
|
|
158
|
+
"@react-native/virtualized-lists": "0.89.0-rc.1",
|
|
159
159
|
"anser": "^1.4.9",
|
|
160
160
|
"ansi-regex": "^5.0.0",
|
|
161
161
|
"flow-parser": "0.336.0",
|
|
162
162
|
"base64-js": "^1.5.1",
|
|
163
163
|
"flow-enums-runtime": "^0.0.6",
|
|
164
|
-
"hermes-compiler": "260318099.0.
|
|
164
|
+
"hermes-compiler": "260318099.0.7",
|
|
165
165
|
"invariant": "^2.2.4",
|
|
166
166
|
"memoize-one": "^6.0.0",
|
|
167
|
-
"metro-runtime": "^0.
|
|
168
|
-
"metro-source-map": "^0.
|
|
167
|
+
"metro-runtime": "^0.88.0",
|
|
168
|
+
"metro-source-map": "^0.88.0",
|
|
169
169
|
"nullthrows": "^1.1.1",
|
|
170
170
|
"pretty-format": "^29.7.0",
|
|
171
171
|
"promise": "^8.3.0",
|
package/sdks/.hermesv1version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
hermes-v260318099.0.
|
|
1
|
+
hermes-v260318099.0.7
|
|
@@ -1 +1 @@
|
|
|
1
|
-
HERMES_VERSION_NAME=260318099.0.
|
|
1
|
+
HERMES_VERSION_NAME=260318099.0.7
|
|
@@ -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<<368361a1c35df89a29ec93fa18761f79>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
* @noformat
|
|
10
10
|
*/
|
|
@@ -493,7 +493,7 @@ export const fuseboxScreenshotCaptureEnabled: Getter<boolean> = createNativeFlag
|
|
|
493
493
|
/**
|
|
494
494
|
* Enable reporting of WebSocket network events (`Network.webSocket*` CDP events) to the React Native DevTools CDP backend.
|
|
495
495
|
*/
|
|
496
|
-
export const fuseboxWebSocketEventsEnabled: Getter<boolean> = createNativeFlagGetter('fuseboxWebSocketEventsEnabled',
|
|
496
|
+
export const fuseboxWebSocketEventsEnabled: Getter<boolean> = createNativeFlagGetter('fuseboxWebSocketEventsEnabled', true);
|
|
497
497
|
/**
|
|
498
498
|
* Keep JS timers running on Android while the React host is paused, stopping them only when the React instance is destroyed. Matches iOS, where timers do not depend on host lifecycle.
|
|
499
499
|
*/
|