The HotCodePush update-protocol client for JavaScript: the wire types, the evaluator, the signatures, the fingerprint recipe and the fixture suite behind every HotCodePush SDK.
The package is not on npm yet. Every commit is published to pkg.pr.new by CI, so install one by its commit SHA and bump it deliberately, never a branch:
npm install https://pkg.pr.new/hotcodepush-team/protocol/@hotcodepush/protocol@<sha>import {
ChannelIndexSchema,
evaluateChannelIndex,
} from '@hotcodepush/protocol';
const index = ChannelIndexSchema.parse(await response.json());
const { outcome, verdicts } = evaluateChannelIndex(index, deviceInfo);
// outcome: the release to take, or the reason not to; verdicts: every release explained@hotcodepush/protocol/catalog.json holds every value of the catalog, the statuses, reasons and strategies, for a reader outside TypeScript.
The package is the foundation of the HotCodePush SDKs, not their supported API: an app uses the SDK for its framework.
The Swift package HotCodePushCore and the Android library com.hotcodepush:core-android implement the same protocol, proven equal by this repo's fixtures.
See hotcodepush.com/docs.
nvm use
npm ci
npm run build # compiles src/ into dist/
npm test
npm run lint && npm run typecheck
npm run fmt # Prettier, run before every commitnpm run catalog writes catalog.json from src/results.ts; a test fails when the committed file is stale.
CLAUDE.md holds the layout and the rules.
See LICENSE.