Skip to content

Commit 614697b

Browse files
committed
Use zxing-wasm polyfill even if native barcode detector API is available as the polyfill is sometimes better than the native on
See discussion #808 for more infos
1 parent 6bdf3d8 commit 614697b

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

assets/js/app.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,11 @@ import {
5151
setZXingModuleOverrides,
5252
} from "barcode-detector/pure";
5353
import wasmFile from "../../node_modules/zxing-wasm/dist/reader/zxing_reader.wasm";
54-
5554
setZXingModuleOverrides({
5655
locateFile: (path, prefix) => {
5756
if (path.endsWith(".wasm")) {
5857
return wasmFile;
5958
}
6059
return prefix + path;
6160
},
62-
});
63-
//Enable polyfill for the barcode detector. The WASM triggering is done when the barcode detector is used
64-
import "barcode-detector/side-effects";
61+
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"@ckeditor/ckeditor5-watchdog": "^44.0.0",
6767
"@ckeditor/ckeditor5-word-count": "^44.0.0",
6868
"@jbtronics/bs-treeview": "^1.0.1",
69-
"@part-db/html5-qrcode": "^3.0.0",
69+
"@part-db/html5-qrcode": "^3.1.0",
7070
"@zxcvbn-ts/core": "^3.0.2",
7171
"@zxcvbn-ts/language-common": "^3.0.3",
7272
"@zxcvbn-ts/language-de": "^3.0.1",

yarn.lock

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1874,10 +1874,12 @@
18741874
resolved "https://registry.yarnpkg.com/@orchidjs/unicode-variants/-/unicode-variants-1.1.2.tgz#1fd71791a67fdd1591ebe0dcaadd3964537a824e"
18751875
integrity sha512-5DobW1CHgnBROOEpFlEXytED5OosEWESFvg/VYmH0143oXcijYTprRYJTs+55HzGM4IqxiLFSuqEzu9mPNwVsA==
18761876

1877-
"@part-db/html5-qrcode@^3.0.0":
1878-
version "3.0.1"
1879-
resolved "https://registry.yarnpkg.com/@part-db/html5-qrcode/-/html5-qrcode-3.0.1.tgz#3eafb7b4cb24eab8a4b815800756814f1d10c8bb"
1880-
integrity sha512-NAbXfrW7pEyK3+ZkL14+pHHq3vjBPn7WWvd82OG0BHbiZ5P3XHJnx33WBUaoUAt2pRRAFYVwQNw8OyNUSE8aeg==
1877+
"@part-db/html5-qrcode@^3.1.0":
1878+
version "3.1.1"
1879+
resolved "https://registry.yarnpkg.com/@part-db/html5-qrcode/-/html5-qrcode-3.1.1.tgz#96bf5e57796f3ec72ee6191ac7b8604298c98dfa"
1880+
integrity sha512-6lH77mvu9ClwIfKHWSOW1+jz+SkCJnbm/8XTuzqlcUWUIW8NRHC5x1wU7svV4gtoirqvBlQvaz1MaopVmfOAqQ==
1881+
dependencies:
1882+
barcode-detector "^2.3.1"
18811883

18821884
"@polka/url@^1.0.0-next.24":
18831885
version "1.0.0-next.28"
@@ -3697,9 +3699,9 @@ fast-json-stable-stringify@^2.0.0:
36973699
integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
36983700

36993701
fast-uri@^3.0.1:
3700-
version "3.0.3"
3701-
resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.3.tgz#892a1c91802d5d7860de728f18608a0573142241"
3702-
integrity sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==
3702+
version "3.0.4"
3703+
resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.4.tgz#bf2973f18465da231ef4b1e43a188c3bf580cf98"
3704+
integrity sha512-G3iTQw1DizJQ5eEqj1CbFCWhq+pzum7qepkxU7rS1FGZDqjYKcrguo9XDRbV7EgPnn8CgaPigTq+NEjyioeYZQ==
37033705

37043706
[email protected], fastest-levenshtein@^1.0.12, fastest-levenshtein@^1.0.16:
37053707
version "1.0.16"

0 commit comments

Comments
 (0)