Skip to content

Commit 3d408ad

Browse files
authored
Upgrade d3-shape, d3-path to 3 (#1960)
* vendor: add d3-shape and d3-path * refactor: migrate d3-shape and d3-path dependencies to @visx/vendor - 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 * fix: update d3-path and d3-shape type definitions and versions in yarn.lock * fix: add references to visx-vendor in tsconfig.json for multiple packages * refactor: run yarn lint:fix
1 parent 751c7c6 commit 3d408ad

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+152
-121
lines changed

packages/visx-curve/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
"author": "@hshoff",
2222
"license": "MIT",
2323
"dependencies": {
24-
"@types/d3-shape": "^1.3.1",
25-
"d3-shape": "^1.0.6"
24+
"@visx/vendor": "workspace:*"
2625
},
2726
"publishConfig": {
2827
"access": "public"

packages/visx-curve/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ export {
1717
curveMonotoneX,
1818
curveMonotoneY,
1919
curveNatural,
20-
} from 'd3-shape';
20+
} from '@visx/vendor/d3-shape';

packages/visx-curve/tsconfig.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,9 @@
1414
"types/**/*",
1515
"../../types/**/*"
1616
],
17-
"references": []
17+
"references": [
18+
{
19+
"path": "../visx-vendor"
20+
}
21+
]
1822
}

packages/visx-glyph/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@
3434
"react": "^16.3.0-0 || ^17.0.0-0 || ^18.0.0-0 || ^19.0.0-0"
3535
},
3636
"dependencies": {
37-
"@types/d3-shape": "^1.3.1",
3837
"@types/react": "*",
3938
"@visx/group": "workspace:*",
40-
"classnames": "^2.3.1",
41-
"d3-shape": "^1.2.0"
39+
"@visx/vendor": "workspace:*",
40+
"classnames": "^2.3.1"
4241
}
4342
}

packages/visx-glyph/src/glyphs/GlyphCircle.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import cx from 'classnames';
3-
import type { Symbol } from 'd3-shape';
4-
import { symbol, symbolCircle } from 'd3-shape';
3+
import type { Symbol } from '@visx/vendor/d3-shape';
4+
import { symbol, symbolCircle } from '@visx/vendor/d3-shape';
55
import Glyph from './Glyph';
66

77
export type GlyphCircleProps<Datum> = {

packages/visx-glyph/src/glyphs/GlyphCross.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import cx from 'classnames';
3-
import type { Symbol } from 'd3-shape';
4-
import { symbol, symbolCross } from 'd3-shape';
3+
import type { Symbol } from '@visx/vendor/d3-shape';
4+
import { symbol, symbolCross } from '@visx/vendor/d3-shape';
55
import Glyph from './Glyph';
66

77
export type GlyphCrossProps<Datum> = {

packages/visx-glyph/src/glyphs/GlyphDiamond.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import cx from 'classnames';
3-
import type { Symbol } from 'd3-shape';
4-
import { symbol, symbolDiamond } from 'd3-shape';
3+
import type { Symbol } from '@visx/vendor/d3-shape';
4+
import { symbol, symbolDiamond } from '@visx/vendor/d3-shape';
55
import Glyph from './Glyph';
66

77
export type GlyphDiamondProps<Datum> = {

packages/visx-glyph/src/glyphs/GlyphSquare.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import cx from 'classnames';
3-
import type { Symbol } from 'd3-shape';
4-
import { symbol, symbolSquare } from 'd3-shape';
3+
import type { Symbol } from '@visx/vendor/d3-shape';
4+
import { symbol, symbolSquare } from '@visx/vendor/d3-shape';
55
import Glyph from './Glyph';
66

77
export type GlyphSquareProps<Datum> = {

packages/visx-glyph/src/glyphs/GlyphStar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import cx from 'classnames';
3-
import type { Symbol } from 'd3-shape';
4-
import { symbol, symbolStar } from 'd3-shape';
3+
import type { Symbol } from '@visx/vendor/d3-shape';
4+
import { symbol, symbolStar } from '@visx/vendor/d3-shape';
55
import Glyph from './Glyph';
66

77
export type GlyphStarProps<Datum> = {

packages/visx-glyph/src/glyphs/GlyphTriangle.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import cx from 'classnames';
3-
import type { Symbol } from 'd3-shape';
4-
import { symbol, symbolTriangle } from 'd3-shape';
3+
import type { Symbol } from '@visx/vendor/d3-shape';
4+
import { symbol, symbolTriangle } from '@visx/vendor/d3-shape';
55
import Glyph from './Glyph';
66

77
export type GlyphTriangleProps<Datum> = {

0 commit comments

Comments
 (0)