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

npm-package-release

v0.6.0

Published

Composable, strongly typed npm release workflows with class-based steps and GitHub Actions interfaces.

Readme

npm Package Release

npm Test Lint Package Coverage Status

Release your npm package from GitHub Actions without maintaining custom release scripts or storing an npm publish token.

Implements Releases as Code for JavaScript packages: a GitHub Actions workflow tests and lints your package, publishes it to npm, optionally updates the changelog, creates a Git tag and GitHub Release, and prepares the next version. Workflows are composed from strongly typed classes. Similar projects: rust-crate-release and ruby-gem-release.

Installation

Requires Node.js 22.14+ and npm 11.5.1+; the release workflow defaults to Node.js 26 and npm 12.

npm install --save-dev --save-exact [email protected]

The CLI is npr; do not install the unrelated npm package named npr.

Usage

1. Configure Your Package

Create npr.config.js (npr.config.mjs in CommonJS projects, and set the workflow's config input to match):

import { KeepAChangelog, ReleaseWorkflow } from "npm-package-release";

export default new ReleaseWorkflow({
  changelog: new KeepAChangelog(),
});

Your package needs a numeric version, a GitHub repository URL, and a CHANGELOG.md with real notes under ## [Unreleased]. KeepAChangelog is the default when omitted. By default, validation runs npm test and npm run lint.

2. Add the Release Workflow

Add .github/workflows/release.yml (see the caller example):

name: Release

on:
  workflow_dispatch:
    inputs:
      version:
        description: Optional numeric release version.
        type: string
        required: false

permissions:
  contents: write
  id-token: write

jobs:
  release:
    uses: dblock/npm-package-release/.github/workflows/[email protected]
    with:
      version: ${{ inputs.version }}

Merge it and the locked development dependency into your default branch. Always upgrade the package and the pinned workflow together. Branch rules must let the workflow push release commits and tags; see Configure GitHub.

3. Enable Trusted Publishing

The workflow publishes with an npm trusted publisher, so you need no npm token or NODE_AUTH_TOKEN. GitHub creates the release environment on the first run. A new publisher expires unless it publishes within two days, so do this when you are ready to release. npm prompts for 2FA in your terminal or browser.

For a new npm package, npm needs the name to exist first. npr bootstrap reserves it with an empty 0.0.0 placeholder and configures the publisher (npr reserve and npr trust run the steps separately):

npm exec --offline -- npr bootstrap --dry-run
npm login --registry=https://registry.npmjs.org
npm exec --offline -- npr bootstrap

Keep your first real version, such as 0.1.0, unpublished in package.json; the workflow publishes it.

For an existing npm package, configure the publisher:

npm exec --offline -- npr trust --dry-run
npm login --registry=https://registry.npmjs.org
npm exec --offline -- npr trust

Check that npm trust list shows your repository, release.yml, environment release, and direct publishing. Alternatively, on the npm website open your package's Settings → Trusted publishing and add a GitHub Actions publisher:

| Field | Value | | --- | --- | | Organization or user | Your GitHub owner. | | Repository | Your package's repository, not this tool's repository. | | Workflow filename | release.yml, the caller filename only. | | Environment name | release. | | Allowed actions | Direct npm publish, not stage-only. |

The npm publisher does not check branches. Optionally restrict the release environment to your default branch.

4. Make a Release

Review your changes, run tests, and dispatch from your default branch:

gh workflow run release.yml

This publishes the checked-in version and prepares the next patch version; pass -f version=0.2.0 to choose another version. Verify the run summary, the registry version and checksums, and the GitHub Release. Inspect recovery artifacts before retrying a failed run.

For a new package, deprecate the 0.0.0 placeholder after the first release if npr reserve could not.

Documentation

Contributing

See CONTRIBUTING.md, DESIGN.md, CHANGELOG.md, RELEASING.md, UPGRADING.md, AGENTS.md, and the documentation above.

License

Distributed under the MIT License.