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

@arcblock/forge-message

Package Overview
Dependencies
Maintainers
1
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arcblock/forge-message - npm Package Compare versions

Comparing version 0.33.1 to 0.34.0

12

lib/message.js

@@ -14,3 +14,3 @@ /* eslint-disable consistent-return */

/* eslint no-console:"off" */
const camelcase = require('camelcase');
const camelCase = require('lodash/camelCase');
const jspb = require('google-protobuf');

@@ -197,3 +197,3 @@ const { Any } = require('google-protobuf/google/protobuf/any_pb');

if (rule === 'repeated') {
value = data[camelcase(`${key}_list`)] || data[key];
value = data[camelCase(`${key}_list`)] || data[key];
}

@@ -203,3 +203,3 @@

if (keyType) {
value = data[camelcase(`${key}_map`)] || data[key];
value = data[camelCase(`${key}_map`)] || data[key];
}

@@ -314,3 +314,3 @@ if (value === undefined) {

// Hack: protobuf tools renamed list fields
const value = params[key] || params[camelcase(`${key}_list`)];
const value = params[key] || params[camelCase(`${key}_list`)];
if (value === undefined) {

@@ -324,3 +324,3 @@ return;

if (keys.length) {
const fn = camelcase(`get_${key}_map`);
const fn = camelCase(`get_${key}_map`);
const map = message[fn]();

@@ -337,3 +337,3 @@ debug('createMessage.map', { type, subType, keyType, id, fn, keys });

const fn = camelcase(rule === 'repeated' ? `add_${key}` : `set_${key}`);
const fn = camelCase(rule === 'repeated' ? `add_${key}` : `set_${key}`);
if (typeof message[fn] !== 'function') {

@@ -340,0 +340,0 @@ throw new Error(`Unexpected field names ${JSON.stringify({ type, key, subType, fn, rule })}`);

{
"name": "@arcblock/forge-message",
"description": "Utility functions to encode and decode message that can send to forge",
"version": "0.33.1",
"version": "0.34.0",
"author": {

@@ -22,7 +22,7 @@ "name": "wangshijun",

"dependencies": {
"@arcblock/forge-proto": "^0.33.0",
"@arcblock/forge-util": "^0.33.1",
"camelcase": "^5.0.0",
"@arcblock/forge-proto": "^0.34.0",
"@arcblock/forge-util": "^0.34.0",
"debug": "^4.1.1",
"google-protobuf": "3.7.0-rc.2"
"google-protobuf": "^3.9.0",
"lodash": "^4.17.15"
},

@@ -79,3 +79,3 @@ "devDependencies": {

},
"gitHead": "398740a29b186416c777e4d35df810a167e24599"
"gitHead": "e2b48a5c0a28d6b9b2f2948935319365bbcf7dba"
}
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