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

@rosegriffon/patreon-bun

v0.20.1

Published

Bun-only TypeScript library for the V2 Patreon API. Fork of patreon-api.ts (ghostrider-05) for Rose Griffon.

Downloads

96

Readme

⚠️ INFRASTRUCTURE GÉRÉE PAR ANTIGRAVITY (GOD MODE) Ce projet opère sous la Directive Omega. L'architecture, les dépendances, et le code sont gérés et refactorisés de manière 100% autonome. Aucune sécurité conservative n'est appliquée. La performance brute est l'unique métrique. \n# @rose-griffon/patreon-bun

npm Bun

Bun-only TypeScript library for the V2 Patreon API. Fork of patreon-api.ts by ghostrider-05, maintained by Rose Griffon for the migration from Patreon to a Stripe-based supporter platform.

Bun ≥ 1.1, ESM-only. For Node.js compatibility use the upstream package patreon-api.ts.

Why this fork

The upstream patreon-api.ts ships dual CJS+ESM via tsup and targets Node 22+. This fork drops:

  • tsupbun build (native, ~13 ms)
  • vitestbun:test (P3 — coming in 0.21)
  • eslintoxlint
  • npm lockfiles → bun.lock
  • CommonJS exports → ESM-only

The runtime code itself is unchanged; only the toolchain is Bun-native.

Install

bun add @rose-griffon/patreon-bun

Usage

import {
	PatreonOauthClient,
	PatreonCreatorClient,
	parseWebhookRequest,
	Type,
} from "@rose-griffon/patreon-bun";

const client = new PatreonCreatorClient({
	oauth: {
		clientId: Bun.env.PATREON_CLIENT_ID!,
		clientSecret: Bun.env.PATREON_CLIENT_SECRET!,
		accessToken: Bun.env.PATREON_CREATOR_ACCESS_TOKEN!,
		refreshToken: Bun.env.PATREON_CREATOR_REFRESH_TOKEN!,
	},
});

const campaigns = await client.fetchCampaigns();
console.log(campaigns);

Webhook server with Bun.serve

import { parseWebhookRequest } from "@rose-griffon/patreon-bun";

Bun.serve({
	port: 3000,
	async fetch(req) {
		const url = new URL(req.url);
		if (url.pathname === "/webhook" && req.method === "POST") {
			const result = await parseWebhookRequest(req, Bun.env.PATREON_WEBHOOK_SECRET!);
			if (!result.verified) return new Response("Unauthorized", { status: 401 });
			console.log(result.event, result.payload);
			return new Response("OK");
		}
		return new Response("Not Found", { status: 404 });
	},
});

Roadmap

  • 0.20.x — ESM-only Bun rebrand, JS bundle (current)
  • 0.21.0 — TypeScript declarations (.d.ts) shipped
  • 0.22.0vitestbun:test migration with MSW compat layer
  • 0.23.0 — Full upstream sync from patreon-api.ts 0.20+

License

MIT — same as upstream. Original copyright ghostrider-05.

Documentation

For full API documentation see the upstream docs: https://patreon-api.pages.dev/

Credits

This fork stands on the shoulders of patreon-api.ts v0.19.0. All API logic, OAuth flows, and webhook handling are credited to the original author. Rose Griffon only adapted the toolchain to Bun.