mapbox-gl-js
mapbox-gl-js copied to clipboard
Upgrade Flow to v0.145
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 betweenVectorTile
/etc. class instances vs objects that fit correspondinginterfaces
(which is needed for ourGeoJSONWrapper
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'