Major release. Every v2 audio fingerprint was prefixed with the literal string
"null"(#23) — fixing this means every fingerprint generated by v2 will differ in v3. Read the migration guide before upgrading if you persist fingerprints.
⚠️ Breaking changes
- Audio fingerprint output no longer prefixed with
"null"(#23). The accumulator was initialized tonulland used+=, so every v2 audio fingerprint started with the literal string"null"before the actual sum. Fingerprints will differ from v2. - Audio fingerprint module rewritten with per-call state (#22). Two overlapping calls in v2 raced on shared module-scoped mutables and could clobber each other's callbacks. v3 calls are independent.
binfield removed frompackage.json(#21) — pointed at a nonexistent script and used an invalid binary name (getDeviceId()).@ts-nocheckremoved fromEncryptDecrypt.tsand the audio module (#24). Internalcyrb53return type is nownumber(was lied about asstringviaas unknown as string).- Dead code removed (#25):
src/webRTC.js,src/code/FingerPrint.ts,murmurhash3_32_gc,javaHashCode. index.tsrewritten withasync/await(#26) — the unused Brave-specific code path was removed (both branches produced identical output).
✨ Added
optionsparameter forgetCurrentBrowserFingerPrint(#27):Throws when both signals are disabled.getCurrentBrowserFingerPrint({ useAudio: true, // include audio signal (default true) useCanvas: true, // include canvas signal (default true) seed: 0, // custom seed for cyrb53 (default 0) });
- Named exports for the building blocks (#28):
import { getCurrentBrowserFingerPrint, getCanvasFingerprint, isCanvasSupported, getAudioFingerprint, cyrb53, type BroprintOptions, } from '@rajesh896/broprint.js';
- Vitest test suite (#32) — 36 tests across cyrb53, canvas, audio, and integration. Includes regression guards for #22 and #23.
- Canvas fingerprint unit tests (#33).
- Audio fingerprint unit tests with concurrency + null-prefix regression guards (#34).
- Integration tests for
getCurrentBrowserFingerPrintcovering every option combination + fallback paths (#35). size-limitbudget of 2 KB brotli per format (esm, cjs, iife), enforced in CI (#37). Current sizes: 1.0–1.3 KB.- Codecov coverage reporting on PRs with an 80% target (#38).
- v2 → v3 migration guide at
MIGRATION.md(#40). - TypeDoc API reference generation via
npm run docs(#42). - Husky pre-commit hooks + lint-staged +
CONTRIBUTING.md(#30). - ESLint + Prettier + EditorConfig (#29).
🔧 Changed
- Package metadata:
"sideEffects": falsefor tree-shaking,engines.node: ">=18",prepublishOnlyscript, keyword cleanup (#31). - README rewritten (#39): factual fixes (no more "cryptographically strong" claim or
crypto-jsreference), new API reference, browser compatibility table, dynamic badges. - CI matrix expanded to Node 18, 20, 22 with type-check + format-check gates (#36).
📦 Install
npm install @rajesh896/broprint.js@3.0.0🚀 Migration
If you persist fingerprints in a database, read MIGRATION.md — every stored v2 fingerprint will not match the v3 output for the same device. The migration guide covers three strategies (dual-period match, age-out, version-tag).
🙏 Credits
This release closes 19 issues opened by the community since v2.2.1. Thanks to everyone who reported bugs, suggested features, and reviewed PRs.
Full Changelog: v2.2.1...v3.0.0