@arcblock/forge-message
Advanced tools
Comparing version 0.33.1 to 0.34.0
@@ -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" | ||
} |
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
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
32846
+ Addedlodash@^4.17.15
+ Added@arcblock/forge-proto@0.34.0(transitive)
+ Added@arcblock/forge-util@0.34.0(transitive)
+ Addedgoogle-protobuf@3.21.4(transitive)
- Removedcamelcase@^5.0.0
- Removed@arcblock/forge-proto@0.33.0(transitive)
- Removed@arcblock/forge-util@0.33.1(transitive)
- Removedcamelcase@5.3.1(transitive)
- Removedgoogle-protobuf@3.7.0-rc.2(transitive)
- Removedlodash.get@4.4.2(transitive)
Updated@arcblock/forge-util@^0.34.0
Updatedgoogle-protobuf@^3.9.0