chore(project): update internal react deps to v17#10029
Conversation
|
✔️ Deploy Preview for carbon-react-next ready! 🔨 Explore the source changes: 1894ba1 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-react-next/deploys/61896f3441e4d10007035d7e 😎 Browse the preview: https://deploy-preview-10029--carbon-react-next.netlify.app |
|
✔️ Deploy Preview for carbon-elements ready! 🔨 Explore the source changes: 1894ba1 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/61896f349eee8100074f0aa8 😎 Browse the preview: https://deploy-preview-10029--carbon-elements.netlify.app |
|
✔️ Deploy Preview for carbon-components-react ready! 🔨 Explore the source changes: 1894ba1 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/61896f34fd2f64000731dc7b 😎 Browse the preview: https://deploy-preview-10029--carbon-components-react.netlify.app |
| "lodash.isequal": "^4.5.0", | ||
| "lodash.omit": "^4.5.0", | ||
| "lodash.throttle": "^4.1.1", | ||
| "react-is": "^16.8.6", |
There was a problem hiding this comment.
Will this have any problems with people using React 16? 🤔
There was a problem hiding this comment.
Out of curiosity, What does react-is do?
There was a problem hiding this comment.
@abbeyhrt It allows us to check if things are a valid React element type. I think the only place we use it is with isValidElementType() in the Public API snapshot to assert that components are valid before we add them to the snapshot "queue".
@joshblack I think we're good. There's no changelog that I could find, so I crawled through the diff between versions and it looks like there are no breaking changes. I think they bumped the versions of all core packages so they'd be the same values, even if they didn't include breaking changes.
They deprecated two aliases, ReactIs.isAsyncMode() and ReactIs.isConcurrentMode(). Will be removed in v18. ReactIs.typeOf() now supports some new types, REACT_LAZY_TYPE, REACT_MEMO_TYPE, REACT_SUSPENSE_TYPE.
|
Yikes. This causes almost 300 test failures due to Enzyme not yet having an adapter available for React v17. enzymejs/enzyme#2429 |
|
@abbeyhrt I added the unofficial enzyme adapter for react v17 you recommended and it cut the failing tests down to just a handful! I've updated the failing ones here - proptype warnings using string substitution needed updated assertions with full argument lists. @joshblack Let me know what you think about this. The unofficial adapter should just be a stop-gap until the official one is released or we eventually manage to remove enzyme completely in favor of react testing library. |
This change allows us to get more visibility into how our code works in storybook, builds, etc with React v17.
We've been getting some bug reports for issues only present when using the components with React v17 and in v11 we'll be bumping the peer deps to no longer include React v16. This change will help surface issues now, before we make React v17 the default.
Changelog
Changed
Testing / Reviewing