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

nyc-merge

v0.1.0

Published

A tool to merge Istanbul coverage reports

Readme

nyc-merge

nyc-merge is a lightweight Node.js tool designed to merge multiple Istanbul (nyc) coverage reports into a single, unified JSON report. This makes it easier to aggregate test coverage results from various sources and present a comprehensive overview.

License: MIT


Features

  • Multi-Pattern Search: Use one or more glob patterns to locate coverage files.
  • Concurrent Processing: Leverages parallel operations for fast file processing, configurable to match your machine's capabilities.
  • Robust Merging: Uses Istanbul’s coverage library to combine coverage data accurately.
  • Error Reporting: Logs errors encountered during file processing, ensuring that issues are visible and can be addressed.
  • CLI Usability: Provides a simple command line interface with clear options for output and concurrency.

Installation

Ensure you have Node.js (version 18 or higher) installed, then install nyc-merge globally via npm:

npm install -g nyc-merge

Alternatively, you can add it to your project as a dependency:

npm install nyc-merge --save-dev

Usage

After installation, you can run nyc-merge directly from the command line.

Command Syntax

nyc-merge --out <output.json> [--concurrency <number>] <glob-pattern> [<glob-pattern> ...]

Options

  • --out, -o
    (Required)
    Path to the output JSON file where the merged coverage report will be written.

  • --concurrency, -c
    Number of parallel operations used to process files. Defaults to the number of CPU cores available.

Examples

Merge all coverage files matching a single glob pattern:

nyc-merge --out merged-coverage.json "coverage/**/coverage-final.json"

Merge coverage reports from multiple directories:

nyc-merge --out merged-coverage.json "coverage/**/coverage-final.json" "test-coverage/**/coverage-final.json"

Customize concurrency:

nyc-merge --out merged-coverage.json --concurrency 4 "coverage/**/coverage-final.json"

How It Works

  1. File Discovery:
    The tool utilizes fast-glob to locate files matching the provided glob patterns.

  2. File Processing:
    Each found file is read asynchronously, and its JSON content is parsed. Any errors during this process are logged.

  3. Data Merging:
    Istanbul’s lib-coverage library is used to merge the JSON coverage reports into a single cohesive report.

  4. Output Generation:
    The resulting merged JSON report is written to the specified output file. Directories are created as needed.


Contributing

Contributions are welcome! If you encounter issues, have suggestions, or want to contribute new features, please check the issues page and submit a pull request.


License

This project is licensed under the MIT License. See the LICENSE file for details.