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: downgrade react-markdown to v8 that supports React version < v18 #2461

Merged
merged 2 commits into from
Aug 5, 2024

Conversation

MartinCupela
Copy link
Contributor

🎯 Goal

fix #2455
fix #2234

🛠 Implementation details

Only react-markdown was downgraded while the libraries used to create remark and rehype plugins have not. Custom rehype or remark plugins using visit function from the library unist-util-visit will have to check the index and parent arguments of the Visitor function for null and undefined.

Copy link

codecov bot commented Aug 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.50%. Comparing base (061d1a3) to head (48e8def).
Report is 8 commits behind head on release-v11.

Additional details and impacted files
@@               Coverage Diff               @@
##           release-v11    #2461      +/-   ##
===============================================
- Coverage        85.51%   85.50%   -0.02%     
===============================================
  Files              393      393              
  Lines             9127     9125       -2     
  Branches          2492     2357     -135     
===============================================
- Hits              7805     7802       -3     
- Misses             924     1121     +197     
+ Partials           398      202     -196     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 8 to 9
if (index === null || typeof index === 'undefined' || index === 0) return;
if (parent === null || typeof parent === 'undefined') return;
Copy link
Member

Choose a reason for hiding this comment

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

Can we simplify this to if (!index || !parent) return;?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated :)

@MartinCupela MartinCupela merged commit 5e6fea0 into release-v11 Aug 5, 2024
8 checks passed
@MartinCupela MartinCupela deleted the fix/downgrade-react-markdown branch August 5, 2024 12:08
github-actions bot pushed a commit that referenced this pull request Aug 5, 2024
## [11.23.4](v11.23.3...v11.23.4) (2024-08-05)

### Bug Fixes

* downgrade react-markdown to v8 that supports React version < v18 ([#2461](#2461)) ([5e6fea0](5e6fea0))
* prevent including own user in read count displayed in MessageStatus ([#2459](#2459)) ([061d1a3](061d1a3))
@stream-ci-bot
Copy link
Collaborator

🎉 This PR is included in version 11.23.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

github-actions bot pushed a commit that referenced this pull request Aug 15, 2024
## [12.0.0-rc.8](v12.0.0-rc.7...v12.0.0-rc.8) (2024-08-15)

### Bug Fixes

* **deps:** drop remark-gfm version ([#2471](#2471)) ([1b359f7](1b359f7))
* do not rerender on client options update ([#2465](#2465)) ([81f33ba](81f33ba))
* do not rerender on client options update ([#2465](#2465)) ([3899352](3899352))
* downgrade react-markdown to v8 that supports React version < v18 ([#2461](#2461)) ([5e6fea0](5e6fea0))
* forward StreamChat constructor options via useCreateChatClient ([#2463](#2463)) ([310835d](310835d))
* prevent ChannelPreviews with duplicate keys ([1a075ad](1a075ad))
* prevent including own user in read count displayed in MessageStatus ([#2459](#2459)) ([061d1a3](061d1a3))
* provide both browser and node cjs bundles ([#2457](#2457)) ([273ea2a](273ea2a))

### Chores

* **deps:** remove unused isomorphic-ws from dependencies ([853bd8b](853bd8b))
@stream-ci-bot
Copy link
Collaborator

🎉 This PR is included in version 12.0.0-rc.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants