Conversation
- Updated package.json files across visx packages to replace direct d3-shape and d3-path dependencies with @visx/vendor - Adjusted import statements in various components and utilities to source from @visx/vendor/d3-shape and @visx/vendor/d3-path - Removed unnecessary d3-shape and d3-path dependencies from package.json files
There was a problem hiding this comment.
Pull Request Overview
This PR upgrades d3-shape from v1.x to v3.2.0 by consolidating all d3-shape and d3-path dependencies into the @visx/vendor package. This change enables consistent versioning and simplifies dependency management across the visx monorepo.
Key changes:
- Added d3-shape (3.2.0) and d3-path (3.1.0) to
@visx/vendorpackage - Updated all imports across visx packages to use
@visx/vendor/d3-shapeand@visx/vendor/d3-pathinstead of direct dependencies - Modified the pie factory function to handle d3-shape v3's new default sorting behavior while maintaining visx's input order preservation
Reviewed Changes
Copilot reviewed 47 out of 48 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Added d3-shape 3.2.0 and d3-path 3.1.0 type definitions and packages, removed old versions and updated package dependency references |
| packages/visx-vendor/package.json | Added d3-shape 3.2.0 and d3-path 3.1.0 along with their type definitions |
| packages/visx-vendor/.gitignore | Added yarn files to ignore list since monorepo uses root lockfile |
| packages/visx-shape/src/util/D3ShapeFactories.ts | Updated pie function to handle d3-shape v3's default sorting behavior |
| packages/visx-shape/test/Pie.test.tsx | Removed test for invalid sort callback behavior |
| packages/visx-xychart/* | Updated d3-shape imports to use @visx/vendor |
| packages/visx-stats/* | Updated d3-shape imports to use @visx/vendor |
| packages/visx-shape/* | Updated d3-shape and d3-path imports to use @visx/vendor |
| packages/visx-sankey/* | Updated d3-shape imports to use @visx/vendor |
| packages/visx-glyph/* | Updated d3-shape imports to use @visx/vendor |
| packages/visx-curve/* | Updated d3-shape imports to use @visx/vendor |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Size Changes
View raw build statsPrevious (master){
"visx-annotation": {
"esm": 28559,
"lib": 36491
},
"visx-axis": {
"esm": 20709,
"lib": 25119
},
"visx-bounds": {
"esm": 2662,
"lib": 3136
},
"visx-brush": {
"esm": 52910,
"lib": 55596
},
"visx-chord": {
"esm": 2663,
"lib": 3373
},
"visx-clip-path": {
"esm": 3394,
"lib": 4415
},
"visx-curve": {
"esm": 323,
"lib": 1462
},
"visx-delaunay": {
"esm": 2305,
"lib": 3035
},
"visx-demo": {
"esm": 0,
"lib": 0
},
"visx-drag": {
"esm": 12368,
"lib": 13865
},
"visx-event": {
"esm": 3815,
"lib": 5091
},
"visx-geo": {
"esm": 12450,
"lib": 15408
},
"visx-glyph": {
"esm": 12165,
"lib": 15689
},
"visx-gradient": {
"esm": 15496,
"lib": 19482
},
"visx-grid": {
"esm": 16678,
"lib": 19853
},
"visx-group": {
"esm": 1251,
"lib": 1681
},
"visx-heatmap": {
"esm": 6399,
"lib": 7278
},
"visx-hierarchy": {
"esm": 10161,
"lib": 14656
},
"visx-legend": {
"esm": 23920,
"lib": 29153
},
"visx-marker": {
"esm": 7834,
"lib": 9673
},
"visx-mock-data": {
"esm": 326036,
"lib": 329336
},
"visx-network": {
"esm": 4124,
"lib": 5913
},
"visx-pattern": {
"esm": 9161,
"lib": 11621
},
"visx-point": {
"esm": 1003,
"lib": 1781
},
"visx-react-spring": {
"esm": 13119,
"lib": 16134
},
"visx-responsive": {
"esm": 15447,
"lib": 17439
},
"visx-sankey": {
"esm": 3278,
"lib": 4160
},
"visx-scale": {
"esm": 19205,
"lib": 30085
},
"visx-shape": {
"esm": 81775,
"lib": 102141
},
"visx-stats": {
"esm": 12868,
"lib": 13977
},
"visx-text": {
"esm": 8309,
"lib": 9806
},
"visx-threshold": {
"esm": 2386,
"lib": 2946
},
"visx-tooltip": {
"esm": 13934,
"lib": 18441
},
"visx-vendor": {
"esm": 2492,
"lib": 2702
},
"visx-visx": {
"esm": 1524,
"lib": 3989
},
"visx-voronoi": {
"esm": 2013,
"lib": 2621
},
"visx-wordcloud": {
"esm": 2423,
"lib": 3192
},
"visx-xychart": {
"esm": 171572,
"lib": 216544
},
"visx-zoom": {
"esm": 16001,
"lib": 18276
}
}Current{
"visx-annotation": {
"esm": 28559,
"lib": 36491
},
"visx-axis": {
"esm": 20709,
"lib": 25119
},
"visx-bounds": {
"esm": 2662,
"lib": 3136
},
"visx-brush": {
"esm": 52910,
"lib": 55596
},
"visx-chord": {
"esm": 2663,
"lib": 3373
},
"visx-clip-path": {
"esm": 3394,
"lib": 4415
},
"visx-curve": {
"esm": 336,
"lib": 1475
},
"visx-delaunay": {
"esm": 2305,
"lib": 3035
},
"visx-demo": {
"esm": 0,
"lib": 0
},
"visx-drag": {
"esm": 12368,
"lib": 13865
},
"visx-event": {
"esm": 3815,
"lib": 5091
},
"visx-geo": {
"esm": 12450,
"lib": 15408
},
"visx-glyph": {
"esm": 12256,
"lib": 15780
},
"visx-gradient": {
"esm": 15496,
"lib": 19482
},
"visx-grid": {
"esm": 16678,
"lib": 19853
},
"visx-group": {
"esm": 1251,
"lib": 1681
},
"visx-heatmap": {
"esm": 6399,
"lib": 7278
},
"visx-hierarchy": {
"esm": 10161,
"lib": 14656
},
"visx-legend": {
"esm": 23920,
"lib": 29153
},
"visx-marker": {
"esm": 7834,
"lib": 9673
},
"visx-mock-data": {
"esm": 326036,
"lib": 329336
},
"visx-network": {
"esm": 4124,
"lib": 5913
},
"visx-pattern": {
"esm": 9161,
"lib": 11621
},
"visx-point": {
"esm": 1003,
"lib": 1781
},
"visx-react-spring": {
"esm": 13119,
"lib": 16134
},
"visx-responsive": {
"esm": 15447,
"lib": 17439
},
"visx-sankey": {
"esm": 3278,
"lib": 4160
},
"visx-scale": {
"esm": 19205,
"lib": 30085
},
"visx-shape": {
"esm": 82414,
"lib": 102780
},
"visx-stats": {
"esm": 12881,
"lib": 13990
},
"visx-text": {
"esm": 8309,
"lib": 9806
},
"visx-threshold": {
"esm": 2386,
"lib": 2946
},
"visx-tooltip": {
"esm": 13934,
"lib": 18441
},
"visx-vendor": {
"esm": 2974,
"lib": 3226
},
"visx-visx": {
"esm": 1524,
"lib": 3989
},
"visx-voronoi": {
"esm": 2013,
"lib": 2621
},
"visx-wordcloud": {
"esm": 2423,
"lib": 3192
},
"visx-xychart": {
"esm": 171585,
"lib": 216557
},
"visx-zoom": {
"esm": 16001,
"lib": 18276
}
} |
|
🎉 This PR is included in version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💥 Breaking Changes
🚀 Enhancements