Skip to content
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

[Snyk] Upgrade recharts from 2.6.2 to 2.14.1 #49

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gitworkflows
Copy link
Contributor

@gitworkflows gitworkflows commented Dec 26, 2024

snyk-top-banner

Snyk has created this PR to upgrade recharts from 2.6.2 to 2.14.1.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


  • The recommended version is 36 versions ahead of your current version.

  • The recommended version was released 23 days ago.

Release notes
Package name: recharts
  • 2.14.1 - 2024-12-03

    What's Changed

    Fix

    • X/YAxis: omit unused/accidentally added (in 2.13) ref prop from axis types in #5295. Resolves #5294

    Full Changelog: v2.14.0...v2.14.1

  • 2.14.0 - 2024-12-02

    What's Changed

    Small release to get new top level chart events out there. Still working on 3.x, a little slower right now because of the holidays.

    Feat

    • Area/Line/Bar/Scatter/Pie/Radar/RadialBar/Funnel Chart components: add support for top level onContextMenu and onDoubleClick events #5254 by @ abarreau in #5255

    Fix

    Typescript fixes

    • LabelList: dataKey prop for LabelList should accept any object by @ ckifer in #5252
    • Pie: PieSectorDataItem.payload should be an object rather than an array by @ BTOdell in #5263

    New Contributors

    Full Changelog: v2.13.3...v2.14.0

  • 2.13.3 - 2024-11-01

    What's Changed

    Small change which may (or may not) help when using ResponsiveContainer with React 19. Worth a shot.

    !! react-is override is still needed for React 19 to work correctly with recharts !! - see #4558

    Fix

    • 7a67b41 ResponsiveContainer - swap isElement from react-is with React.isValidElement

    Full Changelog: v2.13.2...v2.13.3

  • 2.13.2 - 2024-10-30

    What's Changed

    • Another fix from 2.13. Categorical charts should have their ref props back.

    Fix

    • fix: forwardRef to CategoricalChartWrapper from CategoricalChart by @ ckifer in #5176 - fixes #5113

    Full Changelog: v2.13.1...v2.13.2

  • 2.13.1 - 2024-10-29

    What's Changed

    • Small bug fixes from the 2.13 release

    Fix

    • ResponsiveContainer: fix internal bug from 2.13 which causes responsive container to render incorrectly by @ ckifer in #5174
    • Bar: radius prop type fixed to match expected type by @ lifeofpavs in #5116

    New Contributors

    Full Changelog: v2.13.0...v2.13.1

  • 2.13.0 - 2024-10-10

    What's Changed

    React 19 compat, fix annoying defaultProps warnings, bug fixes

    Feat

    • React 19 compatibility - see #4558

      • peerDependencies still cannot be updated until 3.0 release, but for now R19 beta/RC releases can be used with Recharts under the following conditions:
        • Your react-is version matches your react and react-dom versions: use your package manager's override functionality to match your react-is version to your react version or else recharts elements will not show - see #4558 (comment)
    • CartesianGrid: add support for ry prop to curve the corner of the grid background - progress on #3062

    Fix

    • General: Fix defaultProps usage in function components, removes warnings on all affected components - see #3615
    • ReferenceLine: fix accidental removal of type annotation by @ zackliscio in #4610
    • Line/Area: fix issue where clipDot would not take effect if it was the only property in dotProps @ ckifer in #4674
    • Tooltip: fix issue where tooltip would not show in certain cases if data was set on the graphical item by @ HHongSeungWoo in #4718
    • X/YAxis: use correct, adapted event types by @ ckifer in #4967
    • Tooltip: defaultIndex out of range error by @ ckifer in #5054
    • Pie: fix duplicate key error @ ckifer in #4958
    • Text: fix duplicate key error by @ ckifer in #5088 closes #5072

    Typescript

    • JSDoc comments will now be preserved in TypeScript definitions by @ mxdvl in #5071

    New Contributors

    Full Changelog: v2.12.7...v2.13.0

  • 2.13.0-alpha.5 - 2024-09-05

    What's Changed

    Some non-breaking bug fixes that need more testing with React 19. Fixes JSX type issue for React 19 when using @ types/react@19

    Fix

    • Line/Area: clipDot setting fails to take effect if set as the only DotProp by @ ckifer in #4674 fixes #4671
    • Tooltip: Tooltip now renders correctly when data is set on the graphical item rather than the higher level chart by @ HHongSeungWoo in #4718 fixes #4717
    • Pie: fix duplicate key issue when "key" exists in chart data (try not use "key" as a data point) by @ ckifer in #4958 fixes #4858

    TypeScript

    Full Changelog: v2.13.0-alpha.4...v2.13.0-alpha.5

  • 2.13.0-alpha.4 - 2024-06-02

    What's Changed

    Additional React 19 fixes - please keep adding reports to #4558, thanks!

    Fix

    • ReferenceLine: Re-add ReferenceLine types which caused a regression in alpha.0 by @ zackliscio in #4610
    • Fix stacked charts and other defaultProp issues in React 19 by @ ckifer in #4618

    New Contributors

    Full Changelog: v2.13.0-alpha.3...v2.13.0-alpha.4

  • 2.13.0-alpha.3 - 2024-05-28

    What's Changed

    More React 19 specific fixes. If you are using R19, you must use overrides/resolutions to match your react-is version with your react version

    Fix

    • v2.13.0-alpha.2: fix: remove isElement check on children in responsivecontainer by @ ckifer in #4587
    • v2.13.0-alpha.3: fix: legend defaultProps usage for R19 by @ ckifer in #4589

    Full Changelog: v2.13.0-alpha.1...v2.13.0-alpha.3

  • 2.13.0-alpha.2 - 2024-05-26
  • 2.13.0-alpha.1 - 2024-05-24

    What's Changed

    v2.13.0-alpha.0 contains some fixes for React 19 support
    v2.13.0-alpha.1 contains what seems to be the rest of them

    Fix

    Please test this as much as possible using React 16.8 - 19! thank you!

    Full Changelog: v2.12.7...v2.13.0-alpha.1

  • 2.13.0-alpha.0 - 2024-05-24
  • 2.12.7 - 2024-05-08
  • 2.12.6 - 2024-04-21
  • 2.12.5 - 2024-04-12
  • 2.12.4 - 2024-04-04
  • 2.12.3 - 2024-03-15
  • 2.12.2 - 2024-03-01
  • 2.12.1 - 2024-02-20
  • 2.12.0 - 2024-02-09
  • 2.11.0 - 2024-01-27
  • 2.10.4 - 2024-01-09
  • 2.10.3 - 2023-12-01
  • 2.10.2 - 2023-11-29
  • 2.10.1 - 2023-11-19
  • 2.10.0 - 2023-11-19
  • 2.9.3 - 2023-11-06
  • 2.9.2 - 2023-11-01
  • 2.9.1 - 2023-10-30
  • 2.9.0 - 2023-10-15
  • 2.8.0 - 2023-08-25
  • 2.7.3 - 2023-08-08
  • 2.7.2 - 2023-06-22
  • 2.7.1 - 2023-06-15
  • 2.7.0 - 2023-06-15
  • 2.7.0-alpha.0 - 2023-05-26
  • 2.6.2 - 2023-05-10
from recharts GitHub release notes

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

Summary by Sourcery

Enhancements:

  • Upgrade Recharts to improve compatibility with React 19 and fix several bugs, including tooltip rendering issues, default prop warnings, and duplicate key errors.

Snyk has created this PR to upgrade recharts from 2.6.2 to 2.14.1.

See this package in npm:
recharts

See this project in Snyk:
https://app.snyk.io/org/khulnasoft-devsecops/project/4ffd4985-a266-4133-af54-bab5727b70a3?utm_source=github&utm_medium=referral&page=upgrade-pr
Copy link

sourcery-ai bot commented Dec 26, 2024

Reviewer's Guide by Sourcery

This PR upgrades the recharts library from version 2.6.2 to 2.14.1. This addresses potential vulnerabilities and improves compatibility with newer versions of React. The upgrade includes several bug fixes, new features, and improvements to TypeScript support.

Class diagram showing updated Recharts component changes

classDiagram
    class RechartsComponents {
        +onContextMenu()
        +onDoubleClick()
    }

    RechartsComponents <|-- AreaChart
    RechartsComponents <|-- LineChart
    RechartsComponents <|-- BarChart
    RechartsComponents <|-- ScatterChart
    RechartsComponents <|-- PieChart
    RechartsComponents <|-- RadarChart
    RechartsComponents <|-- RadialBarChart
    RechartsComponents <|-- FunnelChart

    note for RechartsComponents "New event handlers added in v2.14.0"

    class Axis {
        -ref: removed
    }

    class PieSectorDataItem {
        +payload: object
    }

    note for PieSectorDataItem "payload type changed from array to object"
Loading

State diagram showing React 19 compatibility changes

stateDiagram-v2
    [*] --> ReactCompatibility
    ReactCompatibility --> DefaultPropsHandling: Update
    DefaultPropsHandling --> ResponsiveContainer: Fix
    ResponsiveContainer --> LegendComponent: Update
    LegendComponent --> TypeScriptSupport: Enhance
    TypeScriptSupport --> [*]

    note right of ReactCompatibility: React 19 support added
    note right of DefaultPropsHandling: Fixed defaultProps usage
    note right of ResponsiveContainer: Improved element handling
    note right of TypeScriptSupport: Enhanced type definitions
Loading

File-Level Changes

Change Details Files
Upgrade recharts from 2.6.2 to 2.14.1
  • Updated the recharts dependency version in package.json
  • Updated the recharts dependency and its dependencies in package-lock.json
frontend/package.json
frontend/package-lock.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

deepsource-io bot commented Dec 26, 2024

Here's the code health analysis summary for commits 6f20567..4ede7bc. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Python LogoPython✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

Copy link

coderabbitai bot commented Dec 26, 2024

Important

Review skipped

Ignore keyword(s) in the title.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have skipped reviewing this pull request. It seems to have been created by a bot ('[Snyk]' found in title). We assume it knows what it's doing!

@gitworkflows
Copy link
Contributor Author

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants