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

@mimlet/protobuf

v0.1.0-beta.8

Published

Lossless native Protobuf fixture generation, verification and binary codecs with offline schema resolution.

Readme

Native Protobuf fixtures

protobufAdapter(protoTextOrReflectionJSON, messageName, options) creates fixtures and binary codecs using the pinned [email protected]. fromProtobuf returns the shared immutable schema builder. No filesystem import, URL fetch, RPC, or network operation is performed. Imports, including well-known types, are explicit virtual files supplied through imports; relative traversal cannot escape that virtual root. imports keys are paths resolved against the importing file. A missing import fails with a message that names the key to add and the file that imports it, for example add "logistics/hub.proto" to imports (imported by "schema.proto"). Reflection JSON must already contain its referenced definitions.

const messages = protobufAdapter(
  'syntax="proto3"; message Event { optional uint64 id=1; bytes payload=2; }',
  'Event'
);
const event = messages.builder().with({ id: 18446744073709551615n }).buildValidated();
const decoded = messages.decode(messages.encode(event));

Canonical fixture values use bigint for every 64-bit integer, numeric enum values, Uint8Array for bytes, and plain own-property records. Decimal strings, unsafe numbers, native Long objects, enum names, and base64 strings are not silently coerced. Map keys use canonical decimal strings or true/false where appropriate. Native verification follows our bounded structural/range checks before native conversion, so a closed enum cannot be silently replaced by its default.

create, check, issues, clone, normalize, encode, decode, standard, session, and builder form the adapter interface. Runtime schema documents do not prove an application type: message objects remain Record<string, unknown>. Validation returns a normalized value; ordinary builder builds remain unchecked. Float32 values are deliberately rounded to their wire precision, while overflow is rejected. IEEE NaN/infinities are valid binary floating-point values. Malformed Unicode strings are rejected rather than replaced during UTF-8 encoding.

Presence and defaults are distinct. Implicit scalar defaults disappear during normalization; explicit optional and oneof default-valued fields remain present. Repeated/map fields have no presence distinction. Proto2 required/default fields, open/closed enums, and editions 2023/2024/2026 presence behavior have native round-trip tests. Unknown wire fields are deliberately discarded by a per-reader setting; unknown fixture fields are rejected. No process-global native settings are changed.

Profiles are minimal (required fields only), random, boundary, and declared defaults. Lists/maps have a configured bounded length. Recursive optional messages terminate; required recursion exceeding the budget fails. Sessions preserve deterministic field streams for the same schema/options/provider version. A session-less build starts from the adapter's seed-1 session(); a name option gives a builder its own session-less values. Metadata exposes field numbers, presence, oneofs and service method types/streaming flags without creating an RPC client. Field names are preserved by default; keepCase: false opts into native camelCase naming.

Budgets bound schema text, imports, decoded/generated structure, repeated values, strings and buffers. Encoded input size is checked before decoding and encoded output size is checked before returning. Native decoding has its own recursion limit; the public budget is not an exact internal allocation bound or an OS sandbox. Use isolated execution for hostile binary/schema processing. Error paths do not echo fixture values; schema/decoding errors preserve causes for explicit diagnostics.

The returned identity, create, issues, and clone capabilities can be used as a native AsyncAPI schema-format bridge; payloads do not need to pass through JSON. The compatibility suite uses actual package tarballs, native wire round trips, strict public declaration checks, and per-package coverage gates.