From 095ef0fa0548e13e5c5fba4da79ffbd85e023c11 Mon Sep 17 00:00:00 2001 From: Itamar Abeliovich Date: Mon, 27 Nov 2017 00:05:22 +0200 Subject: [PATCH 1/2] Hopefully now uses the new prop-types npm package --- gulpfile.js | 3 ++- lib/ReactInputValidation.js | 6 +++++- package.json | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 2ca249d..65ac9ae 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -17,7 +17,8 @@ var taskConfig = { dependencies: [ 'classnames', 'react', - 'react-dom' + 'react-dom', + 'prop-types' ], lib: 'lib' }, diff --git a/lib/ReactInputValidation.js b/lib/ReactInputValidation.js index 9d4c9d0..be501ee 100644 --- a/lib/ReactInputValidation.js +++ b/lib/ReactInputValidation.js @@ -16,8 +16,12 @@ function _inherits(subClass, superClass) { if (typeof superClass !== 'function' var _react = require('react'); +var PropTypes = require('prop-types'); + var _react2 = _interopRequireDefault(_react); +_react2['default'].PropTypes = PropTypes; + var _libValidationRules = require('./lib/validation-rules'); var _libValidationRules2 = _interopRequireDefault(_libValidationRules); @@ -223,4 +227,4 @@ ReactInputValidation.propTypes = { addonPos: _react2['default'].PropTypes.string, // position of addon, default is 'right' ref: _react2['default'].PropTypes.string // always use this for validating (must be unique) }; -module.exports = exports['default']; \ No newline at end of file +module.exports = exports['default']; diff --git a/package.json b/package.json index 70242bd..be4fa90 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,8 @@ "url": "https://github.com/ggayane/react-input-validation/issues" }, "dependencies": { - "classnames": "^2.1.2" + "classnames": "^2.1.2", + "prop-types" }, "devDependencies": { "babel-eslint": "^4.1.3", From acd6c053e6964d47e9141ed962c14a9419315b69 Mon Sep 17 00:00:00 2001 From: Itamar Abeliovich Date: Mon, 27 Nov 2017 00:10:14 +0200 Subject: [PATCH 2/2] Fixed package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index be4fa90..4019bc8 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "classnames": "^2.1.2", - "prop-types" + "prop-types": "^15.6.0" }, "devDependencies": { "babel-eslint": "^4.1.3",