Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature, n/a] updated dependencies #151

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2

jobs:
build:
docker:
- image: circleci/node:10

steps:
- checkout

- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run:
name: Install global packages
# command: sudo npm install -g codecov greenkeeper-lockfile@1
command: sudo npm install -g codecov

# - run:
# name: Greenkeeper Lockfile
# command: greenkeeper-lockfile-update

- run:
name: Install dependencies
command: npm install

- save_cache:
key: v1-dependencies-{{ checksum "package.json" }}
paths:
- node_modules

- run:
name: Javascript Linter
command: npm run lint

- run:
name: Unit tests with code coverage
command: npm run test-cov

# - run:
# name: Push any lockfile changes
# command: greenkeeper-lockfile-upload

- run:
name: Send reports to codecov.io
command: codecov
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
test/cli/truffle-crash.js
test/cli/truffle-crash.js
coverage
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"arraysInObjects": false
}],
"no-unused-expressions": ["error", { "allowShortCircuit": true, "allowTernary": true }],
"object-curly-newline": ["error", { "minProperties": 1 }],
"object-curly-newline": ["error", { "minProperties": 3 }],
"object-property-newline": ["error"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@area If you have a sec, could you give your opinion about this rule change? It reformats the code pretty extensively.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cgewecke and @area do you have a slack or IRC or something? gitter perhaps?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mind 😄. No, we don't have any of those tools set up. I suppose something like that might be useful though.

"prefer-template": [0],
"quotes": [2, "single"],
Expand Down
35 changes: 27 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,71 @@
# Changelog

0.5.2 / 2018-05-21
==================

* upgraded a number of dependencies to remove some deprecation warnings
* updated node version for circle to test under Node 10
* updated circleci config to version 2 format
* removed the `--fix` option from the default lint command. (use `npm run lint -- --fix` to fix.)
* cleaned up all linting errors

0.5.1 / 2018-05-19
==================

* Silence security warnings coming from the parser by upgrading mocha there to v3.
* Kill testrpc w/ tree-kill so that the childprocess actually dies in linux.

0.5.0 / 2018-04-20
==================

* Update README for 0.5.0
* Cleanup stdout/stderr streams on exit. This might stop testrpc-sc from running as a background
* Cleanup stdout/stderr streams on exit. This might stop `testrpc-sc` from running as a background
zombie on Linux systems, post-exit.
* Support `constructor` keyword
* Prefix instrumentation events with `emit` keyword
* (Temporarily) remove support for ternary conditional branch coverage. Solidity no longer allows
us to emit instrumentationevents within the grammatical construction @area devised to
us to emit instrumentation events within the grammatical construction @area devised to
make this possible.

0.4.15 / 2018-03-28
===================

* Update parser to allow `emit` keyword (contribution @andresilva).

0.4.14 / 2018-03-15
====================

* Fix misc bugs related to testrpc-sc using an older version of `ganache-cli` to webpack testrpc-sc
by bumping to testrpc-sc 6.1.2

0.4.13 / 2018-03-15
====================

* Fix bug introduced in 0.4.12 that broke internal rpc server launch. (contribution @andresilva)

0.4.12 / 2018-03-13
===================

* Fix bug that caused parser to crash on JS future-reserved keywords like `class`
* Use newer more stable `ganache-core` as core of testrpc-sc.
* Update instrumentation to allow interface contracts.

0.4.11 / 2018-03-04
===================

* Add @vdrg to contributor list
* Update parser to allow function types as function parameters (contribution: vrdg)

0.4.10 / 2018-02-24
===================

* Fix bug that corrupted the line coverage alignment in reports when view/pure modifiers
occupied their own line.

0.4.9 / 2018-01-23
==================
* Fix bug that ommitted line-coverage for lines with trailing '//' comment

* Fix bug that omitted line-coverage for lines with trailing '//' comment

0.4.8 / 2018-01-02
==================
Expand All @@ -61,6 +79,7 @@

0.4.4 / 2017-12-19
==================

* Fix build folder management by only deleting its contracts folder (contribution: ukstv)
* Document problems/solutions when Truffle must be a local dependency.

Expand All @@ -75,13 +94,13 @@
0.4.2 / 2017-11-20
==================

* Bug fix to gracefully handle *.sol files that are invalid Solidity during pre-processing.
* Bug fix to gracefully handle `*.sol` files that are invalid Solidity during pre-processing.

0.4.1 / 2017-11-19
==================

* Bug fix to allow `constant` keyword for variables by only removing visibility modifiers from
functions. Uses the preprocessor walking over the AST rather than a regex
* Bug fix to allow `constant` keyword for variables by only removing visibility modifiers from
functions. Uses the preprocessor walking over the AST rather than a regex.

0.4.0 / 2017-11-08 (Compatible with testrpc >= 6.0 / pragma 0.4.18 and above)
==================
Expand All @@ -97,8 +116,8 @@
0.3.0 / 2017-11-05
===================

* Add sanity checks for contracts and coverageEnv folders
* Update testrpc-sc to 6.0.3 (Byzantium fork)
* Add sanity checks for `contracts` and `coverageEnv` folders
* Update `testrpc-sc` to `6.0.3` (Byzantium fork)

0.2.7 / 2017-10-12
=================
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ find discrepancies between the coverage report and your suite's behavior, please

### Install
```
$ npm install --save-dev solidity-coverage
$ npm i -D solidity-coverage
```

### Run
Expand Down Expand Up @@ -142,3 +142,4 @@ also lint your submission with `npm run lint`. Bugs can be reported in the
+ [@ukstv](https://github.com/ukstv)
+ [@vdrg](https://github.com/vdrg)
+ [@andresliva](https://github.com/andresilva)
+ [@davesag](https://github.com/davesag)
4 changes: 1 addition & 3 deletions bin/exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const App = require('./../lib/app.js');
const reqCwd = require('req-cwd');
const death = require('death');

const log = console.log;
const { log } = console;

const config = reqCwd.silent('./.solcover.js') || {};
const app = new App(config);
Expand All @@ -19,5 +19,3 @@ app.launchTestrpc()
})
.catch(err => log(err));



12 changes: 0 additions & 12 deletions circle.yml

This file was deleted.

61 changes: 30 additions & 31 deletions docs/testrpc-sc.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# How to upgrade testrpc-sc

Warning: this is a birds nest. Any ideas for improvement, however small, are welcome.
Warning: this is a bird's nest. Any ideas for improvement, however small, are welcome.

### testrpc-sc:
+ published on `npm` as `ethereumjs-testrpc-sc`
+ published **from the coverage branch** of [`sc-forks/testrpc-sc`](https://github.com/sc-forks/testrpc-sc/tree/coverage)
+ a webpack bundle of `sc-forks/ganache-core-sc#coverage` and all of its dependencies.
+ changes to `sc-forks/ganache-core` do not propagate until `testrpc-sc` is rebuilt and published
+ publishing `testrpc-sc` does not propagate until `solidity-coverage`s deps are updated.

* published on `npm` as `ethereumjs-testrpc-sc`
* published **from the coverage branch** of [`sc-forks/testrpc-sc`](https://github.com/sc-forks/testrpc-sc/tree/coverage)
* a webpack bundle of `sc-forks/ganache-core-sc#coverage` and all of its dependencies.
* changes to `sc-forks/ganache-core` do not propagate until `testrpc-sc` is rebuilt and published
* publishing `testrpc-sc` does not propagate until `solidity-coverage`s deps are updated.

To publish a new version:

Expand All @@ -19,19 +20,22 @@ $ npm run build // Check build, just to make sure
$ npm version patch // If helpful. If you're tracking the upstream with a ganache-core sync, use theirs.
$ git push
$ npm publish // This also runs build.

// Go to `solidity-coverage` and pin its `testrpc-sc` dependency to the new version.
```

Go to `solidity-coverage` and pin its `testrpc-sc` dependency to the new version.

### sc-forks/ganache-core-sc:
+ is what testrpc-sc used to be
+ set by default to [its `coverage` branch](https://github.com/sc-forks/ganache-core-sc)
+ depends on `sc-forks/ethereumjs-vm-sc.git`
+ depends on `sc-forks/provider-engine-sc.git#8.1.19`
+ differs from `truffle-suite/ganache-core` by these deps and

* is what testrpc-sc used to be
* set by default to [its `coverage` branch](https://github.com/sc-forks/ganache-core-sc)
* depends on `sc-forks/ethereumjs-vm-sc.git`
* depends on `sc-forks/provider-engine-sc.git#8.1.19`
* differs from `truffle-suite/ganache-core` by these deps and
[two lines](https://github.com/sc-forks/ganache-core/blob/ae31080cdc581fef416a1c68cbe28ff71b6fb7c9/lib/blockchain_double.js#L36-L37)
in `blockchain_double.js` which set the block and transaction default gas limits.

To sync `ganache-core-sc` with its upstream parent at `truffle-suite`

```
$ git checkout master
$ git remote add upstream https://github.com/trufflesuite/ganache-core.git
Expand All @@ -44,39 +48,34 @@ $ git push

### How can I modify ethereumjs-vm-sc and test the changes at `solidity-coverage`?

Since `[email protected]`, ethereumjs-vm-sc is an independent dev dependency,
Since `[email protected]`, `ethereumjs-vm-sc` is an independent dev dependency,
required by the coverage unit tests. The new testrpc has a separate webpacked copy. The simplest
thing to do is open a branch at `solidity-coverage` and develop directly on the `vm` dep.
When you're satisfied that tests pass with your changes, copy your work over to the `ethereumjs-vm-sc` repo itself.

In `test/util/vm.js` the `results` object passed back by `vm.runTx` at [callMethod](https://github.com/sc-forks/solidity-coverage/blob/master/test/util/vm.js#L120)
also contains things like the runState and the logs: ex: `results.vm.runState.logs`.
In `test/util/vm.js` the `results` object passed back by `vm.runTx` at [callMethod](https://github.com/sc-forks/solidity-coverage/blob/master/test/util/vm.js#L120) also contains things like the runState and the logs: ex: `results.vm.runState.logs`.

+ To merge / publish the changes:
+ Merge `ethereumjs-vm-sc#my-new-vm` to master.
+ follow the `testrpc-sc` publication steps above.
To merge / publish the changes:

There's no reason to worry about changing ethereumjs-vm-sc at master. If that affects anyone (unlikely)
they have safe harbour at any solidity-coverage installation @0.1.9 and up. They can update.
* Merge `ethereumjs-vm-sc#my-new-vm` to master.
* follow the `testrpc-sc` publication steps above.

There's no reason to worry about changing `ethereumjs-vm-sc` at master. If that affects anyone (unlikely) they have safe harbour at any `solidity-coverage` installation @0.1.9 and up. They can update.

### E2E Testing

[sc-forks/zeppelin-solidity](https://github.com/sc-forks/zeppelin-solidity) has been configured to
serve as a simple pre-publication E2E test. By default the package pulls solidity-coverage from the repo's master branch.

You can trigger a [CI build](https://travis-ci.org/sc-forks/zeppelin-solidity) and [Coveralls report](https://coveralls.io/github/sc-forks/zeppelin-solidity) by running:

```
$ npm run ci
```

### solidity-parser-sc

We also publish `solidity-parser-sc` because `consensys/solidity-parser` in its .pegjs form has been
left to die in the wild, unloved by all. Publish at the publish branch by running `npm version patch`, `npm publish`.






### solidity-parser-sc

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See parser upgrade notes below.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

We also publish `solidity-parser-sc` because `consensys/solidity-parser` in its `.pegjs` form has been left to die in the wild, unloved by all.

Publish at the publish branch by running `npm version patch`, `npm publish`.

Loading