Releases: Sec-ant/barcode-detector
v3.0.0
Generally, this release bumped the zxing-wasm
dependency to v2
and renamed the subpath exports to ponyfill
and polyfill
from pure
and side-effects
. Detailed changes are as follows:
Breaking Changes
Renamed subpath exports
To avoid possible misunderstandings (we also use the term pure
in zxing-wasm
), the pure
and side-effects
subpath exports were renamed to ponyfill
and polyfill
, respectively. The old subpath exports are considered deprecated and are no longer recommended for use.
No longer a subclass of EventTarget
The BarcodeDetector
class is no longer a subclass of EventTarget
. BarcodeDetector
wasn't designed to be an event target per the spec. This design was previously to allow for customized event handling. However, it causes more issues than it solves.
EAN-2/5 add-on symbols ignored
The EAN-2/5 add-on symbols were previously read if found. However, to align with the behavior of the native barcode detectors in Chromium and Safari on macOS, they are now ignored in this new version.
zxing-wasm
v2
The zxing-wasm
dependency was bumped to v2
. This release includes breaking changes itself. For example, setZXingModuleOverrides
is replaced by prepareZXingModule
. Please refer to the README of zxing-wasm
for detailed instructions on the new APIs.
Bug Fixes
Zero-sized Blob
image no longer throws error
Per the spec, zero-sized ImageBitmapSource
shouldn't cause errors to be thrown. Blob
is one kind of the ImageBitmapSource
and therefore should also comply with this rule. This is now fixed.
Fix TS moduleResolution: node
subpath exports resolution
The subpath export types are now compatible with TypeScript's moduleResolution: node
strategy by using the types-versions-wildcards strategy. This package now passes all the arethetypeswrong
checks.