Skip to content

[Snyk] Upgrade react-calendar from 4.1.0 to 4.8.0#407

Open
nejidevelops wants to merge 1 commit intomasterfrom
snyk-upgrade-ab498253628801495ef346bb018876a1
Open

[Snyk] Upgrade react-calendar from 4.1.0 to 4.8.0#407
nejidevelops wants to merge 1 commit intomasterfrom
snyk-upgrade-ab498253628801495ef346bb018876a1

Conversation

@nejidevelops
Copy link
Owner

snyk-top-banner

Snyk has created this PR to upgrade react-calendar from 4.1.0 to 4.8.0.

ℹ️ 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 10 versions ahead of your current version.

  • The recommended version was released 2 years ago.

Release notes
Package name: react-calendar
  • 4.8.0 - 2024-01-09

    What's new?

    • Added support for showNeighboringCentury and showNeighboringDecade props.`

    What's changed?

    • Replaced tiny-warning with more popular (and equally tiny!) warning.

    Bug fixes

    • Fixed disabled neighboring tiles text color.
  • 4.7.0 - 2023-12-09

    What's new?

    • Improved developer experience by moving prop documentation to JSDoc. This means that you can now see descriptions, default values, and examples for all props in your IDE.
    • Improved documentation.
  • 4.6.1 - 2023-10-18

    What's new?

    • Package is now published with npm provenance statements.
    • Exported OnArgs type to make it easier to create custom on… callbacks (#897). Thanks, @ meszaros-lajos-gyorgy!
    • Exported TileArgs type to make it easier to create custom tileClassName, tileContent, tileDisabled functions.

    Bug fixes

    • Fix weekend indicators ignoring calendarType prop (#902). Thanks, @ abukati!
  • 4.6.0 - 2023-07-27

    What's new?

    • Added support for native ESM modules (#886).

    What's changed?

    • Improved propTypes.
    • Strengthened TypeScript types.
    • Refactored tile rendering.

    Bug fixes

    • Fixed propTypes declared twice in every declaration file.
  • 4.5.0 - 2023-07-21

    What's new?

    • Improved RSC compatibility. You no longer need to add 'use client'; to the parent component for this component to work.

    Bug fixes

    • @ types/react and @ types/react-dom are now optional peerDependencies, which eliminates errors caused by duplicate typings.
  • 4.4.0 - 2023-07-16

    What's new?

    • NavigationLabelFunc, OnClickFunc, OnClickWeekNumberFunc, TileClassNameFunc, TileContentFunc and TileDisabledFunc types are now exported for your convenience.

    What's changed?

    • Renamed calendar types passed to calendarType prop to match Intl.Locale.calendar. Thanks to this change, we will be able to support many more calendar types in the near future! Don't worry - old values are still supported, but will be deprecated in the future.
    • Updated clsx dependency to 2.0.0 to enable ESM support in the near future.
  • 4.3.0 - 2023-06-13

    Thanks to internal improvements, this is our smallest release ever, down to just 10kB Gzipped! 🥳

    What's new?

    • CalendarProps type is now exported for your convenience (#866).
    • Rewritten package using React Hooks (#858).
    • Improved RTL language support (#841).
  • 4.2.1 - 2023-04-04

    Bug fixes

    • Improved type accuracy for value prop and all callbacks (it's now explicitly [Date, Date] instead of Date[]).
    • Fixed types for onDrillDown and onDrillUp props.
    • Fixed types for tileClassName not allowing null or undefined return values.
    • Fixed React.ComponentProps<typeof Calendar> incorrectly marking props with default values as required.
  • 4.2.0 - 2023-04-04

    What's new?

    • Allowed array of strings to be passed as value.
  • 4.1.1 - 2023-04-03
  • 4.1.0 - 2023-03-26
from react-calendar 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:

Snyk has created this PR to upgrade react-calendar from 4.1.0 to 4.8.0.

See this package in npm:
react-calendar

See this project in Snyk:
https://app.snyk.io/org/newtonombese1/project/d92f77c7-4d21-4560-a1c1-675c45b5ed71?utm_source=github&utm_medium=referral&page=upgrade-pr
@gemini-code-assist
Copy link

Summary of Changes

Hello @nejidevelops, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request automates the upgrade of the react-calendar dependency to its latest stable version, 4.8.0. This update brings a wealth of new functionalities, performance optimizations, and critical bug fixes, ensuring the project benefits from the most current and stable version of the calendar component. The upgrade aims to enhance the overall stability, maintainability, and feature set of the application's calendar functionalities.

Highlights

  • Dependency Upgrade: The react-calendar library has been upgraded from version 4.1.0 to 4.8.0. This update incorporates numerous improvements, new features, and bug fixes accumulated over 10 minor versions and approximately two years since the previous version.
  • New Features & Enhancements: Key new features include support for showNeighboringCentury and showNeighboringDecade props, improved developer experience with JSDoc prop documentation, native ESM module support, and enhanced React Server Components (RSC) compatibility. Various types like OnArgs, TileArgs, NavigationLabelFunc, and CalendarProps are now exported for better extensibility and TypeScript usage.
  • Performance and Internal Improvements: The library has seen significant internal refactoring, including a rewrite using React Hooks, leading to a smaller bundle size (down to 10kB Gzipped in version 4.3.0). Other improvements include strengthened TypeScript types, refined propTypes, refactored tile rendering, and better RTL language support. The internal tiny-warning dependency was replaced with the more popular warning package.
  • Bug Fixes: Several bugs have been addressed, such as fixes for disabled neighboring tiles text color, weekend indicators ignoring the calendarType prop, and improved type accuracy for the value prop and various callbacks.
  • Dependency Updates: The clsx dependency has been updated from 1.2.1 to 2.1.1, and a new warning dependency (4.0.3) has been introduced. Additionally, react, react-dom, and scheduler are now explicitly listed as direct dependencies in package-lock.json, and several @types packages have been marked as optional and peer dependencies.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request, generated by Snyk, upgrades react-calendar from version 4.1.0 to 4.8.0. This is a significant update spanning 10 versions. I have reviewed the release notes and the usage of react-calendar within the project. The most notable change is the library's internal rewrite to use React Hooks in v4.3.0. Based on the current usage, this upgrade appears to be safe. However, I have identified an issue in package-lock.json where the project name has been changed to a generated value, which should be corrected. It is also recommended to perform thorough testing on the calendar functionality after merging to ensure everything works as expected.

@@ -1,11 +1,11 @@
{
"name": "Bofulo-School",
"name": "relock-npm-lock-v2-r9NCF4",

Choose a reason for hiding this comment

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

high

The package name in package-lock.json has been changed to a generated string (relock-npm-lock-v2-r9NCF4), likely as a side effect of the tool that created this pull request. This is incorrect and could cause issues in build or deployment pipelines that rely on the package name. The name in package-lock.json should be derived from a name field in package.json.

Recommendation:

  1. Add a name property to your package.json file (e.g., "name": "bofulo-school"). It's a good practice to use lowercase names for npm packages.
  2. Run npm install to regenerate the package-lock.json file with the correct name.

For an immediate fix within this PR, you can revert this line to its previous value.

Suggested change
"name": "relock-npm-lock-v2-r9NCF4",
"name": "Bofulo-School",

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