Upgrade flow to 0.234.0 (#30117)
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:00 UTC
094041495bc1247ff5d39906abb571e6996436be
7 files changed
+19
-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.233.0",
67
- "flow-remove-types": "^2.233.0",
66
+ "flow-bin": "^0.234.0",
67
+ "flow-remove-types": "^2.234.0",
68
"glob": "^7.1.6",
69
"glob-stream": "^6.1.0",
70
"google-closure-compiler": "^20230206.0.0",
packages/react-reconciler/src/ReactFiberThenable.js
+1
-1
@@ -214,7 +214,7 @@ export function trackUsedThenable<T>(
214
}
215
216
// Check one more time in case the thenable resolved synchronously.
217
- switch (thenable.status) {
217
+ switch ((thenable: Thenable<T>).status) {
218
case 'fulfilled': {
219
const fulfilledThenable: FulfilledThenable<T> = (thenable: any);
220
return fulfilledThenable.value;
packages/react-server/src/ReactFizzThenable.js
+1
-1
@@ -107,7 +107,7 @@ export function trackUsedThenable<T>(
107
}
108
109
// Check one more time in case the thenable resolved synchronously
110
- switch (thenable.status) {
110
+ switch ((thenable: Thenable<T>).status) {
111
case 'fulfilled': {
112
const fulfilledThenable: FulfilledThenable<T> = (thenable: any);
113
return fulfilledThenable.value;
packages/react-server/src/ReactFlightThenable.js
+1
-1
@@ -107,7 +107,7 @@ export function trackUsedThenable<T>(
107
}
108
109
// Check one more time in case the thenable resolved synchronously
110
- switch (thenable.status) {
110
+ switch ((thenable: Thenable<T>).status) {
111
case 'fulfilled': {
112
const fulfilledThenable: FulfilledThenable<T> = (thenable: any);
113
return fulfilledThenable.value;
packages/react/src/ReactChildren.js
+1
-1
@@ -127,7 +127,7 @@ function resolveThenable<T>(thenable: Thenable<T>): T {
127
}
128
129
// Check one more time in case the thenable resolved synchronously.
130
- switch (thenable.status) {
130
+ switch ((thenable: Thenable<T>).status) {
131
case 'fulfilled': {
132
const fulfilledThenable: FulfilledThenable<T> = (thenable: any);
133
return fulfilledThenable.value;
packages/react/src/ReactLazy.js
+8
-2
@@ -61,7 +61,10 @@ function lazyInitializer<T>(payload: Payload<T>): T {
61
// end up fixing it if the resolution was a concurrency bug.
62
thenable.then(
63
moduleObject => {
64
- if (payload._status === Pending || payload._status === Uninitialized) {
64
+ if (
65
+ (payload: Payload<T>)._status === Pending ||
66
+ payload._status === Uninitialized
67
+ ) {
68
// Transition to the next state.
69
const resolved: ResolvedPayload<T> = (payload: any);
70
resolved._status = Resolved;
@@ -69,7 +72,10 @@ function lazyInitializer<T>(payload: Payload<T>): T {
72
}
73
},
74
error => {
72
- if (payload._status === Pending || payload._status === Uninitialized) {
75
+ if (
76
+ (payload: Payload<T>)._status === Pending ||
77
+ payload._status === Uninitialized
78
+ ) {
79
// Transition to the next state.
80
const rejected: RejectedPayload = (payload: any);
81
rejected._status = Rejected;
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.233.0:
8325
- version "0.233.0"
8326
- resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.233.0.tgz#e31951c81d3ec590e1cbfd96e540f6dd2459554c"
8327
- integrity sha512-BInTgW8v6xdWzVcItgKKUYCacheMw78Xrrn0Ziii5lN+vf/RKmvVX9mFHuOSN1zawZuq7GpqmT6oIS/oQuOAQg==
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==
8328
8329
-flow-remove-types@^2.233.0:
8329
+flow-remove-types@^2.234.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==