Skip to content

Commit 6d748b4

Browse files
committed
Upgrade flow to 0.235.0
See [Flow changelog](https://github.com/facebook/flow/blob/main/Changelog.md) for changes in this version.
1 parent 0940414 commit 6d748b4

File tree

17 files changed

+27
-13
lines changed

17 files changed

+27
-13
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
"eslint-plugin-react-internal": "link:./scripts/eslint-rules",
6464
"fbjs-scripts": "^3.0.1",
6565
"filesize": "^6.0.1",
66-
"flow-bin": "^0.234.0",
67-
"flow-remove-types": "^2.234.0",
66+
"flow-bin": "^0.235.0",
67+
"flow-remove-types": "^2.235.0",
6868
"glob": "^7.1.6",
6969
"glob-stream": "^6.1.0",
7070
"google-closure-compiler": "^20230206.0.0",

packages/react-client/src/ReactClientConsoleConfigBrowser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export function printToConsole(
7070
} else if (methodName === 'warn') {
7171
warn.apply(console, newArgs);
7272
} else {
73-
// eslint-disable-next-line react-internal/no-production-logging
74-
console[methodName].apply(console, newArgs);
73+
// $FlowFixMe[invalid-computed-prop]
74+
console[methodName].apply(console, newArgs); // eslint-disable-line react-internal/no-production-logging
7575
}
7676
}

packages/react-client/src/ReactClientConsoleConfigPlain.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export function printToConsole(
5151
} else if (methodName === 'warn') {
5252
warn.apply(console, newArgs);
5353
} else {
54-
// eslint-disable-next-line react-internal/no-production-logging
55-
console[methodName].apply(console, newArgs);
54+
// $FlowFixMe[invalid-computed-prop]
55+
console[methodName].apply(console, newArgs); // eslint-disable-line react-internal/no-production-logging
5656
}
5757
}

packages/react-client/src/ReactClientConsoleConfigServer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export function printToConsole(
7171
} else if (methodName === 'warn') {
7272
warn.apply(console, newArgs);
7373
} else {
74-
// eslint-disable-next-line react-internal/no-production-logging
75-
console[methodName].apply(console, newArgs);
74+
// $FlowFixMe[invalid-computed-prop]
75+
console[methodName].apply(console, newArgs); // eslint-disable-line react-internal/no-production-logging
7676
}
7777
}

packages/react-debug-tools/src/ReactDebugHooks.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -774,6 +774,7 @@ const Dispatcher: DispatcherType = {
774774
const DispatcherProxyHandler = {
775775
get(target: DispatcherType, prop: string) {
776776
if (target.hasOwnProperty(prop)) {
777+
// $FlowFixMe[invalid-computed-prop]
777778
return target[prop];
778779
}
779780
const error = new Error('Missing method in Dispatcher: ' + prop);

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ const injectedRenderers: Map<
9797
let targetConsole: Object = console;
9898
let targetConsoleMethods: {[string]: $FlowFixMe} = {};
9999
for (const method in console) {
100+
// $FlowFixMe[invalid-computed-prop]
100101
targetConsoleMethods[method] = console[method];
101102
}
102103

@@ -110,6 +111,7 @@ export function dangerous_setTargetConsoleForTesting(
110111

111112
targetConsoleMethods = ({}: {[string]: $FlowFixMe});
112113
for (const method in targetConsole) {
114+
// $FlowFixMe[invalid-computed-prop]
113115
targetConsoleMethods[method] = console[method];
114116
}
115117
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3391,6 +3391,7 @@ export function attach(
33913391
// Temporarily disable all console logging before re-running the hook.
33923392
for (const method in console) {
33933393
try {
3394+
// $FlowFixMe[invalid-computed-prop]
33943395
originalConsoleMethods[method] = console[method];
33953396
// $FlowFixMe[prop-missing]
33963397
console[method] = () => {};

packages/react-devtools-shared/src/hook.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export function installHook(target: any): DevToolsHook | null {
3232
let targetConsole: Object = console;
3333
let targetConsoleMethods: {[string]: $FlowFixMe} = {};
3434
for (const method in console) {
35+
// $FlowFixMe[invalid-computed-prop]
3536
targetConsoleMethods[method] = console[method];
3637
}
3738

@@ -42,6 +43,7 @@ export function installHook(target: any): DevToolsHook | null {
4243

4344
targetConsoleMethods = ({}: {[string]: $FlowFixMe});
4445
for (const method in targetConsole) {
46+
// $FlowFixMe[invalid-computed-prop]
4547
targetConsoleMethods[method] = console[method];
4648
}
4749
}

packages/react-dom-bindings/src/client/DOMAccessibilityRoles.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const tagToRoleMappings = {
6060
};
6161

6262
function getImplicitRole(element: Element): string | null {
63+
// $FlowFixMe[invalid-computed-prop]
6364
const mappedByTag = tagToRoleMappings[element.tagName];
6465
if (mappedByTag !== undefined) {
6566
return mappedByTag;

packages/react-dom-bindings/src/client/DOMPropertyOperations.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ export function setValueForPropertyOnCustomComponent(
196196
const eventName = name.slice(2, useCapture ? name.length - 7 : undefined);
197197

198198
const prevProps = getFiberCurrentPropsFromNode(node);
199+
// $FlowFixMe[invalid-computed-prop]
199200
const prevValue = prevProps != null ? prevProps[name] : null;
200201
if (typeof prevValue === 'function') {
201202
node.removeEventListener(eventName, prevValue, useCapture);

0 commit comments

Comments
 (0)