Skip to content

Conversation

@everettbu
Copy link

@everettbu everettbu commented Dec 13, 2025

Mirror of facebook/react#35330
Original author: poteto


Major changes in Flow 0.281:

  • $FlowFixMe comments now require explicit error codes (e.g., $FlowFixMe[incompatible-type])
  • Changed all bare $FlowFixMe to include appropriate error codes
  • Changed $FlowIgnore to $FlowFixMe where needed
  • Fixed stream types to have cancel() return Promise instead of void
  • Added pseudoElement property to KeyframeEffect type
  • Added suppressions for Proxy handler variance issues
  • Fixed various type errors across the codebase

Stack created with Sapling. Best reviewed with ReviewStack.

  • -> #35330
  • #35329

Flow 0.280 introduced stricter type checking for `incompatible-type` errors,
requiring additional $FlowFixMe suppressions alongside existing ones. Changes:

- Made `QueuingStrategy` properties optional in streams.js
- Made all properties optional in Web Animations API types (EffectTiming,
  KeyframeAnimationOptions, etc.)
- Added `$FlowFixMe[incompatible-type]` alongside existing suppressions in
  multiple files where Flow now reports additional type mismatches
Major changes in Flow 0.281:
- $FlowFixMe comments now require explicit error codes (e.g., $FlowFixMe[incompatible-type])
- Changed all bare $FlowFixMe to include appropriate error codes
- Changed $FlowIgnore to $FlowFixMe where needed
- Fixed stream types to have cancel() return Promise<void> instead of void
- Added pseudoElement property to KeyframeEffect type
- Added suppressions for Proxy handler variance issues
- Fixed various type errors across the codebase
@everettbu everettbu added CLA Signed React Core Team Opened by a member of the React Core Team labels Dec 13, 2025
@greptile-apps
Copy link

greptile-apps bot commented Dec 13, 2025

Greptile Overview

Greptile Summary

This PR upgrades Flow from version 0.280 to 0.281, which introduces stricter requirements for type suppressions. All bare $FlowFixMe and $FlowIgnore comments now require explicit error codes.

Major changes:

  • Updated all bare $FlowFixMe comments to include explicit error codes like [incompatible-type], [incompatible-call], [method-unbinding], [prop-missing], [cannot-resolve-name], etc.
  • Changed $FlowIgnore to $FlowFixMe with appropriate error codes throughout the codebase
  • Applied formatting updates to Flow type definition files (flow-typed/environments/*) to use trailing commas
  • Removed some obsolete suppressions that are no longer needed (e.g., for reader.cancel() and iterator.throw() calls)

The changes are purely mechanical to satisfy Flow 0.281's new requirements and do not modify any runtime logic.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • This is a purely mechanical Flow version upgrade that adds explicit error codes to type suppressions without changing any runtime logic. All changes follow the established pattern required by Flow 0.281.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
package.json 5/5 Flow version upgraded from 0.280 to 0.281 and flow-remove-types updated accordingly
flow-typed/environments/streams.js 5/5 Formatting updates to use trailing commas and updated type definitions
packages/react-reconciler/src/ReactFiberHooks.js 5/5 Changed $FlowIgnore to $FlowFixMe with explicit error codes [method-unbinding], [incompatible-call], [incompatible-type], and [incompatible-return]
packages/react-reconciler/src/ReactFiberWorkLoop.js 5/5 Added [incompatible-type] error code to existing $FlowFixMe suppressions in work loop functions
packages/react-server/src/ReactFlightServer.js 5/5 Updated $FlowFixMe comments with error codes [incompatible-call], [incompatible-type], [prop-missing], and [method-unbinding]; removed obsolete suppressions for reader.cancel() and iterator.throw()
packages/react/src/ReactLazy.js 5/5 Updated multiple $FlowFixMe comments with explicit error codes [incompatible-use] and [prop-missing] for lazy component introspection

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

100 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants