-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Upgrade react-native-compat to avoid PropTypes warnings #1673
Conversation
app/react-native/package.json
Outdated
@@ -56,7 +56,7 @@ | |||
"json-loader": "^0.5.4", | |||
"json5": "^0.5.1", | |||
"postcss-loader": "^2.0.5", | |||
"react-native-compat": "0.0.2", | |||
"react-native-compat": "0.0.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you plan on versioning according to semvar? we could do ~0.0.4
so we don't have to do a PR for every minor fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes - this is currently in a prerelease stage so we'd need to upgrade to 1.x
for precedence options (unless that has since changed)
Let me update react-native-compat
to 1.0.0
so we can take advantage of ~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any strong opinions on tilde vs caret? I generally go with a tilde, but given the pattern of this package file, I added a caret.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think it really depends on how you plan to maintain it. Automatic updates should not be breaking changes. Typically ^
minor version updates are feature improvements, ~
are bug fixes. If you follow the same convention, ^
should be fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The project is semver compliant 👍
950858f
to
5e9f42f
Compare
Codecov Report
@@ Coverage Diff @@
## master #1673 +/- ##
=========================================
Coverage ? 21.13%
=========================================
Files ? 247
Lines ? 5582
Branches ? 671
=========================================
Hits ? 1180
Misses ? 3917
Partials ? 485 Continue to review full report at Codecov.
|
One step towards #1540 by updating the
react-native-compat
dependency to move off ofReact.PropTypes
(atticoos/react-native-compat#1). There still needs to be a greater sweep to remove usages ofReact.PropTypes
-- users will likely still see this warning on their devices.What I did
Upgrades to
[email protected]
, which usesprop-types
.How to test
I manually pulled down
react-native-compat
and compared the old vs new version to confirm the warning goes away. However, as mentioned, that may not entirely fix the warnings throughout Storybook we still have occurrences using it).