Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Node version set to 18

  • Update react & react-dom to v17

  • Remove node_modules, package-lock. rm -rf node_modules package-lock.json

  • Reinstall and re-build: npm install && npm run build

  • You may need to upgrade other libraries, for example in case of Typescript: npm install @types/react@17.0.0 If you are using React Testing Library, you would want to be under 12.1.5, which is the latest version that supports React < 18. Replace enzyme-adapter-react-16 with @wojtekmaj/enzyme-adapter-react-17 since enzyme doesn't provide support for react 17. react-test-renderer should also be updated.

  • Upgrade all other packages causing dependency conflicts

  • Upgrade all edx packages used in the MFE to their react 17 versions

  • Try to run the project npm run start and fix dependencies along with possible breaks, note all the issues

  • Remove node_modules, package-lock. rm -rf node_modules package-lock.json

  • Reinstall and re-build: npm install && npm run build

  • Run unit tests, linting and build scripts if exists.

  • Test extract (pull/push) translations

  • Start & test the project, full regression test and hopefully a good coverage

  • Perform consumer testing if its a library to check its impacts on consumers

  • If its a library and consumers are breaking with React JS upgrade, it should be release as a major version so renovate doesn’t auto merge its changes in consumers.

https://github.com/openedx/platform-roadmap/issues/277

In case of any help/queries, you can contact us on slack at #tech-fed-bom.