createClass + PropTypes + checkPropTypes warnings (#9399)

(Temporarily) re-adds getters with deprecation warnings for React.PropTypes, React.checkPropTypes, and React.createClass.

* 08bd020: Replace all references to React.PropTypes with prop-types to avoid triggering our own warning message.
* ef5b5c6: Removed several references to React.createClass that appeared after rebasing this branch. (reviewed by @flarnie)
* 524ce20: Added getters for createClass and PropTypes to the main React isomorphic object, behind one-time warning messages. (reviewed by @spicyj)
* db48f54: Fixed Rollup bundles to inline 'prop-types' and 'create-react-class' for UMD builds only. (reviewed by @spicyj, @trueadm )
* cf49cfd: Updated tests-passing.txt to remove tests that were deleted in this branch.
* d34109a: Responses to PR feedback from @spicyj. (Added package.json dependencies to packages/react and packages/react-dom. Renamed a var. Expanded on an inline comment.)
* 488c8d2: Added warning for moved package to React.checkPropTypes accessor too and updated build script.
* 83bcb29: Wordsmithing for deprecation notices (added fb.me links).
* afdc9d2: Tweaked legacy module inlining to remove order-of-deps constraint
* d1348b9: Removed $FlowFixMe.
* 7dbc3e7: More wordsmithing of deprecation notices based on Dan's feedback.
This commit is contained in:
Brian Vaughn
2017-04-11 14:28:03 -07:00
committed by GitHub
parent aa1f8687d7
commit 2beec2f308
59 changed files with 710 additions and 1373 deletions
+2 -13
View File
@@ -45,6 +45,8 @@ scripts/shared/__tests__/evalToString-test.js
src/isomorphic/__tests__/React-test.js
* should log a deprecation warning once when using React.createMixin
* should warn once when attempting to access React.createClass
* should warn once when attempting to access React.PropTypes
* should warn once when attempting to access React.checkPropTypes
src/isomorphic/children/__tests__/ReactChildren-test.js
* should support identity for simple
@@ -278,19 +280,6 @@ src/isomorphic/classic/types/__tests__/ReactPropTypes-test.js
* should have received the validator's return value
* should not warn if the validator returned null
src/isomorphic/classic/types/__tests__/ReactPropTypesProduction-test.js
* should be a no-op
* should be a no-op
* should be a no-op
* should be a no-op
* should be a no-op
* should be a no-op
* should be a no-op
* should be a no-op
* should be a no-op
* should be a no-op
* should not have been called
src/isomorphic/modern/class/__tests__/ReactClassEquivalence-test.js
* tests the same thing for es6 classes and CoffeeScript
* tests the same thing for es6 classes and TypeScript