-
Notifications
You must be signed in to change notification settings - Fork 698
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 v7 #1267
Comments
Hey @kachkaev thanks for opening this π We're definitely open to updating the I'm not sure I have the bandwidth to do this currently but am happy to review PR(s) if others are interested π |
If no one else is taking this, I don't mind working on it. I'll tag this issue in an open PR once I have it complete. edit: after updating the packages there were some issues with the current node engine not supporting the newer d3 libs using ESM, bumping it the node version to 12.22.4 resolved this issue. But I ran into some problems with running
Kinda don't know the best approach to solve this, any suggestions? This is the last hurdle. It's able to build and tests pass with newer D3 libs but don't know how to handle next.js ESM woes. edit2: tried to jump ahead and update react to v17 and was also trying out nextjs v11.0.2-canary.27 Only issues I had with using the canary build of nextjs was improper react installations (had multiple local copies, had issues properly building; totally on my end, don't have the time to properly resolve). Might be something to consider if it requires minimal breaking changes (had to tweak the next.config.js to allow webpack v4). Might be better to revisit this issue after these two PRs are merged in tho: |
I believe the alternatives are:
IMHO, the only reasonable alternative is 1. |
Awesome, I can try out again this weekend and report back. |
Hey! π As you have figured out here, the latest version of d3 no longer supports CommonJS, which is required for node.js environments. Since d3 itself is unlikely to change this (we also went that route), we created a script to vendor our d3 dependencies to export both CommonJS and ESM, and updated our imports to use our vendored d3 packages rather than importing directly from @williaster If we wanted to take a similar approach here, I'm happy to take a stab at it! Let me know what you think. |
hey @becca-bailey thanks for chiming in βΒ I've read that post and it was great π in our we've discussed 3 options in #1637, the first I wanted to try was updating all of our problematic |
Will this ever be addressed? I'm trying to upgrade to D3 7.x in my project and running into TypeScript errors because visx pulls in an ancient version of d3-shape (1.x, 5 years old). |
@kaiyoma we now support d3's esm-only packages via |
Hi folks π
There is a new major version of d3, which was released in June 2021:
https://github.com/d3/d3/releases/tag/v7.0.0
A number of auxiliary d3 libraries got upgraded too, e.g. d3-array: v2 β v3 etc.
I work on a project that uses a few d3 libraries directly and also via visx. Thus, upgrading direct dependencies to the latest versions produces avoidable duplicates.
What is
visx
βs strategy on d3 dependencies? When would be a good time for you to upgrade them? Happy to help with a PR if it is needed and if time allows πThe text was updated successfully, but these errors were encountered: