From 185bf2f65a081d80915a7b648d07445b445811d2 Mon Sep 17 00:00:00 2001 From: Ming Ye Date: Thu, 5 Jan 2023 08:17:50 +0000 Subject: [PATCH 1/2] Update import for babel-code-frame in build script --- scripts/rollup/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/rollup/build.js b/scripts/rollup/build.js index 9bd7072872035..05a249a154c36 100644 --- a/scripts/rollup/build.js +++ b/scripts/rollup/build.js @@ -20,7 +20,7 @@ const useForks = require('./plugins/use-forks-plugin'); const stripUnusedImports = require('./plugins/strip-unused-imports'); const Packaging = require('./packaging'); const {asyncRimRaf} = require('./utils'); -const codeFrame = require('babel-code-frame'); +const codeFrame = require('@babel/code-frame'); const Wrappers = require('./wrappers'); const RELEASE_CHANNEL = process.env.RELEASE_CHANNEL; From 0287d47e944fc616f14c3ebf009c4ea8ceac08e1 Mon Sep 17 00:00:00 2001 From: Ming Ye Date: Thu, 5 Jan 2023 13:00:41 +0000 Subject: [PATCH 2/2] Fix flow error for missing type annotation --- .../src/perf-regression/apps/LargeSubtree.js | 2 +- packages/react-devtools-shell/src/perf-regression/apps/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-devtools-shell/src/perf-regression/apps/LargeSubtree.js b/packages/react-devtools-shell/src/perf-regression/apps/LargeSubtree.js index 11da40cf2c111..63c37a6453be9 100644 --- a/packages/react-devtools-shell/src/perf-regression/apps/LargeSubtree.js +++ b/packages/react-devtools-shell/src/perf-regression/apps/LargeSubtree.js @@ -15,7 +15,7 @@ function generateArray(size) { const arr = generateArray(50000); -export default function LargeSubtree() { +export default function LargeSubtree(): React.Node { const [showList, setShowList] = React.useState(false); const toggleList = () => { const startTime = performance.now(); diff --git a/packages/react-devtools-shell/src/perf-regression/apps/index.js b/packages/react-devtools-shell/src/perf-regression/apps/index.js index 2508dd40103ea..3e51b9a5d7c4a 100644 --- a/packages/react-devtools-shell/src/perf-regression/apps/index.js +++ b/packages/react-devtools-shell/src/perf-regression/apps/index.js @@ -10,7 +10,7 @@ import * as React from 'react'; import LargeSubtree from './LargeSubtree'; -export default function Home() { +export default function Home(): React.Node { return (