@samitouri / QOS-React-1 / commits / 21129d34a5

Upgrade flow to 0.235.0 (#30118)

See [Flow changelog](https://github.com/facebook/flow/blob/main/Changelog.md) for changes in this version.

Jan Kassens committed Jul 8, 2024 at 14:11 UTC 21129d34a5b12ece1901cfa89d139acaef76de57
17 files changed +27 -13
package.json
+2 -2
@@ -63,8 +63,8 @@
63 "eslint-plugin-react-internal": "link:./scripts/eslint-rules",
64 "fbjs-scripts": "^3.0.1",
65 "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",
68 "glob": "^7.1.6",
69 "glob-stream": "^6.1.0",
70 "google-closure-compiler": "^20230206.0.0",
packages/react-client/src/ReactClientConsoleConfigBrowser.js
+2 -2
@@ -70,7 +70,7 @@ export function printToConsole(
70 } else if (methodName === 'warn') {
71 warn.apply(console, newArgs);
72 } 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
75 }
76 }
packages/react-client/src/ReactClientConsoleConfigPlain.js
+2 -2
@@ -51,7 +51,7 @@ export function printToConsole(
51 } else if (methodName === 'warn') {
52 warn.apply(console, newArgs);
53 } 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
56 }
57 }
packages/react-client/src/ReactClientConsoleConfigServer.js
+2 -2
@@ -71,7 +71,7 @@ export function printToConsole(
71 } else if (methodName === 'warn') {
72 warn.apply(console, newArgs);
73 } 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
76 }
77 }
packages/react-debug-tools/src/ReactDebugHooks.js
+1
@@ -774,6 +774,7 @@ const Dispatcher: DispatcherType = {
774 const DispatcherProxyHandler = {
775 get(target: DispatcherType, prop: string) {
776 if (target.hasOwnProperty(prop)) {
777 + // $FlowFixMe[invalid-computed-prop]
778 return target[prop];
779 }
780 const error = new Error('Missing method in Dispatcher: ' + prop);
packages/react-devtools-shared/src/backend/console.js
+2
@@ -97,6 +97,7 @@ const injectedRenderers: Map<
97 let targetConsole: Object = console;
98 let targetConsoleMethods: {[string]: $FlowFixMe} = {};
99 for (const method in console) {
100 + // $FlowFixMe[invalid-computed-prop]
101 targetConsoleMethods[method] = console[method];
102 }
103
@@ -110,6 +111,7 @@ export function dangerous_setTargetConsoleForTesting(
111
112 targetConsoleMethods = ({}: {[string]: $FlowFixMe});
113 for (const method in targetConsole) {
114 + // $FlowFixMe[invalid-computed-prop]
115 targetConsoleMethods[method] = console[method];
116 }
117 }
packages/react-devtools-shared/src/backend/renderer.js
+1
@@ -3391,6 +3391,7 @@ export function attach(
3391 // Temporarily disable all console logging before re-running the hook.
3392 for (const method in console) {
3393 try {
3394 + // $FlowFixMe[invalid-computed-prop]
3395 originalConsoleMethods[method] = console[method];
3396 // $FlowFixMe[prop-missing]
3397 console[method] = () => {};
packages/react-devtools-shared/src/hook.js
+2
@@ -32,6 +32,7 @@ export function installHook(target: any): DevToolsHook | null {
32 let targetConsole: Object = console;
33 let targetConsoleMethods: {[string]: $FlowFixMe} = {};
34 for (const method in console) {
35 + // $FlowFixMe[invalid-computed-prop]
36 targetConsoleMethods[method] = console[method];
37 }
38
@@ -42,6 +43,7 @@ export function installHook(target: any): DevToolsHook | null {
43
44 targetConsoleMethods = ({}: {[string]: $FlowFixMe});
45 for (const method in targetConsole) {
46 + // $FlowFixMe[invalid-computed-prop]
47 targetConsoleMethods[method] = console[method];
48 }
49 }
packages/react-dom-bindings/src/client/DOMAccessibilityRoles.js
+1
@@ -60,6 +60,7 @@ const tagToRoleMappings = {
60 };
61
62 function getImplicitRole(element: Element): string | null {
63 + // $FlowFixMe[invalid-computed-prop]
64 const mappedByTag = tagToRoleMappings[element.tagName];
65 if (mappedByTag !== undefined) {
66 return mappedByTag;
packages/react-dom-bindings/src/client/DOMPropertyOperations.js
+1
@@ -196,6 +196,7 @@ export function setValueForPropertyOnCustomComponent(
196 const eventName = name.slice(2, useCapture ? name.length - 7 : undefined);
197
198 const prevProps = getFiberCurrentPropsFromNode(node);
199 + // $FlowFixMe[invalid-computed-prop]
200 const prevValue = prevProps != null ? prevProps[name] : null;
201 if (typeof prevValue === 'function') {
202 node.removeEventListener(eventName, prevValue, useCapture);
packages/react-dom-bindings/src/events/getListener.js
+1
@@ -62,6 +62,7 @@ export default function getListener(
62 // Work in progress.
63 return null;
64 }
65 + // $FlowFixMe[invalid-computed-prop]
66 const listener = props[registrationName];
67 if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
68 return null;
packages/react-dom-bindings/src/server/ReactDOMFlightServerHostDispatcher.js
+1
@@ -238,6 +238,7 @@ function trimOptions<
238 let hasProperties = false;
239 const trimmed: T = ({}: any);
240 for (const key in options) {
241 + // $FlowFixMe[invalid-computed-prop]
242 if (options[key] != null) {
243 hasProperties = true;
244 (trimmed: any)[key] = options[key];
packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js
+1
@@ -6073,6 +6073,7 @@ function getPreloadAsHeader(
6073 let value = `<${escapedHref}>; rel=preload; as="${escapedAs}"`;
6074 for (const paramName in params) {
6075 if (hasOwnProperty.call(params, paramName)) {
6076 + // $FlowFixMe[invalid-computed-prop]
6077 const paramValue = params[paramName];
6078 if (typeof paramValue === 'string') {
6079 value += `; ${paramName.toLowerCase()}="${escapeStringForLinkHeaderQuotedParamValueContext(
packages/react-native-renderer/src/legacy-events/EventPluginRegistry.js
+1
@@ -107,6 +107,7 @@ function publishEventForPlugin(
107 if (phasedRegistrationNames) {
108 for (const phaseName in phasedRegistrationNames) {
109 if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
110 + // $FlowFixMe[invalid-computed-prop]
111 const phasedRegistrationName = phasedRegistrationNames[phaseName];
112 publishRegistrationName(
113 phasedRegistrationName,
packages/react/src/ReactChildren.js
+1
@@ -42,6 +42,7 @@ function escape(key: string): string {
42 ':': '=2',
43 };
44 const escapedString = key.replace(escapeRegex, function (match) {
45 + // $FlowFixMe[invalid-computed-prop]
46 return escaperLookup[match];
47 });
48
packages/shared/enqueueTask.js
+1
@@ -16,6 +16,7 @@ export default function enqueueTask(task: () => void): void {
16 // read require off the module object to get around the bundlers.
17 // we don't want them to detect a require and bundle a Node polyfill.
18 const requireString = ('require' + Math.random()).slice(0, 7);
19 + // $FlowFixMe[invalid-computed-prop]
20 const nodeRequire = module && module[requireString];
21 // assuming we're in node, let's try to get node's
22 // version of setImmediate, bypassing fake timers if any.
yarn.lock
+5 -5
@@ -8321,12 +8321,12 @@ flatted@^3.2.9:
8321 resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a"
8322 integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==
8323
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==
8328
8329 -flow-remove-types@^2.234.0:
8329 +flow-remove-types@^2.235.0:
8330 version "2.238.2"
8331 resolved "https://registry.yarnpkg.com/flow-remove-types/-/flow-remove-types-2.238.2.tgz#85c9d26e83ba395f0206a23bce438223bc035609"
8332 integrity sha512-WJXRomjPiZ34nG14y7AceoPxg1L00FxjPSA3TDBTG2OPt8QFNtiYEmO4/3WG58n3C4wjxyVuoE6KjxQIvCDyjw==