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

yup

Package Overview
Dependencies
Maintainers
1
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yup - npm Package Compare versions

Comparing version 0.17.6 to 0.18.0

7

CHANGELOG.md

@@ -0,1 +1,8 @@

v0.18.0 - Sat, 23 Apr 2016 01:20:27 GMT
---------------------------------------
- [f827822](../../commit/f827822) [changed] validate() on objects won't cast nested schema with strict()
v0.17.6 - Thu, 21 Apr 2016 14:59:59 GMT

@@ -2,0 +9,0 @@ ---------------------------------------

8

lib/object.js

@@ -99,3 +99,3 @@ 'use strict';

var innerOptions = _extends({}, opts, { parent: {} });
var innerOptions = _extends({}, opts, { parent: {}, __validating: false });

@@ -109,5 +109,7 @@ value = transform(props, function (obj, prop) {

var strict = field._options && field._options.strict;
if (field._strip === true) return;
fieldValue = field.cast(value[prop], innerOptions);
fieldValue = !opts.__validating || !strict ? field.cast(value[prop], innerOptions) : value[prop];

@@ -132,2 +134,4 @@ if (fieldValue !== undefined) obj[prop] = fieldValue;

opts = _extends({}, opts, { __validating: true });
return MixedSchema.prototype._validate.call(this, _value, opts).catch(endEarly ? null : function (err) {

@@ -134,0 +138,0 @@ errors.push(err);

{
"name": "yup",
"version": "0.17.6",
"version": "0.18.0",
"description": "Dead simple Object schema validation",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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