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

@harlan-zw/nuxt-github-sponsors

v0.1.4

Published

Experimental typed GitHub Sponsors data for Nuxt sites.

Downloads

2,825

Readme

npm version npm downloads License Nuxt

Nuxt GitHub Sponsors fetches your GitHub sponsors and hands them to your app as typed data. It ships no UI, so your sponsor page stays yours to design.

Status: experimental. APIs may change before the first release.

Features

  • 🔌 Route and composable: a public route plus useGitHubSponsors() for a typed response, paginated across every active sponsorship.
  • 🔒 Private sponsors filtered: only a minimal public DTO leaves the server.
  • 🏅 Tiers and overrides: assign tier keys by minimum monthly amount, and correct names, avatars, and links without patching GitHub.
  • 🔤 Tier keys typed from config: a page that reads a renamed tier fails to compile.
  • One-day SWR cache: only successful upstream results are cached.
  • 🎨 Headless by design: no sponsor UI, so your visual identity stays yours.

Installation

pnpm add @harlan-zw/nuxt-github-sponsors

[!TIP] Generate an Agent Skill for this package using skilld:

npx skilld add @harlan-zw/nuxt-github-sponsors
export default defineNuxtConfig({
  modules: ['@harlan-zw/nuxt-github-sponsors'],
  githubSponsors: {
    login: 'your-github-login',
  },
})

Set NUXT_GITHUB_SPONSORS_TOKEN. The token must be a classic token, because a fine-grained token cannot call the GitHub GraphQL API.

Options

| Option | Default | Meaning | | --- | --- | --- | | login | required | GitHub login to read sponsorships for. | | mode | 'prerender' | See Modes. | | route | '/api/github-sponsors' | Public route serving the response. | | tiers | top at $50, gold at $25 | Tier keys, by minimum monthly amount. | | overrides | {} | Corrections by sponsor login or name. | | tokenEnv | 'NUXT_GITHUB_SPONSORS_TOKEN' | Env name holding the token. |

Set tokenEnv when the default name is already taken:

export default defineNuxtConfig({
  githubSponsors: {
    login: 'your-github-login',
    tokenEnv: 'NUXT_GITHUB_AUTH_TOKEN',
  },
})

Modes

prerender bakes the route at build. It needs the token at build time. If the token is absent, the module warns and skips the prerender, so no empty sponsor list is baked into the deploy.

runtime serves the route from the server with a one-day SWR cache.

client skips server rendering. The page fetches after mount, so sponsors stay out of the rendered HTML and need no onMounted gate of your own.

Tier keys

The module types the tier keys from your configured tiers, so tiers.top is checked against your config. Renaming a tier turns a silently empty page into a compile error.

Usage

The module registers a public route and useGitHubSponsors. The server core fetches all active sponsorship pages, parses GitHub responses, filters private sponsors, projects a minimal public DTO, applies explicit profile overrides, and assigns configurable tiers.

There is no sponsor UI in this package. Each site keeps its own visual identity and calls useGitHubSponsors() for a typed response.

Failure states

The route always answers 200 with a tagged state. unavailable with reason not-configured means no token. unavailable with reason upstream-error carries an errorTag naming the upstream fault. Both states carry an empty collection, so a page renders and a prerender with failOnError still builds. Only a successful upstream result is cached. No secret is logged.

Override keys that match no sponsor are reported in a server warning, because a key with a typo would otherwise do nothing at all.

Sponsors

License

Licensed under the MIT license.