New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@uform/core

Package Overview
Dependencies
Maintainers
2
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uform/core - npm Package Compare versions

Comparing version 0.1.0-beta.7 to 0.1.0-beta.8

39

lib/field.js

@@ -117,2 +117,6 @@ "use strict";

_proto.getRequiredFromProps = function getRequiredFromProps(props) {
if (!(0, _utils.isEmpty)(props.required)) return props.required;
};
_proto.getEditable = function getEditable(editable) {

@@ -265,2 +269,8 @@ if ((0, _utils.isFn)(editable)) return editable(this.name);

this.valid = true;
if ((0, _utils.hasRequired)(this.rules)) {
this.required = true;
published.required = true;
}
this.invalid = false;

@@ -276,2 +286,8 @@ this.dirtyType = 'rules';

this.errors = [];
if ((0, _utils.hasRequired)(this.rules)) {
this.required = true;
published.required = true;
}
this.valid = true;

@@ -301,2 +317,25 @@ this.invalid = false;

this.dirty = true;
} else {
var prePropsRequired = this.getRequiredFromProps(this.props);
var propsRequired = this.getRequiredFromProps(published.props);
if (!(0, _utils.isEmpty)(propsRequired) && !(0, _utils.isEqual)(prePropsRequired, propsRequired) && !(0, _utils.isEqual)(propsRequired, this.required)) {
this.required = propsRequired;
this.errors = [];
if (this.required) {
if (!(0, _utils.hasRequired)(this.rules)) {
this.rules = (0, _utils.toArr)(this.rules).concat({
required: true
});
}
} else {
this.rules = (0, _utils.toArr)(this.rules).filter(function (rule) {
if (rule && rule.required) return false;
return true;
});
}
this.dirty = true;
}
}

@@ -303,0 +342,0 @@

4

package.json
{
"name": "@uform/core",
"version": "0.1.0-beta.7",
"version": "0.1.0-beta.8",
"license": "MIT",

@@ -28,3 +28,3 @@ "main": "lib",

},
"gitHead": "1314b59984b62cc23831e4c6b17610c16cfe4525"
"gitHead": "1eea35dcec41e5234b295d4e9bd2f9d20b152615"
}

@@ -110,2 +110,6 @@ import {

getRequiredFromProps(props) {
if (!isEmpty(props.required)) return props.required
}
getEditable(editable) {

@@ -243,2 +247,6 @@ if (isFn(editable)) return editable(this.name)

this.valid = true
if (hasRequired(this.rules)) {
this.required = true
published.required = true
}
this.invalid = false

@@ -257,2 +265,6 @@ this.dirtyType = 'rules'

this.errors = []
if (hasRequired(this.rules)) {
this.required = true
published.required = true
}
this.valid = true

@@ -264,3 +276,2 @@ this.invalid = false

}
if (!isEqual(published.required, this.required)) {

@@ -281,2 +292,26 @@ this.required = published.required

this.dirty = true
} else {
const prePropsRequired = this.getRequiredFromProps(this.props)
const propsRequired = this.getRequiredFromProps(published.props)
if (
!isEmpty(propsRequired) &&
!isEqual(prePropsRequired, propsRequired) &&
!isEqual(propsRequired, this.required)
) {
this.required = propsRequired
this.errors = []
if (this.required) {
if (!hasRequired(this.rules)) {
this.rules = toArr(this.rules).concat({
required: true
})
}
} else {
this.rules = toArr(this.rules).filter(rule => {
if (rule && rule.required) return false
return true
})
}
this.dirty = true
}
}

@@ -283,0 +318,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc