-
Notifications
You must be signed in to change notification settings - Fork 48.3k
Cherrypick warning and removal of react create class #9771
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Cherrypick warning and removal of react create class #9771
Conversation
I moved |
Thank you @gaearon - I was also tired by the time I got that far. Going to fix this up now, and your hint about that file will help. |
ba6b6fd
to
f619d51
Compare
yarn.lock
Outdated
create-hash "^1.1.0" | ||
inherits "^2.0.1" | ||
ripemd160 "^2.0.0" | ||
safe-buffer "^5.0.1" | ||
sha.js "^2.4.8" | ||
|
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.
Didn't mean to update all these versions. Will probably make a separate PR with an update to yarn.lock.
**what is the change?:** A couple of bugs and holes were introduced when cherry-picking facebook#9232 onto the 15.6 branch. This fixes them. We also needed to add some logic from facebook#9399 **why make this change?:** To keep tests passing and get this change working. **test plan:** `yarn test` **issue:** facebook#9398
**what is the change?:** - Remove some outdated 'require' statements that got orphaned in 'React.js' - Change 'warning' to 'lowPriorityWarning' for 'React.createClass' - Fix syntax issues in 'React-test' - Use 'creatReactClass' instead of ES6 class in ReactART - Update 'prop-type' dependency to use no higher than 15.7 because 15.8 limits the number of warnings, and this causes a test to fail. - Fix some mixed-up and misnamed variables in `React.js` - Rebase onto commit that updates deprecation messages - Update a test based on new deprecation messages **why make this change?:** These were bugs introduced by rebasing and tests caught the regressions. **test plan:** `yarn test` **issue:** facebook#9398
f619d51
to
27bbbec
Compare
Weird - |
**what is the change?:** I didn't mean to commit changes to `yarn.lock` except for the `prop-types` and `create-react-class` updates. **why make this change?:** To minimize the changes we make to dependency versions. **test plan:** `rm -rf node_modules` `yarn install` `yarn run build` `yarn test`
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.
Why did create-react-class and prop-types move from devDependencies to dependencies?
In #9399 we swap out our own But in general - React is actually using those packages until we remove those APIs. Also I added a call to |
Just looked and I think it seems safer to keep |
👍 I don't think it makes a difference. As far as I know we don't ever do a non-dev install of the root package.json's dependencies. |
Where is the source code of |
It is in the |
Thanks. For future reference, it's here: https://github.com/facebook/react/tree/15.6-dev/addons/create-react-class |
The latest released version is always in |
* react-create-class -> create-react-class * Fix issues/bugs introduced by merge conflict resolution **what is the change?:** A couple of bugs and holes were introduced when cherry-picking facebook#9232 onto the 15.6 branch. This fixes them. We also needed to add some logic from facebook#9399 **why make this change?:** To keep tests passing and get this change working. **test plan:** `yarn test` **issue:** facebook#9398 * Move component base classes into a single file (facebook#8918) * More fixes for issues introduced by rebasing **what is the change?:** - Remove some outdated 'require' statements that got orphaned in 'React.js' - Change 'warning' to 'lowPriorityWarning' for 'React.createClass' - Fix syntax issues in 'React-test' - Use 'creatReactClass' instead of ES6 class in ReactART - Update 'prop-type' dependency to use no higher than 15.7 because 15.8 limits the number of warnings, and this causes a test to fail. - Fix some mixed-up and misnamed variables in `React.js` - Rebase onto commit that updates deprecation messages - Update a test based on new deprecation messages **why make this change?:** These were bugs introduced by rebasing and tests caught the regressions. **test plan:** `yarn test` **issue:** facebook#9398 * Reset `yarn.lock` **what is the change?:** I didn't mean to commit changes to `yarn.lock` except for the `prop-types` and `create-react-class` updates. **why make this change?:** To minimize the changes we make to dependency versions. **test plan:** `rm -rf node_modules` `yarn install` `yarn run build` `yarn test` * Run `yarn prettier`
Edit: Fixed the rest of the issues, this should be good to go now.
Changes:
cherrypick and hand-edit various parts of commits from master to do the following -
create-react-class
andprop-types
as dependencies of ReactReact.createClass
and get it from thecreate-react-class
packageReact.createClass
andReact.PropTypes
deprecation warningscreate-react-class
as used in React(Original PR message below)
This is a butchered version of #9232 with some of #9399 mixed in. I don't have the tests passing, and there is something not quite right about the way this landed.
createReactClass
orReactClass.createClass
, and updating that caused an error:src/isomorphic/React.js
and itself usesvar {Component} = require('ReactBaseClasses');
Cannot find module 'ReactBaseClasses' from 'createClass.js'
and I have no idea whyReactART
and I have not figure out why. Something inReactReconcileTransaction.perform
triggersTypeError: Cannot read property 'call' of undefined
.I'd be happy for any guidance or tips from folks who made those PRs - @acdlite and/or @bvaughn. I am going to delay doing a RC of 15.6 because this is pretty vital to get right.
Still TODO: improve the deprecation message itself.