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

@shipvo/runtime

v0.1.8

Published

The Shipvo native runtime: a tiny Expo module that verifies (Ed25519 + SHA-256), downloads (bsdiff patches), stages and applies signed over-the-air releases, with crash-loop rollback. Plus the config plugin that pins the trust root in the native shell.

Readme

@shipvo/runtime

The native half of Shipvo's over-the-air updates, as an Expo module.

  • Verifies every release pointer (Ed25519) and bundle (SHA-256 + size) against a public key built into the shell.
  • Downloads bsdiff patches when it has the previous release, full bundles otherwise; stages atomically.
  • On Android, a patch that would not fit in memory falls back to the full download; see Patches on small heaps.
  • Applies without restart, marks the release healthy when the app says so, and discards a release that fails to boot 3 times.
  • Android and iOS. iOS applies patches from the bundle it is running and downloads the full bundle otherwise. It is verified on the iOS Simulator in CI; in the web simulator the app runs the same release as the web build.
{ "expo": { "plugins": [["@shipvo/runtime", { "baseUrl": "https://<your control plane>", "publicKey": "<base64 Ed25519 public key>", "appId": "myshop" }]] } }

Optional plugin props declare what the shell can run, so the control plane can skip releases it cannot use:

{ "hermesBytecodeVersions": [96], "nativeModules": { "react-native-mmkv": "3.1.0" } }

They are written as Android meta-data dev.shipvo.HERMES_BYTECODE_VERSIONS (96) and dev.shipvo.NATIVE_MODULES ([email protected]), and as Info.plist keys ShipvoHermesBytecodeVersions and ShipvoNativeModules. Leave them out and nothing is written. A non-integer version or an empty package name fails the build. The runtime does not read them yet.

import { Runtime } from "@shipvo/runtime";
const s = Runtime.getState();            // running / pending / previous release, band, baseUrl, appId
await Runtime.checkForUpdate(true);      // verify, download (patch if possible), stage, apply
Runtime.markHealthy();                   // call once the first screen rendered

shipvo init wires all of this for you.

Patches on small heaps (Android)

A patch needs the base, the patch and the output in memory together. If the phone runs out of memory while applying one, or those three together are more than a share of the app's heap limit, the runtime downloads the full bundle instead. The update still installs and is verified the same way. patchError in the state reports out_of_memory or over_memory_budget, so you can see how often it happens.

Events

The runtime reports refused and reverted releases for you. Runtime.markHealthy() and every Runtime.checkForUpdate() drain the device's event queue and send each event to POST {baseUrl}/t, using baseUrl and appId from expo.extra.shipvo. A refusal found during a background check is reported in the same session, without a restart.

Forwarded events: crash_loop_revert, rolled_back, verify_failed, download_failed, hermes_bytecode_mismatch, native_module_missing, native_module_version. verify_failed, download_failed and hermes_bytecode_mismatch are reported under the failed release id. The native-module reasons arrive as pointer_rejected:<reason> and are reported under the reason name. Sending is best effort: a failed send never throws and never blocks.

import { reportRuntimeEvents, onRuntimeEvents } from "@shipvo/runtime";
reportRuntimeEvents();                       // drain and send now (markHealthy and checkForUpdate already do)
onRuntimeEvents((events) => console.log(events)); // see the drained strings, for a log

To turn the automatic report off, pass reportEvents: false to the config plugin (it lands in expo.extra.shipvo), and call reportRuntimeEvents() yourself. forwardRuntimeEvents(events, send) and FORWARDED_EVENTS are also exported for custom senders. If you call Runtime.consumeEvents() yourself, you take events away from the report.

The control plane accepts download_failed events.

Signed telemetry

Call enableSignedTelemetry once at startup. The install registers once, keeps a secret key in your storage, and then signs each report. If registration fails, reports go out unsigned and the next launch tries again.

import { enableSignedTelemetry } from "@shipvo/runtime";
import AsyncStorage from "@react-native-async-storage/async-storage";

await enableSignedTelemetry({
  storage: AsyncStorage,
  registerUrl: "https://cp.example.com/t/register",
  // crypto: { randomBytes, hmacSha256 }  // React Native has no crypto.subtle, so pass your own
});

The sent body is the unsigned JSON with its closing } replaced by ,"sig":"<hex>"}. The HMAC-SHA256 covers the unsigned JSON, closing } included. A second call replaces the first identity.

Background loads

A silent push or a background task can start the app process with no screen. Shipvo runs the same bundle for that load, so background code uses the staged release. It does not count the load as a boot until the app can show a screen: on Android, a load counts at once when the process is in the foreground or visible while the bundle is chosen, and otherwise when the first activity is created or started; on iOS, a load counts at once unless the app is in the background, and otherwise when the app becomes active. Any number of background loads leave a release's trial boots at 0 and the release pending. The first load that shows a screen counts as boot 1.

Runtime.markHealthy() called in a background load (a headless task, or at module init) does not count the load, promote the release or start the stability timer. A background load that ends before a screen shows leaves the counters unchanged. Call it again when the first screen renders.

An uncaught JS error in a background load counts as one failed boot at once (the error hook is installed when @shipvo/runtime loads), so a release that crashes there is still rolled back. Three loads with a screen and no markHealthy still revert the release.

Crash after markHealthy

markHealthy means the first screen rendered. It promotes a staged release, but it does not clear the unhealthy-boot count. The count is cleared when the app has stayed in the foreground for 30 seconds, or when it goes to background. If the process dies before that, the next launch counts as an unhealthy boot for that release. After 3 unhealthy boots inside 60 seconds the runtime blocks the release, goes back to the previous one and records crash_loop_revert.

A good release that you open and kill in the foreground within 30 seconds, 4 times in 60 seconds, is reverted too. This is rare.

Reverting does not undo changes the bad release made to app storage (files, databases, keychain, preferences). Write migrations so an older release can read newer data.