Skip to content

Conversation

@everettbu
Copy link

@everettbu everettbu commented Dec 13, 2025

Mirror of facebook/react#35329
Original author: poteto


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

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
@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.279 to 0.280, which introduced stricter type checking for incompatible-type errors. The changes are purely mechanical and consist of:

  • Flow version bump: Updated flow-bin and flow-remove-types to 0.280 in package.json
  • Flow type environment reformatting: Large-scale whitespace and formatting changes to Flow type definition files (flow-typed/environments/*.js) to match Flow 0.280 style conventions (trailing commas, spacing)
  • Type suppression updates: Added 133 new $FlowFixMe[incompatible-type] suppressions alongside or replacing existing $FlowFixMe[incompatible-call] suppressions across 67 source files
  • Prettier configuration: Added flow-typed directory to .prettierignore since Flow syntax can't be parsed by Prettier

No functional code changes - all modifications are limited to Flow type suppressions and formatting. The suppressions address stricter type checking in Flow 0.280 for:

  • DOM and Web Animations API calls (.animate(), .getAnimations(), etc.)
  • Stream reader operations and blob serialization
  • React hooks and effect dependency validation
  • DevTools bridge and agent initialization
  • Scheduler heap operations
  • String coercion checks

The upgrade is consistent with the pattern established in previous Flow upgrades and maintains backward compatibility.

Confidence Score: 5/5

  • This PR is safe to merge with no risk - it's a standard Flow version upgrade with mechanical type suppression updates
  • This PR receives a perfect confidence score because: (1) it contains zero functional code changes - only Flow type suppressions and formatting, (2) all changes are mechanical and follow established patterns from previous Flow upgrades, (3) the suppressions are conservative, adding incompatible-type alongside existing suppressions rather than removing type safety, (4) it's a mirror of [flow] Upgrade from 0.279 -> 0.280 facebook/react#35329 which has been reviewed upstream, and (5) the changes are limited to addressing stricter type checking in Flow 0.280 without modifying runtime behavior
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
package.json 5/5 Upgraded Flow version from 0.279 to 0.280 and related dependencies
yarn.lock 5/5 Updated lockfile with new Flow dependencies and hermes-parser version bump
flow-typed/environments/streams.js 5/5 Formatting updates to match Flow 0.280 style (trailing commas, spacing)
flow-typed/environments/dom.js 5/5 Large-scale reformatting to match Flow 0.280 style conventions
packages/react-reconciler/src/ReactFiberHooks.js 5/5 Added $FlowFixMe[incompatible-type] suppressions alongside existing ones for stricter Flow 0.280 checks
packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js 5/5 Replaced $FlowFixMe[incompatible-call] with [incompatible-type] for animation and DOM API calls
packages/react-server/src/ReactFlightServer.js 5/5 Added $FlowFixMe[incompatible-type] suppressions for stricter type checking in console patching and blob serialization

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.

77 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