From d36289d262ba0591a0d0b3e62fb206b9827caed2 Mon Sep 17 00:00:00 2001 From: tintinweb Date: Thu, 14 Jul 2022 12:14:22 +0200 Subject: [PATCH] prepare v0.0.20 --- CHANGELOG.md | 4 +++ package-lock.json | 83 +++++++++++++++++++++++++++++------------------ package.json | 9 +++-- src/cli.js | 1 + 4 files changed, 62 insertions(+), 35 deletions(-) mode change 100644 => 100755 src/cli.js diff --git a/CHANGELOG.md b/CHANGELOG.md index a1b4823..694cf92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Change Log All notable changes to the "solidity-visual-auditor" extension will be documented in this file. +## v0.0.20 +- new: added `solidity-code-metrics` command +- new: updated solidity-parser, solidity-doppelganger + ## v0.0.19 - new: metrics for `tryCatch` and `unchecked` blocks diff --git a/package-lock.json b/package-lock.json index d40fe6f..1976b02 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,24 +9,27 @@ "version": "0.0.19", "license": "MIT", "dependencies": { - "@solidity-parser/parser": "^0.13.2", + "@solidity-parser/parser": "^0.14.3", "sloc": "^0.2.1", - "solidity-doppelganger": "0.0.7", + "solidity-doppelganger": "^0.0.9", "surya": "^0.4.2" + }, + "bin": { + "solidity-code-metrics": "src/cli.js" } }, "node_modules/@solidity-parser/parser": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.13.2.tgz", - "integrity": "sha512-RwHnpRnfrnD2MSPveYoPh8nhofEvX7fgjHk1Oq+NNvCcLx4r1js91CO9o+F/F3fBzOCyvm8kKRTriFICX/odWw==", + "version": "0.14.3", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.14.3.tgz", + "integrity": "sha512-29g2SZ29HtsqA58pLCtopI1P/cPy5/UAzlcAXO6T/CNJimG6yA8kx4NaseMyJULiC+TEs02Y9/yeHzClqoA0hw==", "dependencies": { "antlr4ts": "^0.5.0-alpha.4" } }, "node_modules/ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", "engines": { "node": ">=4" } @@ -93,7 +96,7 @@ "node_modules/async": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/async/-/async-2.1.5.tgz", - "integrity": "sha1-5YfGhYCZSsZ/xW/4bTrFa9voELw=", + "integrity": "sha512-+g/Ncjbx0JSq2Mk03WQkyKvNh5q9Qvyo/RIqIqnmC5feJY70PNl2ESwZU2BhAB+AZPkHNzzyC2Dq2AS5VnTKhQ==", "dependencies": { "lodash": "^4.14.0" } @@ -1742,15 +1745,23 @@ } }, "node_modules/solidity-doppelganger": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/solidity-doppelganger/-/solidity-doppelganger-0.0.7.tgz", - "integrity": "sha512-qTrpjOXyE7DK7C7oUup3DTWTFGknw4Pk0NIZNnxFt3cRtgPgQtDPN0Jm4InfS9ynon/vqjsXf//M8oZXRAv/+g==", + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/solidity-doppelganger/-/solidity-doppelganger-0.0.9.tgz", + "integrity": "sha512-mHiosCFqJaCdaMVw2avUxYiIvLQdZJD7+2DXTPrXDqSr+NgjTpso/7KzTl/H8Ek9w3ydJv296gqnevScud/Isg==", "dependencies": { "@solidity-parser/parser": "^0.13.2", "glob": "^7.1.7", "yargs": "^17.0.1" } }, + "node_modules/solidity-doppelganger/node_modules/@solidity-parser/parser": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.13.2.tgz", + "integrity": "sha512-RwHnpRnfrnD2MSPveYoPh8nhofEvX7fgjHk1Oq+NNvCcLx4r1js91CO9o+F/F3fBzOCyvm8kKRTriFICX/odWw==", + "dependencies": { + "antlr4ts": "^0.5.0-alpha.4" + } + }, "node_modules/solidity-doppelganger/node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -1968,11 +1979,11 @@ } }, "node_modules/surya": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/surya/-/surya-0.4.5.tgz", - "integrity": "sha512-WUMVthFs78po/Jg//29/GXgjl1WK1TJA3EfXOFP6X0Gdp7XIODzfvym9+Fabxti5Bnclkz5ai77WAzFdDwO+6A==", + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/surya/-/surya-0.4.6.tgz", + "integrity": "sha512-zaTYkRbms26cuOWu5jon5l4OsToHX7ZEflqTozXgq/XxUL3VY+tEnxT9Te2WVsA/sYgZPwcH92yQZJgljsss4g==", "dependencies": { - "@solidity-parser/parser": "^0.13.2", + "@solidity-parser/parser": "^0.14.1", "c3-linearization": "^0.3.0", "colors": "^1.4.0", "graphviz": "0.0.9", @@ -2228,7 +2239,7 @@ "node_modules/yargs-parser": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", - "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "integrity": "sha512-CswCfdOgCr4MMsT1GzbEJ7Z2uYudWyrGX8Bgh/0eyCzj/DXWdKq6a/ADufkzI1WAOIW6jYaXJvRyLhDO0kfqBw==", "dependencies": { "camelcase": "^4.1.0" } @@ -2236,17 +2247,17 @@ }, "dependencies": { "@solidity-parser/parser": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.13.2.tgz", - "integrity": "sha512-RwHnpRnfrnD2MSPveYoPh8nhofEvX7fgjHk1Oq+NNvCcLx4r1js91CO9o+F/F3fBzOCyvm8kKRTriFICX/odWw==", + "version": "0.14.3", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.14.3.tgz", + "integrity": "sha512-29g2SZ29HtsqA58pLCtopI1P/cPy5/UAzlcAXO6T/CNJimG6yA8kx4NaseMyJULiC+TEs02Y9/yeHzClqoA0hw==", "requires": { "antlr4ts": "^0.5.0-alpha.4" } }, "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==" }, "ansi-styles": { "version": "4.3.0", @@ -2289,7 +2300,7 @@ "async": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/async/-/async-2.1.5.tgz", - "integrity": "sha1-5YfGhYCZSsZ/xW/4bTrFa9voELw=", + "integrity": "sha512-+g/Ncjbx0JSq2Mk03WQkyKvNh5q9Qvyo/RIqIqnmC5feJY70PNl2ESwZU2BhAB+AZPkHNzzyC2Dq2AS5VnTKhQ==", "requires": { "lodash": "^4.14.0" } @@ -3588,15 +3599,23 @@ } }, "solidity-doppelganger": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/solidity-doppelganger/-/solidity-doppelganger-0.0.7.tgz", - "integrity": "sha512-qTrpjOXyE7DK7C7oUup3DTWTFGknw4Pk0NIZNnxFt3cRtgPgQtDPN0Jm4InfS9ynon/vqjsXf//M8oZXRAv/+g==", + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/solidity-doppelganger/-/solidity-doppelganger-0.0.9.tgz", + "integrity": "sha512-mHiosCFqJaCdaMVw2avUxYiIvLQdZJD7+2DXTPrXDqSr+NgjTpso/7KzTl/H8Ek9w3ydJv296gqnevScud/Isg==", "requires": { "@solidity-parser/parser": "^0.13.2", "glob": "^7.1.7", "yargs": "^17.0.1" }, "dependencies": { + "@solidity-parser/parser": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.13.2.tgz", + "integrity": "sha512-RwHnpRnfrnD2MSPveYoPh8nhofEvX7fgjHk1Oq+NNvCcLx4r1js91CO9o+F/F3fBzOCyvm8kKRTriFICX/odWw==", + "requires": { + "antlr4ts": "^0.5.0-alpha.4" + } + }, "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -3764,11 +3783,11 @@ } }, "surya": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/surya/-/surya-0.4.5.tgz", - "integrity": "sha512-WUMVthFs78po/Jg//29/GXgjl1WK1TJA3EfXOFP6X0Gdp7XIODzfvym9+Fabxti5Bnclkz5ai77WAzFdDwO+6A==", + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/surya/-/surya-0.4.6.tgz", + "integrity": "sha512-zaTYkRbms26cuOWu5jon5l4OsToHX7ZEflqTozXgq/XxUL3VY+tEnxT9Te2WVsA/sYgZPwcH92yQZJgljsss4g==", "requires": { - "@solidity-parser/parser": "^0.13.2", + "@solidity-parser/parser": "^0.14.1", "c3-linearization": "^0.3.0", "colors": "^1.4.0", "graphviz": "0.0.9", @@ -3974,7 +3993,7 @@ "yargs-parser": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", - "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "integrity": "sha512-CswCfdOgCr4MMsT1GzbEJ7Z2uYudWyrGX8Bgh/0eyCzj/DXWdKq6a/ADufkzI1WAOIW6jYaXJvRyLhDO0kfqBw==", "requires": { "camelcase": "^4.1.0" } diff --git a/package.json b/package.json index df59acc..a87542b 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,11 @@ { "name": "solidity-code-metrics", - "version": "0.0.19", + "version": "0.0.20", "description": "Solidity Code Metrics", "main": "src/index.js", + "bin": { + "solidity-code-metrics": "src/cli.js" + }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, @@ -25,9 +28,9 @@ }, "homepage": "https://github.com/ConsenSys/solidity-metrics#readme", "dependencies": { - "@solidity-parser/parser": "^0.13.2", + "@solidity-parser/parser": "^0.14.3", "sloc": "^0.2.1", - "solidity-doppelganger": "0.0.7", + "solidity-doppelganger": "^0.0.9", "surya": "^0.4.2" } } diff --git a/src/cli.js b/src/cli.js old mode 100644 new mode 100755 index e7ce795..4a24fea --- a/src/cli.js +++ b/src/cli.js @@ -1,3 +1,4 @@ +#!/usr/bin/env node 'use strict'; /** * @author github.com/tintinweb