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

@rebuy/rebuy

v3.4.0

Published

Shared zod schemas, legacy-to-CAB widget transforms, and server orchestrators for Rebuy's Shopify consumers (rebuy-api, admin-nextjs, rebuy-shopify-extensions)

Readme

@rebuy/rebuy

Shared zod schemas, legacy→CAB widget transforms, and server orchestrators for Rebuy's Shopify consumers — the library rebuy-api, admin-nextjs, and rebuy-shopify-extensions all build on.

Install

npm install @rebuy/rebuy zod

zod ^4.4.3 is a peer dependency: consumers install their own copy so every package in a tree composes and instanceof-checks against ONE zod instance. Yarn v1 workspaces do not auto-install peers — declare zod explicitly there. react-hook-form is an optional peer, needed only by form-layer consumers that use the SectionArrayPath/SectionPrefixPath types against their own forms (type-only — nothing is bundled).

Node ^22.14.0 || ^24.10.0 || ^26.0.0 for development; the published artifacts are plain ES2020 (ESM .mjs + CJS .cjs).

Entry points

| Subpath | Contents | | --- | --- | | @rebuy/rebuy | Root barrel: schemas, client helpers, utilities | | @rebuy/rebuy/client | RebuyClient API client | | @rebuy/rebuy/gwp | Gift-with-purchase validation helpers | | @rebuy/rebuy/pricing | Variant pricing/discount forecast (priceVariant, currencyDecimals) | | @rebuy/rebuy/routes | apiRoutes + the UPSTREAM_SUFFIXES upstream-host allowlist | | @rebuy/rebuy/schema/checkout-and-beyond | The CAB section-tree schema (CABRootSection et al.) | | @rebuy/rebuy/schema/checkout-and-beyond/constants | CAB enums/constants (SectionType, ButtonField, …) | | @rebuy/rebuy/schema/shop-config | ShopConfig schema | | @rebuy/rebuy/schema/user-config | UserConfig schema | | @rebuy/rebuy/schema/widget-data | WidgetData schema | | @rebuy/rebuy/server | Server orchestrators for rebuy-api's /cab/* routes (settings→tree conversion, data sources, gifts, analytics) + request schemas | | @rebuy/rebuy/transforms | Legacy v1 widget → CAB tree converters | | @rebuy/rebuy/utilities | Misc utilities (getIdFromGraphUrl, stripHtml, uuid, …) |

Every type derives from a zod schema via z.infer — defaults live in the schema (.default() at parse time), never in consumer render code.

Development

npm run lint            # eslint + prettier (a misformat is a lint error)
npm run test:coverage   # vitest, 100% thresholds over the coverage allowlist
npm run check-types     # tsc --noEmit
npm run build           # types + esbuild bundles + check:dist smoke test

After any dependency change, regenerate the lockfile with the pinned npm 10 (npm run lock && npm run lock:verify) — never with npm 11. Versions are cut by semantic-release from ESLint-convention commits (Fix:, Update:, New:, Breaking:, …); never hand-bump version. See AGENTS.md for the full contributor contract.