-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
chore(deps): update d3*
and @types/d3*
, and override d3-sankey
and @types/d3-sankey
#4880
base: develop
Are you sure you want to change the base?
chore(deps): update d3*
and @types/d3*
, and override d3-sankey
and @types/d3-sankey
#4880
Conversation
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
I don't know how to see the size difference after the commit, but according to this comment, it should be less by ~50Kb. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4880 +/- ##
===========================================
+ Coverage 79.51% 85.09% +5.57%
===========================================
Files 175 174 -1
Lines 14396 11666 -2730
Branches 855 844 -11
===========================================
- Hits 11447 9927 -1520
+ Misses 2755 1543 -1212
- Partials 194 196 +2
Flags with carried forward coverage won't be shown. Click here to find out more. |
* update `d3` version to `7.8.5` exclude the `7.4.0` version * override `d3-sankey` and `@types/d3-sankey` dependencies versions * move `@types/d3-scale` and `@types/d3-scale-chromatic` to devDependencies * update all `d3` related dependencies
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Yokozuna59,
Two questions:
- Why have we made this change:
* update `d3` version to `7.8.5` exclude the `7.4.0` version.
Is it just to keep things updated? We might want to make a separate PR for this, just so there's a separate entry in the release notes for it. - Unit tests are failing due to:
packages/mermaid/src/mermaid.spec.ts > when using mermaid and > when using #registerExternalDiagrams > should throw error (but still render) if registerExternalDiagrams fails
AssertionError: expected [Function] to throw error including 'Failed to load 1 external diagrams' but got 'Failed to load 2 external diagrams'
- Expected
+ Received
- Failed to load 1 external diagrams
+ Failed to load 2 external diagrams
❯ packages/mermaid/src/mermaid.spec.ts:72:7
70| node.appendChild(document.createTextNode('graph TD;\na;'));
71|
72| await expect(
| ^
73| mermaid.registerExternalDiagrams(
74| [
The sankey e2e tests seem to be fine, though, so I'm not sure if that's the issue.
By the way, this is super minor and it's probably too much effort to do this in this PR, but in the future, making a separate commit for each change would be more ideal, e.g. something like:
chore(deps): update `d3` version to `^7.8.5`
chore(deps): override `d3-sankey` and `@types/d3-sankey` version
chore(deps): move `@types/d3-scale` and `@types/d3-scale-chromatic` to devDependencies
chore(deps): update all `d3` related dependencies
Hi @aloisklink,
I'd say it's not, in Lines 212 to 214 in 2049915
So I updated both versions in
Same here. I wasn't sure what's the issue so I created a PR until I figure it out.
I planed to do so, but then I thought that it would has unnecessary commits. And the |
d3*
and @types/d3*
, and override d3-sankey
and @types/d3-sankey
d3*
and @types/d3*
, and override d3-sankey
and @types/d3-sankey
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way, this is super minor and it's probably too much effort to do this in this PR, but in the future, making a separate commit for each change would be more ideal, e.g. something like:
I planed to do so, but then I thought that it would has unnecessary commits. And the
pnpm-lock.yaml
is already updated and it would need more effort to partiallygit add
lines for each commit.
Sounds good! Having each separate change in a separate commit would make it easier to find which change caused the unit tests to fail (e.g. using something like git bisect
, but that's up to you.
I'll set this PR as a draft until we figure out what's happening with the unit tests. Other than that, this PR looks good!
It's because of sankey dependencies overriding. I've removed them locally and tested it out, and it worked fine. |
📑 Summary
d3
version to7.8.5
exclude the7.4.0
version.d3-sankey
and@types/d3-sankey
dependencies versions.@types/d3-scale
and@types/d3-scale-chromatic
to devDependencies.d3
related dependencies.Resolves #4872
📏 Design Decisions
We were waiting for d3/d3-sankey#117 to be merged to resolve the
d3-sankey
issues, but it appears it won't be anytime soon. So we're taking the suggested workaround here for now to exclude older versions.As far as I can tell, taking such an approach shouldn't affect the layout or types of
d3-sankey
, andrenovate
should also be able to update overriden versions inpackage.json
.📋 Tasks
Make sure you
develop
branch