Skip to content

Conversation

@tobistudio
Copy link
Owner

snyk-top-banner

Snyk has created this PR to upgrade solidity-coverage from 0.8.5 to 0.8.16.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


  • The recommended version is 17 versions ahead of your current version.

  • The recommended version was released 4 months ago.

Release notes
Package name: solidity-coverage
  • 0.8.16 - 2025-05-07

    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 - 2025-04-16

    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.15-rc.0 - 2025-04-15
  • 0.8.14 - 2024-11-25

    What's Changed

    New Contributors

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

  • 0.8.13 - 2024-08-29

    🐛 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

  • 0.8.13-rc.0 - 2024-08-29
  • 0.8.12 - 2024-04-05

    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

  • 0.8.11 - 2024-03-07

    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 - 2024-02-29

    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.10-rc.0 - 2024-02-28
  • 0.8.9 - 2024-02-27

    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.9-rc.0 - 2024-02-25
  • 0.8.8 - 2024-02-21

    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

  • 0.8.7 - 2024-02-10

    What's Changed

    viaIR now allowed

    This release (hopefully) fixes a long-running problem solidity-coverage had with solc's viaIR compilation mode - It's now possible to use it without any special configuration. (Please report any ongoing issues with this to issue #861)

    If you've been using .solcover.js options like configureYulOptimizer and solcOptimizerDetails as a work around, you should remove them when upgrading. (Don't forget to run the hardhat clean task after updating any coverage config stuff).

    --network no longer allowed

    Sadly the ganache client has been deprecated. The coverage plugin never worked with its latest major version and the network flag only existed for its sake. Going forward, the network option throws an error notifying the user that coverage only uses the HardhatEVM network.

    --sources cli option

    You can now select a single file (or folder) at the command line to generate coverage for. This option should speed things up if you've been waiting for the plugin to instrument everything in a large project whenever you run the command.

    $ npx hardhat coverage --sources MyFile.sol
    $ npx hardhat coverage --sources MyFolder

    (Thanks so much @ clauBv23 for adding this!)

    Funding

    OpenZeppelin has very generously funded recent work at solidity-coverage via DRIPS, a public goods protocol which helps you direct money to projects in your dependency tree. Thanks so much! ❤️

    Links to relevant PRs

    • Add command option to specify the source files to run the coverage on (#806) by @ clauBv23 in #838
    • Remove ganache-cli related code from API & tests by @ cgewecke in #849
    • Add missing onPreCompile stage hook by @ cgewecke in #851
    • Enable coverage when viaIR compiler flag is true by @ cgewecke in #854

    Full Changelog: v0.8.6...v0.8.7

  • 0.8.7-viaIR.0 - 2024-02-09
  • 0.8.6 - 2024-01-29
  • 0.8.6-sha1.0 - 2023-10-14
  • 0.8.5 - 2023-09-22
from solidity-coverage GitHub release notes

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

Snyk has created this PR to upgrade solidity-coverage from 0.8.5 to 0.8.16.

See this package in npm:
solidity-coverage

See this project in Snyk:
https://app.snyk.io/org/dawnsee0823/project/a7063ebf-eb1f-4a43-a397-68540aab5222?utm_source=github&utm_medium=referral&page=upgrade-pr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants