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

@wtf/release-github

v1.3.0

Published

GitHub as the forge of a release, a Forge of @wtf/release/forge, of no release tool, by the platform and the token its caller gives it: the platform and the token it takes (.), the run of a workflow of GitHub Actions, of its variables, and the headers of

Readme

@wtf/release-github

GitHub as the forge of a release: where a repo lives, its registries, and the releases of its tags. An ecosystem says what a release published, a Released of @wtf/release/forge; this forge says where a package on GitHub Packages lives, and keeps a file of a package of no page as an asset of the release, so the GitHub release of the tag names each package it published. It is a library of no release tool: it asks GitHub by the fetch of the platform its caller gives it, and by the token its caller gives it, and reads no token of the environment. @wtf/semantic-release/github gives it the token and the options of a run of semantic-release.

The forge

githubForge of ./forge is a Forge of @wtf/release/forge:

  • runOf is the run of a workflow of GitHub Actions, of its variables: the page of the repository, GITHUB_SERVER_URL and GITHUB_REPOSITORY, and the API, GITHUB_API_URL. None outside a workflow.

  • pageOf gives the page of a package on GitHub, of the registry it was published to:

    | A package published to | Its page | | ------------------------------------------------ | -------------------------------------------------- | | npm of GitHub Packages, npm.pkg.github.com | the page of its version, of its scope as its owner | | Maven of GitHub Packages, maven.pkg.github.com | the page of its version, of its coordinates | | the container registry, ghcr.io (container) | the page of the version its tags hold | | nowhere, of a folder and a tag, as a Go module | its folder at its tag |

    GitHub lists a version a moment after it took it, so a package GitHub does not list at the version yet is asked again, about a minute in all. The registries of GitHub Enterprise Server are read too, of their hosts (npm.<host>, containers.<host>) and of their paths (<host>/_registry/npm).

  • upload keeps a file of a package of no page as an asset of the release of its tag, which is made already: of a release that has the asset already, as of a release run again, that one.

The token goes to the API of GitHub alone, as Authorization: Bearer. The packages of GitHub Packages are read by a token of read:packages, which the GITHUB_TOKEN of a workflow is of permissions: packages: read; the releases are written by one of contents: write.

The notes

A GitHub release has no links of its own, as a GitLab release has: its notes name each package in a section of their own, ### Packages, a link of each, after the notes of the release. notesWithPackages of ./notes gives the notes of a release with that section, and addPackagesToRelease changes the notes of a release made already.

import type { GitHubPlatform } from '@wtf/release-github'
import { releaseLinks } from '@wtf/release-github/links'
import { addPackagesToRelease } from '@wtf/release-github/notes'
import { headersOf } from '@wtf/release-github/run'

declare const platform: GitHubPlatform
declare const env: Record<string, string | undefined>

const run = {
  url: 'https://github.com/acme/core',
  api: 'https://api.github.com',
  project: 'acme/core'
}
const auth = { token: env['GITHUB_TOKEN'] }
const links = await releaseLinks(
  [
    {
      ecosystem: 'npm',
      name: '@acme/core',
      version: '1.2.0',
      registry: { url: 'https://npm.pkg.github.com', type: 'npm', name: '@acme/core' }
    }
  ],
  { run, tag: 'core-v1.2.0', platform, auth }
)
await addPackagesToRelease({
  fetch: platform.fetch,
  run,
  tag: 'core-v1.2.0',
  headers: headersOf(auth),
  links
})

The runs and the release of a tag

A tag can have no workflow run: GitHub starts no workflow of a tag pushed by the GITHUB_TOKEN of a workflow, and makes no push event of tags when more than three are pushed at once. ./runs finds the runs of a tag (findRuns), dispatches a run of a workflow of a tag that has none (dispatchRun, by POST /repos/:owner/:repo/actions/workflows/:file/dispatches of the tag as its ref), ensures one, after a second look at a tag that has none, as GitHub makes the run of a push some seconds after it (ensureRun), and waits for one until it completes (waitForRun). GitHub runs the workflow as it is at the tag, and refuses the dispatch, with 422, of a workflow of no on: workflow_dispatch there. ./releases reads the GitHub release of a tag (findRelease), its notes and its assets. The bin release-github runs them.

| Export | What it is | | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | @wtf/release-github | The types: GitHubPlatform, the platform GitHub is asked by, of its fetch (HttpFetch), and GitHubAuth, the token of a run | | @wtf/release-github/run | githubRunOf, the run of a workflow; githubReleasePageOf, githubCommitPageOf, the pages of a release and a commit; apiOf, the API of a server; headersOf, of a token | | @wtf/release-github/trust | githubPublisherOf, the workflow npm trusts to publish, of GITHUB_REPOSITORY or the remote of github.com and its workflow file; githubRepositoryOf, githubRepositoryOfRemote, githubWorkflowOf | | @wtf/release-github/packages | githubPackageOf, the package of GitHub Packages of a registry, and findPackageVersion, the page of its version | | @wtf/release-github/assets | releaseOfTag, the release of a tag; uploadAsset, a file uploaded as its asset; assetUrlOf, where GitHub serves one | | @wtf/release-github/notes | packagesSection and notesWithPackages, the notes of a release with its packages; addPackagesToRelease, of one made | | @wtf/release-github/forge | githubForge, GitHub as a Forge of @wtf/release/forge | | @wtf/release-github/runs | findRuns, the workflow runs of a tag; dispatchRun, a run of a workflow dispatched of a tag; ensureRun, one dispatched of a tag that has none, after a second look; waitForRun, one waited for until it completes | | @wtf/release-github/releases | findRelease, the GitHub release of a tag, its notes and its assets | | @wtf/release-github/links | releaseLinks, the link of each package from the GitHub release of the tag | | @wtf/release-github/errors | GitHubError and GITHUB_ERRORS: EGITHUB, EGITHUBPACKAGE, EGITHUBRELEASE, EGITHUBDISPATCH, a run GitHub dispatches not, and EGITHUBTIMEOUT, a run that has not completed in the time waited |

License

MIT