lint, build, test working for remix-lib, remix-astwalker

pull/8/head
aniket-engg 4 years ago
parent 83cc0cb71a
commit 40fd06fd16
  1. 4
      libs/remix-astwalker/package.json
  2. 2
      libs/remix-astwalker/src/sourceMappings.ts
  3. 2
      libs/remix-astwalker/tests/resources/ast.ts
  4. 2
      libs/remix-astwalker/tsconfig.json
  5. 2
      libs/remix-astwalker/tsconfig.lib.json
  6. 5
      libs/remix-lib/index.js
  7. 1
      libs/remix-lib/package.json
  8. 2
      libs/remix-lib/src/execution/execution-context.js
  9. 2
      libs/remix-lib/test/txFormat.js
  10. 2222
      package-lock.json
  11. 3
      package.json
  12. 24
      workspace.json

@ -5,8 +5,7 @@
"main": "dist/index.js",
"scripts": {
"build": "tsc",
"lint": "standard",
"test": "nyc --reporter=lcov --require ts-node/register tape ./tests/*.ts | tap-spec; nyc report ---reporter=text",
"test": "./../../node_modules/.bin/nyc --reporter=lcov --require ts-node/register --require tsconfig-paths/register ./../../node_modules/.bin/tape ./tests/*.ts | ./../../node_modules/.bin/tap-spec; ./../../node_modules/.bin/nyc report ---reporter=text",
"prepublish": "npm run build"
},
"repository": {
@ -36,7 +35,6 @@
"@types/tape": "^4.2.33",
"nyc": "^13.3.0",
"remix-lib": "0.4.29",
"standard": "^14.3.4",
"tape": "^4.10.1",
"ts-node": "^8.0.3",
"typescript": "^3.4.3"

@ -1,6 +1,6 @@
import { isAstNode, AstWalker } from './astWalker';
import { AstNode, LineColPosition, LineColRange, Location } from "./types";
import { util } from "remix-lib";
import { util } from "@remix-project/remix-lib";
export declare interface SourceMappings {
// eslint-disable-next-line @typescript-eslint/no-misused-new

@ -1,5 +1,5 @@
import { Node } from '../../src/'
const node: Node = {
const node = {
ast: { "legacyAST": { "children": [{ "attributes": { "fullyImplemented": true, "isLibrary": false, "linearizedBaseContracts": [5640396], "name": "test" }, "children": [{ "attributes": { "name": "x", "type": "int256" }, "children": [{ "attributes": { "name": "int" }, "id": 5657860, "name": "ElementaryTypeName", "src": "21:3:11" }], "id": 5658100, "name": "VariableDeclaration", "src": "21:5:11" }, { "attributes": { "name": "y", "type": "int256" }, "children": [{ "attributes": { "name": "int" }, "id": 5658180, "name": "ElementaryTypeName", "src": "38:3:11" }], "id": 5658268, "name": "VariableDeclaration", "src": "38:5:11" }, { "attributes": { "constant": false, "name": "set", "public": true }, "children": [{ "children": [{ "attributes": { "name": "_x", "type": "int256" }, "children": [{ "attributes": { "name": "int" }, "id": 5658404, "name": "ElementaryTypeName", "src": "68:3:11" }], "id": 5658492, "name": "VariableDeclaration", "src": "68:6:11" }], "id": 5658572, "name": "ParameterList", "src": "67:8:11" }, { "children": [{ "attributes": { "name": "_r", "type": "int256" }, "children": [{ "attributes": { "name": "int" }, "id": 5658628, "name": "ElementaryTypeName", "src": "85:3:11" }], "id": 5658716, "name": "VariableDeclaration", "src": "85:6:11" }], "id": 5658796, "name": "ParameterList", "src": "84:8:11" }, { "children": [{ "children": [{ "attributes": { "operator": "=", "type": "int256" }, "children": [{ "attributes": { "type": "int256", "value": "x" }, "id": 5658900, "name": "Identifier", "src": "108:1:11" }, { "attributes": { "type": "int256", "value": "_x" }, "id": 5658980, "name": "Identifier", "src": "112:2:11" }], "id": 5657492, "name": "Assignment", "src": "108:6:11" }], "id": 5659028, "name": "ExpressionStatement", "src": "108:6:11" }, { "children": [{ "attributes": { "operator": "=", "type": "int256" }, "children": [{ "attributes": { "type": "int256", "value": "y" }, "id": 5659116, "name": "Identifier", "src": "125:1:11" }, { "attributes": { "string": null, "type": "int_const 10", "value": "10" }, "id": 5659196, "name": "Literal", "src": "129:2:11" }], "id": 5659252, "name": "Assignment", "src": "125:6:11" }], "id": 5659316, "name": "ExpressionStatement", "src": "125:6:11" }, { "children": [{ "attributes": { "operator": "=", "type": "int256" }, "children": [{ "attributes": { "type": "int256", "value": "_r" }, "id": 5659428, "name": "Identifier", "src": "141:2:11" }, { "attributes": { "type": "int256", "value": "x" }, "id": 5639308, "name": "Identifier", "src": "146:1:11" }], "id": 5639356, "name": "Assignment", "src": "141:6:11" }], "id": 5639420, "name": "ExpressionStatement", "src": "141:6:11" }], "id": 5639516, "name": "Block", "src": "97:57:11" }], "id": 5639612, "name": "FunctionDefinition", "src": "55:99:11" }, { "attributes": { "constant": false, "name": "get", "public": true }, "children": [{ "children": [], "id": 5639764, "name": "ParameterList", "src": "179:2:11" }, { "children": [{ "attributes": { "name": "x", "type": "uint256" }, "children": [{ "attributes": { "name": "uint" }, "id": 5639820, "name": "ElementaryTypeName", "src": "191:4:11" }], "id": 5639908, "name": "VariableDeclaration", "src": "191:6:11" }, { "attributes": { "name": "y", "type": "uint256" }, "children": [{ "attributes": { "name": "uint" }, "id": 5639988, "name": "ElementaryTypeName", "src": "199:4:11" }], "id": 5640076, "name": "VariableDeclaration", "src": "199:6:11" }], "id": 5640156, "name": "ParameterList", "src": "190:16:11" }, { "children": [], "id": 5640212, "name": "Block", "src": "212:17:11" }], "id": 5640276, "name": "FunctionDefinition", "src": "167:62:11" }], "id": 5640396, "name": "ContractDefinition", "src": "0:231:11" }], "name": "SourceUnit" } },
source: `contract test {
int x;

@ -2,6 +2,8 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"types": ["node"],
"module": "commonjs",
"esModuleInterop": true,
},
"include": ["**/*.ts"]
}

@ -4,7 +4,7 @@
"module": "commonjs",
"outDir": "../../dist/out-tsc",
"declaration": true,
"rootDir": "./src",
"rootDir": "./",
"types": ["node"]
},
"exclude": ["**/*.spec.ts"],

@ -1,4 +1,3 @@
'use strict'
const EventManager = require('./src/eventManager')
const traceHelper = require('./src/helpers/traceHelper')
const uiHelper = require('./src/helpers/uiHelper')
@ -30,7 +29,7 @@ const TraceManager = require('./src/trace/traceManager')
const UniversalDApp = require('./src/universalDapp')
if (typeof (module) !== 'undefined' && typeof (module.exports) !== 'undefined') {
exports = modules()
module.exports = modules()
}
function modules () {
@ -64,7 +63,7 @@ function modules () {
EventsDecoder: EventsDecoder,
txExecution: txExecution,
txHelper: txHelper,
executionContext: executionContext,
executionContext: new executionContext(),
txFormat: txFormat,
txListener: txListener,
txRunner: txRunner,

@ -37,7 +37,6 @@
"tape": "^4.6.0"
},
"scripts": {
"lint": "standard",
"test": "./../../node_modules/.bin/tape ./test/tests.js"
},
"repository": {

@ -326,4 +326,4 @@ const transactionDetailsLinks = {
'Goerli': 'https://goerli.etherscan.io/tx/'
}
module.exports = new ExecutionContext()
module.exports = ExecutionContext

@ -5,7 +5,7 @@ const txHelper = require('../src/execution/txHelper')
const util = require('../src/util')
let compiler = require('solc')
const compilerInput = require('../src/helpers/compilerHelper').compilerInput
const executionContext = require('../src/execution/execution-context')
const executionContext = require('../').execution.executionContext
const solidityVersion = 'v0.6.0+commit.26b70077'
/* tape *********************************************************** */

2222
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -131,6 +131,7 @@
},
"dependencies": {
"@remixproject/engine": "^0.2.3",
"@types/tape": "^4.2.33",
"ethereumjs-block": "^2.2.2",
"ethereumjs-tx": "^2.1.2",
"ethereumjs-vm": "4.1.3",
@ -204,6 +205,7 @@
"npm-link-local": "^1.1.0",
"npm-merge-driver": "^2.3.5",
"npm-run-all": "^4.0.2",
"nyc": "^13.3.0",
"onchange": "^3.2.1",
"prettier": "1.19.1",
"remix-tabs": "1.0.48",
@ -214,6 +216,7 @@
"semver": "^6.1.2",
"solc": "^0.6.0",
"swarmgw": "^0.3.1",
"tap-spec": "^5.0.0",
"tape": "^4.13.3",
"ts-node": "~7.0.0",
"tslint": "~6.0.0",

@ -104,7 +104,7 @@
"outputPath": "dist/libs/remix-analyzer",
"tsConfig": "libs/remix-analyzer/tsconfig.lib.json",
"packageJson": "libs/remix-analyzer/package.json",
"main": "libs/remix-analyzer/src/index.ts",
"main": "libs/remix-analyzer/index.ts",
"assets": ["libs/remix-analyzer/*.md"]
}
}
@ -131,9 +131,6 @@
"builder": "@nrwl/workspace:run-commands",
"options": {
"commands": [
{
"command": "rm -rf ../../dist"
},
{
"command": "./../../node_modules/.bin/npm-run-all test"
}
@ -142,17 +139,13 @@
}
},
"build": {
"builder": "@nrwl/workspace:run-commands",
"builder": "@nrwl/node:package",
"options": {
"commands": [
{
"command": "rm -rf ../../dist"
},
{
"command": "./../../node_modules/.bin/npm-run-all build"
}
],
"cwd": "libs/remix-astwalker"
"outputPath": "dist/libs/remix-astwalker",
"tsConfig": "libs/remix-astwalker/tsconfig.lib.json",
"packageJson": "libs/remix-astwalker/package.json",
"main": "libs/remix-astwalker/src/index.ts",
"assets": ["libs/remix-astwalker/*.md"]
}
}
}
@ -211,9 +204,6 @@
"builder": "@nrwl/workspace:run-commands",
"options": {
"commands": [
{
"command": "rm -rf ../../dist"
},
{
"command": "./../../node_modules/.bin/npm-run-all test"
}

Loading…
Cancel
Save