Skip to content

Commit 236bc8a

Browse files
authored
[CLNP-6261] React 19 upgrade (#1304)
[CLNP-6261](https://sendbird.atlassian.net/browse/CLNP-6261) [SBISSUE-18486](https://sendbird.atlassian.net/browse/SBISSUE-18486) ### Changelogs - Added React 19 compatibility ``` ### Checklist Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If unsure, ask the members. This is a reminder of what we look for before merging your code. - [x] **All tests pass locally with my changes** - [ ] **I have added tests that prove my fix is effective or that my feature works** - [ ] **Public components / utils / props are appropriately exported** - [ ] I have added necessary documentation (if appropriate) ## External Contributions This project is not yet set up to accept pull requests from external contributors. If you have a pull request that you believe should be accepted, please contact the Developer Relations team <[email protected]> with details and we'll evaluate if we can set up a [CLA](https://en.wikipedia.org/wiki/Contributor_License_Agreement) to allow for the contribution. [CLNP-6261]: https://sendbird.atlassian.net/browse/CLNP-6261?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [SBISSUE-18486]: https://sendbird.atlassian.net/browse/SBISSUE-18486?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent 3c5399b commit 236bc8a

File tree

4 files changed

+430
-1145
lines changed

4 files changed

+430
-1145
lines changed

Diff for: babel.config.js

+4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
2+
const reactCompilerConfig = {};
3+
14
module.exports = {
25
presets: [
36
'@babel/preset-env',
47
'@babel/preset-react',
58
'@babel/preset-typescript',
69
],
710
plugins: [
11+
['babel-plugin-react-compiler', reactCompilerConfig],
812
'@babel/plugin-proposal-class-properties',
913
'@babel/plugin-syntax-export-default-from',
1014
'@babel/plugin-proposal-private-property-in-object',

Diff for: package.json

+11-10
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@
6666
"author": "SendBird <[email protected]>",
6767
"license": "SEE LICENSE IN LICENSE.md",
6868
"peerDependencies": {
69-
"react": "^16.8.6 || ^17.0.0 || ^18.0.0",
70-
"react-dom": "^16.8.6 || ^17.0.0 || ^18.0.0"
69+
"react": "^16.8.6 || ^17.0.0 || ^18.0.0 || ^19.0.0",
70+
"react-dom": "^16.8.6 || ^17.0.0 || ^18.0.0 || ^19.0.0"
7171
},
7272
"dependencies": {
7373
"@sendbird/chat": "^4.16.2",
@@ -97,19 +97,20 @@
9797
"@rollup/plugin-node-resolve": "^15.2.3",
9898
"@rollup/plugin-replace": "^5.0.4",
9999
"@rollup/plugin-typescript": "^11.1.5",
100-
"@storybook/addon-essentials": "^8.0.9",
101-
"@storybook/manager-api": "^8.4.7",
102-
"@storybook/react-vite": "^8.0.9",
100+
"@storybook/addon-essentials": "^8.5.0",
101+
"@storybook/manager-api": "^8.5.0",
102+
"@storybook/react-vite": "^8.5.0",
103103
"@svgr/rollup": "^8.1.0",
104+
"@testing-library/dom": "^10.4.0",
104105
"@testing-library/jest-dom": "^5.16.5",
105-
"@testing-library/react": "^13.4.0",
106-
"@testing-library/react-hooks": "^8.0.1",
106+
"@testing-library/react": "^16.2.0",
107107
"@testing-library/user-event": "^14.4.3",
108108
"@types/node": "^22.7.2",
109109
"@typescript-eslint/eslint-plugin": "^6.17.0",
110110
"@typescript-eslint/parser": "^6.17.0",
111111
"autoprefixer": "^9.7.4",
112112
"babel-jest": "^29.0.1",
113+
"babel-plugin-react-compiler": "^19.0.0-beta-27714ef-20250124",
113114
"browserslist": "^4.14.5",
114115
"caniuse-lite": "^1.0.30001148",
115116
"eslint": "^8.40.0",
@@ -130,8 +131,8 @@
130131
"plop": "^2.5.3",
131132
"postcss": "^8.3.5",
132133
"postcss-rtlcss": "^5.3.0",
133-
"react": "^18.2.0",
134-
"react-dom": "^18.2.0",
134+
"react": "^19.0.0",
135+
"react-dom": "^19.0.0",
135136
"rollup": "^4.9.2",
136137
"rollup-plugin-analyzer": "^4.0.0",
137138
"rollup-plugin-copy": "^3.5.0",
@@ -141,7 +142,7 @@
141142
"rollup-plugin-typescript2": "^0.36.0",
142143
"rollup-plugin-visualizer": "^5.9.2",
143144
"sass": "^1.55.0",
144-
"storybook": "^8.0.9",
145+
"storybook": "^8.5.0",
145146
"stylelint": "^13.0.0",
146147
"stylelint-config-sass-guidelines": "^7.0.0",
147148
"ts-pattern": "^4.2.2",

Diff for: src/modules/GroupChannel/context/__tests__/useMessageActions.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { renderHook } from '@testing-library/react-hooks';
1+
import { renderHook } from '@testing-library/react';
22
import { useMessageActions } from '../hooks/useMessageActions';
33
import { UserMessageCreateParams, FileMessageCreateParams } from '@sendbird/chat/message';
44

0 commit comments

Comments
 (0)