fix(EmojiPicker): drop @emoji-mart/react peer dependency on v15 - #3300
Conversation
Ports #3255 onto v15. `@emoji-mart/react` does not declare React 19 in its peer dependencies, so integrators on React 19 needed `package.json` overrides to install it. Its React wrapper around the emoji-mart `Picker` custom element is now vendored as `src/plugins/Emojis/Picker.tsx` (MIT, Copyright (c) Missive), and the package is removed from the peer, optional-peer and dev dependencies. `Picker` stays internal: `stream-chat-react/emojis` exports the same API. Beyond #3255: `EmojiPicker` no longer unwraps the CJS default export of `@emoji-mart/react` (#3199), since that import is gone. `AI.md` no longer tells integrators to install the package or to add React 19 overrides for it, and points to `package.json` for dependency versions instead of listing them, which had left `stream-chat` at `^9.27.2`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the βοΈ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Size Change: +1.92 kB (+0.23%) Total Size: 846 kB π¦ View Changed
βΉοΈ View Unchanged
|
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release-v15 #3300 +/- ##
==============================================
Coverage ? 85.42%
==============================================
Files ? 530
Lines ? 15558
Branches ? 4907
==============================================
Hits ? 13291
Misses ? 2267
Partials ? 0 β View full report in Codecov by Harness. π New features to boost your workflow:
|
π― Goal
Ports #3255 from master.
@emoji-mart/reactdoesn't list React 19 in its peer dependencies, so apps on React 19 had to addpackage.jsonoverrides just to install it, even though it works fine on React 19. All it provides is a ~20-line React wrapper around emoji-mart'sPickercustom element, so this PR copies that wrapper into the SDK and drops the package.π Implementation details
Copied wrapper. New
src/plugins/Emojis/Picker.tsx, taken from@emoji-mart/react(MIT, Copyright (c) Missive). It behaves the same as the original.EmojiPickeruses it, andpickerPropsis typed with itsPickerProps. It isn't exported:stream-chat-react/emojisexposes the same API as before.Dependencies.
@emoji-mart/reactis removed frompeerDependencies,peerDependenciesMetaanddevDependencies.emoji-martand@emoji-mart/datastay as optional peers.Changes that only exist on v15:
EmojiPickerno longer unwraps@emoji-mart/react's CommonJS default export. That workaround came from fix(interop): unwrap CJS default exports (react-player, @emoji-mart/react)Β #3199, which master doesn't have, and it has nothing left to unwrap now that the package is gone.AI.mdstill exists on v15; docs: consolidate agent guidance into AGENTS.md, drop AI.mdΒ #3256 removes it on master and isn't ported yet. It no longer tells integrators to install@emoji-mart/reactor to add React 19 overrides for it. Its dependency list now names the packages and points topackage.jsonfor their versions, instead of repeating the versions (which had leftstream-chatat^9.27.2).Tests.
Picker.test.tsx(4 tests, from master). I also checked the vite example: the emoji button opens the picker, and picking an emoji inserts it into the composer.Integrators can uninstall
@emoji-mart/react. Nothing else changes for them.π¨ UI Changes
None.