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

eth-gas-reporter

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eth-gas-reporter - npm Package Compare versions

Comparing version 0.1.5 to 0.1.7

4

CHANGELOG.md
## Changelog: eth-gas-reporter
0.1.5 / 2018-05-15
==================
* Support multi-contract files by parsing files w/ solidity-parser-antlr
0.1.4 / 2018-05-14

@@ -3,0 +7,0 @@ ==================

31

gasStats.js

@@ -26,2 +26,4 @@ /**

let outputFile;
let rst;
let rstTitle;

@@ -158,2 +160,4 @@ /**

const leftPad = (rst) ? ' ' : '';
// Format table

@@ -163,5 +167,6 @@ const table = new Table({

chars: {
'mid': '·', 'top-mid': '|', 'left-mid': '·', 'mid-mid': '|', 'right-mid': '·',
'top-left': '·', 'top-right': '·', 'bottom-left': '·', 'bottom-right': '·',
'middle': '·', 'top': '-', 'bottom': '-', 'bottom-mid': '|'
'mid': '·', 'top-mid': '|', 'left-mid': `${leftPad}·`, 'mid-mid': '|', 'right-mid': '·',
'left': `${leftPad}|`, 'top-left': `${leftPad}·`, 'top-right': '·',
'bottom-left': `${leftPad}·`, 'bottom-right': '·', 'middle': '·', 'top': '-',
'bottom': '-', 'bottom-mid': '|'
}

@@ -223,12 +228,16 @@ })

let rstOutput = '';
if (rst) {
rstOutput += `${rstTitle}\n`;
rstOutput += `${'='.repeat(rstTitle.length)}\n\n`;
rstOutput += `.. code-block:: shell\n\n`;
}
let tableOutput = rstOutput + table.toString();
// export to preferred output
if (outputFile) {
fs.writeFile(outputFile, table.toString(), (err) => {
if (err) {
console.log('Writing to %s failed', outputFile);
console.log(table.toString());
}
});
fs.writeFileSync(outputFile, tableOutput)
} else {
console.log(table.toString())
console.log(tableOutput)
}

@@ -268,2 +277,4 @@ }

outputFile = config.outputFile || null
rst = config.rst || false
rstTitle = config.rstTitle || '';
colors.enabled = !config.noColors || false

@@ -270,0 +281,0 @@

@@ -16,5 +16,7 @@ module.exports = {

onlyCalledMethods: true,
noColors: true
noColors: true,
rst: true,
rstTitle: 'Gas Usage'
}
}
}
{
"name": "eth-gas-reporter",
"version": "0.1.4",
"version": "0.1.5",
"description": "Mocha reporter which shows gas used per unit test.",

@@ -5,0 +5,0 @@ "main": "index.js",

{
"name": "eth-gas-reporter",
"version": "0.1.5",
"version": "0.1.7",
"description": "Mocha reporter which shows gas used per unit test.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -52,2 +52,4 @@ # eth-gas-reporter

| onlyCalledMethods | *Boolean* | false | Omit methods that are never called from report. |
| rst | *Boolean* | false | Output with a reStructured text code-block directive. Useful if you want to include report in RTD |
| rstTitle | *String* | '' | Title for reStructured text header (See Travis for example output) |

@@ -54,0 +56,0 @@

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