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

netlify-publisher

v1.0.0

Published

Zip a Playwright (or any static) HTML report and publish it to Netlify as a deploy, returning a shareable URL.

Readme

netlify-publisher

Zip a Playwright (or any static) HTML report and publish it to Netlify as a deploy, returning a shareable URL.

Each publish creates a new immutable deploy of your Netlify site, so every test run gets its own permanent link like https://<deploy-id>--<your-site>.netlify.app.

Requirements

Installation

npm install netlify-publisher

Usage

As a library

import { publishReport } from "netlify-publisher";

const deployUrl = await publishReport({
    siteId: "your-netlify-site-id", // or set NETLIFY_SITE_ID env variable
    token: "your-netlify-token", // or set NETLIFY_TOKEN env variable
    reportDir: "playwright-report", // or set REPORT_FOLDER env variable
    title: "smoke test report", // or set NETLIFY_TITLE env variable
});

console.log(deployUrl); // https://<deploy-id>--<your-site>.netlify.app

Note: publishReport() reads env variables directly from process.env — it does not load a .env file itself (only the CLI does that, via dotenv). If you're calling publishReport() from your own script and rely on a .env file, load it yourself first, e.g. import "dotenv/config"; at the top of that script.

In a Playwright custom reporter

import { publishReport } from "netlify-publisher";

class MyReporter {
    async onEnd(result) {
        if (process.env.POST_RESULTS) {
            const deployUrl = await publishReport();
            console.info(deployUrl);
        }
    }
}

export default MyReporter;

From the command line

npx netlify-publisher [reportDir]

The CLI loads a .env file automatically (via dotenv) and prints the deploy URL to stdout. reportDir can also be passed as npx netlify-publisher <reportDir>; otherwise the REPORT_FOLDER env variable is required.

Options

siteId, token, reportDir, and title are all required — pass each as an option or set its env variable fallback. There are no silent defaults for any of them; publishReport() throws immediately, listing every missing one together, if any are missing.

| Option | Env variable | Required | Description | | --------------- | ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------- | | siteId | NETLIFY_SITE_ID | Yes | Netlify site ID (Site settings → General → Site ID). | | token | NETLIFY_TOKEN | Yes | Netlify personal access token. | | reportDir | REPORT_FOLDER | Yes | Path to the report folder to publish. | | title | NETLIFY_TITLE | Yes | Deploy title shown in the Netlify deploys list. | | zipFolderName | — | No | Folder the report is nested under in the deployed site (e.g. report is served at /playwright-report/). Defaults to the report folder's own name. Pass false to serve the report from the site root (/index.html). |

Returns

publishReport() resolves with the deploy_ssl_url of the created deploy — a permanent HTTPS link to this specific version of the report.

License

MIT