From 4980e2aa027eee58dff65818df1e2a0c4782afaa Mon Sep 17 00:00:00 2001 From: cgewecke Date: Tue, 31 Dec 2019 12:57:56 -0800 Subject: [PATCH] Update README for 0.7.0 Release (#463) --- README.md | 45 ++++++++++++++++++++++++++++++--------------- docs/api.md | 8 ++++---- docs/upgrade.md | 14 +++++++------- 3 files changed, 41 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index ad5f6eb..a81276f 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # solidity-coverage [![Gitter chat](https://badges.gitter.im/sc-forks/solidity-coverage.svg)][18] -![npm (tag)](https://img.shields.io/npm/v/solidity-coverage/beta) +![npm (tag)](https://img.shields.io/npm/v/solidity-coverage/master) [![CircleCI](https://circleci.com/gh/sc-forks/solidity-coverage.svg?style=svg)][20] -[![codecov](https://codecov.io/gh/sc-forks/solidity-coverage/branch/beta/graph/badge.svg)][21] +[![codecov](https://codecov.io/gh/sc-forks/solidity-coverage/branch/master/graph/badge.svg)][21] [![buidler](https://buidler.dev/buidler-plugin-badge.svg?1)][26] @@ -16,9 +16,14 @@ ## Install ``` -$ npm install --save-dev solidity-coverage@beta +$ npm install --save-dev solidity-coverage ``` +**Resources**: ++ [0.7.0 release notes][31] ++ [A guide][29] to upgrading from 0.6.x to 0.7.x ++ [0.6.3 docs][30] + ### Truffle V5 **Add** this package to your plugins array in `truffle-config.js` ([Truffle docs][27]) @@ -48,6 +53,12 @@ module.exports = { npx buidler coverage [command-options] ``` +**Buidler Project Examples:** + ++ Simple: [buidler-metacoin][32] ++ More complex: [MolochDao/moloch][33] + + ## Usage notes: + Coverage runs tests a little more slowly. + Coverage launches its own in-process ganache server. @@ -78,7 +89,6 @@ module.exports = { }; ``` - | Option | Type | Default | Description | | ------ | ---- | ------- | ----------- | | silent | *Boolean* | false | Suppress logging output | @@ -158,17 +168,17 @@ $ yarn [1]: https://github.com/trufflesuite/ganache-core#options [2]: https://istanbul.js.org/docs/advanced/alternative-reporters/ [3]: https://mochajs.org/api/mocha -[4]: https://github.com/sc-forks/solidity-coverage/blob/beta/docs/faq.md#running-out-of-gas -[5]: https://github.com/sc-forks/solidity-coverage/blob/beta/docs/faq.md#running-out-of-memory -[6]: https://github.com/sc-forks/solidity-coverage/blob/beta/docs/faq.md#running-out-of-time -[7]: https://github.com/sc-forks/solidity-coverage/blob/beta/docs/faq.md#continuous-integration -[8]: https://github.com/sc-forks/solidity-coverage/blob/beta/docs/faq.md#notes-on-branch-coverage +[4]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/faq.md#running-out-of-gas +[5]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/faq.md#running-out-of-memory +[6]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/faq.md#running-out-of-time +[7]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/faq.md#continuous-integration +[8]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/faq.md#notes-on-branch-coverage [9]: https://sc-forks.github.io/metacoin/ [10]: https://coveralls.io/github/OpenZeppelin/openzeppelin-solidity?branch=master -[11]: https://github.com/sc-forks/solidity-coverage/tree/beta/test/units +[11]: https://github.com/sc-forks/solidity-coverage/tree/master/test/units [12]: https://github.com/sc-forks/solidity-coverage/issues -[13]: https://github.com/sc-forks/solidity-coverage/blob/beta/docs/faq.md#notes-on-gas-distortion -[14]: https://github.com/sc-forks/solidity-coverage/blob/beta/docs/advanced.md +[13]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/faq.md#notes-on-gas-distortion +[14]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/advanced.md [15]: #config-options [16]: https://blog.colony.io/code-coverage-for-solidity-eecfa88668c2 [17]: https://github.com/JoinColony/solcover @@ -177,9 +187,14 @@ $ yarn [20]: https://circleci.com/gh/sc-forks/solidity-coverage [21]: https://codecov.io/gh/sc-forks/solidity-coverage [22]: https://cdn-images-1.medium.com/max/800/1*uum8t-31bUaa6dTRVVhj6w.png -[23]: https://github.com/sc-forks/solidity-coverage/blob/beta/docs/advanced.md#workflow-hooks -[24]: https://github.com/sc-forks/solidity-coverage/blob/beta/docs/advanced.md#skipping-tests +[23]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/advanced.md#workflow-hooks +[24]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/advanced.md#skipping-tests [25]: https://github.com/sc-forks/solidity-coverage/issues/417 [26]: https://buidler.dev/ [27]: https://www.trufflesuite.com/docs -[28]: https://github.com/sc-forks/solidity-coverage/blob/beta/docs/api.md +[28]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/api.md +[29]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/upgrade.md#upgrading-from-06x-to-070 +[30]: https://github.com/sc-forks/solidity-coverage/tree/0.6.x-final#solidity-coverage +[31]: https://github.com/sc-forks/solidity-coverage/releases/tag/v0.7.0 +[32]: https://github.com/sc-forks/buidler-e2e/tree/coverage +[33]: https://github.com/sc-forks/moloch diff --git a/docs/api.md b/docs/api.md index 6bf9f8a..a7870a7 100644 --- a/docs/api.md +++ b/docs/api.md @@ -23,7 +23,7 @@ contracts. + there are two complete [coverage tool/plugin implementations][5] (for Buidler and Truffle) which can be used as sources if you're building something similar. -[5]: https://github.com/sc-forks/solidity-coverage/tree/beta/plugins +[5]: https://github.com/sc-forks/solidity-coverage/tree/master/plugins # Table of Contents @@ -103,8 +103,8 @@ const instrumented = api.instrument(contracts) ## ganache Enables coverage data collection on an in-process ganache server. By default, this method launches -the server, begins listening on the port specified in the [config](#constructor) (or 8555 if unspecified), and -returns a url string. When `autoLaunchServer` is false, method returns `ganache.server` so you can control +the server, begins listening on the port specified in the [config](#constructor) (or 8555 if unspecified), and +returns a url string. When `autoLaunchServer` is false, method returns `ganache.server` so you can control the `server.listen` invocation yourself. **Parameters** @@ -240,7 +240,7 @@ const solcoverJS = utils.loadSolcoverJS(config); const api = new CoverageAPI(solcoverJS); ``` -[7]: https://github.com/sc-forks/solidity-coverage/tree/beta#config-options +[7]: https://github.com/sc-forks/solidity-coverage/tree/master#config-options ------------- diff --git a/docs/upgrade.md b/docs/upgrade.md index f3f6803..0672a7e 100644 --- a/docs/upgrade.md +++ b/docs/upgrade.md @@ -2,7 +2,7 @@ **Install** ``` -$ npm install --save-dev solidity-coverage@beta +$ npm install --save-dev solidity-coverage ``` **Add** this package to your plugins array in `truffle-config.js` @@ -19,13 +19,13 @@ truffle run coverage [command-options] A full list of options and other information are [available here][8] -# Upgrading from 0.6.x to 0.7.0-beta.x +# Upgrading from 0.6.x to 0.7.x First, follow [the installation instructions](#how-to-install-070) and see if it works. :rabbit2: It does!? Bye. -:elephant: It does not. Good... +:elephant: It does not. #### Are you using Truffle V5? @@ -42,7 +42,7 @@ First, follow [the installation instructions](#how-to-install-070) and see if it + If the flags were `allowUnlimitedContractSize`, `gasLimit`, `gasPrice` or `emitFreeLogs`, you can safely ignore them. Ditto if your port was `8555`. -+ If the flags were things like `accounts` or `network_id`, you'll need to transfer them as ++ If the flags were things like `--account` or `-i`, you'll need to transfer them as [ganache-core options][1] to the `providerOptions` key in .solcover.js. + Ganache's "cli flag" and "js option" formats are slightly different. Check out [their docs][1] @@ -128,11 +128,11 @@ First, follow [the installation instructions](#how-to-install-070) and see if it [1]: https://github.com/trufflesuite/ganache-core#options -[2]: https://github.com/sc-forks/solidity-coverage/blob/beta/docs/advanced.md -[3]: https://github.com/sc-forks/solidity-coverage/blob/beta/docs/advanced.md#workflow-hooks +[2]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/advanced.md +[3]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/advanced.md#workflow-hooks [4]: https://github.com/sc-forks/metacoin [5]: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/1923 [6]: https://github.com/JoinColony/colonyNetwork/pull/716 [7]: https://github.com/aragon/aragon-court/pull/123 -[8]: https://github.com/sc-forks/solidity-coverage/tree/beta#command-options +[8]: https://github.com/sc-forks/solidity-coverage/tree/master#command-options