Skip to content

v3.0.0

Latest

Choose a tag to compare

@Rajesh-Royal Rajesh-Royal released this 25 Apr 18:38

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 to null and 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.
  • bin field removed from package.json (#21) — pointed at a nonexistent script and used an invalid binary name (getDeviceId()).
  • @ts-nocheck removed from EncryptDecrypt.ts and the audio module (#24). Internal cyrb53 return type is now number (was lied about as string via as unknown as string).
  • Dead code removed (#25): src/webRTC.js, src/code/FingerPrint.ts, murmurhash3_32_gc, javaHashCode.
  • index.ts rewritten with async/await (#26) — the unused Brave-specific code path was removed (both branches produced identical output).

✨ Added

  • options parameter for getCurrentBrowserFingerPrint (#27):
    getCurrentBrowserFingerPrint({
      useAudio: true,    // include audio signal (default true)
      useCanvas: true,   // include canvas signal (default true)
      seed: 0,           // custom seed for cyrb53 (default 0)
    });
    Throws when both signals are disabled.
  • 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 getCurrentBrowserFingerPrint covering every option combination + fallback paths (#35).
  • size-limit budget 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": false for tree-shaking, engines.node: ">=18", prepublishOnly script, keyword cleanup (#31).
  • README rewritten (#39): factual fixes (no more "cryptographically strong" claim or crypto-js reference), 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