-
Notifications
You must be signed in to change notification settings - Fork 36
Bump recharts from 2.15.4 to 3.3.0 #21
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
base: main
Are you sure you want to change the base?
Conversation
Bumps [recharts](https://github.com/recharts/recharts) from 2.15.4 to 3.3.0. - [Release notes](https://github.com/recharts/recharts/releases) - [Changelog](https://github.com/recharts/recharts/blob/main/CHANGELOG.md) - [Commits](recharts/recharts@v2.15.4...v3.3.0) --- updated-dependencies: - dependency-name: recharts dependency-version: 3.3.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
LabelsThe following labels could not be found: Please fix the above issues or remove invalid values from |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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.
🔧 Build Fix:
The ChartTooltipContent and ChartLegendContent functions have incorrect TypeScript prop types that try to access payload from Recharts component props, but Recharts 3.3.0 excludes payload from the component props type and passes it through content component props instead.
View Details
📝 Patch Details
diff --git a/components/ui/chart.tsx b/components/ui/chart.tsx
index 97cc280..2fd35fa 100644
--- a/components/ui/chart.tsx
+++ b/components/ui/chart.tsx
@@ -118,14 +118,21 @@ function ChartTooltipContent({
color,
nameKey,
labelKey,
-}: React.ComponentProps<typeof RechartsPrimitive.Tooltip> &
- React.ComponentProps<"div"> & {
- hideLabel?: boolean
- hideIndicator?: boolean
- indicator?: "line" | "dot" | "dashed"
- nameKey?: string
- labelKey?: string
- }) {
+}: {
+ active?: boolean
+ payload?: any[]
+ label?: any
+ className?: string
+ indicator?: "line" | "dot" | "dashed"
+ hideLabel?: boolean
+ hideIndicator?: boolean
+ labelFormatter?: (label: any, payload: any[]) => React.ReactNode
+ labelClassName?: string
+ formatter?: (value: any, name: any, item: any, index: number, payload: any) => React.ReactNode
+ color?: string
+ nameKey?: string
+ labelKey?: string
+}) {
const { config } = useChart()
const tooltipLabel = React.useMemo(() => {
@@ -256,8 +263,9 @@ function ChartLegendContent({
payload,
verticalAlign = "bottom",
nameKey,
-}: React.ComponentProps<"div"> &
- Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
+}: React.ComponentProps<"div"> & {
+ payload?: any[]
+ verticalAlign?: "top" | "bottom"
hideIcon?: boolean
nameKey?: string
}) {
Analysis
TypeScript compilation error due to Recharts 3.3.0 breaking changes
What fails: TypeScript compiler fails on components/ui/chart.tsx at lines 109 and 267 due to missing payload property on Tooltip and Legend component props
How to reproduce:
pnpm run buildResult:
./components/ui/chart.tsx:109:3
Type error: Property 'payload' does not exist on type 'Omit<Props<ValueType, NameType>, PropertiesReadFromContext> & { active?: boolean | undefined; includeHidden?: boolean | undefined; ... 17 more ...; axisId?: AxisId | undefined; } & ClassAttributes<...> & HTMLAttributes<...> & { ...; }'.
./components/ui/chart.tsx:267:39
Type error: Type '"payload" | "verticalAlign"' does not satisfy the constraint...
Bumps recharts from 2.15.4 to 3.3.0.
Release notes
Sourced from recharts's releases.
... (truncated)
Commits
7f4f707Add tests for getAttrsOfCartesianLabel, allow Percent type for custom label p...9bbaa5dMore strictNullChecks refactoring (#6446)189f2353.3.0 version bump (#6463)d558329chore(deps-dev): bump the storybook group across 1 directory with 7 updates (...72bfccbchore(deps-dev): bump eslint-plugin-storybook from 9.1.10 to 9.1.12 (#6458)87a8181chore(deps-dev): bump vite from 6.3.7 to 6.4.0 in /www (#6454)42d0258chore(deps-dev): bump typescript-eslint from 8.46.0 to 8.46.1 (#6451)1a9f9eechore(deps-dev): bump vite from 6.3.6 to 6.3.7 in /www (#6452)57e89b0Only use the YAxis width oscillation detection if the difference is > 1 pixel...debb9a4chore(deps-dev): bump eslint-config-airbnb-extended from 2.3.1 to 2.3.2 (#6448)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)