Skip to content

Releases: sc-forks/solidity-coverage

0.8.17 (Osaka Support)

11 Dec 04:01

Choose a tag to compare

This release contains changes to support the Osaka hardfork (thanks to @fvictorio 💯 ).

What's Changed

Full Changelog: v0.8.16...v0.8.17

0.8.16

07 May 21:40
c06fe7c

Choose a tag to compare

Support for custom storage layout syntax

This version updates the plugin's parser dependency to support the layout and at keywords introduced in Solidity v0.8.29

What's Changed

Full Changelog: v0.8.15...v0.8.16

0.8.15

16 Apr 01:08
993d7b8

Choose a tag to compare

Speed up test runs when using viaIR

This release adds an irMinimum option which should improve execution speeds if you're generating coverage with solc's viaIR mode enabled. The plugin has handled viaIR for about a year but it runs more slowly in that setting because it has to search for execution traces across a wider range of opcodes. The performance hit is especially notable in solidity code that iterates hundreds of times in loops.

NOTE: Not all code will compile withirMinimum (you may get stack-too-deep errors unfortunately). But if yours does, this option should make things faster for you.

Usage

// .solcover.js
module.exports = {
  irMinimum: true,
}

What's Changed

New Contributors

Full Changelog: v0.8.14...v0.8.15

0.8.14

25 Nov 18:18

Choose a tag to compare

What's Changed

  • Update solidity-parser/parser dep to 0.19.0 for transient storage support by @cgewecke in #898
  • fix: typos in documentation files by @leopardracer in #896

New Contributors

Full Changelog: v0.8.13...v0.8.14

v0.8.13

29 Aug 04:53

Choose a tag to compare

🐛 Bug Fixes

This release fixes a bug that caused the plugin to error when used with hardhat-viem in combination with a forked network.

What's Changed

  • Error if --solcoverjs passed but file is nonexistent by @area in #889
  • Stop overwriting forking config in extendConfig by @cgewecke in #893
  • Misc docs fixes

New Contributors

Full Changelog: v0.8.12...v0.8.13

v0.8.12

05 Apr 23:08

Choose a tag to compare

What's Changed

  • Adds "work-around" support for the hardhat-viem plugin. If you're using viem, run the coverage task with:
    SOLIDITY_COVERAGE=true npx hardhat coverage
    
  • Adds support for solc v0.4.x
  • Fixes a bug where plugin crashed if the contract sources directory name contained a period.
  • Fixes a bug where instrumentation failed if there was whitespace between require statement and the terminating semi-colon

PRs

Full Changelog: v0.8.11...v0.8.12

v0.8.11

07 Mar 23:13

Choose a tag to compare

Summary

0.8.11 fixes a(nother) bug that resulted in some line hits remaining undetected when compiling with viaIR=true

What's Changed

  • Check all SWAP opcodes for inst. hashes when viaIR is true by @cgewecke in #873

Full Changelog: v0.8.10...v0.8.11

0.8.10

29 Feb 23:04

Choose a tag to compare

Summary

0.8.10 fixes a bug that resulted in some line hits remaining undetected when compiling with viaIR=true

What's Changed

  • Check all PUSH opcodes for instr. hashes when viaIR is true by @cgewecke in #871

Full Changelog: v0.8.9...v0.8.10

0.8.9

27 Feb 15:24

Choose a tag to compare

What's Changed

  • Fix regression introduced in 0.8.7 where modifier branch coverage for modifiers inherited from a dependency was not measured correctly in some cases @cgewecke in #868

Full Changelog: v0.8.8...v0.8.9

0.8.8

21 Feb 19:25

Choose a tag to compare

What's Changed

  • Fix bug when instrumenting hardhat flattened contracts:
    • Only inject file-level instr. for first pragma in file by @cgewecke in #865
  • Fix 0% coverage when using with hardhat-foundry & foundry.toml is present:
    • Coerce sources path to absolute path if necessary by @cgewecke in #866

Install

npm install --save-dev solidity-coverage@latest
npx hardhat clean

Full Changelog: v0.8.7...v0.8.8