-
-
Notifications
You must be signed in to change notification settings - Fork 954
refactor: deprecated React 17 #4078
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
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## next #4078 +/- ##
==========================================
- Coverage 89.29% 89.24% -0.05%
==========================================
Files 517 517
Lines 12220 12186 -34
Branches 3169 3162 -7
==========================================
- Hits 10912 10876 -36
- Misses 644 646 +2
Partials 664 664
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This pull request includes several changes to the testing setup and dependencies for the project, focusing on updating React versions and improving the testing library usage. The most important changes include removing support for React 17, updating peer dependencies, and refactoring test imports and assertions.
React version updates:
package.json
, and updated peer dependencies to require React 18 or higher. (.github/workflows/nodejs-ci.yml
,package.json
) [1] [2] [3] [4]Testing library updates:
@testing-library/react
directly instead of custom utilities, and updated assertions to usescreen
andexpect
. (src/Calendar/test/useCalendarDateSpec.tsx
,src/Content/test/ContentStylesSpec.tsx
,src/Modal/test/ModalSpec.tsx
,src/internals/Plaintext/test/PlaintextSpec.tsx
,src/internals/Ripple/test/RippleSpec.tsx
) [1] [2] [3] [4] [5]Miscellaneous improvements:
aria-controls
andaria-describedby
attributes inPickerToggle
to handle cases whereid
is undefined. (src/internals/Picker/PickerToggle.tsx
)useUniqueId
hook to use the built-inuseId
from React. (src/internals/hooks/useUniqueId.ts
)