Skip to content

Commit

Permalink
Flow upgrade to 0.188
Browse files Browse the repository at this point in the history
ghstack-source-id: 5c359b97cc0a2587cf55ff879c863415a2c13127
Pull Request resolved: #25423
  • Loading branch information
kassens committed Oct 4, 2022
1 parent 3b6826e commit 9813ede
Show file tree
Hide file tree
Showing 17 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"eslint-plugin-react-internal": "link:./scripts/eslint-rules",
"fbjs-scripts": "1.2.0",
"filesize": "^6.0.1",
"flow-bin": "^0.185.0",
"flow-bin": "^0.188.0",
"glob": "^7.1.6",
"glob-stream": "^6.1.0",
"google-closure-compiler": "^20200517.0.0",
Expand Down
1 change: 1 addition & 0 deletions packages/react-devtools-core/src/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ export function launchEditor(
// There's an existing editor process already and it's attached
// to the terminal, so go kill it. Otherwise two separate editor
// instances attach to the stdin/stdout which gets confusing.
// $FlowFixMe[incompatible-use] found when upgrading Flow
childProcess.kill('SIGKILL');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export function describeNativeComponentFrame(
} catch (x) {
control = x;
}
// $FlowFixMe[prop-missing] found when upgrading Flow
fn.call(Fake.prototype);
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ function wrapWithHoc(Component, index) {
// $FlowFixMe
const displayName = Component.displayName || Component.name;

// $FlowFixMe[incompatible-type] found when upgrading Flow
HOC.displayName = `withHoc${index}(${displayName})`;
return HOC;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ function wrapWithHoc(Component) {
}
// $FlowFixMe
const displayName = Component.displayName || Component.name;
// $FlowFixMe[incompatible-type] found when upgrading Flow
Hoc.displayName = `withHoc(${displayName})`;
return Hoc;
}
Expand Down
1 change: 1 addition & 0 deletions packages/react-dom-bindings/src/events/SyntheticEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ function createSyntheticEvent(Interface: EventInterfaceType) {
return this;
}

// $FlowFixMe[prop-missing] found when upgrading Flow
assign(SyntheticBaseEvent.prototype, {
preventDefault: function() {
this.defaultPrevented = true;
Expand Down
3 changes: 3 additions & 0 deletions packages/react-dom/src/client/ReactDOMRoot.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ function ReactDOMRoot(internalRoot: FiberRoot) {
this._internalRoot = internalRoot;
}

// $FlowFixMe[prop-missing] found when upgrading Flow
ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = function(
children: ReactNodeList,
): void {
Expand Down Expand Up @@ -139,6 +140,7 @@ ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = functio
updateContainer(children, root, null, null);
};

// $FlowFixMe[prop-missing] found when upgrading Flow
ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = function(): void {
if (__DEV__) {
if (typeof arguments[0] === 'function') {
Expand Down Expand Up @@ -260,6 +262,7 @@ function scheduleHydration(target: Node) {
queueExplicitHydrationTarget(target);
}
}
// $FlowFixMe[prop-missing] found when upgrading Flow
ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = scheduleHydration;

export function hydrateRoot(
Expand Down
1 change: 1 addition & 0 deletions packages/react-pg/src/ReactPostgres.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export function Pool(options: mixed) {

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

// $FlowFixMe[prop-missing] found when upgrading Flow
Pool.prototype.query = function(query: string, values?: Array<mixed>) {
const pool = this.pool;
const outerMap = unstable_getCacheForType(this.createRecordMap);
Expand Down
1 change: 1 addition & 0 deletions packages/react-reconciler/src/ReactFiberCommitWork.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -1237,6 +1237,7 @@ function abortRootTransitions(
transitionInstance.pendingBoundaries !== null &&
transitionInstance.pendingBoundaries.has(deletedOffscreenInstance)
) {
// $FlowFixMe[incompatible-use] found when upgrading Flow
transitionInstance.pendingBoundaries.delete(
deletedOffscreenInstance,
);
Expand Down
1 change: 1 addition & 0 deletions packages/react-reconciler/src/ReactFiberCommitWork.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -1237,6 +1237,7 @@ function abortRootTransitions(
transitionInstance.pendingBoundaries !== null &&
transitionInstance.pendingBoundaries.has(deletedOffscreenInstance)
) {
// $FlowFixMe[incompatible-use] found when upgrading Flow
transitionInstance.pendingBoundaries.delete(
deletedOffscreenInstance,
);
Expand Down
1 change: 1 addition & 0 deletions packages/react-reconciler/src/ReactFiberHooks.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -1944,6 +1944,7 @@ function mountEvent<Args, Return, F: (...Array<Args>) => Return>(
"A function wrapped in useEvent can't be called during rendering.",
);
}
// $FlowFixMe[prop-missing] found when upgrading Flow
return eventFn._impl.apply(undefined, arguments);
};
eventFn._impl = callback;
Expand Down
1 change: 1 addition & 0 deletions packages/react-reconciler/src/ReactFiberHooks.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -1944,6 +1944,7 @@ function mountEvent<Args, Return, F: (...Array<Args>) => Return>(
"A function wrapped in useEvent can't be called during rendering.",
);
}
// $FlowFixMe[prop-missing] found when upgrading Flow
return eventFn._impl.apply(undefined, arguments);
};
eventFn._impl = callback;
Expand Down
2 changes: 2 additions & 0 deletions packages/react-reconciler/src/ReactFiberWorkLoop.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -1425,6 +1425,7 @@ function markRootSuspended(root, suspendedLanes) {
suspendedLanes,
workInProgressRootInterleavedUpdatedLanes,
);
// $FlowFixMe[incompatible-call] found when upgrading Flow
markRootSuspended_dontCallThisOneDirectly(root, suspendedLanes);
}

Expand Down Expand Up @@ -2066,6 +2067,7 @@ function workLoopConcurrent() {
}

while (workInProgress !== null && !shouldYield()) {
// $FlowFixMe[incompatible-call] found when upgrading Flow
performUnitOfWork(workInProgress);
}
}
Expand Down
2 changes: 2 additions & 0 deletions packages/react-reconciler/src/ReactFiberWorkLoop.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -1425,6 +1425,7 @@ function markRootSuspended(root, suspendedLanes) {
suspendedLanes,
workInProgressRootInterleavedUpdatedLanes,
);
// $FlowFixMe[incompatible-call] found when upgrading Flow
markRootSuspended_dontCallThisOneDirectly(root, suspendedLanes);
}

Expand Down Expand Up @@ -2066,6 +2067,7 @@ function workLoopConcurrent() {
}

while (workInProgress !== null && !shouldYield()) {
// $FlowFixMe[incompatible-call] found when upgrading Flow
performUnitOfWork(workInProgress);
}
}
Expand Down
1 change: 1 addition & 0 deletions packages/shared/ReactComponentStackFrame.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export function describeNativeComponentFrame(
} catch (x) {
control = x;
}
// $FlowFixMe[prop-missing] found when upgrading Flow
fn.call(Fake.prototype);
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion scripts/flow/config/flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ munge_underscores=false
%REACT_RENDERER_FLOW_OPTIONS%

[version]
^0.185.0
^0.188.0
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7912,10 +7912,10 @@ flatted@^2.0.0:
resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138"
integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==

flow-bin@^0.185.0:
version "0.185.2"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.185.2.tgz#b45a07d45cf641198e86e47848e35f64b0688c4c"
integrity sha512-Vphs8Z4Qo17dzlPKe/l8M85JvGn1Tf5NV6xESZLg8p9ktdIbNUYaxnq/WBQPoESiLrGdrC2v+rfezfh3tvxkvQ==
flow-bin@^0.188.0:
version "0.188.1"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.188.1.tgz#1043ec955eec8cd402ec9fb4c49054bf14368c06"
integrity sha512-tQehbFoeXKz/MZqEClBB2ezuT1HHKoBlv6t8mAoUdFk1PaFhqcEmjx+1Bn0xygykrqHy0FY6C3z+AGleOnFbdQ==

fluent-syntax@0.13.0:
version "0.13.0"
Expand Down

0 comments on commit 9813ede

Please sign in to comment.