@samitouri / QOS-React / commits / d73b6f1110

Update Flow to 0.261 (#34255)

- 0.261 required to pull out a constant to preserve refinement - 0.259 needed some updated suppressions for hacky stuff

Jan Kassens committed Aug 21, 2025 at 15:02 UTC d73b6f111057e09b9886e8edd2bc70fa56229489
10 files changed +19 -18
package.json
+2 -2
@@ -73,8 +73,8 @@
73 "eslint-plugin-react-internal": "link:./scripts/eslint-rules",
74 "fbjs-scripts": "^3.0.1",
75 "filesize": "^6.0.1",
76 - "flow-bin": "^0.258",
77 - "flow-remove-types": "^2.258",
76 + "flow-bin": "^0.261",
77 + "flow-remove-types": "^2.261",
78 "glob": "^7.1.6",
79 "glob-stream": "^6.1.0",
80 "google-closure-compiler": "^20230206.0.0",
packages/react-client/src/ReactFlightReplyClient.js
+1 -1
@@ -1183,7 +1183,7 @@ function bind(this: Function): Function {
1183 const referenceClosure = knownServerReferences.get(this);
1184
1185 if (!referenceClosure) {
1186 - // $FlowFixMe[prop-missing]
1186 + // $FlowFixMe[incompatible-call]
1187 return FunctionBind.apply(this, arguments);
1188 }
1189
packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js
+3 -2
@@ -2991,7 +2991,8 @@ FragmentInstance.prototype.unobserveUsing = function (
2991 this: FragmentInstanceType,
2992 observer: IntersectionObserver | ResizeObserver,
2993 ): void {
2994 - if (this._observers === null || !this._observers.has(observer)) {
2994 + const observers = this._observers;
2995 + if (observers === null || !observers.has(observer)) {
2996 if (__DEV__) {
2997 console.error(
2998 'You are calling unobserveUsing() with an observer that is not being observed with this fragment ' +
@@ -2999,7 +3000,7 @@ FragmentInstance.prototype.unobserveUsing = function (
3000 );
3001 }
3002 } else {
3002 - this._observers.delete(observer);
3003 + observers.delete(observer);
3004 traverseFragmentInstance(this._fragmentFiber, unobserveChild, observer);
3005 }
3006 };
packages/react-native-renderer/src/ReactFiberConfigFabric.js
+3 -2
@@ -651,7 +651,8 @@ FragmentInstance.prototype.unobserveUsing = function (
651 this: FragmentInstanceType,
652 observer: IntersectionObserver,
653 ): void {
654 - if (this._observers === null || !this._observers.has(observer)) {
654 + const observers = this._observers;
655 + if (observers === null || !observers.has(observer)) {
656 if (__DEV__) {
657 console.error(
658 'You are calling unobserveUsing() with an observer that is not being observed with this fragment ' +
@@ -659,7 +660,7 @@ FragmentInstance.prototype.unobserveUsing = function (
660 );
661 }
662 } else {
662 - this._observers.delete(observer);
663 + observers.delete(observer);
664 traverseFragmentInstance(this._fragmentFiber, unobserveChild, observer);
665 }
666 };
packages/react-server-dom-esm/src/ReactFlightESMReferences.js
+1 -1
@@ -49,7 +49,7 @@ const FunctionBind = Function.prototype.bind;
49 // $FlowFixMe[method-unbinding]
50 const ArraySlice = Array.prototype.slice;
51 function bind(this: ServerReference<any>): any {
52 - // $FlowFixMe[prop-missing]
52 + // $FlowFixMe[incompatible-call]
53 const newFn = FunctionBind.apply(this, arguments);
54 if (this.$$typeof === SERVER_REFERENCE_TAG) {
55 if (__DEV__) {
packages/react-server-dom-parcel/src/ReactFlightParcelReferences.js
+1 -1
@@ -56,7 +56,7 @@ const FunctionBind = Function.prototype.bind;
56 // $FlowFixMe[method-unbinding]
57 const ArraySlice = Array.prototype.slice;
58 function bind(this: ServerReference<any>): any {
59 - // $FlowFixMe[prop-missing]
59 + // $FlowFixMe[incompatible-call]
60 const newFn = FunctionBind.apply(this, arguments);
61 if (this.$$typeof === SERVER_REFERENCE_TAG) {
62 if (__DEV__) {
packages/react-server-dom-turbopack/src/ReactFlightTurbopackReferences.js
+1 -1
@@ -63,7 +63,7 @@ const FunctionBind = Function.prototype.bind;
63 // $FlowFixMe[method-unbinding]
64 const ArraySlice = Array.prototype.slice;
65 function bind(this: ServerReference<any>): any {
66 - // $FlowFixMe[prop-missing]
66 + // $FlowFixMe[incompatible-call]
67 const newFn = FunctionBind.apply(this, arguments);
68 if (this.$$typeof === SERVER_REFERENCE_TAG) {
69 if (__DEV__) {
packages/react-server-dom-webpack/src/ReactFlightWebpackReferences.js
+1 -2
@@ -63,8 +63,7 @@ const FunctionBind = Function.prototype.bind;
63 // $FlowFixMe[method-unbinding]
64 const ArraySlice = Array.prototype.slice;
65 function bind(this: ServerReference<any>): any {
66 - // $FlowFixMe[unsupported-syntax]
67 - // $FlowFixMe[prop-missing]
66 + // $FlowFixMe[incompatible-call]
67 const newFn = FunctionBind.apply(this, arguments);
68 if (this.$$typeof === SERVER_REFERENCE_TAG) {
69 if (__DEV__) {
packages/react-server/src/ReactFlightServer.js
+1 -1
@@ -408,7 +408,7 @@ function patchConsole(consoleInst: typeof console, methodName: string) {
408
409 emitConsoleChunk(request, methodName, owner, env, stack, args);
410 }
411 - // $FlowFixMe[prop-missing]
411 + // $FlowFixMe[incompatible-call]
412 return originalMethod.apply(this, arguments);
413 };
414 if (originalName) {
yarn.lock
+5 -5
@@ -9108,12 +9108,12 @@ flatted@^3.2.9:
9108 resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a"
9109 integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==
9110
9111 -flow-bin@^0.258:
9112 - version "0.258.1"
9113 - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.258.1.tgz#5580e6085196800487dae67a71777b572d0c9552"
9114 - integrity sha512-v08KZw8jiwhA01V59kuCLd628kDJ0ZTX4jguh0P2rboF9rMlGmV8Rd+io1f1U9nWGoORTP2ZUI27X42jFA6eDQ==
9111 +flow-bin@^0.261:
9112 + version "0.261.2"
9113 + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.261.2.tgz#8558c965950f8e38872ea21f66bf04932da2380b"
9114 + integrity sha512-lTYA05K4obAjyrrX4in3sLZyAECSFCDwQiGpZHJLm8ldCk+qcW11Wcxq/CdvyQAOPR7Kpb5BPRSaj4hwEXIAUw==
9115
9116 -flow-remove-types@^2.258:
9116 +flow-remove-types@^2.261:
9117 version "2.279.0"
9118 resolved "https://registry.yarnpkg.com/flow-remove-types/-/flow-remove-types-2.279.0.tgz#3a3388d9158eba0f82c40d80d31d9640b883a3f5"
9119 integrity sha512-bPFloMR/A2b/r/sIsf7Ix0LaMicCJNjwhXc4xEEQVzJCIz5u7C7XDaEOXOiqveKlCYK7DcBNn6R01Cbbc9gsYA==