unstale

npm / barcode-detector

barcode-detector

What changed in barcode-detector 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-24.

4 breaking2 deprecations6 new APIs and options1 performance1 behavior and defaults5 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

barcode-detector 319 changes

Breaking changes 4

  • Detection results now distinguish DataBar and Code 39 sub-variants; code matching exact format values may need to account for the more specific names.

    3.1.0release notes

  • BarcodeDetector is no longer a subclass of EventTarget, so it no longer provides the event-target behavior previously used for customized event handling.

    3.0.0release notes

  • EAN-2/5 add-on symbols are now ignored, aligning behavior with native barcode detectors in Chromium and Safari on macOS.

    3.0.0release notes

  • With the zxing-wasm v2 dependency, prepareZXingModule replaces setZXingModuleOverrides; consult zxing-wasm's README for instructions on the new APIs.

    3.0.0release notes

Deprecations 2

  • The subpath export previously named side-effects is now named polyfill; the old export is deprecated and no longer recommended.

    3.0.0release notes

  • The subpath export previously named pure is now named ponyfill; the old export is deprecated and no longer recommended.

    3.0.0release notes

New APIs and options 6

  • Adds micro_pdf417 as a supported barcode format.

    3.2.0release notes

  • Adds telepen as a supported barcode format.

    3.2.0release notes

  • Adds telepen_alpha as a supported barcode format.

    3.2.0release notes

  • Adds telepen_numeric as a supported barcode format.

    3.2.0release notes

  • The formats option accepts additional format names, including sub-variants and input hints that may filter detection to the appropriate symbology family.

    3.1.0release notes

  • The formats option accepts three shorthand meta formats for selecting GS1-compatible, retail, or industrial barcode formats.

    3.1.0release notes

Performance 1

  • Detection latency decreased by approximately 40–48% in benchmarked 720p/1080p scenarios on Chromium 156 (Apple M3 Pro).

    3.2.3release notes

Behavior and default changes 1

  • Upstream detector improvements may shift some barcodes’ cornerPoints by 1–2 px; rawValue is unchanged.

    3.1.3release notes

Fixes and other changes 5

  • Internally created ImageBitmap resources are released after Blob conversion, including when conversion fails.

    3.2.3release notes

  • Upstream detector crash fixes are included.

    3.1.3release notes

  • When WASM initialization fails, only a service unavailable DOM exception is thrown instead of unhandled errors.

    3.0.7release notes

  • Subpath export types are now compatible with TypeScript's moduleResolution: node strategy.

    3.0.0release notes

  • A zero-sized Blob image no longer throws an error, in keeping with the spec for zero-sized ImageBitmapSource inputs.

    3.0.0release notes