From 2dba5005a48886fd76fd8780caad05db7b81198c Mon Sep 17 00:00:00 2001 From: Jan Kassens Date: Tue, 2 Jan 2024 14:25:21 -0500 Subject: [PATCH] [flow] upgrade to 0.225.1 --- .eslintrc.js | 1 - package.json | 8 +-- .../devtools/views/Components/Components.js | 4 +- .../views/Profiler/SnapshotCommitList.js | 4 +- .../src/devtools/views/portaledContent.js | 4 +- packages/react/index.js | 2 - yarn.lock | 54 +++++++++---------- 7 files changed, 36 insertions(+), 41 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 7c7bc560c2445..eaad9393c5685 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -504,7 +504,6 @@ module.exports = { React$Node: 'readonly', React$Portal: 'readonly', React$Ref: 'readonly', - React$StatelessFunctionalComponent: 'readonly', ReadableStreamController: 'readonly', RequestInfo: 'readonly', RequestOptions: 'readonly', diff --git a/package.json b/package.json index 2054a059dc89e..f89d81a1d2cff 100644 --- a/package.json +++ b/package.json @@ -62,14 +62,14 @@ "eslint-plugin-react-internal": "link:./scripts/eslint-rules", "fbjs-scripts": "^3.0.1", "filesize": "^6.0.1", - "flow-bin": "^0.223.2", - "flow-remove-types": "^2.223.2", + "flow-bin": "^0.225.1", + "flow-remove-types": "^2.225.1", "glob": "^7.1.6", "glob-stream": "^6.1.0", "google-closure-compiler": "^20230206.0.0", "gzip-size": "^5.1.1", - "hermes-eslint": "^0.18.0", - "hermes-parser": "^0.18.0", + "hermes-eslint": "^0.18.2", + "hermes-parser": "^0.18.2", "jest": "^29.4.2", "jest-cli": "^29.4.2", "jest-diff": "^29.4.2", diff --git a/packages/react-devtools-shared/src/devtools/views/Components/Components.js b/packages/react-devtools-shared/src/devtools/views/Components/Components.js index ba2e99cf34393..1575ab242c2ce 100644 --- a/packages/react-devtools-shared/src/devtools/views/Components/Components.js +++ b/packages/react-devtools-shared/src/devtools/views/Components/Components.js @@ -259,6 +259,4 @@ function setResizeCSSVariable( } } -export default (portaledContent( - Components, -): React$StatelessFunctionalComponent<{}>); +export default (portaledContent(Components): React$AbstractComponent<{}>); diff --git a/packages/react-devtools-shared/src/devtools/views/Profiler/SnapshotCommitList.js b/packages/react-devtools-shared/src/devtools/views/Profiler/SnapshotCommitList.js index e41d313600786..7b1cbcbdd2614 100644 --- a/packages/react-devtools-shared/src/devtools/views/Profiler/SnapshotCommitList.js +++ b/packages/react-devtools-shared/src/devtools/views/Profiler/SnapshotCommitList.js @@ -33,7 +33,7 @@ export type ItemData = { }; type Props = { - commitData: CommitDataFrontend, + commitData: $ReadOnlyArray, commitTimes: Array, filteredCommitIndices: Array, selectedCommitIndex: number | null, @@ -71,7 +71,7 @@ export default function SnapshotCommitList({ } type ListProps = { - commitData: CommitDataFrontend, + commitData: $ReadOnlyArray, commitTimes: Array, height: number, filteredCommitIndices: Array, diff --git a/packages/react-devtools-shared/src/devtools/views/portaledContent.js b/packages/react-devtools-shared/src/devtools/views/portaledContent.js index b79018fb5c2a2..efd0a4e30d272 100644 --- a/packages/react-devtools-shared/src/devtools/views/portaledContent.js +++ b/packages/react-devtools-shared/src/devtools/views/portaledContent.js @@ -17,8 +17,8 @@ import ThemeProvider from './ThemeProvider'; export type Props = {portalContainer?: Element, ...}; export default function portaledContent( - Component: React$StatelessFunctionalComponent, -): React$StatelessFunctionalComponent { + Component: React$AbstractComponent, +): React$AbstractComponent { return function PortaledContent({portalContainer, ...rest}: Props) { const store = useContext(StoreContext); diff --git a/packages/react/index.js b/packages/react/index.js index bef926da87e53..b60e8957c5b0a 100644 --- a/packages/react/index.js +++ b/packages/react/index.js @@ -8,8 +8,6 @@ */ // Keep in sync with https://github.com/facebook/flow/blob/main/lib/react.js -export type StatelessFunctionalComponent

= - React$StatelessFunctionalComponent

; export type ComponentType<-P> = React$ComponentType

; export type AbstractComponent< -Config, diff --git a/yarn.lock b/yarn.lock index c91403498f6cc..04f549b979495 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7862,17 +7862,17 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== -flow-bin@^0.223.2: - version "0.223.2" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.223.2.tgz#2c39f40c4a821bdeac7d340eda61738f0c142706" - integrity sha512-wqNNzsVdgS/6sC/anloAzEiWGHEYBcANftU7rrDNRyTI9plBAYAu8xVZ/5RtymRuO2GvYWO1DR8hfEunAhdvWA== +flow-bin@^0.225.1: + version "0.225.1" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.225.1.tgz#ffc3d6f0bfa321cf5dd63439537953dc93e9971d" + integrity sha512-nsYTF1Hh6FWNKFmbe45G7gdgUMBX2CYEfoAvdLJ9oFq43vafe8sA+EWlnXV7cY9LGjdavRsjv4dhEA2M15Rehg== -flow-remove-types@^2.223.2: - version "2.223.2" - resolved "https://registry.yarnpkg.com/flow-remove-types/-/flow-remove-types-2.223.2.tgz#f034bbd00aabf7b700d4d9eca1ca7f101b23513b" - integrity sha512-w49sqmIs86Qofh1Ip4eWmuEv5e7oAAUQzDQVPddjvGErn5GxtGBy0JAymPGyRj3Q2kS5/ta5q+9v5+a8858gWw== +flow-remove-types@^2.225.1: + version "2.225.1" + resolved "https://registry.yarnpkg.com/flow-remove-types/-/flow-remove-types-2.225.1.tgz#2de188480ffe54397891ff922d2695eb5a27e9e9" + integrity sha512-UZj78nVIq3JGJcet2MzAUMPhu3ag9IawRt+kuA9JSuLH2aQYN0wmYhcLVbyyKpj6qgjVXBR+EXIO9XRprY0g2g== dependencies: - hermes-parser "0.17.1" + hermes-parser "0.18.0" pirates "^3.0.2" vlq "^0.2.1" @@ -8602,39 +8602,39 @@ has@^1.0.1, has@^1.0.3: dependencies: function-bind "^1.1.1" -hermes-eslint@^0.18.0: - version "0.18.0" - resolved "https://registry.yarnpkg.com/hermes-eslint/-/hermes-eslint-0.18.0.tgz#16e7d5c7742f709d814d6a5a5d955803e81b328d" - integrity sha512-NIh8Utqk32+voL1b4ngCRnMQ0XCRzFbon7IG25lhnSYCTezX5besIK+79pUHw1YEDZVGrVrMxeIYxXiamLzcUQ== +hermes-eslint@^0.18.2: + version "0.18.2" + resolved "https://registry.yarnpkg.com/hermes-eslint/-/hermes-eslint-0.18.2.tgz#af09ea1700eb32502caf135b181ffed6091ccb72" + integrity sha512-FWKVoHyHaXRjOfjoTgoc4OTkC+KThYdhLFyggoXIYLMDHF9hkg5yHSih3cyK3hT73te6+aaGHePzwaOai69uoA== dependencies: esrecurse "^4.3.0" - hermes-estree "0.18.0" - hermes-parser "0.18.0" - -hermes-estree@0.17.1: - version "0.17.1" - resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.17.1.tgz#902806a900c185720424ffcf958027821d23c051" - integrity sha512-EdUJms+eRE40OQxysFlPr1mPpvUbbMi7uDAKlScBw8o3tQY22BZ5yx56OYyp1bVaBm+7Cjc3NQz24sJEFXkPxg== + hermes-estree "0.18.2" + hermes-parser "0.18.2" hermes-estree@0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.18.0.tgz#6c202d8c78ddefadf3eb595a584dfa55b51a0508" integrity sha512-WaIudIVKo5QWFqz1ta53HqSDuVxYST/MUuP9X7dqUpbHse3E2gzJq/7hEtgx84hh2XSNWN1AhYho3ThOA85uCA== -hermes-parser@0.17.1: - version "0.17.1" - resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.17.1.tgz#8b5cbaff235fed28487812ad718f9c7182d0db0f" - integrity sha512-yErtFLMEL6490fFJPurNn23OI2ciGAtaUfKUg9VPdcde9CmItCjOVQkJt1Xzawv5kuRzeIx0RE2E2Q9TbIgdzA== - dependencies: - hermes-estree "0.17.1" +hermes-estree@0.18.2: + version "0.18.2" + resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.18.2.tgz#fd450fa1659cf074ceaa2ddeeb21674f3b2342f3" + integrity sha512-KoLsoWXJ5o81nit1wSyEZnWUGy9cBna9iYMZBR7skKh7okYAYKqQ9/OczwpMHn/cH0hKDyblulGsJ7FknlfVxQ== -hermes-parser@0.18.0, hermes-parser@^0.18.0: +hermes-parser@0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.18.0.tgz#dd9878f70e9ca2570e7626181ae0465115f7f78d" integrity sha512-DIIM6vsy30BU5hNkOXh6MR2r4ZAxVhbfyTnmfo/rqUf3KySlNWn9fWiOcpuGAdDN2o5sdPCpu6cep3a23d1Klw== dependencies: hermes-estree "0.18.0" +hermes-parser@0.18.2, hermes-parser@^0.18.2: + version "0.18.2" + resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.18.2.tgz#50f15e2fcd559a48c68cd7af259d4292298bd14d" + integrity sha512-1eQfvib+VPpgBZ2zYKQhpuOjw1tH+Emuib6QmjkJWJMhyjM8xnXMvA+76o9LhF0zOAJDZgPfQhg43cyXEyl5Ew== + dependencies: + hermes-estree "0.18.2" + homedir-polyfill@^1.0.0, homedir-polyfill@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8"