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

@flakiness/junit-xml

v1.2.0

Published

Convert JUnit XML test reports into Flakiness Reports

Readme

Tests

@flakiness/junit-xml

Convert JUnit XML test reports into a Flakiness report and upload it to flakiness.io.

The recommended way to run it is with npx (no install step):

npx @flakiness/junit-xml --flakiness-project myorg/myproject ./build/reports/junit 

This combines every XML file under the given path into a single Flakiness report and auto-uploads it to flakiness.io. See authentication on how to configure auto-upload.

If your environment has no Node.js, a standalone binary is also available.

Contents

Usage

flakiness-junit-xml [options] <junit-path>

  <junit-path>                   JUnit XML file, or a directory of XML files (scanned recursively)
  --env-name <name>              Environment name (defaults to --category, or `junit`)
  --commit-id <id>               Git commit ID (auto-detected from cwd if omitted)
  --title <title>                Report title (env: FLAKINESS_TITLE)
  --output-dir <dir>             Output directory (default: flakiness-report)
  -c, --category <category>      Category, e.g. `bun`, `rust` (default: `junit`)
  --flakiness-project <project>  Flakiness project, `org/project` (env: FLAKINESS_PROJECT)
  --token <token>                Flakiness.io access token (env: FLAKINESS_ACCESS_TOKEN)
  --endpoint <url>               Flakiness.io API endpoint override
  --disable-upload               Convert only; don't upload (env: FLAKINESS_DISABLE_UPLOAD)

Requires Node.js ^20.17.0 || >=22.9.0.

flakiness-junit-xml ingests JUnit XML from any test runner. Some runners don't emit it by default — the examples below show how to get XML out of the common ones.

Example: ingesting bun test results

bun test emits JUnit XML with --reporter=junit:

bun test --reporter=junit --reporter-outfile=./junit.xml
npx @flakiness/junit-xml --category bun --flakiness-project myorg/myproject ./junit.xml

Example: ingesting Rust cargo-nextest results

cargo test doesn't emit JUnit XML; cargo-nextest does. Add a CI profile in .config/nextest.toml:

[profile.ci.junit]
path = "junit.xml"

Then run the tests and point at the XML nextest writes under target/nextest/:

cargo nextest run --profile ci
npx @flakiness/junit-xml --category rust --flakiness-project myorg/myproject ./target/nextest/ci/junit.xml

Standalone binary (no Node.js)

This tool is also shipped as a single self-contained executable that bundles its own runtime, so it works on machines without Node.js.

macOS / Linux:

curl -fsSL https://github.com/flakiness/junit-xml/releases/latest/download/install.sh | sh

Windows (PowerShell):

irm https://github.com/flakiness/junit-xml/releases/latest/download/install.ps1 | iex

This installs a flakiness-junit-xml command on your PATH. Then use it exactly as above:

flakiness-junit-xml --flakiness-project myorg/myproject ./build/reports/junit 

[!NOTE] You can set INSTALL_DIR to configure custom location for installation.

curl -fsSL https://github.com/flakiness/junit-xml/releases/latest/download/install.sh | INSTALL_DIR="$HOME/.local/bin" sh

Authentication

The report is uploaded to flakiness.io automatically. Authentication, in priority order:

  1. Access token--token or FLAKINESS_ACCESS_TOKEN.
  2. GitHub Actions OIDC — no token needed when --flakiness-project (or FLAKINESS_PROJECT) is set, the project is bound to the repository, and the workflow grants id-token: write.

To convert without uploading, pass --disable-upload or set FLAKINESS_DISABLE_UPLOAD=1. The report is still written to --output-dir.

License

MIT