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

@metamask/ethjs-query

Package Overview
Dependencies
Maintainers
10
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metamask/ethjs-query - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

6

CHANGELOG.md

@@ -0,1 +1,7 @@

# 0.5.0 -- change to error reporting
1. Removed logic that was catching too broadly and applying an erroneous "formatting error" error.
2. Removed logic that was rethrowing newly constructed Error objects that stripped stack traces relevant to the actual error.
3. Changes to lint configuration
# 0.4.0 -- maintenance update

@@ -2,0 +8,0 @@

2

internals/webpack/webpack.config.js

@@ -29,3 +29,3 @@ var webpack = require('webpack'); // eslint-disable-line

plugins: [
new webpack.BannerPlugin({ banner: ' /* eslint-disable */ ', raw: true, entryOnly: true }),
new webpack.BannerPlugin({ banner: '/* eslint-disable */', raw: true, entryOnly: true }),
new webpack.optimize.OccurrenceOrderPlugin(),

@@ -32,0 +32,0 @@ new webpack.DefinePlugin({

@@ -96,17 +96,9 @@ 'use strict';

// format result
try {
_this.log('attempting method formatting for \'' + protoMethodName + '\' with raw outputs: ' + JSON.stringify(result, null, _this.options.jsonSpace));
var methodOutputs = format.formatOutputs(rpcMethodName, result);
_this.log('method formatting success for \'' + protoMethodName + '\' formatted result: ' + JSON.stringify(methodOutputs, null, _this.options.jsonSpace));
resolve(methodOutputs);
return;
} catch (outputFormattingError) {
var outputError = new Error('[ethjs-query] while formatting outputs from RPC \'' + JSON.stringify(result, null, _this.options.jsonSpace) + '\' for method \'' + protoMethodName + '\' ' + outputFormattingError);
reject(outputError);
return;
}
_this.log('attempting method formatting for \'' + protoMethodName + '\' with raw outputs: ' + JSON.stringify(result, null, _this.options.jsonSpace));
var methodOutputs = format.formatOutputs(rpcMethodName, result);
_this.log('method formatting success for \'' + protoMethodName + '\' formatted result: ' + JSON.stringify(methodOutputs, null, _this.options.jsonSpace));
resolve(methodOutputs);
return;
})['catch'](function (error) {
var outputError = new Error('[ethjs-query] while formatting outputs from RPC \'' + JSON.stringify(error, null, _this.options.jsonSpace) + '\'');
reject(outputError);
return;
reject(error);
});

@@ -113,0 +105,0 @@ });

{
"name": "@metamask/ethjs-query",
"version": "0.4.0",
"version": "0.5.0",
"description": "A simple query layer for the Ethereum RPC.",

@@ -131,3 +131,3 @@ "main": "lib/index.js",

"babel-core": "6.18.2",
"babel-eslint": "7.1.0",
"babel-eslint": "7.2.2",
"babel-loader": "6.2.8",

@@ -159,3 +159,3 @@ "babel-plugin-check-es2015-constants": "6.8.0",

"cross-env": "1.0.7",
"eslint": "2.10.1",
"eslint": "5.4.0",
"eslint-config-airbnb": "9.0.1",

@@ -193,3 +193,6 @@ "eslint-import-resolver-webpack": "0.2.4",

"rules": {
"import/no-unresolved": 2,
"arrow-body-style": [
2,
"as-needed"
],
"comma-dangle": [

@@ -203,14 +206,12 @@ 2,

{
"MemberExpression": 0,
"SwitchCase": 1
}
],
"import/no-unresolved": 2,
"max-len": 0,
"newline-per-chained-call": 0,
"no-console": 1,
"max-len": 0,
"prefer-template": 2,
"no-use-before-define": 0,
"newline-per-chained-call": 0,
"arrow-body-style": [
2,
"as-needed"
]
"prefer-template": 2
}

@@ -217,0 +218,0 @@ },

@@ -89,18 +89,10 @@ const format = require('ethjs-format');

// format result
try {
this.log(`attempting method formatting for '${protoMethodName}' with raw outputs: ${JSON.stringify(result, null, this.options.jsonSpace)}`);
const methodOutputs = format.formatOutputs(rpcMethodName, result);
this.log(`method formatting success for '${protoMethodName}' formatted result: ${JSON.stringify(methodOutputs, null, this.options.jsonSpace)}`);
resolve(methodOutputs);
return;
} catch (outputFormattingError) {
const outputError = new Error(`[ethjs-query] while formatting outputs from RPC '${JSON.stringify(result, null, this.options.jsonSpace)}' for method '${protoMethodName}' ${outputFormattingError}`);
reject(outputError);
return;
}
this.log(`attempting method formatting for '${protoMethodName}' with raw outputs: ${JSON.stringify(result, null, this.options.jsonSpace)}`);
const methodOutputs = format.formatOutputs(rpcMethodName, result);
this.log(`method formatting success for '${protoMethodName}' formatted result: ${JSON.stringify(methodOutputs, null, this.options.jsonSpace)}`);
resolve(methodOutputs);
return;
})
.catch(error => {
const outputError = new Error(`[ethjs-query] while formatting outputs from RPC '${JSON.stringify(error, null, this.options.jsonSpace)}'`);
reject(outputError);
return;
reject(error);
});

@@ -107,0 +99,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 too big to display

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