Migrate from React.PropTypes to prop-types

This commit is contained in:
Aesop Wolf 2017-06-15 20:10:13 -07:00
parent c5dfa4b31a
commit a20da5b7cd
5 changed files with 9 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{
"name": "formsy-react",
"version": "0.19.2",
"version": "0.19.3",
"description": "A form input builder and validator for React JS",
"repository": {
"type": "git",
@ -8,7 +8,7 @@
},
"main": "lib/main.js",
"scripts": {
"deploy": "NODE_ENV=production webpack -p --config webpack.production.config.js",
"build": "NODE_ENV=production webpack -p --config webpack.production.config.js",
"test": "babel-node testrunner",
"examples": "webpack-dev-server --config examples/webpack.config.js --content-base examples",
"prepublish": "babel ./src/ -d ./lib/"
@ -33,6 +33,7 @@
"babel-preset-stage-2": "^6.5.0",
"jsdom": "^6.5.1",
"nodeunit": "^0.9.1",
"prop-types": "^15.5.10",
"react": "^15.0.0",
"react-addons-pure-render-mixin": "^15.0.0",
"react-addons-test-utils": "^15.0.0",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,4 @@
var PropTypes = require('prop-types');
var utils = require('./utils.js');
var React = global.React || require('react');
@ -44,7 +45,7 @@ module.exports = {
};
},
contextTypes: {
formsy: React.PropTypes.object // What about required?
formsy: PropTypes.object // What about required?
},
getDefaultProps: function () {
return {

View File

@ -1,3 +1,4 @@
var PropTypes = require('prop-types');
var React = global.React || require('react');
var Formsy = {};
var validationRules = require('./validationRules.js');
@ -46,7 +47,7 @@ Formsy.Form = React.createClass({
},
childContextTypes: {
formsy: React.PropTypes.object
formsy: PropTypes.object
},
getChildContext: function () {
return {