@samitouri / QOS-React-2 / commits / aed33a49cc

Flow upgrade to 0.185

ghstack-source-id: 8104710c9643aa54961a02546f253dc99d70dd5d Pull Request resolved: https://github.com/facebook/react/pull/25420

Jan Kassens committed Oct 4, 2022 at 13:42 UTC aed33a49ccac5f42ea1bde6e97f2f470edcd6574
10 files changed +27 -12
package.json
+1 -1
@@ -63,7 +63,7 @@
63 "eslint-plugin-react-internal": "link:./scripts/eslint-rules",
64 "fbjs-scripts": "1.2.0",
65 "filesize": "^6.0.1",
66 - "flow-bin": "^0.182.0",
66 + "flow-bin": "^0.185.0",
67 "glob": "^7.1.6",
68 "glob-stream": "^6.1.0",
69 "google-closure-compiler": "^20200517.0.0",
packages/react-client/src/ReactFlightClient.js
+1
@@ -321,6 +321,7 @@ function initializeModelChunk<T>(chunk: ResolvedModelChunk<T>): void {
321 initializingChunkBlockedModel !== null &&
322 initializingChunkBlockedModel.deps > 0
323 ) {
324 + // $FlowFixMe[incompatible-type]: found when upgrading Flow
325 initializingChunkBlockedModel.value = value;
326 // We discovered new dependencies on modules that are not yet resolved.
327 // We have to go the BLOCKED state until they're resolved.
packages/react-devtools-shell/src/app/InspectableElements/EdgeCaseObjects.js
+2
@@ -16,7 +16,9 @@ const objectWithModifiedHasOwnProperty = {
16 };
17
18 const objectWithNullProto = Object.create(null);
19 +// $FlowFixMe[prop-missing] found when upgrading Flow
20 objectWithNullProto.foo = 'abc';
21 +// $FlowFixMe[prop-missing] found when upgrading Flow
22 objectWithNullProto.bar = 123;
23
24 export default function EdgeCaseObjects(): React.Node {
packages/react-dom-bindings/src/client/ReactDOMFloatClient.js
+1
@@ -528,6 +528,7 @@ function createStyleResource(
528 } else {
529 const hint = preloadResources.get(href);
530 if (hint) {
531 + // $FlowFixMe[incompatible-type]: found when upgrading Flow
532 resource.hint = hint;
533 // If a preload for this style Resource already exists there are certain props we want to adopt
534 // on the style Resource, primarily focussed on making sure the style network pathways utilize
packages/react-native-renderer/src/ReactFabricEventEmitter.js
+1
@@ -117,6 +117,7 @@ export function dispatchEvent(
117 const event = {eventName: topLevelType, nativeEvent};
118 // $FlowFixMe[class-object-subtyping] found when upgrading Flow
119 RawEventEmitter.emit(topLevelType, event);
120 + // $FlowFixMe[class-object-subtyping] found when upgrading Flow
121 RawEventEmitter.emit('*', event);
122
123 // Heritage plugin event system
packages/react-reconciler/src/ReactFiberWorkLoop.new.js
+7 -3
@@ -404,18 +404,19 @@ export function addMarkerProgressCallbackToPendingTransition(
404 ) {
405 if (enableTransitionTracing) {
406 if (currentPendingTransitionCallbacks === null) {
407 - currentPendingTransitionCallbacks = {
407 + currentPendingTransitionCallbacks = ({
408 transitionStart: null,
409 transitionProgress: null,
410 transitionComplete: null,
411 markerProgress: new Map(),
412 markerIncomplete: null,
413 markerComplete: null,
414 - };
414 + }: PendingTransitionCallbacks);
415 }
416
417 if (currentPendingTransitionCallbacks.markerProgress === null) {
418 - // $FlowFixMe[incompatible-use] found when upgrading Flow
418 + // $FlowFixMe[incompatible-use]
419 + // $FlowFixMe[incompatible-type]
420 currentPendingTransitionCallbacks.markerProgress = new Map();
421 }
422
@@ -445,6 +446,7 @@ export function addMarkerIncompleteCallbackToPendingTransition(
446
447 if (currentPendingTransitionCallbacks.markerIncomplete === null) {
448 // $FlowFixMe[incompatible-use] found when upgrading Flow
449 + // $FlowFixMe[incompatible-type] found when upgrading Flow
450 currentPendingTransitionCallbacks.markerIncomplete = new Map();
451 }
452
@@ -473,6 +475,7 @@ export function addMarkerCompleteCallbackToPendingTransition(
475
476 if (currentPendingTransitionCallbacks.markerComplete === null) {
477 // $FlowFixMe[incompatible-use] found when upgrading Flow
478 + // $FlowFixMe[incompatible-type] found when upgrading Flow
479 currentPendingTransitionCallbacks.markerComplete = new Map();
480 }
481
@@ -501,6 +504,7 @@ export function addTransitionProgressCallbackToPendingTransition(
504
505 if (currentPendingTransitionCallbacks.transitionProgress === null) {
506 // $FlowFixMe[incompatible-use] found when upgrading Flow
507 + // $FlowFixMe[incompatible-type] found when upgrading Flow
508 currentPendingTransitionCallbacks.transitionProgress = new Map();
509 }
510
packages/react-reconciler/src/ReactFiberWorkLoop.old.js
+7 -3
@@ -404,18 +404,19 @@ export function addMarkerProgressCallbackToPendingTransition(
404 ) {
405 if (enableTransitionTracing) {
406 if (currentPendingTransitionCallbacks === null) {
407 - currentPendingTransitionCallbacks = {
407 + currentPendingTransitionCallbacks = ({
408 transitionStart: null,
409 transitionProgress: null,
410 transitionComplete: null,
411 markerProgress: new Map(),
412 markerIncomplete: null,
413 markerComplete: null,
414 - };
414 + }: PendingTransitionCallbacks);
415 }
416
417 if (currentPendingTransitionCallbacks.markerProgress === null) {
418 - // $FlowFixMe[incompatible-use] found when upgrading Flow
418 + // $FlowFixMe[incompatible-use]
419 + // $FlowFixMe[incompatible-type]
420 currentPendingTransitionCallbacks.markerProgress = new Map();
421 }
422
@@ -445,6 +446,7 @@ export function addMarkerIncompleteCallbackToPendingTransition(
446
447 if (currentPendingTransitionCallbacks.markerIncomplete === null) {
448 // $FlowFixMe[incompatible-use] found when upgrading Flow
449 + // $FlowFixMe[incompatible-type] found when upgrading Flow
450 currentPendingTransitionCallbacks.markerIncomplete = new Map();
451 }
452
@@ -473,6 +475,7 @@ export function addMarkerCompleteCallbackToPendingTransition(
475
476 if (currentPendingTransitionCallbacks.markerComplete === null) {
477 // $FlowFixMe[incompatible-use] found when upgrading Flow
478 + // $FlowFixMe[incompatible-type] found when upgrading Flow
479 currentPendingTransitionCallbacks.markerComplete = new Map();
480 }
481
@@ -501,6 +504,7 @@ export function addTransitionProgressCallbackToPendingTransition(
504
505 if (currentPendingTransitionCallbacks.transitionProgress === null) {
506 // $FlowFixMe[incompatible-use] found when upgrading Flow
507 + // $FlowFixMe[incompatible-type] found when upgrading Flow
508 currentPendingTransitionCallbacks.transitionProgress = new Map();
509 }
510
packages/react-server-dom-webpack/src/ReactFlightWebpackNodeRegister.js
+1
@@ -101,6 +101,7 @@ module.exports = function register() {
101 name: '*', // Represents the whole object instead of a particular import.
102 async: false,
103 };
104 + // $FlowFixMe[incompatible-call] found when upgrading Flow
105 module.exports = new Proxy(moduleReference, proxyHandlers);
106 };
107
scripts/flow/config/flowconfig
+2 -1
@@ -43,9 +43,10 @@ untyped-type-import=error
43 %CI_MAX_WORKERS%
44 exact_by_default=true
45 munge_underscores=false
46 +inference_mode=classic
47
48 # Substituted by createFlowConfig.js:
49 %REACT_RENDERER_FLOW_OPTIONS%
50
51 [version]
51 -^0.182.0
52 +^0.185.0
yarn.lock
+4 -4
@@ -7912,10 +7912,10 @@ flatted@^2.0.0:
7912 resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138"
7913 integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==
7914
7915 -flow-bin@^0.182.0:
7916 - version "0.182.0"
7917 - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.182.0.tgz#1dacbd72465743670412ada015d3182deda6f966"
7918 - integrity sha512-Ux90c2sMfoV/VVjOEFT2OHFJFnyfoIbTK/5AKAMnU4Skfru1G+FyS5YLu3XxQl0R6mpA9+rrFlPfYZq/5B+J3w==
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==
7919
7920 fluent-syntax@0.13.0:
7921 version "0.13.0"