web3-validator
Advanced tools
Comparing version 2.0.2 to 2.0.3-dev.3060994.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.3060994.0+3060994", | ||
"description": "JSON-Schema compatible validator for web3", | ||
@@ -30,3 +30,3 @@ "main": "./lib/commonjs/index.js", | ||
"prebuild": "yarn clean", | ||
"build": "yarn build:cjs & yarn build:esm & yarn build:types", | ||
"build": "concurrently --kill-others-on-fail \"yarn:build:*(!check|web)\"", | ||
"build:cjs": "tsc --build tsconfig.cjs.json && echo '{\"type\": \"commonjs\"}' > ./lib/commonjs/package.json", | ||
@@ -51,4 +51,4 @@ "build:esm": "tsc --build tsconfig.esm.json && echo '{\"type\": \"module\"}' > ./lib/esm/package.json", | ||
"util": "^0.12.5", | ||
"web3-errors": "^1.1.2", | ||
"web3-types": "^1.2.0", | ||
"web3-errors": "1.1.3-dev.3060994.0+3060994", | ||
"web3-types": "1.2.1-dev.3060994.0+3060994", | ||
"zod": "^3.21.4" | ||
@@ -70,3 +70,3 @@ }, | ||
}, | ||
"gitHead": "2543fd184bc354f3fdb61bb021c41311f03b683f" | ||
"gitHead": "3060994b7264998050145d2ae87f2f843262a776" | ||
} |
@@ -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
931173
5467
2
1
- Removedweb3-errors@1.3.0(transitive)
- Removedweb3-types@1.9.0(transitive)