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

Move @types/react to devDependencies to prevent version conflicts in … #4

Merged
merged 1 commit into from
Apr 16, 2020

Conversation

gregolai
Copy link
Contributor

@gregolai gregolai commented Apr 13, 2020

Fixes #5

Having @types/react in dependencies was causing version-conflict issues with anything that has use-callback-ref as a dependency, such as react-focus-lock (great library, by the way). @types/react should go in devDependencies.

ts-react-toolbox was also behind, which was causing dist builds to have type errors, so I upgraded it to the latest version and the errors went away.

…transitive dependencies. Upgrade ts-react-toolbox so dist builds pass.
@@ -2,13 +2,153 @@
# yarn lockfile v1


"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.0.0-beta.35":
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Most of the diffs here occurred from just running npx yarn

@gregolai
Copy link
Contributor Author

@theKashey Could I get some 👀 on this at your convenience? Thanks!

@theKashey
Copy link
Owner

Sorry, missed this PR as well as the issue.
However, the proposed fix is not 100% correct - it shall be a not version bound optional peer dependency (as per gaearon/react-hot-loader#1433 gaearon/react-hot-loader#1359 )

"peerDependencies": {
    "@types/react": "^15.0.0 || ^16.0.0",
  },
  "peerDependenciesMeta": {
    "@types/react": {
      "optional": true
    }
  },

@theKashey theKashey merged commit 8122108 into theKashey:master Apr 16, 2020
@theKashey
Copy link
Owner

The package has been updated.

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.

Typescript error when consumer code uses a different version of @types/react
2 participants