-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
react 19 #7463
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
react 19 #7463
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR upgrades the application to support React 19 by reintroducing PropTypes runtime validation manually and updating React and related dependency versions. Key changes include:
- Adding componentDidMount lifecycle methods in multiple components to perform manual PropTypes validation.
- Updating React, react-dom, and various testing libraries to the React 19 compatible versions.
- Modifying package.json files in multiple packages to reflect these dependency updates.
Reviewed Changes
Copilot reviewed 66 out of 66 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
packages/decap-cms-core/src/components/Collection/Entries/EntryListing.js | Added PropTypes.checkPropTypes in componentDidMount. |
packages/decap-cms-core/src/components/Collection/Entries/EntriesSearch.js | Added PropTypes.checkPropTypes in componentDidMount. |
packages/decap-cms-core/src/components/Collection/Entries/EntriesCollection.js | Added PropTypes.checkPropTypes in componentDidMount. |
packages/decap-cms-core/src/components/Collection/CollectionSearch.js | Added PropTypes.checkPropTypes in componentDidMount. |
packages/decap-cms-core/src/components/Collection/Collection.js | Added PropTypes.checkPropTypes in componentDidMount. |
packages/decap-cms-core/src/components/App/Header.js | Added PropTypes.checkPropTypes in componentDidMount. |
packages/decap-cms-core/src/components/App/App.js | Added PropTypes.checkPropTypes in componentDidMount. |
packages/decap-cms-core/package.json | Updated React and react-dom versions and react-scroll-sync minor version bump. |
packages/decap-cms-backend-test/src/AuthenticationPage.js | Added PropTypes.checkPropTypes in componentDidMount. |
packages/decap-cms-backend-test/package.json | Updated React to version 19.1.0. |
packages/decap-cms-backend-proxy/src/AuthenticationPage.js | Added PropTypes.checkPropTypes in componentDidMount. |
packages/decap-cms-backend-gitlab/src/AuthenticationPage.js | Added PropTypes.checkPropTypes in componentDidMount. |
packages/decap-cms-backend-github/src/AuthenticationPage.js | Added PropTypes.checkPropTypes in componentDidMount. |
packages/decap-cms-backend-gitea/src/AuthenticationPage.js | Added PropTypes.checkPropTypes in componentDidMount. |
packages/decap-cms-backend-git-gateway/src/AuthenticationPage.js | Added PropTypes.checkPropTypes in componentDidMount and removed duplicate static propTypes definition. |
packages/decap-cms-backend-bitbucket/src/AuthenticationPage.js | Added PropTypes.checkPropTypes in componentDidMount. |
packages/decap-cms-backend-azure/src/AuthenticationPage.js | Added PropTypes.checkPropTypes in componentDidMount. |
packages/decap-cms-backend-aws-cognito-github-proxy/src/AuthenticationPage.js | Added PropTypes.checkPropTypes in componentDidMount. |
packages/decap-cms-app/package.json | Updated React and react-dom peerDependencies to React 19.1.0. |
package.json | Updated various dependencies including React and testing libraries to versions compatible with React 19.1.0. |
Comments suppressed due to low confidence (1)
packages/decap-cms-core/src/components/Collection/Entries/EntriesCollection.js:75
- Consider abstracting the manual PropTypes validation into a shared utility or higher-order component to reduce duplicated code across components. Additionally, ensure this validation is executed only in development mode to mitigate any potential performance overhead in production.
componentDidMount() {
// Manually validate PropTypes - React 19 breaking change
PropTypes.checkPropTypes(EntriesCollection.propTypes, this.props, 'prop', 'EntriesCollection');
d1cd526
to
177959a
Compare
c7571f8
to
6a889e8
Compare
Summary
support for react 19.
closes #7365
React 19 has some breaking changes. Most of them aren't used here, but dropping propTypes does affect decap-cms. https://react.dev/blog/2024/04/25/react-19-upgrade-guide#removed-deprecated-react-apis
I recreated how prop-types used to work https://www.npmjs.com/package/prop-types#proptypescheckproptypes for all components.
Test plan
decap-cms works and tests are completed successfully
Checklist
Please add a
x
inside each checkbox:A picture of a cute animal (not mandatory but encouraged)