-
Notifications
You must be signed in to change notification settings - Fork 23
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
Update to React 16 #147
Update to React 16 #147
Conversation
…to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder
I had a code review by peer Luis Lara. Here are some comments from Luis:
|
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Merging to see if security dashboard will reflect these changes |
A more conservative way to address https://www.whitesourcesoftware.com/vulnerability-database/CVE-2020-15168.
Step 1:
Given fb.js requires isomorphic-fetch which requires node-fetch.js and fb.js is a dependency of react, react-dom and react-test-render. Updating the repo to use react 16 will totally address the vulnerability by removing such dependency.
Step 2:
Enzyme v2 is no longer compatible with React 16, update to v3 according to enzymejs/enzyme#1106
Step 3:
Update Enzyme-to-json manually. Notice npm will not do this for you. Please refer to enzymejs/enzyme#1143
Step 4:
Add test adaper, according to https://stackoverflow.com/questions/50222545/enzyme-expects-an-adapter-to-be-configured and https://enzymejs.github.io/enzyme/docs/installation/index.html
Step5:
Add jest test debug config to enable debugging within VS Code
Step 6:
Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to get rid of warning for react-dom dependency, this is fixed in react 17.
Step 7:
Fix Span Creation with new React version so search can still work as expected
Current State:
TODO: