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

tap-to-tapson

v1.0.0

Published

Convert Test Anything Protocol to tapson

Downloads

1

Readme

tap-to-tapson

Reads TAP 13, produces tapson (v1.0.x) as equivalent as possible.

<tap-producer> | tap-to-tapson | <tapson-consumer>

Also works as a node module, with streams:

var tapToTapson = require("tap-to-tapson")();
process.stdin.pipe(tapToTapson).pipe(process.stdout);

Mapping examples

Comments are interpreted as a "heading" for the expected properties of the following tests, until the next comment appears.

TAP version 13
ok 1 before any headings
# Serious business
ok 2 should throw
ok 3
ok 4
# Even more serious
ok 5
ok 6 what
1..6
{"ok":true,"expected":"before any headings"}
{"ok":true,"expected":"Serious business: should throw"}
{"ok":true,"expected":"Serious business"}
{"ok":true,"expected":"Serious business"}
{"ok":true,"expected":"Even more serious"}
{"ok":true,"expected":"Even more serious: what"}

Tests marked "TODO" or "SKIP" fail with actual-property set to reason given.

TAP version 13
not ok 1 answer to life the universe and everything # TODO not written yet
not ok 2 database smoketest # SKIP database not configured
1..2
{"ok":false,"expected":"answer to life the universe and everything","actual":"TODO: not written yet"}
{"ok":false,"expected":"database smoketest","actual":"SKIP: database not configured"}

Any assert's YAML block goes in the actual property. ("TODO" and "SKIP"-directives are ignored here.)

TAP Version 13
not ok 1 Resolve address
  ---
  message: "Failed with error 'hostname peebles.example.com not found'"
  severity: fail
  data:
    got:
      hostname: 'peebles.example.com'
      address: ~
    expected:
      hostname: 'peebles.example.com'
      address: '85.193.201.85'
  ...
1..1
{"ok":false,"expected":"Resolve address","actual":"message: \"Failed with error 'hostname peebles.example.com not found'\"\nseverity: fail\ndata:\n  got:\n    hostname: peebles.example.com\n    address: null\n  expected:\n    hostname: peebles.example.com\n    address: 85.193.201.85\n"}

A TAP plan given ahead of time becomes a set of tapson planned tests. (The output is representative. The ids are random but match the test results.)

TAP version 13
1..3
ok 1
ok 2
ok 3
{"id":"2654782ca1d79720181551c031c7ed3f3e157634"}
{"id":"314cf30f5c39abb4798bbbf30327be092bd765bc"}
{"id":"a010bf964ecb2709bd1c996630c65b28dff1e99d"}
{"id":"2654782ca1d79720181551c031c7ed3f3e157634","ok":true}
{"id":"314cf30f5c39abb4798bbbf30327be092bd765bc","ok":true}
{"id":"a010bf964ecb2709bd1c996630c65b28dff1e99d","ok":true}