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

feat: bump react'version to 18.x #774

Merged
merged 8 commits into from
Jul 13, 2022
Merged

feat: bump react'version to 18.x #774

merged 8 commits into from
Jul 13, 2022

Conversation

mortalYoung
Copy link
Collaborator

@mortalYoung mortalYoung commented Jul 8, 2022

简介

  • 兼容用户 react@18.x 的环境
  • 本地开发环境升级至 react@18

主要变更

  • 替换项目中用到 ReactDOM.render 方法,通过区分当前版本,来判断是调用 render 还是 creatRoot 方法
  • 项目中显式安装 react 和 react-dom,之前是幽灵依赖
  • 升级 react-test-renderer 和 @testing-library 及相关依赖,适配本地 react18 的环境,修复升级后测试用例不通过的问题
  • 升级 react 相关组件,如 react-dnd,rc 组件,storybook 等, refer: 迁移文档

Related Issues

Closed #734
Closed #728
Closed #164

@mortalYoung mortalYoung self-assigned this Jul 8, 2022
@mortalYoung mortalYoung added the dependencies Pull requests that update a dependency file label Jul 8, 2022
@codecov
Copy link

codecov bot commented Jul 8, 2022

Codecov Report

Merging #774 (f75e2db) into main (4d9edb3) will decrease coverage by 0.62%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #774      +/-   ##
==========================================
- Coverage   91.65%   91.02%   -0.63%     
==========================================
  Files         191      180      -11     
  Lines        5869     5783      -86     
  Branches     1405     1399       -6     
==========================================
- Hits         5379     5264     -115     
- Misses        484      513      +29     
  Partials        6        6              
Impacted Files Coverage Δ
src/components/scrollable/index.tsx 100.00% <ø> (ø)
src/components/contextView/index.tsx 100.00% <100.00%> (ø)
src/components/dialog/confirm.tsx 93.54% <100.00%> (ø)
src/components/tabs/tab.tsx 100.00% <100.00%> (ø)
src/react/render.ts 100.00% <100.00%> (ø)
src/workbench/notification/statusBarView/index.tsx 100.00% <100.00%> (ø)
src/controller/editor.tsx 45.03% <0.00%> (-3.32%) ⬇️
src/workbench/sidebar/explore/folderTree.tsx 97.67% <0.00%> (-2.33%) ⬇️
mock/monacoMock.js
... and 21 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4d9edb3...f75e2db. Read the comment docs.

@mortalYoung mortalYoung changed the title 【WIP】feat: bump react'version to 18.x feat: bump react'version to 18.x Jul 11, 2022
src/common/render.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@wewoor wewoor left a comment

Choose a reason for hiding this comment

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

+1

@wewoor wewoor merged commit 819696e into main Jul 13, 2022
@wewoor wewoor deleted the feat/react branch July 13, 2022 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Support to React 18 bug: 无法正常启动molecule Upgrade the Storybook
2 participants