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

@pumi-dev/sdk

v0.3.0

Published

Types and test tools for pumi plugins: `import … from "pumi"` outside the pumi repository.

Readme

@pumi-dev/sdk

Types and test tools for pumi plugins, so a plugin type-checks and tests outside the pumi repository. At run time the app gives a plugin its own pumi; this package is for tsc and bun test.

Install it under the name pumi:

"devDependencies": { "pumi": "npm:@pumi-dev/[email protected]", "@types/bun": "1.3.14", "typescript": "5.9.3" }

This version, 0.3.0, was built from pumi 0.45.0. The SDK's version is its own and moves when what a plugin can import changes; a plugin that uses something newer than the app it runs in gets an error from the app at run time, not from tsc.

// tsconfig.json
{
  "compilerOptions": {
    "target": "ESNext",
    "module": "Preserve",
    "moduleResolution": "bundler",
    "lib": ["ESNext"],
    "types": ["bun"],
    "jsx": "react-jsx",
    "jsxImportSource": "pumi",
    "strict": true,
    "noEmit": true,
    "allowImportingTsExtensions": true,
    "verbatimModuleSyntax": true,
    "skipLibCheck": true
  },
  "exclude": ["node_modules"]
}

| Import | What it is | | --- | --- | | pumi | the SDK's types: main.ts's and ui.tsx's | | pumi/theme | a UI theme's kit | | pumi/jsx-runtime, pumi/jsx-dev-runtime | React's JSX with the renderer's elements (div, text, terminal, …) | | pumi/testing | createTestRoot and TestRenderer: components drawn by the native test renderer |

pumi and pumi/theme hold no code. In a test each of their values is a stand-in: code that imports one loads, a call gives a rejected promise, and using what it returned throws. A test stands in for the app with mock.module("pumi", () => ({ … })) before importing what uses it.

react is a peer dependency at the app's version, so the plugin's code, the JSX and the test renderer share one React.

Testing components

import { mock, test, expect, describe } from "bun:test"
mock.module("pumi", () => ({ useTheme: () => ({ text: "#fff" }) }))
const { createTestRoot, hasNativeTestRenderer } = await import("pumi/testing")
const { Panel } = await import("../src/ui.tsx")

;(hasNativeTestRenderer ? describe : describe.skip)("the panel", () => {
  test("says hello", () => {
    const { render, renderer } = createTestRoot({ width: 400, height: 300 })
    render(<Panel />)
    expect(renderer.getAllText()).toContain("hello")
  })
})

The renderer is the app's native addon, which this package does not ship. pumi/testing loads the file PUMI_ADDON names, else the installed app's:

| | | | --- | --- | | macOS | /Applications/pumi.app/Contents/MacOS/pumi.darwin-<arch>.node (or ~/Applications/…) | | Linux | ~/.local/pumi.app/bin/pumi.linux-<arch>.node | | Windows | %LOCALAPPDATA%\Programs\pumi\pumi.app\bin\pumi.win32-x64.node |

A release build of the app has no test renderer, so with the installed app hasNativeTestRenderer is false and such tests skip. A debug build has it: bun run addon in a pumi checkout writes runtime/app/native/pumi.<platform>-<arch>.node; point PUMI_ADDON at it. Linux has no test renderer in any build.

Docs: https://pumi.dev/docs/