From 71380be0cad6c78546c0536f4a1ba359a77e7286 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Mon, 29 Oct 2018 15:33:12 +0100 Subject: [PATCH] fix linting issues --- bin/embark | 2 +- lib/core/engine.js | 3 - lib/core/fs.js | 1 - lib/modules/blockchain_process/blockchain.js | 15 +- lib/modules/blockchain_process/simulator.js | 1 + lib/modules/contracts_manager/index.js | 6 +- lib/modules/coverage/contract_source.js | 6 +- lib/modules/debugger/debugger_manager.js | 38 +-- lib/modules/debugger/index.js | 135 +++++----- lib/modules/graph/index.js | 1 + lib/modules/webserver/index.js | 1 - lib/modules/whisper/index.js | 2 +- npm-shrinkwrap.json | 255 ++++++++++++++----- package.json | 2 +- test_apps/test_app/package-lock.json | 10 - 15 files changed, 300 insertions(+), 178 deletions(-) diff --git a/bin/embark b/bin/embark index 9ccaf23a7..f0e9e05a5 100755 --- a/bin/embark +++ b/bin/embark @@ -995,7 +995,7 @@ function isDappCmd(cmd) { } function isObject(val) { - // eslint-disable-next-line no-eq-null + // eslint-disable-next-line return val != null && typeof val === 'object' && Array.isArray(val) === false; } diff --git a/lib/core/engine.js b/lib/core/engine.js index 40a13c4ee..219ed463c 100644 --- a/lib/core/engine.js +++ b/lib/core/engine.js @@ -297,9 +297,6 @@ class Engine { this.registerModule('tests', Object.assign(options, {ipc: this.ipc})); } - codeCoverageService(_options) { - this.registerModule('coverage'); - } } module.exports = Engine; diff --git a/lib/core/fs.js b/lib/core/fs.js index 12a908064..fa6f7bbeb 100644 --- a/lib/core/fs.js +++ b/lib/core/fs.js @@ -207,6 +207,5 @@ module.exports = { copyPreserve, dappPath, pkgPath, - outputFileSync, writeJson }; diff --git a/lib/modules/blockchain_process/blockchain.js b/lib/modules/blockchain_process/blockchain.js index 05538341e..09400f55a 100644 --- a/lib/modules/blockchain_process/blockchain.js +++ b/lib/modules/blockchain_process/blockchain.js @@ -15,7 +15,7 @@ const Logger = require('../../core/logger'); // time between IPC connection attmpts (in ms) const IPC_CONNECT_INTERVAL = 2000; -/*eslint complexity: ["error", 38]*/ +/*eslint complexity: ["error", 42]*/ var Blockchain = function(userConfig, clientClass) { this.userConfig = userConfig; this.env = userConfig.env || 'development'; @@ -48,10 +48,10 @@ var Blockchain = function(userConfig, clientClass) { mine: this.userConfig.mine || false, account: this.userConfig.account || {}, devPassword: this.userConfig.devPassword || "", - whisper: (this.userConfig.whisper != false), + whisper: (this.userConfig.whisper !== false), maxpeers: ((this.userConfig.maxpeers === 0) ? 0 : (this.userConfig.maxpeers || 25)), bootnodes: this.userConfig.bootnodes || "", - wsRPC: (this.userConfig.wsRPC != false), + wsRPC: (this.userConfig.wsRPC !== false), wsHost: dockerHostSwap(this.userConfig.wsHost) || defaultHost, wsPort: this.userConfig.wsPort || 8546, wsOrigins: this.userConfig.wsOrigins || false, @@ -98,10 +98,10 @@ var Blockchain = function(userConfig, clientClass) { /** * Polls for a connection to an IPC server (generally this is set up - * in the Embark process). Once connected, any logs logged to the + * in the Embark process). Once connected, any logs logged to the * Logger will be shipped off to the IPC server. In the case of `embark * run`, the BlockchainListener module is listening for these logs. - * + * * @returns {void} */ Blockchain.prototype.initStandaloneProcess = function () { @@ -117,7 +117,7 @@ Blockchain.prototype.initStandaloneProcess = function () { this.ipc = new Ipc({ipcRole: 'client'}); // Wait for an IPC server to start (ie `embark run`) by polling `.connect()`. - // Do not kill this interval as the IPC server may restart (ie restart + // Do not kill this interval as the IPC server may restart (ie restart // `embark run` without restarting `embark blockchain`) setInterval(() => { if (!this.ipc.connected) { @@ -435,7 +435,7 @@ Blockchain.prototype.initChainAndGetAddress = function (callback) { }); }; -var BlockchainClient = function(userConfig, clientName, env, onReadyCallback, onExitCallback, logger, events, isStandalone) { +var BlockchainClient = function(userConfig, clientName, env, onReadyCallback, onExitCallback, logger, _events, _isStandalone) { if ((userConfig === {} || JSON.stringify(userConfig) === '{"enabled":true}') && env !== 'development') { logger.info("===> " + __("warning: running default config on a non-development environment")); } @@ -453,7 +453,6 @@ var BlockchainClient = function(userConfig, clientName, env, onReadyCallback, on case 'parity': clientClass = ParityClient; break; - return new Blockchain({blockchainConfig, client: GethCommands, env, isDev, onReadyCallback, onExitCallback, logger, events, isStandalone}); default: console.error(__('Unknow client "%s". Please use one of the following: %s', userConfig.ethereumClientName, 'geth, parity')); process.exit(); diff --git a/lib/modules/blockchain_process/simulator.js b/lib/modules/blockchain_process/simulator.js index 4bb0ade6e..e9a3d711e 100644 --- a/lib/modules/blockchain_process/simulator.js +++ b/lib/modules/blockchain_process/simulator.js @@ -13,6 +13,7 @@ class Simulator { this.logger = options.logger; } + /*eslint complexity: ["error", 21]*/ run(options) { let cmds = []; diff --git a/lib/modules/contracts_manager/index.js b/lib/modules/contracts_manager/index.js index bbfcbb957..31efff538 100644 --- a/lib/modules/contracts_manager/index.js +++ b/lib/modules/contracts_manager/index.js @@ -219,7 +219,7 @@ class ContractsManager { ); } - build(done, useContractFiles = true, resetContracts = true) { + build(done, _useContractFiles = true, resetContracts = true) { let self = this; self.contracts = {}; @@ -397,8 +397,8 @@ class ContractsManager { callback(); }, // TODO: needs refactoring, has gotten too complex - /*eslint complexity: ["error", 16]*/ - /*eslint max-depth: ["error", 16]*/ + /*eslint complexity: ["error", 19]*/ + /*eslint max-depth: ["error", 19]*/ function determineDependencies(callback) { let className, contract; for (className in self.contracts) { diff --git a/lib/modules/coverage/contract_source.js b/lib/modules/coverage/contract_source.js index 776444f57..010227b73 100644 --- a/lib/modules/coverage/contract_source.js +++ b/lib/modules/coverage/contract_source.js @@ -102,7 +102,7 @@ class ContractSource { Object.values(this.contractBytecode).every((contractBytecode) => { return (Object.values(contractBytecode).length <= 1); }); } - /*eslint complexity: ["error", 40]*/ + /*eslint complexity: ["error", 44]*/ generateCodeCoverage(trace) { if(!this.ast || !this.contractBytecode) throw new Error('Error generating coverage: solc output was not assigned'); @@ -313,9 +313,9 @@ class ContractSource { nodes.forEach((node) => { // Skip duplicate function reports by only reporting when there is a jump. - if(node.type == 'f' && step.jump) return; + if(node.type === 'f' && step.jump) return; - if(node.type != 'b' && node.body && node.body.loc) { + if(node.type !== 'b' && node.body && node.body.loc) { for(var line = node.body.loc.start.line; line <= node.body.loc.end.line; line++) { coverage.l[line]++; } diff --git a/lib/modules/debugger/debugger_manager.js b/lib/modules/debugger/debugger_manager.js index b92414dce..3c09eb48e 100644 --- a/lib/modules/debugger/debugger_manager.js +++ b/lib/modules/debugger/debugger_manager.js @@ -58,20 +58,20 @@ class DebuggerManager { }); }, function startDebug(next) { - let debuggerData = {}; - cmd_line.events.on("locals", (data) => { - debuggerData.locals = self.simplifyDebuggerVars(data); - }); + let debuggerData = {}; + cmd_line.events.on("locals", (data) => { + debuggerData.locals = self.simplifyDebuggerVars(data); + }); - cmd_line.events.on("globals", (data) => { - debuggerData.contract = self.simplifyDebuggerVars(data); - }); + cmd_line.events.on("globals", (data) => { + debuggerData.contract = self.simplifyDebuggerVars(data); + }); cmd_line.startDebug(txHash, filename, () => { cmd_line.events.on("source", () => { - let lines = cmd_line.getSource(); - // TODO: this is a bit of a hack - let line = lines.filter((x) => x.indexOf("=>") === 0)[0]; + let lines = cmd_line.getSource(); + // TODO: this is a bit of a hack + let line = lines.filter((x) => x.indexOf("=>") === 0)[0]; outputCb(lines, line, debuggerData); }); @@ -86,17 +86,17 @@ class DebuggerManager { }); } - // TODO: this is duplicated in debugger/index.js - simplifyDebuggerVars(data) { - let new_data = {}; + // TODO: this is duplicated in debugger/index.js + simplifyDebuggerVars(data) { + let new_data = {}; - for (let key in data) { - let field = data[key]; - new_data[`${key} (${field.type})`] = field.value; - } + for (let key in data) { + let field = data[key]; + new_data[`${key} (${field.type})`] = field.value; + } - return new_data; - } + return new_data; + } } diff --git a/lib/modules/debugger/index.js b/lib/modules/debugger/index.js index 72527a934..22d399814 100644 --- a/lib/modules/debugger/index.js +++ b/lib/modules/debugger/index.js @@ -1,10 +1,7 @@ -var RemixDebug = require('remix-debug-debugtest'); -var CmdLine = RemixDebug.CmdLine; var DebuggerManager = require('./debugger_manager.js'); class TransactionDebugger { constructor(embark, _options) { - const self = this; this.embark = embark; this.debugger_manager = new DebuggerManager("http://localhost:8545"); @@ -35,44 +32,44 @@ class TransactionDebugger { self.embark.logger.error(line); }); - self.find_vars_in_line(tx.transactionHash, line, known_vars, (found_vars) => { - if (!found_vars) return; - self.embark.logger.info("vars:"); - found_vars.forEach((variable) => { - self.embark.logger.info(`${variable.name}: ${variable.value}`); - }); - }); + self.find_vars_in_line(tx.transactionHash, line, known_vars, (found_vars) => { + if (!found_vars) return; + self.embark.logger.info("vars:"); + found_vars.forEach((variable) => { + self.embark.logger.info(`${variable.name}: ${variable.value}`); + }); + }); }); }); }); } - find_vars_in_line(txHash, line, known_vars, cb) { - let found_vars = []; - this.getGlobals(txHash, (err, globals) => { - if (err) return cb([]); - for (let variable in globals) { + find_vars_in_line(txHash, line, known_vars, cb) { + let found_vars = []; + this.getGlobals(txHash, (err, globals) => { + if (err) return cb([]); + for (let variable in globals) { let value = globals[variable]; - if (line.indexOf(variable) >= 0) { + if (line.indexOf(variable) >= 0) { found_vars.push({name: variable, value: value}); - } - } + } + } - for (let variable in known_vars.locals) { + for (let variable in known_vars.locals) { let value = known_vars.locals[variable]; let variable_name = variable.split(' ')[0]; - if (line.indexOf(variable_name) >= 0) { + if (line.indexOf(variable_name) >= 0) { found_vars.push({name: variable, value: value}); - } - } + } + } - for (let variable in known_vars.contract) { + for (let variable in known_vars.contract) { let value = known_vars.contract[variable]; let variable_name = variable.split(' ')[0]; - if (line.indexOf(variable_name) >= 0) { + if (line.indexOf(variable_name) >= 0) { found_vars.push({name: variable, value: value}); - } - } + } + } cb(found_vars); }); @@ -94,11 +91,11 @@ class TransactionDebugger { let filename = contract.filename; this.apiDebugger = this.debugger_manager.createDebuggerSession(txHash, filename, () => { - this.getGlobals(txHash, (err, globals) => { - if (err) return res.send({ok: false}); - this.debuggerData.globals = globals; - res.send({ok :true}); - }); + this.getGlobals(txHash, (err, globals) => { + if (err) return res.send({ok: false}); + this.debuggerData.globals = globals; + res.send({ok :true}); + }); }); }); }); @@ -140,10 +137,10 @@ class TransactionDebugger { ws.send(JSON.stringify(this.debuggerData), () => {}); }); - this.apiDebugger.events.on("locals", (data) => { - this.debuggerData.locals = this.simplifyDebuggerVars(data); - ws.send(JSON.stringify(this.debuggerData), () => {}); - }); + this.apiDebugger.events.on("locals", (data) => { + this.debuggerData.locals = this.simplifyDebuggerVars(data); + ws.send(JSON.stringify(this.debuggerData), () => {}); + }); this.apiDebugger.events.on("globals", (data) => { this.debuggerData.contract = this.simplifyDebuggerVars(data); @@ -166,14 +163,14 @@ class TransactionDebugger { listenToCommands() { const self = this; this.cmdDebugger = false; - this.currentCmdTxHash = ""; + this.currentCmdTxHash = ""; this.embark.registerConsoleCommand((cmd, _options) => { let cmdName = cmd.split(" ")[0]; let txHash = cmd.split(" ")[1]; return { match: () => cmdName === 'debug', - process: (cb) => { + process: (_cb) => { if (txHash) { this.embark.events.request("contracts:contract:byTxHash", txHash, (err, contract) => { if (err) { @@ -181,7 +178,7 @@ class TransactionDebugger { return; } let filename = contract.filename; - self.currentCmdTxHash = txHash; + self.currentCmdTxHash = txHash; self.cmdDebugger = self.debugger_manager.createDebuggerSession(txHash, filename, () => { self.cmdDebugger.getSource().forEach((line) => { console.dir(line); @@ -190,7 +187,7 @@ class TransactionDebugger { }); return; } - self.currentCmdTxHash = self.last_tx; + self.currentCmdTxHash = self.last_tx; let filename = self.tx_tracker[self.last_tx].contract.filename; self.cmdDebugger = self.debugger_manager.createDebuggerSession(self.last_tx, filename, () => { self.cmdDebugger.getSource().forEach((line) => { @@ -204,7 +201,7 @@ class TransactionDebugger { this.embark.registerConsoleCommand((cmd, _options) => { return { match: () => (cmd === 'next' || cmd === 'n'), - process: (cb) => { + process: (_cb) => { if (!self.cmdDebugger.currentStep()) { console.dir("end of execution reached"); return self.cmdDebugger.unload(); @@ -220,7 +217,7 @@ class TransactionDebugger { this.embark.registerConsoleCommand((cmd, _options) => { return { match: () => (cmd === 'previous' || cmd === 'p'), - process: (cb) => { + process: (_cb) => { if (!self.cmdDebugger.currentStep()) { console.dir("end of execution reached"); return self.cmdDebugger.unload(); @@ -236,7 +233,7 @@ class TransactionDebugger { this.embark.registerConsoleCommand((cmd, _options) => { return { match: () => (cmd === 'var local' || cmd === 'v l' || cmd === 'vl'), - process: (cb) => { + process: (_cb) => { self.cmdDebugger.displayLocals(); } }; @@ -245,7 +242,7 @@ class TransactionDebugger { this.embark.registerConsoleCommand((cmd, _options) => { return { match: () => (cmd === 'var global' || cmd === 'v g' || cmd === 'vg'), - process: (cb) => { + process: (_cb) => { self.cmdDebugger.displayGlobals(); } }; @@ -254,41 +251,41 @@ class TransactionDebugger { this.embark.registerConsoleCommand((cmd, _options) => { return { match: () => (cmd === 'var all' || cmd === 'v a' || cmd === 'va'), - process: (cb) => { + process: (_cb) => { - self.getGlobals((err, globals) => { - if (err) return self.embark.logger.error(err); - console.dir(globals); - }); + self.getGlobals((err, globals) => { + if (err) return self.embark.logger.error(err); + console.dir(globals); + }); } }; }); } - getGlobals(txHash, cb) { - let globals = {}; - this.embark.events.request("blockchain:getTransaction", txHash, (err, tx) => { - if (err) return cb(err); + getGlobals(txHash, cb) { + let globals = {}; + this.embark.events.request("blockchain:getTransaction", txHash, (err, tx) => { + if (err) return cb(err); - this.embark.events.request("blockchain:block:byHash", tx.blockHash, (err, block) => { - if (err) return cb(err); + this.embark.events.request("blockchain:block:byHash", tx.blockHash, (err, block) => { + if (err) return cb(err); - globals["block.blockHash"] = tx.blockHash; - globals["block.number"] = tx.blockNumber; - globals["block.coinbase"] = block.miner; - globals["block.difficulty"] = block.difficulty; - globals["block.gaslimit"] = block.gasLimit; - globals["block.timestamp"] = block.timestamp; - globals["msg.sender"] = tx.from; - globals["msg.gas"] = tx.gas; - globals["msg.gasPrice"] = tx.gasPrice; - globals["msg.value"] = tx.value; - globals["now"] = block.timestamp; + globals["block.blockHash"] = tx.blockHash; + globals["block.number"] = tx.blockNumber; + globals["block.coinbase"] = block.miner; + globals["block.difficulty"] = block.difficulty; + globals["block.gaslimit"] = block.gasLimit; + globals["block.timestamp"] = block.timestamp; + globals["msg.sender"] = tx.from; + globals["msg.gas"] = tx.gas; + globals["msg.gasPrice"] = tx.gasPrice; + globals["msg.value"] = tx.value; + globals["now"] = block.timestamp; - cb(null, globals); - }); - }); - } + cb(null, globals); + }); + }); + } } diff --git a/lib/modules/graph/index.js b/lib/modules/graph/index.js index 3bef77feb..bcd4e11e2 100644 --- a/lib/modules/graph/index.js +++ b/lib/modules/graph/index.js @@ -14,6 +14,7 @@ class GraphGenerator { }); } + /*eslint complexity: ["error", 21]*/ generate(options) { const self = this; let id = 0; diff --git a/lib/modules/webserver/index.js b/lib/modules/webserver/index.js index cf534c58c..00710f430 100644 --- a/lib/modules/webserver/index.js +++ b/lib/modules/webserver/index.js @@ -38,7 +38,6 @@ class WebServer { buildDir: this.buildDir, events: this.events, host: this.host, - logger: this.logger, port: this.port, plugins: this.plugins, openBrowser: this.webServerConfig.openBrowser diff --git a/lib/modules/whisper/index.js b/lib/modules/whisper/index.js index 89e2f72b8..d78608ba7 100644 --- a/lib/modules/whisper/index.js +++ b/lib/modules/whisper/index.js @@ -81,7 +81,7 @@ class Whisper { } // Assume it is a Geth compliant client self.web3.shh.getVersion(function(err, version) { - if (err || version == "2") { + if (err || version === "2") { return cb({name: 'Whisper', status: 'off'}); } return cb({name: 'Whisper (version ' + version + ')', status: 'on'}); diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 32f7b688e..ff658dd63 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -5400,61 +5400,62 @@ } }, "eslint": { - "version": "4.13.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.13.1.tgz", - "integrity": "sha512-UCJVV50RtLHYzBp1DZ8CMPtRSg4iVZvjgO9IJHIKyWU/AnJVjtdRikoUPLB29n5pzMB7TnsLQWf0V6VUJfoPfw==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.7.0.tgz", + "integrity": "sha512-zYCeFQahsxffGl87U2aJ7DPyH8CbWgxBC213Y8+TCanhUTf2gEvfq3EKpHmEcozTLyPmGe9LZdMAwC/CpJBM5A==", "dev": true, "requires": { - "ajv": "^5.3.0", - "babel-code-frame": "^6.22.0", + "@babel/code-frame": "^7.0.0", + "ajv": "^6.5.3", "chalk": "^2.1.0", - "concat-stream": "^1.6.0", - "cross-spawn": "^5.1.0", - "debug": "^3.0.1", - "doctrine": "^2.0.2", - "eslint-scope": "^3.7.1", - "espree": "^3.5.2", - "esquery": "^1.0.0", - "estraverse": "^4.2.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^2.1.0", + "eslint-scope": "^4.0.0", + "eslint-utils": "^1.3.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^4.0.0", + "esquery": "^1.0.1", "esutils": "^2.0.2", "file-entry-cache": "^2.0.0", "functional-red-black-tree": "^1.0.1", "glob": "^7.1.2", - "globals": "^11.0.1", - "ignore": "^3.3.3", + "globals": "^11.7.0", + "ignore": "^4.0.6", "imurmurhash": "^0.1.4", - "inquirer": "^3.0.6", - "is-resolvable": "^1.0.0", - "js-yaml": "^3.9.1", + "inquirer": "^6.1.0", + "is-resolvable": "^1.1.0", + "js-yaml": "^3.12.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.3.0", - "lodash": "^4.17.4", - "minimatch": "^3.0.2", + "lodash": "^4.17.5", + "minimatch": "^3.0.4", "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", "optionator": "^0.8.2", "path-is-inside": "^1.0.2", "pluralize": "^7.0.0", "progress": "^2.0.0", + "regexpp": "^2.0.1", "require-uncached": "^1.0.3", - "semver": "^5.3.0", + "semver": "^5.5.1", "strip-ansi": "^4.0.0", - "strip-json-comments": "~2.0.1", - "table": "^4.0.1", - "text-table": "~0.2.0" + "strip-json-comments": "^2.0.1", + "table": "^5.0.2", + "text-table": "^0.2.0" }, "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } + "acorn": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.2.tgz", + "integrity": "sha512-GXmKIvbrN3TV7aVqAzVFaMW8F8wzVX7voEBRO3bDA64+EX37YSayggRJP5Xig6HYHBkWKpFg9W5gg6orklubhg==", + "dev": true + }, + "acorn-jsx": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.0.tgz", + "integrity": "sha512-XkB50fn0MURDyww9+UYL3c1yLbOBz0ZFvrdYlGB8l+Ije1oSC75qAqrzSPjYQbdnQUzhlUGNKuesryAv0gxZOg==", + "dev": true }, "ansi-regex": { "version": "3.0.0", @@ -5462,14 +5463,43 @@ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, - "eslint-scope": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.3.tgz", - "integrity": "sha512-W+B0SvF4gamyCTmUc+uITPY0989iXVfKvhwtmJocTaYoc/3khEHmEmvfY/Gn9HA9VV75jrQECsHizkNw1b68FA==", + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "debug": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz", + "integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "espree": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-4.1.0.tgz", + "integrity": "sha512-I5BycZW6FCVIub93TeVY1s7vjhP9CY6cXCznIRfiig7nRviKZYdRnj/sHEWC6A7WE9RDWOFq9+7OsWSYz8qv2w==", + "dev": true, + "requires": { + "acorn": "^6.0.2", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" } }, "esprima": { @@ -5478,10 +5508,57 @@ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "external-editor": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", + "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "inquirer": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.0.tgz", + "integrity": "sha512-QIEQG4YyQ2UYZGDC4srMZ7BjHOmNk1lR2JQj5UknBapklm6WHA+VVH7N+sUdX3A7NeCfGF8o4X1S3Ao7nAcIeg==", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.0", + "figures": "^2.0.0", + "lodash": "^4.17.10", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.1.0", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, "js-yaml": { @@ -5494,12 +5571,22 @@ "esprima": "^4.0.0" } }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -5508,6 +5595,18 @@ "requires": { "ansi-regex": "^3.0.0" } + }, + "table": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/table/-/table-5.1.0.tgz", + "integrity": "sha512-e542in22ZLhD/fOIuXs/8yDZ9W61ltF8daM88rkRNtgTIct+vI2fTnAyu/Db2TCfEcI8i7mjZz6meLq0nW7TYg==", + "dev": true, + "requires": { + "ajv": "^6.5.3", + "lodash": "^4.17.10", + "slice-ansi": "1.0.0", + "string-width": "^2.1.1" + } } } }, @@ -5774,6 +5873,18 @@ "estraverse": "^4.1.1" } }, + "eslint-utils": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", + "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "dev": true + }, "espree": { "version": "3.5.4", "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", @@ -15167,6 +15278,12 @@ "safe-regex": "^1.1.0" } }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, "regexpu-core": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.2.0.tgz", @@ -16624,14 +16741,6 @@ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, "eth-lib": { "version": "0.1.27", "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.27.tgz", @@ -16886,6 +16995,28 @@ "underscore": "1.8.3", "web3-core-helpers": "1.0.0-beta.34", "websocket": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2" + }, + "dependencies": { + "websocket": { + "version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2", + "from": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible", + "requires": { + "debug": "^2.2.0", + "nan": "^2.3.3", + "typedarray-to-buffer": "^3.1.2", + "yaeti": "^0.0.6" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + } + } + } } }, "web3-shh": { @@ -16917,7 +17048,6 @@ "version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2", "from": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible", "requires": { - "debug": "^2.2.0", "nan": "^2.3.3", "typedarray-to-buffer": "^3.1.2", "yaeti": "^0.0.6" @@ -17205,6 +17335,15 @@ "rx-lite": "*" } }, + "rxjs": { + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", + "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", diff --git a/package.json b/package.json index 0913f3f8d..6600f00b8 100644 --- a/package.json +++ b/package.json @@ -142,7 +142,7 @@ "devDependencies": { "chai": "4.1.2", "cross-env": "5.2.0", - "eslint": "4.13.1", + "eslint": "5.7.0", "mocha-sinon": "1.2.0", "npm-run-all": "4.1.3", "sinon": "4.5.0" diff --git a/test_apps/test_app/package-lock.json b/test_apps/test_app/package-lock.json index fc5f9f009..024d5dcc9 100644 --- a/test_apps/test_app/package-lock.json +++ b/test_apps/test_app/package-lock.json @@ -108,11 +108,6 @@ "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-3.3.1.tgz", "integrity": "sha512-2Sm+JaYn74OiTM2wHvxJOo3roiq/h25Yi69Fqk269cNUwIXsCvATB6CRSFC9Am/20G2b28hGv/+7NiWydIrPvg==" }, - "dotenv": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-4.0.0.tgz", - "integrity": "sha1-hk7xN5rO1Vzm+V3r7NzhefegzR0=" - }, "embark-service": { "version": "file:extensions/embark-service", "requires": { @@ -350,11 +345,6 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",