Skip to content
This repository was archived by the owner on Oct 9, 2026. It is now read-only.

Latest commit

 

History

History
 
 

diffr-ts

README.md

@dev.fast/diffr

TypeScript types, zod validators, and a binary fetcher for diffr's NDJSON protocol. The package version matches the diffr release.

import { decodeStructuralDiffEvent } from "@dev.fast/diffr";
const event = decodeStructuralDiffEvent(line);
npx --package @dev.fast/diffr@0.1.6 diffr-fetch --into ./bin --required

Supports macOS arm64, macOS x64, Linux arm64, Linux x64, and Windows x64 (diffr.exe). --check verifies an existing install without network access. Downloads warn on network failure unless --required; invalid hashes or archives always fail.

--full fetches the full edition, which adds the parsers lean builds omit (Apex, Fortran, F#, Haskell, Julia, OCaml, QML, Verilog, VHDL). It requires full-edition pins, which start with the next release.

Wire changes

Keep these files in sync:

Files (from repo root) Check
crates/diffr-core/src/protocol/mod.rs, crates/diffr-core/src/pairing.rs, diffr-ts/src/contract.ts Contract tests against the binary; Rust version check
docs/streaming.md Review against the wire format
tui/packages/hunk/src/diffr/wire.ts (v3 only) TUI fixture tests
Review's packages/review-protocol/package.json and packages/review/package.json Exact package version pins

Release

After tagging the matching Rust release and building with cargo build --locked, run from diffr-ts. New pins select the lean and full CLI-only release archives; older pins continue to use the combined archives:

bun install --frozen-lockfile
npm run pin
bun run typecheck && bun test
npm publish --access public