Esri / esri-leaflet-renderers

Plugin for Esri Leaflet to use drawing information defined in the feature service
51 stars 33 forks source link

Make esri-leaflet et al peerDependencies #152

Closed ckoberlein closed 4 years ago

ckoberlein commented 4 years ago

We had some trouble recently where esri-leaflet-renderers was not plugging in properly to esri-leaflet in our application.

The problem was due to a minor version mismatch in esri-leaflet in our package.json file (2.3.3) versus the one defined and installed with esri-leaflet-renderers (^2.0.0 resolving to 2.4.1). This led to having two different versions of esri-leaflet in the application - the one we use add layers to the map and the one used by the renderers module.

Changing the packages from dependencies to peerDependencies would be a more forgiving approach and save potential debugging time for users.

Thanks.

gavinr commented 4 years ago

Thanks for the report @ckoberlein. Seems like a good idea to me. @jgravois has this issue come up before? If this is the best way to do it, should we do it in other plugins (like esri-leaflet-geocoder) too?

jgravois commented 4 years ago

peerDependencies would be a more forgiving approach and save potential debugging time for users.

this makes sense to me and is the route we took with rest-js. see https://github.com/Esri/arcgis-rest-js/pull/506 for more info.

ckoberlein commented 4 years ago

Thanks for getting to this so quickly!

gavinr commented 4 years ago

This is released in https://github.com/Esri/esri-leaflet-renderers/releases/tag/v2.1.1