web3-validator
Advanced tools
Comparing version 2.0.2 to 2.0.3-dev.171b413.0
@@ -156,3 +156,12 @@ "use strict"; | ||
} | ||
lastSchema.items = childSchema; | ||
// lastSchema.items is a Schema, concat with 'childSchema' | ||
if (!Array.isArray(lastSchema.items)) { | ||
lastSchema.items = [lastSchema.items, childSchema]; | ||
} // lastSchema.items is an empty Scheme array, set it to 'childSchema' | ||
else if (lastSchema.items.length === 0) { | ||
lastSchema.items = childSchema; | ||
} // lastSchema.items is a non-empty Scheme array, append 'childSchema' | ||
else { | ||
lastSchema.items.push(childSchema); | ||
} | ||
lastSchema = childSchema; | ||
@@ -203,2 +212,3 @@ } | ||
} | ||
lastSchema = schema; | ||
} | ||
@@ -205,0 +215,0 @@ return schema; |
@@ -152,3 +152,12 @@ /* | ||
} | ||
lastSchema.items = childSchema; | ||
// lastSchema.items is a Schema, concat with 'childSchema' | ||
if (!Array.isArray(lastSchema.items)) { | ||
lastSchema.items = [lastSchema.items, childSchema]; | ||
} // lastSchema.items is an empty Scheme array, set it to 'childSchema' | ||
else if (lastSchema.items.length === 0) { | ||
lastSchema.items = childSchema; | ||
} // lastSchema.items is a non-empty Scheme array, append 'childSchema' | ||
else { | ||
lastSchema.items.push(childSchema); | ||
} | ||
lastSchema = childSchema; | ||
@@ -199,2 +208,3 @@ } | ||
} | ||
lastSchema = schema; | ||
} | ||
@@ -201,0 +211,0 @@ return schema; |
{ | ||
"name": "web3-validator", | ||
"version": "2.0.2", | ||
"version": "2.0.3-dev.171b413.0+171b413", | ||
"description": "JSON-Schema compatible validator for web3", | ||
@@ -50,4 +50,4 @@ "main": "./lib/commonjs/index.js", | ||
"util": "^0.12.5", | ||
"web3-errors": "^1.1.2", | ||
"web3-types": "^1.2.0", | ||
"web3-errors": "1.1.3-dev.171b413.0+171b413", | ||
"web3-types": "1.2.1-dev.171b413.0+171b413", | ||
"zod": "^3.21.4" | ||
@@ -69,3 +69,3 @@ }, | ||
}, | ||
"gitHead": "2543fd184bc354f3fdb61bb021c41311f03b683f" | ||
"gitHead": "171b413ae61a6cc5466a8501ed6dd513e83749c6" | ||
} |
@@ -190,3 +190,12 @@ /* | ||
lastSchema.items = childSchema; | ||
// lastSchema.items is a Schema, concat with 'childSchema' | ||
if (!Array.isArray(lastSchema.items)) { | ||
lastSchema.items = [lastSchema.items as JsonSchema, childSchema]; | ||
} // lastSchema.items is an empty Scheme array, set it to 'childSchema' | ||
else if (lastSchema.items.length === 0) { | ||
lastSchema.items = childSchema; | ||
} // lastSchema.items is a non-empty Scheme array, append 'childSchema' | ||
else { | ||
lastSchema.items.push(childSchema); | ||
} | ||
lastSchema = childSchema; | ||
@@ -241,2 +250,3 @@ } | ||
} | ||
lastSchema = schema; | ||
} | ||
@@ -243,0 +253,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
931000
5467
2
1
- Removedweb3-errors@1.3.0(transitive)
- Removedweb3-types@1.9.0(transitive)