mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
C++ InspectorPackagerConnection: Indicate new implementation in /json response (#42200)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/42200 Changelog: [Internal] Quick hack to make it easy to determine whether a given build of React Native is using the C++ implementation of InspectorPackagerConnection or the legacy platform-specific implementation. For now, we just append this information to the `title` field. Ultimately, rather than polluting the title, this should be an inert capability flag that gets reported via `inspector-proxy`. I'm not doing that yet since we have work in the pipeline to set up a proper capability flag system soon. Reviewed By: huntie Differential Revision: D52629415 fbshipit-source-id: a4e873f4be78ae49b35b94fd5d41d0e2efc02dbe
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9525074a19
commit
4d22d02b77
+1
-1
@@ -142,7 +142,7 @@ folly::dynamic InspectorPackagerConnection::Impl::pages() {
|
||||
|
||||
for (const auto& page : pages) {
|
||||
array.push_back(folly::dynamic::object("id", std::to_string(page.id))(
|
||||
"title", page.title)("app", app_)("vm", page.vm));
|
||||
"title", page.title + " [C++ connection]")("app", app_)("vm", page.vm));
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
+1
-1
@@ -170,7 +170,7 @@ TEST_F(InspectorPackagerConnectionTest, TestGetPages) {
|
||||
"/payload",
|
||||
ElementsAreArray({AllOf(
|
||||
AtJsonPtr("/app", Eq("my-app")),
|
||||
AtJsonPtr("/title", Eq("mock-title")),
|
||||
AtJsonPtr("/title", Eq("mock-title [C++ connection]")),
|
||||
AtJsonPtr("/vm", Eq("mock-vm")),
|
||||
AtJsonPtr("/id", Eq(std::to_string(pageId))))}))))))
|
||||
.RetiresOnSaturation();
|
||||
|
||||
Reference in New Issue
Block a user