Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

istanbul-lib-report

istanbuljs90.5mBSD-3-Clause3.0.1TypeScript support: definitely-typed

Base reporting library for istanbul

istanbul, report, api, lib

readme

istanbul-lib-report

Greenkeeper badge Build Status

Core reporting utilities for istanbul.

Example usage

const libReport = require('istanbul-lib-report');
const reports = require('istanbul-reports');

// coverageMap, for instance, obtained from istanbul-lib-coverage
const coverageMap;

const configWatermarks = {
  statements: [50, 80],
  functions: [50, 80],
  branches: [50, 80],
  lines: [50, 80]
};

// create a context for report generation
const context = libReport.createContext({
  dir: 'report/output/dir',
  // The summarizer to default to (may be overridden by some reports)
  // values can be nested/flat/pkg. Defaults to 'pkg'
  defaultSummarizer: 'nested',
  watermarks: configWatermarks,
  coverageMap,
})

// create an instance of the relevant report class, passing the
// report name e.g. json/html/html-spa/text
const report = reports.create('json', {
  skipEmpty: configSkipEmpty,
  skipFull: configSkipFull
})

// call execute to synchronously create and write the report to disk
report.execute(context)

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

3.0.0 (2019-12-20)

Note: Version bump only for package istanbul-lib-report

3.0.0-alpha.2 (2019-12-07)

Note: Version bump only for package istanbul-lib-report

3.0.0-alpha.1 (2019-10-06)

Note: Version bump only for package istanbul-lib-report

3.0.0-alpha.0 (2019-06-19)

Bug Fixes

  • package: update supports-color to version 7.0.0 (#420) (631029d)
  • Properly combine directories in nested summarizer (#380) (50afdbb)

Features

  • Refactor istanbul-lib-report so report can choose summarizer (#408) (0f328fd)
  • Update dependencies, require Node.js 8 (#401) (bf3a539)

BREAKING CHANGES

  • Existing istanbul-lib-report API's have been changed
  • Node.js 8 is now required

3.0.1 (2023-07-25)

Bug Fixes

  • deps: update make-dir CVE-2022-25883 (eab82a9)

2.0.8 (2019-04-24)

Note: Version bump only for package istanbul-lib-report

2.0.7 (2019-04-09)

Note: Version bump only for package istanbul-lib-report

2.0.6 (2019-04-03)

Bug Fixes

  • Avoid corrupting HTML report's arrow png during copy (#343) (ce664c7)

2.0.5 (2019-03-12)

Note: Version bump only for package istanbul-lib-report

2.0.4 (2019-01-26)

Bug Fixes

  • nested summarizer error with no files (#230) (07724bf)

2.0.3 (2018-12-25)

Note: Version bump only for package istanbul-lib-report

2.0.2 (2018-09-06)

Note: Version bump only for package istanbul-lib-report

2.0.1 (2018-07-07)

Note: Version bump only for package istanbul-lib-report

2.0.0 (2018-06-06)

Bug Fixes

BREAKING CHANGES

  • a null prototype is now used in several places rather than the default {} assignment.

1.1.4 (2018-03-04)

Note: Version bump only for package istanbul-lib-report

1.1.3 (2018-02-13)

Note: Version bump only for package istanbul-lib-report

1.1.2 (2017-10-21)

Bug Fixes

  • remove call to mkdirp.sync() in constructor so when used for ConsoleWriter (#104) (58eb79d)

1.1.1 (2017-05-27)

1.1.0 (2017-04-29)

Features

  • once 100% line coverage is achieved, missing branch coverage is now shown in text report (#45) (8a809f8)

1.0.0 (2017-03-27)