@samitouri / QOS-React-2 / commits / 9813edef29

Flow upgrade to 0.188

ghstack-source-id: 5c359b97cc0a2587cf55ff879c863415a2c13127 Pull Request resolved: https://github.com/facebook/react/pull/25423

Jan Kassens committed Oct 4, 2022 at 15:39 UTC 9813edef2964d5d01308540e4eb7804dfc95425f
17 files changed +24 -6
package.json
+1 -1
@@ -63,7 +63,7 @@
63 "eslint-plugin-react-internal": "link:./scripts/eslint-rules",
64 "fbjs-scripts": "1.2.0",
65 "filesize": "^6.0.1",
66 - "flow-bin": "^0.185.0",
66 + "flow-bin": "^0.188.0",
67 "glob": "^7.1.6",
68 "glob-stream": "^6.1.0",
69 "google-closure-compiler": "^20200517.0.0",
packages/react-devtools-core/src/editor.js
+1
@@ -173,6 +173,7 @@ export function launchEditor(
173 // There's an existing editor process already and it's attached
174 // to the terminal, so go kill it. Otherwise two separate editor
175 // instances attach to the stdin/stdout which gets confusing.
176 + // $FlowFixMe[incompatible-use] found when upgrading Flow
177 childProcess.kill('SIGKILL');
178 }
179
packages/react-devtools-shared/src/backend/DevToolsComponentStackFrame.js
+1
@@ -121,6 +121,7 @@ export function describeNativeComponentFrame(
121 } catch (x) {
122 control = x;
123 }
124 + // $FlowFixMe[prop-missing] found when upgrading Flow
125 fn.call(Fake.prototype);
126 }
127 } else {
packages/react-devtools-shell/src/app/DeeplyNestedComponents/index.js
+1
@@ -18,6 +18,7 @@ function wrapWithHoc(Component, index) {
18 // $FlowFixMe
19 const displayName = Component.displayName || Component.name;
20
21 + // $FlowFixMe[incompatible-type] found when upgrading Flow
22 HOC.displayName = `withHoc${index}(${displayName})`;
23 return HOC;
24 }
packages/react-devtools-shell/src/app/InspectableElements/CustomHooks.js
+1
@@ -109,6 +109,7 @@ function wrapWithHoc(Component) {
109 }
110 // $FlowFixMe
111 const displayName = Component.displayName || Component.name;
112 + // $FlowFixMe[incompatible-type] found when upgrading Flow
113 Hoc.displayName = `withHoc(${displayName})`;
114 return Hoc;
115 }
packages/react-dom-bindings/src/events/SyntheticEvent.js
+1
@@ -81,6 +81,7 @@ function createSyntheticEvent(Interface: EventInterfaceType) {
81 return this;
82 }
83
84 + // $FlowFixMe[prop-missing] found when upgrading Flow
85 assign(SyntheticBaseEvent.prototype, {
86 preventDefault: function() {
87 this.defaultPrevented = true;
packages/react-dom/src/client/ReactDOMRoot.js
+3
@@ -94,6 +94,7 @@ function ReactDOMRoot(internalRoot: FiberRoot) {
94 this._internalRoot = internalRoot;
95 }
96
97 +// $FlowFixMe[prop-missing] found when upgrading Flow
98 ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = function(
99 children: ReactNodeList,
100 ): void {
@@ -139,6 +140,7 @@ ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = functio
140 updateContainer(children, root, null, null);
141 };
142
143 +// $FlowFixMe[prop-missing] found when upgrading Flow
144 ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = function(): void {
145 if (__DEV__) {
146 if (typeof arguments[0] === 'function') {
@@ -260,6 +262,7 @@ function scheduleHydration(target: Node) {
262 queueExplicitHydrationTarget(target);
263 }
264 }
265 +// $FlowFixMe[prop-missing] found when upgrading Flow
266 ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = scheduleHydration;
267
268 export function hydrateRoot(
packages/react-pg/src/ReactPostgres.js
+1
@@ -77,6 +77,7 @@ export function Pool(options: mixed) {
77
78 type NestedMap = Map<any, Record | NestedMap>;
79
80 +// $FlowFixMe[prop-missing] found when upgrading Flow
81 Pool.prototype.query = function(query: string, values?: Array<mixed>) {
82 const pool = this.pool;
83 const outerMap = unstable_getCacheForType(this.createRecordMap);
packages/react-reconciler/src/ReactFiberCommitWork.new.js
+1
@@ -1237,6 +1237,7 @@ function abortRootTransitions(
1237 transitionInstance.pendingBoundaries !== null &&
1238 transitionInstance.pendingBoundaries.has(deletedOffscreenInstance)
1239 ) {
1240 + // $FlowFixMe[incompatible-use] found when upgrading Flow
1241 transitionInstance.pendingBoundaries.delete(
1242 deletedOffscreenInstance,
1243 );
packages/react-reconciler/src/ReactFiberCommitWork.old.js
+1
@@ -1237,6 +1237,7 @@ function abortRootTransitions(
1237 transitionInstance.pendingBoundaries !== null &&
1238 transitionInstance.pendingBoundaries.has(deletedOffscreenInstance)
1239 ) {
1240 + // $FlowFixMe[incompatible-use] found when upgrading Flow
1241 transitionInstance.pendingBoundaries.delete(
1242 deletedOffscreenInstance,
1243 );
packages/react-reconciler/src/ReactFiberHooks.new.js
+1
@@ -1944,6 +1944,7 @@ function mountEvent<Args, Return, F: (...Array<Args>) => Return>(
1944 "A function wrapped in useEvent can't be called during rendering.",
1945 );
1946 }
1947 + // $FlowFixMe[prop-missing] found when upgrading Flow
1948 return eventFn._impl.apply(undefined, arguments);
1949 };
1950 eventFn._impl = callback;
packages/react-reconciler/src/ReactFiberHooks.old.js
+1
@@ -1944,6 +1944,7 @@ function mountEvent<Args, Return, F: (...Array<Args>) => Return>(
1944 "A function wrapped in useEvent can't be called during rendering.",
1945 );
1946 }
1947 + // $FlowFixMe[prop-missing] found when upgrading Flow
1948 return eventFn._impl.apply(undefined, arguments);
1949 };
1950 eventFn._impl = callback;
packages/react-reconciler/src/ReactFiberWorkLoop.new.js
+2
@@ -1425,6 +1425,7 @@ function markRootSuspended(root, suspendedLanes) {
1425 suspendedLanes,
1426 workInProgressRootInterleavedUpdatedLanes,
1427 );
1428 + // $FlowFixMe[incompatible-call] found when upgrading Flow
1429 markRootSuspended_dontCallThisOneDirectly(root, suspendedLanes);
1430 }
1431
@@ -2066,6 +2067,7 @@ function workLoopConcurrent() {
2067 }
2068
2069 while (workInProgress !== null && !shouldYield()) {
2070 + // $FlowFixMe[incompatible-call] found when upgrading Flow
2071 performUnitOfWork(workInProgress);
2072 }
2073 }
packages/react-reconciler/src/ReactFiberWorkLoop.old.js
+2
@@ -1425,6 +1425,7 @@ function markRootSuspended(root, suspendedLanes) {
1425 suspendedLanes,
1426 workInProgressRootInterleavedUpdatedLanes,
1427 );
1428 + // $FlowFixMe[incompatible-call] found when upgrading Flow
1429 markRootSuspended_dontCallThisOneDirectly(root, suspendedLanes);
1430 }
1431
@@ -2066,6 +2067,7 @@ function workLoopConcurrent() {
2067 }
2068
2069 while (workInProgress !== null && !shouldYield()) {
2070 + // $FlowFixMe[incompatible-call] found when upgrading Flow
2071 performUnitOfWork(workInProgress);
2072 }
2073 }
packages/shared/ReactComponentStackFrame.js
+1
@@ -123,6 +123,7 @@ export function describeNativeComponentFrame(
123 } catch (x) {
124 control = x;
125 }
126 + // $FlowFixMe[prop-missing] found when upgrading Flow
127 fn.call(Fake.prototype);
128 }
129 } else {
scripts/flow/config/flowconfig
+1 -1
@@ -48,4 +48,4 @@ munge_underscores=false
48 %REACT_RENDERER_FLOW_OPTIONS%
49
50 [version]
51 -^0.185.0
51 +^0.188.0
yarn.lock
+4 -4
@@ -7912,10 +7912,10 @@ flatted@^2.0.0:
7912 resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138"
7913 integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==
7914
7915 -flow-bin@^0.185.0:
7916 - version "0.185.2"
7917 - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.185.2.tgz#b45a07d45cf641198e86e47848e35f64b0688c4c"
7918 - integrity sha512-Vphs8Z4Qo17dzlPKe/l8M85JvGn1Tf5NV6xESZLg8p9ktdIbNUYaxnq/WBQPoESiLrGdrC2v+rfezfh3tvxkvQ==
7915 +flow-bin@^0.188.0:
7916 + version "0.188.1"
7917 + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.188.1.tgz#1043ec955eec8cd402ec9fb4c49054bf14368c06"
7918 + integrity sha512-tQehbFoeXKz/MZqEClBB2ezuT1HHKoBlv6t8mAoUdFk1PaFhqcEmjx+1Bn0xygykrqHy0FY6C3z+AGleOnFbdQ==
7919
7920 fluent-syntax@0.13.0:
7921 version "0.13.0"