npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, πŸ‘‹, I’m Ryan HefnerΒ  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you πŸ™

Β© 2026 – Pkg Stats / Ryan Hefner

@pokujs/coverage

v0.10.0

Published

β˜”οΈ The world's first V8 and JSC coverage tool to generate reports for Node.js, Bun, Deno, and TypeScript at the same time.

Readme

@pokujs/coverage

Stage: Experimental 🧟

Enjoying Poku? Give him a star to show your support ⭐


β˜”οΈ @pokujs/coverage unifies coverage collection across Node.js, Deno, and Bun.

[!TIP]

  • @pokujs/coverage supports JSONC, YAML, and TOML config files. You can also use JavaScript and TypeScript by setting the options directly in the plugin.
  • The default reporter is designed for easy consumption by LLMs, pinpointing uncovered code with precise locations.

Why

  • Know exactly what is and isn't tested across each runtime using the same test suite.
  • Whether it's CommonJS, ES Modules, TypeScript, or both, just install and use it.

Quickstart

πŸ“¦ Install

npm i -D @pokujs/coverage

Usage

🐷 Poku

{
  "scripts": {
    "test:node": "poku --coverage",
    "test:bun": "bun --bun poku --coverage",
    "test:deno": "deno run -A npm:poku --coverage"
  }
}

⚑️ Vitest

// vitest.config.js
import { defineConfig } from 'vitest/config';

export default defineConfig({
  test: {
    coverage: {
      provider: 'custom',
      customProviderModule: '@pokujs/coverage/vitest',
    },
  },
});
{
  "scripts": {
    "test": "vitest run --coverage"
  }
}

πŸƒ Jest

// jest.config.js
const { defineConfig } = require('jest');

module.exports = defineConfig({
  coverageProvider: 'v8',
  coverageReporters: ['none'],
  reporters: ['default', '@pokujs/coverage/jest'],
});
{
  "scripts": {
    "test": "jest --coverage"
  }
}
  • coverageReporters: ['none'] disables Jest coverage reporters.
  • Jest coverage settings are not remapped to @pokujs/coverage.

⌨️ CLI

{
  "scripts": {
    "test:node": "coverage node --test",
    "test:ava": "coverage ava",
    "test:mocha": "coverage mocha",
    "test:deno": "coverage deno test"
  }
}
  • Bun (built-in) isn't supported in CLI mode yet.

Examples

Poku β€’ Node.js β€’ Deno β€’ Vitest β€’ Mocha β€’ AVA


Options

| Option | Type | Default | Node.js | Deno | Bun | | -------------------------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------- | ------- | ---- | --- | | reporter | Reporter \| Reporter[] | 'text' | ● | ● | ● | | include | string[] | [] | ● | ● | ● | | exclude | string[] | list | ● | ● | ● | | all | boolean | false | ● | ● | ● | | src | string \| string[] | [cwd] | ● | ● | ● | | extension | string \| string[] | list | ● | ● | ● | | checkCoverage | number \| CoverageThresholds | undefined | ● | ● | ● | | skipFull | boolean | false | ● | ● | ● | | skipEmpty | boolean | false | ● | ● | ● | | watermarks | Partial<Watermarks> | [50, 80] per metric | ● | ● | ● | | hyperlinks | boolean \| IDE | true | ● | ● | ● | | reportsDirectory | string | './coverage' | ● | ● | ● | | excludeAfterRemap | boolean | true | ● | ● | – | | tempDirectory | string | auto | ● | ● | ● | | clean | boolean | auto | ● | ● | ● | | config | string \| false | undefined | ● | ● | ● | | requireFlag | boolean | false | ● | ● | ● |

.nycrc, .c8rc, and bunfig.toml config files are supported and options are automatically remapped.

[!NOTE]

On Bun, the branches threshold and excludeAfterRemap option are silently ignored.


β€Ί reporter

| Reporter | Node.js | Deno | Bun | | ---------------- | ------- | ---- | --- | | 'text' | ● | ● | ● | | 'lcov' | ● | ● | ● | | 'lcovonly' | ● | ● | ● | | 'text-lcov' | ● | ● | ● | | 'text-summary' | ● | ● | ● | | 'teamcity' | ● | ● | ● | | 'json' | ● | ● | ● | | 'json-summary' | ● | ● | ● | | 'cobertura' | ● | ● | ● | | 'clover' | ● | ● | ● | | 'none' | ● | ● | ● | | 'v8' | ● | ● | – | | 'jsc' | – | – | ● |

{ "reporter": ["text", "lcov"] }

[!NOTE]

  • On Bun, 'v8' falls back to 'jsc'.
  • On Node.js or Deno, 'jsc' falls back to 'v8'.

β€Ί include

Glob patterns for files to include. When non-empty, only matching files appear in reports.

{ "include": ["src/**"] }

β€Ί exclude

Glob patterns for files to exclude. Replaces the default list when provided.

{ "exclude": ["test/**", "**/*.spec.ts"] }
  • Every file Poku passes through its runner hook is recorded and dropped from reports.
  • node_modules/ and .git/ directories are unconditionally banned from coverage output.

β€Ί all

Walk the filesystem and report every source file under cwd, including those never touched by tests (reported as zero coverage).

{ "all": true }

β€Ί src

Root directories searched when all: true. Overrides cwd as the default walk root. Useful for monorepos. Relative paths are resolved against cwd.

{
  "all": true,
  "src": ["./packages/core/src", "./packages/api/src"]
}

β€Ί extension

File extensions considered by all: true discovery. Overrides the default list entirely.

{
  "all": true,
  "extension": [".ts", ".vue"]
}

β€Ί checkCoverage

Fail the run when coverage falls below the configured thresholds.

  • number: default threshold applied to every metric.
  • CoverageThresholds: per-metric thresholds, plus the optional perFile toggle.
  • undefined: disabled.
{
  "checkCoverage": 95
}

Above: every metric requires 95.

{
  "checkCoverage": {
    "lines": 95,
    "statements": 95,
    "functions": 90,
    "branches": 80,
    "perFile": false
  }
}

Above: per-metric granularity. perFile enforces thresholds per file instead of on aggregated totals.

[!TIP]

.nycrc and .c8rc options are automatically remapped into the CoverageThresholds usage.


β€Ί skipFull

Hide fully-covered files (every non-null metric β‰₯ 100%) from the text reporter table. Totals are unaffected.

{ "skipFull": true }

β€Ί skipEmpty

Hide files with no executable code from the text reporter table. Totals are unaffected.

{ "skipEmpty": true }

β€Ί watermarks

[lowMax, highMin] thresholds for classifying percentages as low / medium / high in the text reporter.

{
  "watermarks": {
    "lines": [60, 85],
    "branches": [60, 85],
    "functions": [60, 85],
    "statements": [60, 85]
  }
}

β€Ί hyperlinks

Controls clickable file links in the text reporter.

  • true: plain file:// links.
  • <ide>: emit IDE-specific URLs.
  • false: disabled.

Available:

  • 'vscode'
  • 'jetbrains'
  • 'cursor'
  • 'windsurf'
  • 'vscode-insiders'
{ "hyperlinks": "vscode" }

β€Ί reportsDirectory

Directory where report files are written. Resolved relative to the Poku working directory.

{ "reportsDirectory": "./coverage" }

β€Ί excludeAfterRemap

When true, globs match original source paths (post source-map remap). When false, globs match transpiled paths (pre-remap, mirrors c8).

{ "excludeAfterRemap": false }

β€Ί tempDirectory

Directory where raw coverage data is written. When omitted, a temp dir is created and cleaned up automatically.

{ "tempDirectory": "./.tmp-coverage" }

β€Ί clean

Override temp-directory cleanup at teardown.

  • undefined: auto (clean only if auto-generated).
  • true: always clean.
  • false: never clean.
{ "clean": false }

β€Ί config

Path to a config file, or false to disable auto-discovery.

{ "config": ".coveragerc" }

You can also specify the config path via CLI:

poku --coverage --coverageConfig=.coveragerc test/

[!TIP]

When no config is specified, the plugin automatically searches for the following files in the working directory (in order):

  • .coveragerc, .coveragerc.json, .coveragerc.jsonc, .coveragerc.toml, .coveragerc.yaml, .coveragerc.yml
  • .nycrc, .nycrc.json
  • .c8rc, .c8rc.json
  • bunfig.toml

Examples

Require --coverage flag

🚩 When using via plugin, by default, coverage runs whenever the plugin is active. Use requireFlag to only collect coverage when --coverage is passed to the CLI:

// poku.config.js
import { coverage } from '@pokujs/c8';
import { defineConfig } from 'poku';

export default defineConfig({
  plugins: [
    coverage({
      requireFlag: true,
    }),
  ],
});
# No coverage (plugin is a no-op)
poku test/

# With coverage
poku --coverage test/

[!NOTE]

Priority order:

  • For config file discovery: --coverageConfig (CLI) > config (plugin option) > auto-discovery
  • For coverage options: plugin options > config file options

Using with @pokujs/multi-suite

🧬 Place the coverage plugin at the root level, before multiSuite:

import { coverage } from '@pokujs/coverage';
import { multiSuite } from '@pokujs/multi-suite';
import { defineConfig } from 'poku';

export default defineConfig({
  plugins: [
    coverage({ include: ['src/**'] }),
    multiSuite([
      defineConfig({ include: ['test/unit'], concurrency: 8 }),
      defineConfig({ include: ['test/e2e'], sequential: true }),
    ]),
  ],
});

On teardown, it merges everything into a single report.


🍞 For Bun Users

@pokujs/coverage extends Bun's coverage by tapping into the JSC Inspector directly, unlocking:

  • The full set of reporters (html, html-spa, jsc, json, json-summary, cobertura, clover, teamcity, text-summary, etc.).
  • Consistent options across runtimes (all,checkCoverage, include, exclude, extension, skipFull, skipEmpty, watermarks, etc.).
  • Support for /* jsc ignore */ directives (next, start/stop).
  • Real function names with per-function execution counts.
  • A richer LCOV built from the JSC data, with function records and real per-line counts.
  • Compatibility with .nycrc / .c8rc config files, easing migration from existing coverage setups.

[!NOTE]

Branch coverage is not yet available under Bun. This is a limitation of the JSC Inspector, which Bun depends on.


πŸ¦• For Deno Users

  • The full set of reporters (html-spa, v8, json, json-summary, cobertura, clover, teamcity, text-summary, etc.).
  • Consistent options across runtimes (all, checkCoverage, include, exclude, extension, skipFull, skipEmpty, watermarks, etc.).
  • Compatibility with .nycrc / .c8rc config files, easing migration from existing coverage setups.

Acknowledgements and Credits

β˜”οΈ @pokujs/coverage internally adapts parts of the projects v8-to-istanbul, @jridgewell/trace-mapping, istanbul-reports, and Monocart Coverage Reports for multi-runtime support, enabling Istanbul reports for both Node.js, Deno, and Bun.

  • .js, .css, .png, and .ico assets from html and html-spa reporters are copied verbatim from istanbul-reports.

Also, a special thanks to c8, that served as a study base and as a reference for comparing results.


AI & Open Source

πŸ€– This project is not "vibe-coded". The use of LLMs makes it really easier to perform complex queries, mapping, and filtering data, especially when dealing with massive amounts of raw data from V8 and JSC engines.

In development, this is primarily used as a productivity tool, not as an autopilot. If you'd like to contribute to the project, please keep this in mind: I'll love reading what you, a human, have written 🀝

  • You can view detailed queries by runtime and engine in the ./docs.

License

MIT Β© wellwelwel and contributors.