Skip to content

Bump React dependency and peer dependency to 17#33

Open
abstracthat wants to merge 1 commit into
masterfrom
react-17
Open

Bump React dependency and peer dependency to 17#33
abstracthat wants to merge 1 commit into
masterfrom
react-17

Conversation

@abstracthat

Copy link
Copy Markdown
Member

React 17 is out. I've tested this in a large Karet application and found no issues. This release will mostly just clear the npm warning for the React peer dependency.

@polytypic

Copy link
Copy Markdown
Member

Thanks!

One issue is that tests are still run with 16.* due to the devDependencies specifying "react": "^16.8.0".

@abstracthat

Copy link
Copy Markdown
Member Author

I had that change locally but missed pushing it. Thanks @polytypic!

@polytypic

Copy link
Copy Markdown
Member

Hmm... One more issue came to mind. Namely that since this is upgrading React major version from 16 to 17, then it would probably be best to also change the major version number of Karet (4.1.0 -> 5.0.0). That is because React is effectively an interface dependency that leaks through. Other than that this looks good!

@mAAdhaTTah

Copy link
Copy Markdown

If you make the peerDep version something like ^16.8.0 || ^17.0.0, consumers can choose which major version they want to use and your package indicates that it works with both, so it wouldn't be a breaking change for people still on React 16.

@polytypic polytypic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good!

I thought about the possibility of not upgrading the major version of Karet, but it is conceivable that someone might be using React through Karet and in that case an unintentional major version upgrade of React might happen. So, all in all, increasing the major version of Karet should be the safer approach.

@bpinto

bpinto commented Jan 23, 2021

Copy link
Copy Markdown

ping @abstracthat

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.

4 participants