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

fix: migrate react-markdown 8.0.7 to 9.0.3 to resolve React compatibi… #2614

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

Conversation

PRASSamin
Copy link

Pull Request: Upgrade react-markdown in stream-chat-react

🎯 Goal

The goal of this change is to upgrade the react-markdown dependency from version v8.0.7 to v9.0.3 in the stream-chat-react package to resolve compatibility issues with modern React versions.

Problem Description

The stream-chat-react package currently uses an outdated version of the react-markdown library (v8.0.7). This version causes compatibility issues with modern React projects, including React 19 and Next.js, resulting in:

  • Build Errors: Issues such as Cannot find namespace "JSX" during builds.
  • Dependency Conflicts: Mismatches with updated React libraries.

Solution

To resolve these issues, this PR updates all instances of react-markdown in stream-chat-react to use version v9.0.3. The update also ensures that:

  1. Functionality Remains Intact: Verified that all features using react-markdown continue to work as expected.
  2. Dependencies Are Aligned: Ensured compatibility with peer libraries and React versions.

Changes Summary

Submission Details

  • Testing: All usage of react-markdown has been verified to function correctly.
  • Documentation: No changes required, as there is no impact on public-facing APIs.

Thank you for reviewing this pull request!

@MartinCupela
Copy link
Contributor

@PRASSamin this PR does not test the impacts it introduces. At the moment we do not plan to upgrade react-markdown. See this PR: #2461

Is there something that prevents you from upgrading on your side?

@PRASSamin
Copy link
Author

@MartinCupela The issue I’m facing occurs specifically during the build process of my Next.js project. It throws errors related to JSX and TypeScript compatibility
Screenshot From 2025-01-23 20-15-49

@PRASSamin
Copy link
Author

And when I use the npm overrides feature to upgrade react-markdown to version 9.0.3:

"overrides": {
  "react-markdown": "9.0.3"
}

it results in errors during the development phase.

Screenshot From 2025-01-23 23-09-10

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