Skip to content

Conversation

emplums
Copy link

@emplums emplums commented Dec 14, 2020

This PR changes the acceptable React version to be used as an external dependency to React ^17.0.0.

I've also moved react from dependencies to devDependencies. Since it's marked as a peerDependency it shouldn't be in regular deps. I don't think we realized this because rollup is marking react as external (preventing it to be bundled with the application).

This change would require all applications using Primer React Components to upgrade to version 17 and should be released as a breaking change.

Open Questions

Should we allow versions above 16.8 still? I'm pretty sure because I added capture: true to the two document listeners in the library, we should see the same behavior in environments using ^16.8.0 and environments using ^17.0.0. It still feels a little weird to allow either version, but because 17.0.0 is relatively new, I wouldn't want someone to be prevented from using PRC because another dependency in their application requires something below 17 🤔

Closes #941

Screenshots

Please provide before/after screenshots for any visual changes

Merge checklist

  • Added or updated TypeScript definitions (index.d.ts) if necessary
  • Added/updated tests
  • Added/updated documentation
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@vercel
Copy link

vercel bot commented Dec 14, 2020

Deployment failed with the following error:

Invalid request: should NOT have additional property `files`.

@emplums emplums requested a review from colebemis December 14, 2020 21:08
@vercel
Copy link

vercel bot commented Dec 14, 2020

Deployment failed with the following error:

Invalid request: should NOT have additional property `includeFiles`.

@vercel
Copy link

vercel bot commented Dec 14, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/primer/primer-components/k52z651wn
✅ Preview: https://primer-components-git-upgrade-react.primer.now.sh

@vercel vercel bot temporarily deployed to Preview December 14, 2020 21:28 Inactive
@vercel vercel bot temporarily deployed to Preview December 14, 2020 22:04 Inactive
@emplums
Copy link
Author

emplums commented Dec 14, 2020

Note: I needed to remove the files key from our now.json - this started breaking today but is unrelated to the changes in this PR (I opened a separate PR to double check). Removing that key stops the Vercel deploys from failing and seems to make no changes to what is actually deployed 👍

Copy link
Contributor

@colebemis colebemis left a comment

Choose a reason for hiding this comment

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

🚀

@vercel vercel bot temporarily deployed to Preview December 18, 2020 17:21 Inactive
@vercel vercel bot temporarily deployed to Preview December 22, 2020 18:59 Inactive
@emplums emplums changed the base branch from main to major January 5, 2021 20:52
@emplums emplums merged commit c17899b into major Jan 5, 2021
@emplums emplums deleted the upgrade-react branch January 5, 2021 20:52
@smockle smockle mentioned this pull request Apr 21, 2021
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade peerDep range to include React 17

2 participants