mapbox-gl-js icon indicating copy to clipboard operation
mapbox-gl-js copied to clipboard

Upgrade Flow to v0.145

Open mourner opened this issue 1 year ago • 0 comments

Upgrade Flow from v0.142 to v0.145 as a part of #12194. This was a difficult push because v0.143.0 fixed a bug which made Flow basically ignore many of the library definitions, leading to ~140 errors that were not caught before. A few notes:

  • I had to inline @mapbox/geojson-types instead of using that package because the latter no longer works for reasons I don't really understand. On a positive note, we could now deprecate that package because it's no longer used anywhere else.
  • @mapbox/vector-tile-related changes are due to the need to differentiate between VectorTile/etc. class instances vs objects that fit corresponding interfaces (which is needed for our GeoJSONWrapper logic which wraps GeoJSON to imitate VT classes).
  • There are many fixes related to objects that are expected to be of a certain type but could be undefined, something Flow didn't handle in all cases before.
  • The config ignores were cleaned up of packages we no longer use.

Launch Checklist

  • [x] briefly describe the changes in this PR
  • [x] manually test the debug page
  • [x] apply changelog label ('bug', 'feature', 'docs', etc) or use the label 'skip changelog'

mourner avatar Sep 20 '22 14:09 mourner