Skip to content

v0.66.0

Compare
Choose a tag to compare
@facebook-github-bot facebook-github-bot released this 16 Feb 19:27
· 12356 commits to main since this release

New Features:

  • Error message redesign to help you better debug typing issues in your programs.
  • Upgrade global find-refs from experimental to beta.
  • Improve global find-refs performance by 2x-20x depending on the workload.
  • Support for CommonJS imports/exports with global find-refs.
  • Find usages of overridden instance methods with find-refs.
  • Improvements to type reporting services like type-at-pos and coverage thanks to a type "normalizer" rewrite. Notably, the normalizer and client services like type-at-pos now:
    • Make more aggressive use of type aliases, leading to more compact results,
    • Correctly distinguish between class types and their instance counterparts,
    • Report abstract type parameters themselves instead of their bounds, and
    • Precisely report recursive types.

Likely to cause new Flow errors:

  • Unresolved type variables internally unified with any no longer completely resolve to any. This may uncover new bugs in your programs where some inferred types silently resolved to any.
  • Fix type system "stall" for spreads of null and undefined. This meant programs like ({...null}: {p: number}); incorrectly passed Flow. If you were spreading a maybe-object type then Flow may catch some new bugs in your programs.
  • Because of the new error messages some suppression comments (configured with suppress_comment) will become unused since error locations moved.

Misc:

  • 3.5x performance improvement for some Facebook projects that makes heavy use of complicated unions of string literals such as GraphQL enums generated by Relay. (Performance improvements will scale with your usage of large string literal unions.)
  • Improve the nonstrict-import lint's error message.
  • Fix bug in React.cloneElement for stateless functional components.
  • Add --max-warnings flag which allows Flow to exit with a non-zero exit code if warnings are present.
  • Add --file-watcher flag to ignore file system events.
  • Expose url.format's urlObj argument type.