Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@open-rpc/schema-utils-js

Package Overview
Dependencies
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@open-rpc/schema-utils-js - npm Package Compare versions

Comparing version 1.12.2 to 1.12.3

11

build/src/method-call-validator/method-call-validator.js

@@ -86,13 +86,18 @@ "use strict";

.map(function (param, index) {
var id = index;
if (method.paramStructure === "by-name") {
id = param.name;
}
if (param.schema === undefined) {
return;
}
if (!params[index] && !param.required) {
var input = params[id];
if (input === undefined && !param.required) {
return;
}
var idForMethod = generate_method_id_1.generateMethodParamId(method, param);
var isValid = _this.ajvValidator.validate(idForMethod, params[index]);
var isValid = _this.ajvValidator.validate(idForMethod, input);
var errors = _this.ajvValidator.errors;
if (!isValid) {
return new parameter_validation_error_1.default(index, param.schema, params[index], errors);
return new parameter_validation_error_1.default(id, param.schema, input, errors);
}

@@ -99,0 +104,0 @@ })

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

## [1.12.3](https://github.com/open-rpc/schema-utils-js/compare/1.12.2...1.12.3) (2020-03-27)
### Bug Fixes
* add proper test cov and fix by-name ([31caaf0](https://github.com/open-rpc/schema-utils-js/commit/31caaf08f862e114975fc915a0b4cfc35df6d525))
* param validation fixups ([4ce56b2](https://github.com/open-rpc/schema-utils-js/commit/4ce56b21f679ff60f192bef92bf06115a235ffe0))
* tests passing now ([6d82333](https://github.com/open-rpc/schema-utils-js/commit/6d8233320bfda6d56eeedecf4c79133bba327651))
## [1.12.2](https://github.com/open-rpc/schema-utils-js/compare/1.12.1...1.12.2) (2020-03-26)

@@ -2,0 +11,0 @@

{
"name": "@open-rpc/schema-utils-js",
"private": false,
"version": "1.12.2",
"version": "1.12.3",
"description": "",

@@ -6,0 +6,0 @@ "main": "build/src/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