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

@lutzseverino/postern

v1.3.0

Published

Facts-only ports to code hosting platforms: issues, pull requests, releases and access.

Readme

Each of those four areas is a port, one stable interface for one concept, and each hosting platform sits behind its own adapter. Postern reports what the platform records and decides nothing: readiness, ordering, authorization and what a label means stay with your tool. GitHub is the only adapter so far.

Installation

npm install @lutzseverino/postern

The package has no runtime dependencies. Its runtime is one self-contained ESM file, dist/postern.mjs, which you can also copy into a project at an exact version.

Features

  • Detects the platform and repository path from a Git remote URL.
  • Reads issues with their labels, parent, sub-issues, blockers, edit and link times.
  • Normalizes issue webhook events into platform-neutral event facts without requests.
  • Reads label changes and comments, and writes labels, comments and issue state.
  • Lists repository labels and updates their names, colors and descriptions.
  • Reads pull requests, reviews, review threads and checks, and squash-merges against an expected head.
  • Lists releases and resolves tags to commits.
  • Reports the authenticated account and repository roles, and sends other API requests authenticated.
  • Reads every API page with access.requestPages and reports failures with their status and redacted platform message.

Usage

import { connect, PlatformError } from "@lutzseverino/postern";

const repository = connect("[email protected]:octo/hello.git", {
  credential: () => process.env.MY_TOOL_TOKEN,
});

try {
  const issue = await repository.issueTracker.issue(42);
  console.log(issue.title, issue.parent, issue.blockedBy);
} catch (error) {
  if (error instanceof PlatformError && error.reason === "rateLimited") {
    console.log("Try again at", error.retryAt);
  } else throw error;
}

connect takes a remote URL or a detectPlatform result. Any remote no adapter serves fails with reason unsupported.

Configuration

  • credential: a token, or a function returning one that Postern calls whenever it needs a token. Without it the connection is anonymous and public reads that the platform serves anonymously still work. Postern never reads environment variables, files or command-line tools for credentials, and no error or result contains a credential.
  • relationshipSections: { parent, blockedBy }, the body section names to read relationships from on a platform without native links. There is no default; without it, such a platform reports parent: null and blockedBy: []. GitHub's links are native, so the GitHub adapter never reads body sections.
  • fetch and timeoutMs: the fetch implementation to use, and the per-request timeout in whole milliseconds, from 1 to 2147483647 (30 seconds by default).

Ports

A connection exposes issueTracker, pullRequests, releaseSource and access. Each reports capabilities, its capability flags: an absent flag means the platform does not offer that feature. An operation that needs an absent flag fails with unsupported, and a field that needs one is null.

| Port | Flags | | --------------- | --------------------------------------------------------------------------------------------------- | | issueTracker | nativeParent, nativeBlockers, bodyEditTime, linkTime, subIssueLinkAdditions, botMarking | | pullRequests | closingReferences, reviewCommits | | releaseSource | drafts, prereleases | | access | none |

The GitHub adapter offers every flag. Roles, review states and check results use the platform's own words.

Errors

Every failure is a PlatformError whose reason is one of unauthenticated, forbidden, notFound, conflict, rejected, rateLimited (with retryAt when the platform states it), unavailable, invalidResponse or unsupported.

Scope

The ports cover a deliberate set of facts, listed in the API reference; Postern is not a general API client, and access.request reaches anything else on the platform's API. Releases follow SemVer: pin a major version, because a breaking port change is a new major.

Documentation

Documentation index

Contributing

Contribution guide

License

MIT License