Skip to content

Commit 9813ede

Browse files
committed
Flow upgrade to 0.188
ghstack-source-id: 5c359b97cc0a2587cf55ff879c863415a2c13127 Pull Request resolved: #25423
1 parent 3b6826e commit 9813ede

File tree

17 files changed

+24
-6
lines changed

17 files changed

+24
-6
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"eslint-plugin-react-internal": "link:./scripts/eslint-rules",
6464
"fbjs-scripts": "1.2.0",
6565
"filesize": "^6.0.1",
66-
"flow-bin": "^0.185.0",
66+
"flow-bin": "^0.188.0",
6767
"glob": "^7.1.6",
6868
"glob-stream": "^6.1.0",
6969
"google-closure-compiler": "^20200517.0.0",

packages/react-devtools-core/src/editor.js

+1
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ export function launchEditor(
173173
// There's an existing editor process already and it's attached
174174
// to the terminal, so go kill it. Otherwise two separate editor
175175
// instances attach to the stdin/stdout which gets confusing.
176+
// $FlowFixMe[incompatible-use] found when upgrading Flow
176177
childProcess.kill('SIGKILL');
177178
}
178179

packages/react-devtools-shared/src/backend/DevToolsComponentStackFrame.js

+1
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ export function describeNativeComponentFrame(
121121
} catch (x) {
122122
control = x;
123123
}
124+
// $FlowFixMe[prop-missing] found when upgrading Flow
124125
fn.call(Fake.prototype);
125126
}
126127
} else {

packages/react-devtools-shell/src/app/DeeplyNestedComponents/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ function wrapWithHoc(Component, index) {
1818
// $FlowFixMe
1919
const displayName = Component.displayName || Component.name;
2020

21+
// $FlowFixMe[incompatible-type] found when upgrading Flow
2122
HOC.displayName = `withHoc${index}(${displayName})`;
2223
return HOC;
2324
}

packages/react-devtools-shell/src/app/InspectableElements/CustomHooks.js

+1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ function wrapWithHoc(Component) {
109109
}
110110
// $FlowFixMe
111111
const displayName = Component.displayName || Component.name;
112+
// $FlowFixMe[incompatible-type] found when upgrading Flow
112113
Hoc.displayName = `withHoc(${displayName})`;
113114
return Hoc;
114115
}

packages/react-dom-bindings/src/events/SyntheticEvent.js

+1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ function createSyntheticEvent(Interface: EventInterfaceType) {
8181
return this;
8282
}
8383

84+
// $FlowFixMe[prop-missing] found when upgrading Flow
8485
assign(SyntheticBaseEvent.prototype, {
8586
preventDefault: function() {
8687
this.defaultPrevented = true;

packages/react-dom/src/client/ReactDOMRoot.js

+3
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ function ReactDOMRoot(internalRoot: FiberRoot) {
9494
this._internalRoot = internalRoot;
9595
}
9696

97+
// $FlowFixMe[prop-missing] found when upgrading Flow
9798
ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = function(
9899
children: ReactNodeList,
99100
): void {
@@ -139,6 +140,7 @@ ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = functio
139140
updateContainer(children, root, null, null);
140141
};
141142

143+
// $FlowFixMe[prop-missing] found when upgrading Flow
142144
ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = function(): void {
143145
if (__DEV__) {
144146
if (typeof arguments[0] === 'function') {
@@ -260,6 +262,7 @@ function scheduleHydration(target: Node) {
260262
queueExplicitHydrationTarget(target);
261263
}
262264
}
265+
// $FlowFixMe[prop-missing] found when upgrading Flow
263266
ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = scheduleHydration;
264267

265268
export function hydrateRoot(

packages/react-pg/src/ReactPostgres.js

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export function Pool(options: mixed) {
7777

7878
type NestedMap = Map<any, Record | NestedMap>;
7979

80+
// $FlowFixMe[prop-missing] found when upgrading Flow
8081
Pool.prototype.query = function(query: string, values?: Array<mixed>) {
8182
const pool = this.pool;
8283
const outerMap = unstable_getCacheForType(this.createRecordMap);

packages/react-reconciler/src/ReactFiberCommitWork.new.js

+1
Original file line numberDiff line numberDiff line change
@@ -1237,6 +1237,7 @@ function abortRootTransitions(
12371237
transitionInstance.pendingBoundaries !== null &&
12381238
transitionInstance.pendingBoundaries.has(deletedOffscreenInstance)
12391239
) {
1240+
// $FlowFixMe[incompatible-use] found when upgrading Flow
12401241
transitionInstance.pendingBoundaries.delete(
12411242
deletedOffscreenInstance,
12421243
);

packages/react-reconciler/src/ReactFiberCommitWork.old.js

+1
Original file line numberDiff line numberDiff line change
@@ -1237,6 +1237,7 @@ function abortRootTransitions(
12371237
transitionInstance.pendingBoundaries !== null &&
12381238
transitionInstance.pendingBoundaries.has(deletedOffscreenInstance)
12391239
) {
1240+
// $FlowFixMe[incompatible-use] found when upgrading Flow
12401241
transitionInstance.pendingBoundaries.delete(
12411242
deletedOffscreenInstance,
12421243
);

packages/react-reconciler/src/ReactFiberHooks.new.js

+1
Original file line numberDiff line numberDiff line change
@@ -1944,6 +1944,7 @@ function mountEvent<Args, Return, F: (...Array<Args>) => Return>(
19441944
"A function wrapped in useEvent can't be called during rendering.",
19451945
);
19461946
}
1947+
// $FlowFixMe[prop-missing] found when upgrading Flow
19471948
return eventFn._impl.apply(undefined, arguments);
19481949
};
19491950
eventFn._impl = callback;

packages/react-reconciler/src/ReactFiberHooks.old.js

+1
Original file line numberDiff line numberDiff line change
@@ -1944,6 +1944,7 @@ function mountEvent<Args, Return, F: (...Array<Args>) => Return>(
19441944
"A function wrapped in useEvent can't be called during rendering.",
19451945
);
19461946
}
1947+
// $FlowFixMe[prop-missing] found when upgrading Flow
19471948
return eventFn._impl.apply(undefined, arguments);
19481949
};
19491950
eventFn._impl = callback;

packages/react-reconciler/src/ReactFiberWorkLoop.new.js

+2
Original file line numberDiff line numberDiff line change
@@ -1425,6 +1425,7 @@ function markRootSuspended(root, suspendedLanes) {
14251425
suspendedLanes,
14261426
workInProgressRootInterleavedUpdatedLanes,
14271427
);
1428+
// $FlowFixMe[incompatible-call] found when upgrading Flow
14281429
markRootSuspended_dontCallThisOneDirectly(root, suspendedLanes);
14291430
}
14301431

@@ -2066,6 +2067,7 @@ function workLoopConcurrent() {
20662067
}
20672068

20682069
while (workInProgress !== null && !shouldYield()) {
2070+
// $FlowFixMe[incompatible-call] found when upgrading Flow
20692071
performUnitOfWork(workInProgress);
20702072
}
20712073
}

packages/react-reconciler/src/ReactFiberWorkLoop.old.js

+2
Original file line numberDiff line numberDiff line change
@@ -1425,6 +1425,7 @@ function markRootSuspended(root, suspendedLanes) {
14251425
suspendedLanes,
14261426
workInProgressRootInterleavedUpdatedLanes,
14271427
);
1428+
// $FlowFixMe[incompatible-call] found when upgrading Flow
14281429
markRootSuspended_dontCallThisOneDirectly(root, suspendedLanes);
14291430
}
14301431

@@ -2066,6 +2067,7 @@ function workLoopConcurrent() {
20662067
}
20672068

20682069
while (workInProgress !== null && !shouldYield()) {
2070+
// $FlowFixMe[incompatible-call] found when upgrading Flow
20692071
performUnitOfWork(workInProgress);
20702072
}
20712073
}

packages/shared/ReactComponentStackFrame.js

+1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ export function describeNativeComponentFrame(
123123
} catch (x) {
124124
control = x;
125125
}
126+
// $FlowFixMe[prop-missing] found when upgrading Flow
126127
fn.call(Fake.prototype);
127128
}
128129
} else {

scripts/flow/config/flowconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ munge_underscores=false
4848
%REACT_RENDERER_FLOW_OPTIONS%
4949

5050
[version]
51-
^0.185.0
51+
^0.188.0

yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -7912,10 +7912,10 @@ flatted@^2.0.0:
79127912
resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138"
79137913
integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==
79147914

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==
79197919

79207920
79217921
version "0.13.0"

0 commit comments

Comments
 (0)