Terra-core: React 15.5 upgrade

Created on 10 Apr 2017  路  15Comments  路  Source: cerner/terra-core

The react 15.5 release was non-passive for our packages. React is currently locked to version 15.4.2

We need to update our packages to be compatible with react 15.5.

https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html

Limitations:

Most helpful comment

react-intl v2.3.0 is released 馃檪

All 15 comments

I started some of the 15.5.x upgrade here: https://github.com/cerner/terra-core/tree/react-15.5

  • I updated each package to use the prop-types package.
  • We still need to update to react 15.5 after our 3rd party issues are resolved.

Looks like the enzyme PR to add compat with react 15.5 has been merged. Waiting on a release for that.

Pull request for react-docgen is still open: https://github.com/reactjs/react-docgen/pull/172

The react-docgen issue has been closed

react-datepicker merged their fix

They released a version of react-docgen (2.14.1) to fix the build issues we were seeing around their compiling changes (https://github.com/reactjs/react-docgen/issues/174). I believe that this should allow us to push to the appropriate version of react-docgen.

The react-intl pr for adding react 15.5 compat has been merged. This should be our last blocker for us on adding react 15.5 compat to our components.

https://www.npmjs.com/package/react-addons-test-utils
^ This has also been deprecated.

To get our jest tests working again, we need to also install react-test-renderer. https://github.com/airbnb/enzyme/issues/875#issuecomment-296450234

I updated the react-datepicker dependency to 0.46. In this version, they added a new prop called disableDateAutoCorrection.

react-intl v2.3.0 is released 馃檪

After updating react-intl to 2.3.0, all of our tests now pass.

When running the site locally, I am still seeing this warning:

Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead.

I will investigate which dependency is still causing this warning.

After going through this exercise, I think it might be a good idea to separate out each of our components into their own webpack bundle.

  • It would test the component in isolation guaranteeing that css isn't leaking from one component to another.

  • It would be easier to isolate an issue down to a single component.

I had missed a couple proptypes. This branch is ready to upgrade to react-15.5: https://github.com/cerner/terra-core/tree/react-15.5

There are no longer warnings and all tests are passing.

After terra-time-input was merged into master, my tests are failing again. This is the issue:

I can't merge the pull request until that issue is resolved.

^ We have removed text-mask for now. Closing this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

noahbenham picture noahbenham  路  4Comments

bjankord picture bjankord  路  3Comments

bjankord picture bjankord  路  3Comments

noahbenham picture noahbenham  路  5Comments

SpartaSixZero picture SpartaSixZero  路  5Comments