Skip to content

Commit

Permalink
chore: removed deprecated Wrapper export and all the redundant tests …
Browse files Browse the repository at this point in the history
…for it
  • Loading branch information
MilosRasic committed May 22, 2018
1 parent a3094d2 commit a71a072
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 277 deletions.
19 changes: 2 additions & 17 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.Wrapper = exports.withFormsy = exports.validationRules = exports.propTypes = exports.addValidationRule = undefined;
exports.withFormsy = exports.validationRules = exports.propTypes = exports.addValidationRule = undefined;

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

Expand Down Expand Up @@ -516,23 +516,8 @@ var addValidationRule = function addValidationRule(name, func) {
_validationRules2.default[name] = func;
};

var withFormsy = _Wrapper2.default;

var didWarnAboutWrapperDeprecation = false;

var deprecatedWrapper = function deprecatedWrapper(Component) {
if (!didWarnAboutWrapperDeprecation) {
// eslint-disable-next-line no-console
console.warn('Wrapper has been renamed to withFormsy. Importing Wrapper from formsy-react is depreacted and will be removed in the future. Please rename your Wrapper imports to withFormsy.');
didWarnAboutWrapperDeprecation = true;
}

return withFormsy(Component);
};

exports.addValidationRule = addValidationRule;
exports.propTypes = _Wrapper.propTypes;
exports.validationRules = _validationRules2.default;
exports.withFormsy = withFormsy;
exports.Wrapper = deprecatedWrapper;
exports.withFormsy = _Wrapper2.default;
exports.default = Formsy;
Loading

0 comments on commit a71a072

Please sign in to comment.