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 🙏

© 2024 – Pkg Stats / Ryan Hefner

wptreport

v0.3.1

Published

Report generator for Web Platform Test result sets

Downloads

12

Readme

wptreport - Report generator for WPT test result sets

If you use the WPT test runner you are getting a bunch of JSON test results which you can't do much that's immediately, humanly useful with. There are quite a few of those in the test results repository.

The purpose of wptreport is to generate human-oriented reports for such data.

Installation

The typical installation is:

npm install wptreport

If you're hacking on the code, or want to be on the bleeding edge (which shouldn't be needed: I ship the code pretty much anytime I make a change), you can alternatively

git clone https://github.com/darobin/wptreport.git
cd wptreport
npm link .

Usage

This is a command-line tool, it takes some basic options.

wptreport [--input /path/to/dir] [--output /path/to/dir] [--spec SpecName]

  • --input <directory>, -i <directory>: Path to the directory that contains all the JSON data. JSON files must match the pattern \w{2}\d{d}\.json where the two first letters are an identifier for the browser engine (use whatever makes sense to your audience) and the number is the version number. Defaults to the current directory. This is also where the filter.js is found, if any (see the section on filtering).
  • --output <directory>, -o <directory>: The directory where the generated reports are stored. Defaults to the current directory.
  • --spec SpecName, -s SpecName: The specification name to use in titling the report. Optional, but certainly looks nicer.
  • --help, -h: Get some help (about the tool, you're on your own for your other issues).
  • --version, -v: Get the version number.

The format of the JSON files is defined by the test runner.

Filtering

If the input directory contains a filter.js file, it will be loaded as a Node module (and can therefore completely operate like one). Some test suites have experimental tests, tests that can provide useful information in some cases that you don't want in others, etc. As such, it can be useful to filter out some results before reporting.

The module can optionally export two methods:

  • excludeFile(fileName). Receives the name of the test file being looked at (as listed in the JSON data). Return true to skip it (and therefore all of its content), false to keep it.
  • excludeCase(fileName, caseName). Receives both the name of the test file and that of the test case being looked at. Skip with true, keep with false. This is the same as the previous one, only more granular.