Skip to content

Commit 3966f77

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 9922e07 commit 3966f77

16 files changed

+26
-13
lines changed

package.json

+2-2
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

+2-2
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

+2-2
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

+2-2
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

+1
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

+2
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

+1
Original file line numberDiff line numberDiff line change
@@ -3386,6 +3386,7 @@ export function attach(
33863386
// Temporarily disable all console logging before re-running the hook.
33873387
for (const method in console) {
33883388
try {
3389+
// $FlowFixMe[invalid-computed-prop]
33893390
originalConsoleMethods[method] = console[method];
33903391
// $FlowFixMe[prop-missing]
33913392
console[method] = () => {};

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

+2
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

+1
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

+1
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);

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

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export default function getListener(
6262
// Work in progress.
6363
return null;
6464
}
65+
// $FlowFixMe[invalid-computed-prop]
6566
const listener = props[registrationName];
6667
if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
6768
return null;

packages/react-dom-bindings/src/server/ReactDOMFlightServerHostDispatcher.js

+1
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ function trimOptions<
238238
let hasProperties = false;
239239
const trimmed: T = ({}: any);
240240
for (const key in options) {
241+
// $FlowFixMe[invalid-computed-prop]
241242
if (options[key] != null) {
242243
hasProperties = true;
243244
(trimmed: any)[key] = options[key];

packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js

+1
Original file line numberDiff line numberDiff line change
@@ -6071,6 +6071,7 @@ function getPreloadAsHeader(
60716071
let value = `<${escapedHref}>; rel=preload; as="${escapedAs}"`;
60726072
for (const paramName in params) {
60736073
if (hasOwnProperty.call(params, paramName)) {
6074+
// $FlowFixMe[invalid-computed-prop]
60746075
const paramValue = params[paramName];
60756076
if (typeof paramValue === 'string') {
60766077
value += `; ${paramName.toLowerCase()}="${escapeStringForLinkHeaderQuotedParamValueContext(

packages/react/src/ReactChildren.js

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ function escape(key: string): string {
4242
':': '=2',
4343
};
4444
const escapedString = key.replace(escapeRegex, function (match) {
45+
// $FlowFixMe[invalid-computed-prop]
4546
return escaperLookup[match];
4647
});
4748

packages/shared/enqueueTask.js

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export default function enqueueTask(task: () => void): void {
1616
// read require off the module object to get around the bundlers.
1717
// we don't want them to detect a require and bundle a Node polyfill.
1818
const requireString = ('require' + Math.random()).slice(0, 7);
19+
// $FlowFixMe[invalid-computed-prop]
1920
const nodeRequire = module && module[requireString];
2021
// assuming we're in node, let's try to get node's
2122
// version of setImmediate, bypassing fake timers if any.

yarn.lock

+5-5
Original file line numberDiff line numberDiff line change
@@ -8321,12 +8321,12 @@ flatted@^3.2.9:
83218321
resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a"
83228322
integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==
83238323

8324-
flow-bin@^0.234.0:
8325-
version "0.234.0"
8326-
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.234.0.tgz#17dfc5aac1d928b6d7194f93bd0bf742d735c77d"
8327-
integrity sha512-uLmvfFRW6yEcz2wSJ2H6192RwknBpzAHBezDcXzmxJASxB6QzjKadhPxZvsJ74uJ+9Th1hDNuRB4mGrVUeneyA==
8324+
flow-bin@^0.235.0:
8325+
version "0.235.1"
8326+
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.235.1.tgz#7dfca9c480bb7cb83fa3caca58386e9beca09bc3"
8327+
integrity sha512-SuXw5NQDIdSBMg/NgvS5mzdI6dPEYWubnucnYno9wWLd6xoK1nkH6t2Dn2GsML9bIoVqp3E/ni1jo18A4G4FrQ==
83288328

8329-
flow-remove-types@^2.234.0:
8329+
flow-remove-types@^2.235.0:
83308330
version "2.238.2"
83318331
resolved "https://registry.yarnpkg.com/flow-remove-types/-/flow-remove-types-2.238.2.tgz#85c9d26e83ba395f0206a23bce438223bc035609"
83328332
integrity sha512-WJXRomjPiZ34nG14y7AceoPxg1L00FxjPSA3TDBTG2OPt8QFNtiYEmO4/3WG58n3C4wjxyVuoE6KjxQIvCDyjw==

0 commit comments

Comments
 (0)