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(react): update to React 18 #13332

Merged
merged 36 commits into from Apr 11, 2023
Merged

Conversation

tay1orjones
Copy link
Member

@tay1orjones tay1orjones commented Mar 10, 2023

Closes #13220

Changelog

Changed

  • Update peerDependency range for React to include v18 (in addition to v16 and v17)
  • Update devDependencies in published packages to use React 18
  • Update all examples to use React 18 by default
  • Update @testing-library deps to latest major version
    • Update tests to use new promise-based API in user-event - every interaction via userEvent must now use await
  • Update our test-utils to use the createRoot api

Testing / Reviewing

  • Local storybook and build should succeed using React 18
  • CI checks should pass

Known issues, do not prevent merge

Click here to view the errors we had to address with this
  • Fix failing tests
    • Copy-test.js - 🐳
    • CopyButton-test.js - 🐳
    • StructuredList-test.js 🐳
    • packages/react/src/components/DataTable/tests/exports-test.js
    • useDisclosure-test.js 🐳
    • FileUploader-test.js 🐳
    • FileUploaderButton-test.js 🐳
    • Modal-test.js 🐳
    • ModalWrapper-test.js 🐳
    • Multiselect-test.js 🐳
    • Switch-test.js - 🐳
    • Treeview-test.js
    • Anywhere we use render, or clean from packages/test-utils/react.js may need to be refactored to use @testing-library/react instead
      • AspectRatio tests need refactored to use @testing-library/react
      • CodeSnippet.Skeleton-test.js - TJ
      • ErrorBoundary-test.js - Francine
      • Filename-test.js - Andrea
      • FileUploader-test.js - Ale
      • FileUploaderButton-test.js - TJ
      • FileUploaderDropContainer-test.js
      • FileUploaderItem-test.js - Taylor
      • FileUploaderSkeleton-test.js - Taylor
      • Grid-test.js - Taylor
      • Row-test.js - Taylor
      • useId-test.js - Taylor

@netlify
Copy link

netlify bot commented Mar 10, 2023

Deploy Preview for carbon-components-react ready!

Name Link
🔨 Latest commit 6f396a0
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/64351ff067c55700084883ff
😎 Deploy Preview https://deploy-preview-13332--carbon-components-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Mar 10, 2023

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 6f396a0
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/64351ff067c5570008488401
😎 Deploy Preview https://deploy-preview-13332--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Member

@alisonjoseph alisonjoseph left a comment

Choose a reason for hiding this comment

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

Everything is running as expected locally and tests are passing! 🔥

@alisonjoseph
Copy link
Member

Looks like there's a conflict in one file @tay1orjones @francinelucca

@tw15egan
Copy link
Member

@francinelucca I believe its because I moved the Switch-test.js file inside a new __tests__ folder in Switch

Ref: https://github.com/carbon-design-system/carbon/pull/13378/files#diff-c666fd460093fad8eb023239785f8ce16642cc7df125f3adc4bbc1feb8eea203

@francinelucca
Copy link
Member

Solved! @alisonjoseph @tw15egan

Copy link
Member

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

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

🔥 🔥

@kodiakhq kodiakhq bot merged commit 7b9a05b into carbon-design-system:main Apr 11, 2023
18 checks passed
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.

React 18 Migration: Explore updating packages to React 18
6 participants