diff --git a/packages/victory-axis/package.json b/packages/victory-axis/package.json index 21e744036..0a074a121 100644 --- a/packages/victory-axis/package.json +++ b/packages/victory-axis/package.json @@ -27,8 +27,7 @@ "react": ">=16.6.0" }, "devDependencies": { - "victory-axis": "*", - "victory-chart": "*" + "victory-axis": "*" }, "publishConfig": { "provenance": true @@ -174,7 +173,6 @@ "dependencies": [ "types:create", "../victory-core:types:create", - "../victory-chart:types:create", "../victory-vendor:types:create", "../victory-voronoi:types:create" ], @@ -240,7 +238,6 @@ "output": [], "dependencies": [ "../victory-core:types:create", - "../victory-chart:types:create", "../victory-vendor:types:create", "../victory-voronoi:types:create" ], @@ -258,7 +255,6 @@ "output": [], "dependencies": [ "../victory-core:types:create", - "../victory-chart:types:create", "../victory-vendor:types:create", "../victory-voronoi:types:create" ], @@ -277,7 +273,6 @@ "output": [], "dependencies": [ "build:lib:cjs", - "../victory-chart:build:lib:cjs", "../victory-vendor:build:lib:cjs", "../victory-voronoi:build:lib:cjs" ], diff --git a/packages/victory-axis/src/victory-axis.test.tsx b/packages/victory-axis/src/victory-axis.test.tsx deleted file mode 100644 index f13dcc8e3..000000000 --- a/packages/victory-axis/src/victory-axis.test.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import React from "react"; -import { VictoryAxis } from "victory-axis"; -import { VictoryChart } from "victory-chart"; -import { render, screen } from "@testing-library/react"; - -describe("components/victory-axis", () => { - it("should render two axes by default", () => { - const chartProps = { - defaultAxes: { - independent: , - dependent: , - }, - }; - render(); - - const axes = screen.getAllByTestId("axis"); - - expect(axes).toHaveLength(2); - }); -}); diff --git a/packages/victory-box-plot/package.json b/packages/victory-box-plot/package.json index 54bdd308c..038492be5 100644 --- a/packages/victory-box-plot/package.json +++ b/packages/victory-box-plot/package.json @@ -29,7 +29,7 @@ }, "devDependencies": { "victory-box-plot": "*", - "victory-chart": "^36.9.1" + "victory-chart": "*" }, "publishConfig": { "provenance": true diff --git a/packages/victory-candlestick/package.json b/packages/victory-candlestick/package.json index deda897a7..6a551c49d 100644 --- a/packages/victory-candlestick/package.json +++ b/packages/victory-candlestick/package.json @@ -27,8 +27,8 @@ "react": ">=16.6.0" }, "devDependencies": { - "victory-vendor": "^36.9.1", - "victory-chart": "^36.9.1", + "victory-vendor": "*", + "victory-chart": "*", "victory-candlestick": "*" }, "publishConfig": { diff --git a/packages/victory-chart/package.json b/packages/victory-chart/package.json index 98f4b58cd..9ffbfa9fe 100644 --- a/packages/victory-chart/package.json +++ b/packages/victory-chart/package.json @@ -31,8 +31,7 @@ "react": ">=16.6.0" }, "devDependencies": { - "victory-chart": "*", - "victory-line": "*" + "victory-chart": "*" }, "publishConfig": { "provenance": true @@ -193,7 +192,6 @@ "../victory-core:types:create", "../victory-polar-axis:types:create", "../victory-shared-events:types:create", - "../victory-line:types:create", "../victory-vendor:types:create", "../victory-voronoi:types:create" ], @@ -265,7 +263,6 @@ "../victory-core:types:create", "../victory-polar-axis:types:create", "../victory-shared-events:types:create", - "../victory-line:types:create", "../victory-vendor:types:create", "../victory-voronoi:types:create" ], @@ -286,7 +283,6 @@ "../victory-core:types:create", "../victory-polar-axis:types:create", "../victory-shared-events:types:create", - "../victory-line:types:create", "../victory-vendor:types:create", "../victory-voronoi:types:create" ], @@ -305,7 +301,6 @@ "output": [], "dependencies": [ "build:lib:cjs", - "../victory-line:build:lib:cjs", "../victory-vendor:build:lib:cjs", "../victory-voronoi:build:lib:cjs" ], diff --git a/packages/victory-chart/src/helper-methods.test.tsx b/packages/victory-chart/src/helper-methods.test.tsx index 4476538e5..3a3aa13d4 100644 --- a/packages/victory-chart/src/helper-methods.test.tsx +++ b/packages/victory-chart/src/helper-methods.test.tsx @@ -1,7 +1,8 @@ import { getChildComponents } from "victory-chart/lib/helper-methods"; import React from "react"; import { VictoryAxis } from "victory-axis"; -import { VictoryLine } from "victory-line"; + +const MockVictoryLine = () =>
; describe("victory-chart/helpers-methods", () => { describe("getChildComponents", () => { @@ -18,7 +19,7 @@ describe("victory-chart/helpers-methods", () => { }); it("adds default axes when none of the children are axis components", () => { - const line = ; + const line = ; const children = [line]; const result = getChildComponents({ children }, defaultAxes); expect(result).toHaveLength(3); diff --git a/packages/victory-chart/src/victory-chart.test.tsx b/packages/victory-chart/src/victory-chart.test.tsx index 39dead932..f27a5598a 100644 --- a/packages/victory-chart/src/victory-chart.test.tsx +++ b/packages/victory-chart/src/victory-chart.test.tsx @@ -1,7 +1,6 @@ import React from "react"; import { VictoryChart } from "victory-chart"; import { VictoryAxis } from "victory-axis"; -import { VictoryLine } from "victory-line"; import { render, screen, fireEvent } from "@testing-library/react"; describe("components/victory-chart", () => { @@ -103,9 +102,7 @@ describe("components/victory-chart", () => { describe("animation", () => { it("handles basic animation parameters without crashing", () => { const { container } = render( - - - , + , ); expect(container.querySelector("svg")).toBeInTheDocument(); diff --git a/packages/victory-core/package.json b/packages/victory-core/package.json index d77b39ae7..02c49a4cf 100644 --- a/packages/victory-core/package.json +++ b/packages/victory-core/package.json @@ -28,10 +28,7 @@ "react": ">=16.6.0" }, "devDependencies": { - "victory-axis": "*", - "victory-bar": "*", - "victory-core": "*", - "victory-line": "*" + "victory-core": "*" }, "publishConfig": { "provenance": true @@ -177,9 +174,6 @@ "dependencies": [ "types:create", "../victory-vendor:types:create", - "../victory-axis:types:create", - "../victory-bar:types:create", - "../victory-line:types:create", "../victory-voronoi:types:create" ], "output": [], @@ -245,9 +239,6 @@ "dependencies": [ "../victory-vendor:build", "../victory-vendor:types:create", - "../victory-axis:types:create", - "../victory-bar:types:create", - "../victory-line:types:create", "../victory-voronoi:types:create" ], "packageLocks": [ @@ -265,9 +256,6 @@ "dependencies": [ "../victory-vendor:build", "../victory-vendor:types:create", - "../victory-axis:types:create", - "../victory-bar:types:create", - "../victory-line:types:create", "../victory-voronoi:types:create" ], "packageLocks": [ @@ -285,9 +273,6 @@ "output": [], "dependencies": [ "build:lib:cjs", - "../victory-axis:build:lib:cjs", - "../victory-bar:build:lib:cjs", - "../victory-line:build:lib:cjs", "../victory-vendor:build:lib:cjs", "../victory-voronoi:build:lib:cjs" ], diff --git a/packages/victory-core/src/victory-util/axis.test.tsx b/packages/victory-core/src/victory-util/axis.test.tsx index ce949a2af..26370ef61 100644 --- a/packages/victory-core/src/victory-util/axis.test.tsx +++ b/packages/victory-core/src/victory-util/axis.test.tsx @@ -1,6 +1,5 @@ +/* eslint-disable react/no-multi-comp */ import React from "react"; -import { VictoryAxis } from "victory-axis"; -import { VictoryBar } from "victory-bar"; import { Axis, Scale } from "victory-core"; describe("helpers/axis", () => { @@ -67,9 +66,15 @@ describe("helpers/axis", () => { }); describe("getAxisComponent", () => { - const dependentAxis = ; - const independentAxis = ; - const bar = ; + const MockVictoryAxis = (props) =>
; + MockVictoryAxis.getAxis = (props) => (props.dependentAxis ? "y" : "x"); + MockVictoryAxis.role = "axis"; + + const MockVictoryBar = (props) =>
; + + const dependentAxis = ; + const independentAxis = ; + const bar = ; beforeEach(() => { jest.spyOn(dependentAxis.type, "getAxis"); diff --git a/packages/victory-core/src/victory-util/wrapper.test.tsx b/packages/victory-core/src/victory-util/wrapper.test.tsx index 2bef065dc..4adaa340d 100644 --- a/packages/victory-core/src/victory-util/wrapper.test.tsx +++ b/packages/victory-core/src/victory-util/wrapper.test.tsx @@ -1,13 +1,18 @@ +/* eslint-disable react/no-multi-comp */ import React from "react"; -import { VictoryAxis } from "victory-axis"; import { Wrapper } from "victory-core"; -import { VictoryLine } from "victory-line"; + +const MockVictoryAxis = (props) =>
; +MockVictoryAxis.role = "axis"; + +const MockVictoryLine = (props) =>
; +MockVictoryLine.role = "line"; describe("helpers/wrapper", () => { describe("getDomain", () => { - const victoryLine = ; - const xAxis = ; - const yAxis = ; + const victoryLine = ; + const xAxis = ; + const yAxis = ; const childComponents = [victoryLine, xAxis, yAxis]; it("calculates a domain from props", () => { @@ -32,7 +37,7 @@ describe("helpers/wrapper", () => { { x: "cat", y: 3 }, ], }; - const childComponents = []; + const childComponents = []; const dataStrings = Wrapper.getStringsFromData(childComponents).x; expect(dataStrings).toEqual(["one", "red", "cat"]); }); @@ -47,7 +52,7 @@ describe("helpers/wrapper", () => { x: 0, y: 1, }; - const childComponents = []; + const childComponents = []; const dataStrings = Wrapper.getStringsFromData(childComponents).x; expect(dataStrings).toEqual(["one", "red", "cat"]); }); @@ -59,7 +64,7 @@ describe("helpers/wrapper", () => { { x: "three", y: 3 }, ], }; - const childComponents = []; + const childComponents = []; expect(Wrapper.getStringsFromData(childComponents).x).toEqual(["three"]); }); @@ -70,7 +75,7 @@ describe("helpers/wrapper", () => { { x: 3, y: 3 }, ], }; - const childComponents = []; + const childComponents = []; expect(Wrapper.getStringsFromData(childComponents).x).toEqual([]); }); diff --git a/packages/victory-native/package.json b/packages/victory-native/package.json index 6314037b3..3e81faf3d 100644 --- a/packages/victory-native/package.json +++ b/packages/victory-native/package.json @@ -59,7 +59,7 @@ "react-native": "^0.65.1", "react-native-gesture-handler": "^1.10.3", "react-native-svg": "^12.4.3", - "victory-native": "*" + "victory-native": "^36.9.1" }, "peerDependencies": { "react": ">=16.6.0" diff --git a/packages/victory-selection-container/package.json b/packages/victory-selection-container/package.json index 42beba058..91c46337c 100644 --- a/packages/victory-selection-container/package.json +++ b/packages/victory-selection-container/package.json @@ -27,7 +27,7 @@ "react": ">=16.6.0" }, "devDependencies": { - "victory-bar": "^36.9.1", + "victory-bar": "*", "victory-selection-container": "*" }, "publishConfig": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 075aba0b1..7c5479124 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -275,14 +275,12 @@ importers: specifiers: lodash: ^4.17.19 victory-axis: '*' - victory-chart: '*' victory-core: ^36.9.1 dependencies: lodash: 4.17.21 victory-core: link:../victory-core devDependencies: victory-axis: 'link:' - victory-chart: link:../victory-chart packages/victory-bar: specifiers: @@ -303,7 +301,7 @@ importers: specifiers: lodash: ^4.17.19 victory-box-plot: '*' - victory-chart: ^36.9.1 + victory-chart: '*' victory-core: ^36.9.1 victory-vendor: ^36.9.1 dependencies: @@ -341,9 +339,9 @@ importers: specifiers: lodash: ^4.17.19 victory-candlestick: '*' - victory-chart: ^36.9.1 + victory-chart: '*' victory-core: ^36.9.1 - victory-vendor: ^36.9.1 + victory-vendor: '*' dependencies: lodash: 4.17.21 victory-core: link:../victory-core @@ -369,7 +367,6 @@ importers: victory-axis: ^36.9.1 victory-chart: '*' victory-core: ^36.9.1 - victory-line: '*' victory-polar-axis: ^36.9.1 victory-shared-events: ^36.9.1 dependencies: @@ -381,26 +378,19 @@ importers: victory-shared-events: link:../victory-shared-events devDependencies: victory-chart: 'link:' - victory-line: link:../victory-line packages/victory-core: specifiers: lodash: ^4.17.21 react-fast-compare: ^3.2.0 - victory-axis: '*' - victory-bar: '*' victory-core: '*' - victory-line: '*' victory-vendor: ^36.9.1 dependencies: lodash: 4.17.21 react-fast-compare: 3.2.0 victory-vendor: link:../victory-vendor devDependencies: - victory-axis: link:../victory-axis - victory-bar: link:../victory-bar victory-core: 'link:' - victory-line: link:../victory-line packages/victory-create-container: specifiers: @@ -524,7 +514,7 @@ importers: victory-histogram: ^36.9.1 victory-legend: ^36.9.1 victory-line: ^36.9.1 - victory-native: '*' + victory-native: ^36.9.1 victory-pie: ^36.9.1 victory-polar-axis: ^36.9.1 victory-scatter: ^36.9.1 @@ -607,7 +597,7 @@ importers: packages/victory-selection-container: specifiers: lodash: ^4.17.19 - victory-bar: ^36.9.1 + victory-bar: '*' victory-core: ^36.9.1 victory-selection-container: '*' dependencies: