Skip to content

'[skip ci] upgrade React Native on a new RDT backend #46669

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/debugger-frontend/BUILD_INFO
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@generated SignedSource<<85fb986aee1b601b649481b64d2b5dc8>>
Git revision: e8c79432972029c625c91d16967b07fe61f04a61
@generated SignedSource<<be159160e305455e8919c5e323fb1784>>
Git revision: 87b2feb14627b3e8713bc2637992b9a8c76bbe61
Built with --nohooks: false
Is local checkout: false
Remote URL: https://github.com/facebookexperimental/rn-chrome-devtools-frontend
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

15 changes: 9 additions & 6 deletions packages/react-native/Libraries/Core/setUpReactDevTools.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,22 @@ import type {Domain} from '../../src/private/fusebox/setUpFuseboxReactDevToolsDi
if (__DEV__) {
// Register dispatcher on global, which can be used later by Chrome DevTools frontend
require('../../src/private/fusebox/setUpFuseboxReactDevToolsDispatcher');
const {
initialize,
connectToDevTools,
connectWithCustomMessagingProtocol,
} = require('react-devtools-core');

// Install hook before React is loaded.
const reactDevTools = require('react-devtools-core');
initialize();

// This should be defined in DEV, otherwise error is expected.
const fuseboxReactDevToolsDispatcher =
global.__FUSEBOX_REACT_DEVTOOLS_DISPATCHER__;
const reactDevToolsFuseboxGlobalBindingName =
fuseboxReactDevToolsDispatcher.BINDING_NAME;

const ReactNativeStyleAttributes = require('../Components/View/ReactNativeStyleAttributes');
const devToolsSettingsManager = require('../DevToolsSettings/DevToolsSettingsManager');
const resolveRNStyle = require('../StyleSheet/flattenStyle');

let disconnect = null;
Expand All @@ -37,7 +42,7 @@ if (__DEV__) {
}

function connectToReactDevToolsInFusebox(domain: Domain) {
disconnect = reactDevTools.connectWithCustomMessagingProtocol({
disconnect = connectWithCustomMessagingProtocol({
onSubscribe: listener => {
domain.onMessage.addEventListener(listener);
},
Expand All @@ -47,7 +52,6 @@ if (__DEV__) {
onMessage: (event, payload) => {
domain.sendMessage({event, payload});
},
settingsManager: devToolsSettingsManager,
nativeStyleEditorValidAttributes: Object.keys(ReactNativeStyleAttributes),
resolveRNStyle,
});
Expand Down Expand Up @@ -101,14 +105,13 @@ if (__DEV__) {
isWebSocketOpen = true;
});

reactDevTools.connectToDevTools({
connectToDevTools({
isAppActive,
resolveRNStyle,
nativeStyleEditorValidAttributes: Object.keys(
ReactNativeStyleAttributes,
),
websocket: ws,
devToolsSettingsManager,
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
"nullthrows": "^1.1.1",
"pretty-format": "^29.7.0",
"promise": "^8.3.0",
"react-devtools-core": "^5.3.1",
"react-devtools-core": "^6.0.0",
"react-refresh": "^0.14.0",
"regenerator-runtime": "^0.13.2",
"scheduler": "0.25.0-rc-fb9a90fa48-20240614",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7379,10 +7379,10 @@ range-parser@~1.2.1:
resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031"
integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==

react-devtools-core@^5.3.1:
version "5.3.1"
resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-5.3.1.tgz#d57f5b8f74f16e622bd6a7bc270161e4ba162666"
integrity sha512-7FSb9meX0btdBQLwdFOwt6bGqvRPabmVMMslv8fgoSPqXyuGpgQe36kx8gR86XPw7aV1yVouTp6fyZ0EH+NfUw==
react-devtools-core@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-6.0.0.tgz#a1e3964677fb0c81ca391ed66e5b5d22621d9304"
integrity sha512-VmW+VhR9mR2difSed80BNpYLkYyWYzsZgdLPlakoFPYGiD7fwC36tp4HLw45N4sRqY+Te6ZWD9MVSex8d4gFxg==
dependencies:
shell-quote "^1.6.1"
ws "^7"
Expand Down
Loading