Skip to content

Commit b538937

Browse files
authored
Merge branch 'main' into ts-migrate/victory-native
2 parents bcce09b + ddf9158 commit b538937

File tree

82 files changed

+625
-347
lines changed

Some content is hidden

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

82 files changed

+625
-347
lines changed

.changeset/brave-cycles-matter.md

-34
This file was deleted.

docs/src/content/introduction/native.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ scope: null
88

99
# Getting Started with Victory Native
1010

11-
> These docs are for the legacy versions of Victory Native. If you're looking for Victory Native XL docs, please [see here]
12-
(https://formidable.com/open-source/victory-native/).
11+
> These docs are for the legacy versions of Victory Native. Victory Native XL is our rewrite of Victory Native designed specifically for React Native. Please [see here for more information]
12+
(https://formidable.com/open-source/victory-native/). If you would like to continue to use this version of Victory with React Native, follow the legacy guide below.
1313

1414
In this guide, we’ll show you how to get started with Victory Native and the React Native SVG dependency running in your React Native app for iOS and Android.
1515

@@ -22,7 +22,7 @@ Victory Native is compatible with React Native 0.50 or higher.
2222
To add Victory Native to your React Native app install `victory-native`.
2323

2424
```bash
25-
$ yarn add victory-native # or npm install --save victory-native
25+
$ yarn add victory-native@legacy # or npm install --save victory-native@legacy
2626
```
2727

2828
#### 2. Add React Native SVG to your app

packages/victory-area/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# victory-area
22

3+
## 36.8.5
4+
5+
### Patch Changes
6+
7+
- Replace instances of lodash.assign with Object.assign ([#2757](https://github.com/FormidableLabs/victory/pull/2757))
8+
9+
* Replace instances of lodash.range with equivalent native code ([#2760](https://github.com/FormidableLabs/victory/pull/2760))
10+
311
## 36.8.4
412

513
## 36.8.3

packages/victory-area/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "victory-area",
3-
"version": "36.8.4",
3+
"version": "36.8.5",
44
"description": "Area Component for Victory",
55
"keywords": [
66
"data visualization",
@@ -22,8 +22,8 @@
2222
"dependencies": {
2323
"lodash": "^4.17.19",
2424
"prop-types": "^15.8.1",
25-
"victory-core": "^36.8.4",
26-
"victory-vendor": "^36.8.4"
25+
"victory-core": "^36.8.5",
26+
"victory-vendor": "^36.8.5"
2727
},
2828
"peerDependencies": {
2929
"react": ">=16.6.0"

packages/victory-area/src/victory-area.test.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { fireEvent, render, screen } from "@testing-library/react";
2-
import { range } from "lodash";
32
import React from "react";
43
import { Area, VictoryArea, VictoryAreaProps } from "victory-area";
54
import { VictoryChart } from "victory-chart";
5+
import { Helpers } from "victory-core";
66
import { curveCatmullRom } from "victory-vendor/d3-shape";
77
import { calculateD3Path } from "../../../test/helpers/svg";
88

@@ -115,7 +115,7 @@ describe("components/victory-area", () => {
115115
scale: "linear",
116116
interpolation: "linear",
117117
sortKey: "x",
118-
data: range(5)
118+
data: Helpers.range(5)
119119
// eslint-disable-next-line max-nested-callbacks
120120
.map((i) => ({ x: i, y: i, y0: 0 }))
121121
.reverse(),
@@ -145,7 +145,7 @@ describe("components/victory-area", () => {
145145
interpolation: "linear",
146146
sortKey: "x",
147147
sortOrder: "descending",
148-
data: range(5)
148+
data: Helpers.range(5)
149149
.map((i) => ({ x: i, y: i, y0: 0 }))
150150
.reverse(),
151151
};

packages/victory-axis/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# victory-axis
22

3+
## 36.8.5
4+
5+
### Patch Changes
6+
7+
- Replace instances of lodash.assign with Object.assign ([#2757](https://github.com/FormidableLabs/victory/pull/2757))
8+
39
## 36.8.4
410

511
## 36.8.3

packages/victory-axis/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "victory-axis",
3-
"version": "36.8.4",
3+
"version": "36.8.5",
44
"description": "Axis Component for Victory",
55
"keywords": [
66
"data visualization",
@@ -22,7 +22,7 @@
2222
"dependencies": {
2323
"lodash": "^4.17.19",
2424
"prop-types": "^15.8.1",
25-
"victory-core": "^36.8.4"
25+
"victory-core": "^36.8.5"
2626
},
2727
"peerDependencies": {
2828
"react": ">=16.6.0"

packages/victory-bar/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# victory-bar
22

3+
## 36.8.5
4+
5+
### Patch Changes
6+
7+
- Replace instances of lodash.assign with Object.assign ([#2757](https://github.com/FormidableLabs/victory/pull/2757))
8+
9+
* Replace instances of lodash.range with equivalent native code ([#2760](https://github.com/FormidableLabs/victory/pull/2760))
10+
311
## 36.8.4
412

513
## 36.8.3

packages/victory-bar/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "victory-bar",
3-
"version": "36.8.4",
3+
"version": "36.8.5",
44
"description": "Bar Component for Victory",
55
"keywords": [
66
"data visualization",
@@ -22,8 +22,8 @@
2222
"dependencies": {
2323
"lodash": "^4.17.19",
2424
"prop-types": "^15.8.1",
25-
"victory-core": "^36.8.4",
26-
"victory-vendor": "^36.8.4"
25+
"victory-core": "^36.8.5",
26+
"victory-vendor": "^36.8.5"
2727
},
2828
"peerDependencies": {
2929
"react": ">=16.6.0"

packages/victory-bar/src/victory-bar.test.tsx

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import * as React from "react";
22
import { render, fireEvent, screen } from "@testing-library/react";
3-
import { range } from "lodash";
43
import { VictoryChart } from "victory-chart";
54
import { Bar, VictoryBar } from "victory-bar";
5+
import { Helpers } from "victory-core";
6+
67
import { isBar, getBarHeight } from "../../../test/helpers";
78

89
describe("components/victory-bar", () => {
@@ -70,14 +71,14 @@ describe("components/victory-bar", () => {
7071

7172
describe("rendering data", () => {
7273
it("renders bars for {x, y} shaped data (default)", () => {
73-
const data = range(10).map((i) => ({ x: i, y: i }));
74+
const data = Helpers.range(10).map((i) => ({ x: i, y: i }));
7475
const { container } = render(<VictoryBar data={data} />);
7576
const bars = container.querySelectorAll("path");
7677
expect(bars.length).toEqual(10);
7778
});
7879

7980
it("renders ordered bars when sortKey is passed", () => {
80-
const data = range(5)
81+
const data = Helpers.range(5)
8182
.map((i) => ({ x: i, y: i }))
8283
.reverse();
8384
const { container } = render(<VictoryBar data={data} sortKey="x" />);
@@ -94,7 +95,7 @@ describe("components/victory-bar", () => {
9495
});
9596

9697
it("renders reverse ordered bars when sortOrder is descending", () => {
97-
const data = range(5)
98+
const data = Helpers.range(5)
9899
.map((i) => ({ x: i, y: i }))
99100
.reverse();
100101
const { container } = render(
@@ -112,14 +113,16 @@ describe("components/victory-bar", () => {
112113
});
113114

114115
it("renders bars for array-shaped data", () => {
115-
const data = range(20).map((i) => [i, i]);
116+
const data = Helpers.range(20).map((i) => [i, i]);
116117
const { container } = render(<VictoryBar data={data} x={0} y={1} />);
117118
const bars = container.querySelectorAll("path");
118119
expect(bars).toHaveLength(20);
119120
});
120121

121122
it("renders bars for deeply-nested data", () => {
122-
const data = range(8).map((i) => ({ a: { b: [{ x: i, y: i }] } }));
123+
const data = Helpers.range(8).map((i) => ({
124+
a: { b: [{ x: i, y: i }] },
125+
}));
123126
const { container } = render(
124127
<VictoryBar data={data} x="a.b[0].x" y="a.b[0].y" />,
125128
);
@@ -128,7 +131,7 @@ describe("components/victory-bar", () => {
128131
});
129132

130133
it("renders bars values with null accessor", () => {
131-
const data = range(8);
134+
const data = Helpers.range(8);
132135
const { container } = render(
133136
// @ts-expect-error "'null' is not assignable to 'x'"
134137
<VictoryBar data={data} x={null} y={null} />,
@@ -249,14 +252,14 @@ describe("components/victory-bar", () => {
249252

250253
describe("accessibility", () => {
251254
it("adds an aria role to each bar in the series", () => {
252-
const data = range(10).map((y, x) => ({ x, y }));
255+
const data = Helpers.range(10).map((y, x) => ({ x, y }));
253256
render(<VictoryBar data={data} />);
254257
const presentationElements = screen.getAllByRole("presentation");
255258
expect(presentationElements).toHaveLength(11); // bars plus container
256259
});
257260

258261
it("applies aria-label and tabIndex to the Bar primitive", () => {
259-
const data = range(5, 11).map((y, x) => ({ y, x }));
262+
const data = Helpers.range(5, 11).map((y, x) => ({ y, x }));
260263
const { container } = render(
261264
<VictoryBar
262265
data={data}

packages/victory-box-plot/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# victory-box-plot
22

3+
## 36.8.5
4+
5+
### Patch Changes
6+
7+
- Replace instances of lodash.assign with Object.assign ([#2757](https://github.com/FormidableLabs/victory/pull/2757))
8+
39
## 36.8.4
410

511
## 36.8.3

packages/victory-box-plot/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "victory-box-plot",
3-
"version": "36.8.4",
3+
"version": "36.8.5",
44
"description": "Box Plot Component for Victory",
55
"keywords": [
66
"data visualization",
@@ -22,15 +22,15 @@
2222
"dependencies": {
2323
"lodash": "^4.17.19",
2424
"prop-types": "^15.8.1",
25-
"victory-core": "^36.8.4",
26-
"victory-vendor": "^36.8.4"
25+
"victory-core": "^36.8.5",
26+
"victory-vendor": "^36.8.5"
2727
},
2828
"peerDependencies": {
2929
"react": ">=16.6.0"
3030
},
3131
"devDependencies": {
3232
"victory-box-plot": "*",
33-
"victory-chart": "^36.8.4"
33+
"victory-chart": "^36.8.5"
3434
},
3535
"publishConfig": {
3636
"provenance": true

packages/victory-brush-container/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# victory-brush-container
22

3+
## 36.8.5
4+
5+
### Patch Changes
6+
7+
- Replace instances of lodash.assign with Object.assign ([#2757](https://github.com/FormidableLabs/victory/pull/2757))
8+
39
## 36.8.4
410

511
## 36.8.3

packages/victory-brush-container/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "victory-brush-container",
3-
"version": "36.8.4",
3+
"version": "36.8.5",
44
"description": "Interactive Brush Component for Victory",
55
"keywords": [
66
"data visualization",
@@ -23,7 +23,7 @@
2323
"lodash": "^4.17.19",
2424
"prop-types": "^15.8.1",
2525
"react-fast-compare": "^3.2.0",
26-
"victory-core": "^36.8.4"
26+
"victory-core": "^36.8.5"
2727
},
2828
"peerDependencies": {
2929
"react": ">=16.6.0"

packages/victory-brush-line/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# victory-brush-line
22

3+
## 36.8.5
4+
5+
### Patch Changes
6+
7+
- Replace instances of lodash.assign with Object.assign ([#2757](https://github.com/FormidableLabs/victory/pull/2757))
8+
39
## 36.8.4
410

511
## 36.8.3

packages/victory-brush-line/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "victory-brush-line",
3-
"version": "36.8.4",
3+
"version": "36.8.5",
44
"description": "Interactive Brush Line Component for Victory",
55
"keywords": [
66
"data visualization",
@@ -23,7 +23,7 @@
2323
"lodash": "^4.17.19",
2424
"prop-types": "^15.8.1",
2525
"react-fast-compare": "^3.2.0",
26-
"victory-core": "^36.8.4"
26+
"victory-core": "^36.8.5"
2727
},
2828
"peerDependencies": {
2929
"react": ">=16.6.0"

packages/victory-candlestick/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# victory-candlestick
22

3+
## 36.8.5
4+
5+
### Patch Changes
6+
7+
- Replace instances of lodash.assign with Object.assign ([#2757](https://github.com/FormidableLabs/victory/pull/2757))
8+
9+
* Replace instances of lodash.range with equivalent native code ([#2760](https://github.com/FormidableLabs/victory/pull/2760))
10+
311
## 36.8.4
412

513
## 36.8.3

packages/victory-candlestick/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "victory-candlestick",
3-
"version": "36.8.4",
3+
"version": "36.8.5",
44
"description": "Candlestick Component for Victory",
55
"keywords": [
66
"data visualization",
@@ -22,14 +22,14 @@
2222
"dependencies": {
2323
"lodash": "^4.17.19",
2424
"prop-types": "^15.8.1",
25-
"victory-core": "^36.8.4"
25+
"victory-core": "^36.8.5"
2626
},
2727
"peerDependencies": {
2828
"react": ">=16.6.0"
2929
},
3030
"devDependencies": {
31-
"victory-vendor": "^36.8.4",
32-
"victory-chart": "^36.8.4",
31+
"victory-vendor": "^36.8.5",
32+
"victory-chart": "^36.8.5",
3333
"victory-candlestick": "*"
3434
},
3535
"publishConfig": {

0 commit comments

Comments
 (0)