Skip to content

chore(project): update internal react deps to v17#10029

Merged
kodiakhq[bot] merged 7 commits into
carbon-design-system:mainfrom
tay1orjones:storybook-react-17
Nov 8, 2021
Merged

chore(project): update internal react deps to v17#10029
kodiakhq[bot] merged 7 commits into
carbon-design-system:mainfrom
tay1orjones:storybook-react-17

Conversation

@tay1orjones

@tay1orjones tay1orjones commented Nov 2, 2021

Copy link
Copy Markdown
Member

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

  • project: update internal react deps to v17

Testing / Reviewing

  • Ensure both storybooks build and all stories are viewable
  • Status checks need to pass
  • Generally, any defects discovered in components should be contained in new issues for triage and fixing

@tay1orjones tay1orjones requested a review from a team as a code owner November 2, 2021 02:52
@netlify

netlify Bot commented Nov 2, 2021

Copy link
Copy Markdown

✔️ 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

@tay1orjones tay1orjones requested a review from joshblack November 2, 2021 02:52
Comment thread package.json
@tay1orjones tay1orjones self-assigned this Nov 2, 2021
@tay1orjones tay1orjones added this to the v11 Beta 3 milestone Nov 2, 2021
@tay1orjones tay1orjones changed the title chore(project): update deps to react v17 chore(project): update internal react deps to v17 Nov 2, 2021
@netlify

netlify Bot commented Nov 2, 2021

Copy link
Copy Markdown

✔️ 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

@netlify

netlify Bot commented Nov 2, 2021

Copy link
Copy Markdown

✔️ Deploy Preview for carbon-components-react ready!
Built without sensitive environment variables

🔨 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",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this have any problems with people using React 16? 🤔

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, What does react-is do?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

@tay1orjones

Copy link
Copy Markdown
Member Author

Yikes. This causes almost 300 test failures due to Enzyme not yet having an adapter available for React v17. enzymejs/enzyme#2429

@tay1orjones tay1orjones requested a review from a team as a code owner November 4, 2021 16:02
@tay1orjones

Copy link
Copy Markdown
Member Author

@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.

@abbeyhrt abbeyhrt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@kodiakhq kodiakhq Bot merged commit e7b27cf into carbon-design-system:main Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants