dillon1000/react
Commit
Browse files Warn if PropType function is called manually (#7132)
* Warn if PropType function is called in production * Check if console is undefined before warning * Randomize value of ReactPropTypesSecret * Remove dev environment tests * Rename typeCheckPass to productionWarningCheck * Rename productionWarningCheck to expectWarningInProduction * Call toString on Math.random() * Rename test block for React type checks * Make sure warning isnt emitted for failing props * Cache warning by component and prop, warn in dev * Pass ReactPropTypesSecret to internal checks * Move tests to ReactPropTypes-test.js * Update the warning message to include link * Do not test warning for unions with invalid args
Changed paths6 files
First-parent comparisonsrc/addons/link/__tests__/ReactLinkPropTypes-test.js ModifiedM src/isomorphic/classic/types/ReactPropTypes.js ModifiedA src/isomorphic/classic/types/ReactPropTypesSecret.js AddedM src/isomorphic/classic/types/__tests__/ReactPropTypes-test.js ModifiedM src/isomorphic/classic/types/checkReactTypeSpec.js ModifiedM src/renderers/dom/client/wrappers/LinkedValueUtils.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…