Skip to content

Releases: dtinth/babel-plugin-__coverage__

v11.0.0: better nyc integration

15 Jun 02:26
Compare
Choose a tag to compare

This release integrates with nyc better by respecting include/exclude options specified in package.json file. This allows easier integrations with nyc which looks less hacky. Unfortunately this means for existing users that uses nyc with babel-plugin-coverage, this release is a breaking change.

Compatibility notes: babel-plugin-__coverage__@^11.0.0 should be used with nyc@^6.6.1

  • In previous versions, instrumentation is disabled by telling nyc to only instrument a bogus path:

      "nyc": {
        "include": [ "/" ]
      }

    Then you have to configure include/exclude options in your .babelrc file.

  • In this version, this plugin will respect nyc’s include/exclude configuration, so with the original configuration no files will be instrumented (the breaking change).

    To fix this, remove the bogus configuration, and use nyc’s instrument and sourceMap flags instead.

      "nyc": {
        "instrument": false,
        "sourceMap": false
      }

    You can also configure the included/excluded files here instead of in the .babelrc.

      "nyc": {
        "instrument": false,
        "sourceMap": false,
        "exclude": [ "**/*Spec.js" ]
      }