Skip to content

Commit 6c6a4ee

Browse files
Version Packages (#148)
* chore(release): v3.0.0 * chore: update changelog format --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent cfee698 commit 6c6a4ee

File tree

3 files changed

+33
-34
lines changed

3 files changed

+33
-34
lines changed

Diff for: .changeset/dull-dogs-boil.md

-33
This file was deleted.

Diff for: CHANGELOG.md

+32
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
# barcode-detector
22

3+
## 3.0.0
4+
5+
Generally, this release bumped the [`zxing-wasm`](https://github.com/Sec-ant/zxing-wasm) dependency to [`v2`](https://github.com/Sec-ant/zxing-wasm/releases/tag/v2.0.1) and renamed the subpath exports to `ponyfill` and `polyfill` from `pure` and `side-effects`. Detailed changes are as follows:
6+
7+
### Breaking Changes
8+
9+
#### Renamed subpath exports
10+
11+
To avoid possible misunderstandings (we also use the term [`pure`](https://zxing-wasm.deno.dev/interfaces/full.ReaderOptions.html#ispure) 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.
12+
13+
#### No longer a subclass of `EventTarget`
14+
15+
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](https://github.com/Sec-ant/barcode-detector/issues/90) than it solves.
16+
17+
#### EAN-2/5 add-on symbols ignored
18+
19+
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.
20+
21+
#### `zxing-wasm` v2
22+
23+
The [`zxing-wasm`](https://github.com/Sec-ant/zxing-wasm) dependency was bumped to [`v2`](https://github.com/Sec-ant/zxing-wasm/releases/tag/v2.0.1). This release includes breaking changes itself. For example, `setZXingModuleOverrides` is replaced by `prepareZXingModule`. Please refer to [the README of `zxing-wasm`](https://github.com/Sec-ant/zxing-wasm?tab=readme-ov-file#configuring-wasm-serving) for detailed instructions on the new APIs.
24+
25+
### Bug Fixes
26+
27+
#### Zero-sized `Blob` image no longer throws error
28+
29+
Per [the spec](https://wicg.github.io/shape-detection-api/#image-sources-for-detection), zero-sized `ImageBitmapSource` shouldn't cause errors to be thrown. `Blob` is [one kind of the `ImageBitmapSource`](https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#images-2) and therefore should also comply with this rule. This is now fixed.
30+
31+
#### Fix TS `moduleResolution: node` subpath exports resolution
32+
33+
The subpath export types are now compatible with TypeScript's `moduleResolution: node` strategy by using the [types-versions-wildcards strategy](https://github.com/andrewbranch/example-subpath-exports-ts-compat/tree/main/examples/node_modules/types-versions-wildcards). This package now passes all the [`arethetypeswrong` checks](https://arethetypeswrong.github.io/?p=barcode-detector%403.0.0).
34+
335
## 2.3.1
436

537
### Patch Changes

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "barcode-detector",
33
"description": "A Barcode Detection API polyfill that uses ZXing webassembly under the hood",
44
"private": false,
5-
"version": "2.3.1",
5+
"version": "3.0.0",
66
"type": "module",
77
"files": [
88
"./dist"

0 commit comments

Comments
 (0)