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

@minsky-org/adapter-seam

v0.2.0

Published

One fail-closed policy for every "real adapter or in-memory fake" seam. Zero runtime dependencies.

Readme

@minsky-org/adapter-seam

One fail-closed policy for every "real adapter or in-memory fake" seam. Zero runtime dependencies.

  • creds present, use the real adapter
  • creds absent in production, throw (a silent fake in prod is a data-loss bug)
  • creds absent elsewhere, warn once per seam and use the fake
import { resolveAdapter } from "@minsky-org/adapter-seam";

export const getSearch = () =>
  resolveAdapter({
    seam: "search",
    credsPresent: Boolean(env.MEILI_URL),
    isProduction: env.NODE_ENV === "production",
    real: () => createMeiliSearch(),
    fake: () => createFakeSearch(),
  });

Resolve lazily at first use, never at module load, so a fake never gets baked in before the env is read.

Why production is a parameter

isProduction is a required field on the args object. The package never reads process.env.NODE_ENV itself. Three reasons:

  • it matches the org stack law that parseEnv always takes its input explicitly, so every env read in a codebase happens in one place
  • it makes the function testable without mutating the global environment, so tests do not leak state into each other
  • it keeps the production decision visible at the call site, so a reader knows which branch runs without coming here to find out

This module is server-side by nature. It resolves adapters that hold credentials, and credentials never belong in a browser bundle. process.emitWarning below is a node API, so none of the above is a claim that the module is browser-safe.

Warnings

The dev-mode warning goes through process.emitWarning(message, "AdapterFallback"), not console.warn. A consumer can filter the named warning off the process warning event instead of scraping stdout.

Test seam

resetAdapterWarnings() clears the module-global warned-seam set. Call it in a test teardown so warn-once behaviour can be asserted without depending on test order.

import { resetAdapterWarnings } from "@minsky-org/adapter-seam";

afterEach(() => {
  resetAdapterWarnings();
});

Breaking change in 0.2.0

isProduction is now required. A 0.1.x call site adds the field and drops any NODE_ENV juggling around the call.