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

optimal

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

optimal - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

9

CHANGELOG.md

@@ -1,3 +0,10 @@

# 4.0.0
### 4.0.1 - 2020-01-19
#### 🐞 Fixes
- **[tuple]** Fixed some array type check failures.
- **[tuple]** Fixed tuples failing to validate when in a `union`.
# 4.0.0 - 2020-01-07
#### 💥 Breaking

@@ -4,0 +11,0 @@

5

esm/index.js

@@ -365,2 +365,3 @@ function _defineProperty(obj, key, value) {

case 'array':
case 'tuple':
this.invariant(Array.isArray(value), 'Must be an array.', path);

@@ -1339,3 +1340,3 @@ break;

try {
if (type === content.type || type === 'object' && content.type === 'shape' || content.type === 'custom') {
if (type === content.type || type === 'object' && content.type === 'shape' || type === 'array' && content.type === 'tuple' || content.type === 'custom') {
content.noErrorPrefix = true;

@@ -1345,2 +1346,4 @@ nextValue = content.run(value, path, _this2.schema);

}
return false;
} catch (error) {

@@ -1347,0 +1350,0 @@ errors.add(" - " + error.message + "\n");

@@ -369,2 +369,3 @@ 'use strict';

case 'array':
case 'tuple':
this.invariant(Array.isArray(value), 'Must be an array.', path);

@@ -1343,3 +1344,3 @@ break;

try {
if (type === content.type || type === 'object' && content.type === 'shape' || content.type === 'custom') {
if (type === content.type || type === 'object' && content.type === 'shape' || type === 'array' && content.type === 'tuple' || content.type === 'custom') {
content.noErrorPrefix = true;

@@ -1349,2 +1350,4 @@ nextValue = content.run(value, path, _this2.schema);

}
return false;
} catch (error) {

@@ -1351,0 +1354,0 @@ errors.add(" - " + error.message + "\n");

{
"name": "optimal",
"version": "4.0.0",
"version": "4.0.1",
"description": "A system for building and validating defined object structures.",

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

"@milesj/build-tools": "^0.62.0",
"@types/node": "^13.1.4",
"@types/node": "^13.1.8",
"conventional-changelog-beemo": "^1.6.0",
"rollup": "^1.28.0",
"rollup": "^1.29.0",
"rollup-plugin-babel": "^4.3.3",

@@ -53,0 +53,0 @@ "rollup-plugin-node-resolve": "^5.2.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