Skip to content

Commit

Permalink
Migrate from React.PropTypes to prop-types
Browse files Browse the repository at this point in the history
  • Loading branch information
aesopwolf committed Jun 16, 2017
1 parent c5dfa4b commit a20da5b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions package.json
@@ -1,14 +1,14 @@
{
"name": "formsy-react",
"version": "0.19.2",
"version": "0.19.3",
"description": "A form input builder and validator for React JS",
"repository": {
"type": "git",
"url": "https://github.com/christianalfoni/formsy-react.git"
},
"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/"
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion release/formsy-react.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion release/formsy-react.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/Mixin.js
@@ -1,3 +1,4 @@
var PropTypes = require('prop-types');
var utils = require('./utils.js');
var React = global.React || require('react');

Expand Down Expand Up @@ -44,7 +45,7 @@ module.exports = {
};
},
contextTypes: {
formsy: React.PropTypes.object // What about required?
formsy: PropTypes.object // What about required?
},
getDefaultProps: function () {
return {
Expand Down
3 changes: 2 additions & 1 deletion src/main.js
@@ -1,3 +1,4 @@
var PropTypes = require('prop-types');
var React = global.React || require('react');
var Formsy = {};
var validationRules = require('./validationRules.js');
Expand Down Expand Up @@ -46,7 +47,7 @@ Formsy.Form = React.createClass({
},

childContextTypes: {
formsy: React.PropTypes.object
formsy: PropTypes.object
},
getChildContext: function () {
return {
Expand Down

0 comments on commit a20da5b

Please sign in to comment.