visgl / deck.gl-community

Community contributed modules for deck.gl
https://visgl.github.io/deck.gl-community/
MIT License
37 stars 20 forks source link

Module editable-layers has implicit dependency to layers #112

Closed cg-sat closed 3 months ago

cg-sat commented 3 months ago

The module editable-layers has no explicit dependency to module layers: https://github.com/visgl/deck.gl-community/blob/master/modules/editable-layers/package.json

In fact the segments-layer is importing the layers module: https://github.com/visgl/deck.gl-community/blob/646f8328d27d67d596f05c9154072051ec5cf4f0/modules/editable-layers/src/lib/layers/segments-layer.ts#L9

This causes a build failure for any project, that only imports @deck.gl-community/editable-layers, but not @deck.gl-community/layers. The workaround is to also import @deck.gl-community/layers, but this implicit dependency should be made explicit by defining layers as peerDepdendency for editable-layers.

ibgreen commented 3 months ago

this implicit dependency should be made explicit by defining layers as peerDepdendency for editable-layers.

@cg-sat Thanks for reporting. Yes, that sounds reasonable. I believe a peerDependency would follow the conventions in deck.gl etc.

Are you able to put up a PR to help speed things up?

cg-sat commented 3 months ago

@ibgreen I cloned the repo and made the necessary changes in package.json of editable-layers module. While testing the correct package resolving, npm uncovered issue #114

A PR for this issue and for #114 will come shortly.

ibgreen commented 3 months ago

Landed, pending #126

ibgreen commented 2 months ago

Published in v9.0.3, sorry for the long delay