Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

d3-selection should be a peer dependency. #92

Closed
stof opened this issue Apr 29, 2019 · 1 comment · Fixed by #94
Closed

d3-selection should be a peer dependency. #92

stof opened this issue Apr 29, 2019 · 1 comment · Fixed by #94

Comments

@stof
Copy link

stof commented Apr 29, 2019

This package is adding new methods on the selection object to control transitions.

But if different versions of d3-selection end up being installed for the d3-transition dependency and for the main project, the main project would not have access to the method.
A peer dependency should be used instead, to ensure that the d3-selection for which the prototype gets augmented is the project one.

There will be a BC break for users of the package: they will need to depend on d3-selection too when they depend on d3-transition (but that is likely already the case though).
This would not impact projects installing the full d3 package (as the d3 package is the one depending on both packages, and it already depends on both anyway)

@mbostock
Copy link
Member

Agreed. I will do this for the next major release.

mbostock added a commit that referenced this issue Jul 30, 2019
@mbostock mbostock mentioned this issue Nov 17, 2019
Merged
@mbostock mbostock changed the title d3-selection should be a peer dependency d3-selection should be a peer dependency. Nov 17, 2019
@Fil Fil closed this as completed in #94 Aug 23, 2020
magjac added a commit to magjac/d3-graphviz that referenced this issue Apr 2, 2021
d3-graphviz extends the d3-selection prototype so d3-selection should
be a peer dependency. See
d3/d3-transition#92 for similar reasoneing
about d3-transition.
magjac added a commit to magjac/d3-graphviz that referenced this issue Apr 2, 2021
d3-graphviz extends the d3-selection prototype so d3-selection should
be a peer dependency. See
d3/d3-transition#92 for similar reasoneing
about d3-transition.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants