Update React DevTools to ^4.13.0

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](https://github.com/facebook/react/pull/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](https://github.com/facebook/react/pull/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
This commit is contained in:
Brian Vaughn
2021-04-29 16:57:25 -07:00
committed by Facebook GitHub Bot
parent 699343a9ca
commit 2520e6912f
2 changed files with 12 additions and 9 deletions

View File

@@ -5,7 +5,10 @@
"version": "0.0.0", "version": "0.0.0",
"pluginType": "device", "pluginType": "device",
"supportedDevices": [ "supportedDevices": [
{"os": "Metro", "archived": false} {
"os": "Metro",
"archived": false
}
], ],
"main": "dist/bundle.js", "main": "dist/bundle.js",
"flipperBundlerEntry": "index.tsx", "flipperBundlerEntry": "index.tsx",
@@ -16,7 +19,7 @@
"dependencies": { "dependencies": {
"address": "^1.1.2", "address": "^1.1.2",
"get-port": "^5.0.0", "get-port": "^5.0.0",
"react-devtools-core": "~4.10.3" "react-devtools-core": "^4.13.0"
}, },
"title": "React DevTools", "title": "React DevTools",
"icon": "app-react", "icon": "app-react",

View File

@@ -1270,10 +1270,10 @@ raf@^3.4.0:
dependencies: dependencies:
performance-now "^2.1.0" performance-now "^2.1.0"
react-devtools-core@~4.10.3: react-devtools-core@^4.13.0:
version "4.10.3" version "4.13.0"
resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.10.3.tgz#30580721d7e9a1568a55b7107f2b6cdce6502e63" resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.13.0.tgz#fa80ee03b1a975c1d9898e24de841e45a4b22d30"
integrity sha512-2CtceOczycfR1Th5B+lIPA1NnGODdbeTLTLZVCYmdXfdmvR5h1+cgr0f+R7HtWbTeIcG5PXUK1/YDnELP5opQA== integrity sha512-KR+0pLw8wTjOVr+9AECe5ctmycaAjbmxN3bbdB0vmlwm0JkxNnKMxDzanf+4V8IuPBQWgm8qdWpbSOqhu1l14g==
dependencies: dependencies:
shell-quote "^1.6.1" shell-quote "^1.6.1"
ws "^7" ws "^7"
@@ -1465,9 +1465,9 @@ safe-regex@^1.1.0:
ret "~0.1.10" ret "~0.1.10"
scheduler@^0.20.1: scheduler@^0.20.1:
version "0.20.1" version "0.20.2"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.1.tgz#da0b907e24026b01181ecbc75efdc7f27b5a000c" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91"
integrity sha512-LKTe+2xNJBNxu/QhHvDR14wUXHRQbVY5ZOYpOGWRzhydZUqrLb2JBvLPY7cAqFmqrWuDED0Mjk7013SZiOz6Bw== integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==
dependencies: dependencies:
loose-envify "^1.1.0" loose-envify "^1.1.0"
object-assign "^4.1.1" object-assign "^4.1.1"