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

@guardian/example-npm-publish

v0.0.6

Published

This repository is a reference example for publishing a package to NPM using GitHub Actions and [NPM's trusted publishers](https://docs.npmjs.com/trusted-publishers). It is intentionally minimal to demonstrate the process and avoid the complexities of too

Readme

@guardian/example-npm-publish

This repository is a reference example for publishing a package to NPM using GitHub Actions and NPM's trusted publishers. It is intentionally minimal to demonstrate the process and avoid the complexities of tooling such as TypeScript, Changesets, etc.

Want to try it? Update the version in package.json push and create a tag of format v0.0.X.

Observations

Creating a new package

Trusted publishing only works for existing packages. If you want to create a new package, it needs to be published manually first. As this is a one-off, we recommend doing this locally by:

  1. Get an NPM token from TBD.

  2. Make the NPM token available to the NPM CLI by creating an .npmrc file in your home directory:

    echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > ~/.npmrc

    This file uses the NPM_TOKEN environment variable. Set it to the token you got in step 1:

    export NPM_TOKEN=???
  3. Publish the package:

    npm publish --access public

    Your package should now be available on npmjs.com.

Setting up trusted publishing

With a package already available on npmjs.com, there are some manual steps to set up trusted publishing. This has to be done by one of the handful of restricted staff that can access the @guardian NPM organisation.

Below is a screenshot from https://www.npmjs.com/package/@guardian/example-npm-publish.

img

Within the repository, the following requirements exist:

  1. Use NPM version 11.5.1 or higher (if you are using Node version 24.5.0 or higher, this will already be the case)
  2. The name field in package.json must match the package name on npmjs.com (e.g. @guardian/example-npm-publish)
  3. The repository.url field in package.json must match GitHub repository (e.g. https://github.com/guardian/example-npm-publish)

Tested scenarios

When an older version of NPM is used

An HTTP 404 response is returned. For example:

npm error 404 Not Found - PUT https://registry.npmjs.org/@guardian%2fexample-npm-publish - Not found npm error 404 npm error 404 '@guardian/[email protected]' is not in this registry.

When the workflow filename doesn’t match the one set on npmjs.com

An HTTP 404 response is returned. For example:

npm error 404 Not Found - PUT https://registry.npmjs.org/@guardian%2fexample-npm-publish - Not found npm error 404 npm error 404 The requested resource '@guardian/[email protected]' could not be found or you do not have permission to access it.

[!NOTE] This also happens when using re-usable workflows 😔.

When repository.url is not set in package.json

An HTTP 422 response is returned. For example:

npm error 422 Unprocessable Entity - PUT https://registry.npmjs.org/@guardian%2fexample-npm-publish - Error verifying sigstore provenance bundle: Failed to validate repository information: package.json: "repository.url" is "", expected to match "https://github.com/guardian/example-npm-publish" from provenance

When the repository.url doesn’t match the one set on npmjs.com

An HTTP 404 response is returned. For example:

npm error code E404 npm error 404 Not Found - PUT https://registry.npmjs.org/@guardian%2fexample-npm-publish - Not found npm error 404 npm error 404 The requested resource '@guardian/[email protected]' could not be found or you do not have permission to access it.