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

Remove mapbox-gl-supported dependency

Open wipfli opened this issue 3 years ago • 6 comments

Currently, Mapbox and MapLibre GL JS have the same requirements on browser support. This is why we use https://github.com/mapbox/mapbox-gl-supported in our library. However, in the future browser requirements might diverge between Mapbox and MapLibre.

Should we fork https://github.com/mapbox/mapbox-gl-supported already now or only once we have to?

wipfli avatar Feb 04 '22 16:02 wipfli

#920 is what triggered this idea.

wipfli avatar Feb 04 '22 16:02 wipfli

Currently, I don't think we should fork. If we diverge then we should fork at that point.

HarelM avatar Feb 04 '22 17:02 HarelM

We removed internet explorer support. I think mapbox-gl-supported will not complain if someone uses internet explorer...

wipfli avatar Feb 05 '22 13:02 wipfli

https://github.com/mapbox/mapbox-gl-supported/pull/38

wipfli avatar Feb 05 '22 13:02 wipfli

How about dropping the dependency? As far as my quick search in the code /src revealed this seems hardly used( i may be wrong see exported names.)

I found one usage of supported.webGLContextAttributes which is just a tiny hash table .. sry JS object

Besides:

  • if it seems important, how about using some kind of simplified version inline e.g in utils/ where it originated? object,array or even json support methods seem pretty outdated
  • let the user require the external lib himself, as we all have to check our audience to e.g. show outdated browser warnings or require ie polyfills
  • js dependency hell is already dark enough

just my 2 cents as i stumbled upon a yarn dependency warning today.

schorsch avatar Mar 04 '22 10:03 schorsch

It's basically a single file of code, I tend to agree we can simply copy it here, also agree about the users of this library responsibility to handle browsers support. Feel free to submit a PR. Removing it from the API would be a breaking change obviously.

HarelM avatar Mar 04 '22 15:03 HarelM

This was removed a while ago. Closing...

HarelM avatar Dec 27 '23 15:12 HarelM