-
Notifications
You must be signed in to change notification settings - Fork 209
fix(react): add react-compat to deal with the warnings #32
Conversation
6d3a324
to
c0b6c89
Compare
Codecov Report
@@ Coverage Diff @@
## master #32 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 3 3
Lines 62 61 -1
Branches 9 9
=====================================
- Hits 62 61 -1
Continue to review full report at Codecov.
|
README.md
Outdated
@@ -132,6 +135,7 @@ If you want to use the global: | |||
```html | |||
<!-- Load dependencies --> | |||
<script src="https://unpkg.com/react/dist/react.js"></script> | |||
<script src="https://packd.now.sh/prop-types?name=PropTypes"></script> |
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.
This is assuming the service works (which it's not right now) and it has no SLA. Not a huge deal because this is really only for demos and toys anyway...
package.json
Outdated
"react-dom": "^15.4.2", | ||
"prop-types": "^15.5.1", | ||
"react": "^15.5.1", | ||
"react-addons-test-utils": "^15.5.0", |
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.
This is still required until this gets merged: enzymejs/enzyme#876
globals: { | ||
react: 'React', | ||
glamor: 'Glamor', | ||
'prop-types': 'PropTypes', |
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.
I'm making this up. prop-types
is not currently available via UMD.
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.
It is. There are UMD files inside of it. cc @acdlite
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.
There are now :) Thanks @acdlite :)
React@15.5.0 introduced deprecation warnings for a few things and they're really annoying. So this will help prevent those warnings from logging for people using this package.
c0b6c89
to
de50b7c
Compare
Will review this tonight @kentcdodds. |
I'm getting these errors after running
|
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.
Commented with an error I'm seeing:
[test] console.error node_modules/fbjs/lib/warning.js:36
[test] Warning: ReactTestUtils has been moved to react-dom/test-utils. Update references to remove this warning.
[test]
[test] console.error node_modules/fbjs/lib/warning.js:36
[test] Warning: ReactTestUtils has been moved to react-dom/test-utils. Update references to remove this warning.
Also, this branch is behind master
by 1 commit.
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.
Another thing: I'm concerned about merging this with the dependency CI throwing an error. All PRs will have an error until your other PR is merged. I'll defer to your decision here.
That error is coming from enzyme. Will be fixed soon: enzymejs/enzyme#876 Don't worry about dependency CI. I actually fixed that a bit ago. Just takes time for dependency CI to pick up on the change. |
React@15.5.0 introduced deprecation warnings for a few things and they're really annoying. So this will help prevent those warnings from logging for people using this package.