Skip to content

Commit

Permalink
Update React DevTools to ^4.13.0
Browse files Browse the repository at this point in the history
Summary:
React DevTools has gotten pretty outdated in React Native. Let's fix that!

Last time I tried this it caused a lot of churn for tools like Flipper, so I approached this in two steps ([detailed in this post](https://fb.workplace.com/groups/rnsyncsquad/permalink/808063140086959/)).

First was a short term plan (as implemented in [PR 21344](facebook/react#21344)) to:
1. Branch and make a patch release of DevTools 4.10 that adds a protocol check to the frontend (to detect any newer backends).
2. Upgrade Flipper (and recommend upgrade for the OSS React Native Debugger as well) to this new frontend.
3. Wait for the updated frontend to roll out.

The short term plan is now done, at least for the internal build of Flipper, and both GitHub PRs to update Flipper and React Native Debugger have been merged.

So this diff moves forward with the longer term plan (implemented in [PR 21331](facebook/react#21331)):
1. Add an explicit version to the protocol used by the DevTools "backend" and "frontend" components to talk to each other.
2. Check this protocol during initialization to ensure it matches.
3. Show upgrade/downgrade instructions if there's a mismatch (or if the check times out without a response– indicating an older backend).
4. Release this as 4.13.

 ---

Changelog:
[General][Changed] - Upgrade `react-devtools-core` from ~4.6.0 to ^4.13.0

Reviewed By: yungsters

Differential Revision: D28103394

fbshipit-source-id: 21114294144bde9aede63cb3ba98a240082299bd
  • Loading branch information
Brian Vaughn authored and facebook-github-bot committed Apr 29, 2021
1 parent 699343a commit 2520e69
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
7 changes: 5 additions & 2 deletions desktop/plugins/public/reactdevtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"version": "0.0.0",
"pluginType": "device",
"supportedDevices": [
{"os": "Metro", "archived": false}
{
"os": "Metro",
"archived": false
}
],
"main": "dist/bundle.js",
"flipperBundlerEntry": "index.tsx",
Expand All @@ -16,7 +19,7 @@
"dependencies": {
"address": "^1.1.2",
"get-port": "^5.0.0",
"react-devtools-core": "~4.10.3"
"react-devtools-core": "^4.13.0"
},
"title": "React DevTools",
"icon": "app-react",
Expand Down
14 changes: 7 additions & 7 deletions desktop/plugins/public/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1270,10 +1270,10 @@ raf@^3.4.0:
dependencies:
performance-now "^2.1.0"

react-devtools-core@~4.10.3:
version "4.10.3"
resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.10.3.tgz#30580721d7e9a1568a55b7107f2b6cdce6502e63"
integrity sha512-2CtceOczycfR1Th5B+lIPA1NnGODdbeTLTLZVCYmdXfdmvR5h1+cgr0f+R7HtWbTeIcG5PXUK1/YDnELP5opQA==
react-devtools-core@^4.13.0:
version "4.13.0"
resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.13.0.tgz#fa80ee03b1a975c1d9898e24de841e45a4b22d30"
integrity sha512-KR+0pLw8wTjOVr+9AECe5ctmycaAjbmxN3bbdB0vmlwm0JkxNnKMxDzanf+4V8IuPBQWgm8qdWpbSOqhu1l14g==
dependencies:
shell-quote "^1.6.1"
ws "^7"
Expand Down Expand Up @@ -1465,9 +1465,9 @@ safe-regex@^1.1.0:
ret "~0.1.10"

scheduler@^0.20.1:
version "0.20.1"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.1.tgz#da0b907e24026b01181ecbc75efdc7f27b5a000c"
integrity sha512-LKTe+2xNJBNxu/QhHvDR14wUXHRQbVY5ZOYpOGWRzhydZUqrLb2JBvLPY7cAqFmqrWuDED0Mjk7013SZiOz6Bw==
version "0.20.2"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91"
integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"
Expand Down

0 comments on commit 2520e69

Please sign in to comment.