Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RW projects: Add resolutions for @types/react 17 #5112

Merged
merged 4 commits into from
Apr 11, 2022

Conversation

Tobbe
Copy link
Member

@Tobbe Tobbe commented Apr 10, 2022

Definitely Typed recently released a new major version for react (and react-dom) types, to be used with React 18.

Some packages have a dependency on @types/react with the version set to "*". Those now causes the new, incompatible, types to be installed. This PR adds a resolutions field to RW projects' package.json that pins @types/react to 17.0.40.

There's an issue on the Definitely Typed repo for this: DefinitelyTyped/DefinitelyTyped#59765
That issue is about @types/styled-components. In our case it seems to be @types/react-syntax-highlighter, but the issue is the same.

TODO:

  • codemod
  • tests for codemod
  • update test project

Fixes #5104

@netlify
Copy link

netlify bot commented Apr 10, 2022

Deploy Preview for redwoodjs-docs canceled.

Name Link
🔨 Latest commit ffc6382
🔍 Latest deploy log https://app.netlify.com/sites/redwoodjs-docs/deploys/6253dafcf1d74b0008f48dbf

@Tobbe Tobbe added the release:fix This PR is a fix label Apr 10, 2022
@Tobbe Tobbe force-pushed the tobbe-force-types-react-17 branch from 8f1a26b to 8dc215c Compare April 10, 2022 22:49
@Tobbe Tobbe force-pushed the tobbe-force-types-react-17 branch from 8dc215c to f2e0ea8 Compare April 10, 2022 22:50
@dac09 dac09 enabled auto-merge (squash) April 11, 2022 08:02
@dac09 dac09 merged commit 7a1deb5 into redwoodjs:main Apr 11, 2022
@jtoar jtoar added this to the next-release milestone Apr 11, 2022
@Tobbe Tobbe deleted the tobbe-force-types-react-17 branch April 11, 2022 08:05
thedavidprice added a commit that referenced this pull request Apr 14, 2022
thedavidprice added a commit that referenced this pull request Apr 14, 2022
…m dep (#5165)

* Revert "RW projects: Add resolutions for @types/react 17 (#5112)"

This reverts commit 7a1deb5.

* add  @types/react resolution to react-dom packages

* fix yarn check
@thedavidprice
Copy link
Contributor

thedavidprice commented Apr 14, 2022

Reverted in favor of #5165

thedavidprice added a commit that referenced this pull request Apr 14, 2022
…m dep (#5165)

* Revert "RW projects: Add resolutions for @types/react 17 (#5112)"

This reverts commit 7a1deb5.

* add  @types/react resolution to react-dom packages

* fix yarn check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:fix This PR is a fix
Projects
No open projects
Status: Archived
Development

Successfully merging this pull request may close these issues.

Type Checking on Typescript project finds errors with an unchanged project
4 participants