maplibre / maplibre-gl-js

MapLibre GL JS - Interactive vector tile maps in the browser
https://maplibre.org/maplibre-gl-js/docs/
Other
6.75k stars 727 forks source link

Bump majors of point-geometry, pbf, vector-tile #4735

Open birkskyum opened 2 months ago

birkskyum commented 2 months ago

These three packages by mapbox all have new major version updates that support ESM and don't support CJS. They seem to be very related and easiest to updated at the same time:

These two has to be removed at the same time, since the typescript is moved to the packages and will conflict:

When updating, there're some type errors, but the only non-trivial one is from geojson_wrapper.ts saying:

Class 'FeatureWrapper' incorrectly implements class 'VectorTileFeature'. Did you mean to extend 'VectorTileFeature' and inherit its members as a subclass?
  Type 'FeatureWrapper' is missing the following properties from type 'VectorTileFeature': _pbf, _geometry, _keys, _values, bboxts(2720)

Related to

HarelM commented 2 months ago

There is a branch I updated from dependabot to solve this, but one of the packages was not updated in one of the dependencies, causing a significant bundle size increase. I'm not sure I had a good solution to this, but feel free to take a stab at this.

See here: