Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency zxing-wasm to v2 - autoclosed #143

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 5, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
zxing-wasm 1.3.4 -> 2.0.1 age adoption passing confidence

Release Notes

Sec-ant/zxing-wasm (zxing-wasm)

v2.0.1

Compare Source

Patch Changes
  • 6321b02: Add ZXING_CPP_COMMIT export.

v2.0.0

Compare Source

This release introduces a major refactoring of the underlying Embind APIs and read / write functions. Key changes include a new set of default reader options, enhanced writer capabilities backed by zint, and updated APIs for reading and writing barcodes. These changes break backward compatibility, so we are upgrading to the next major version.

Breaking Changes
Consolidated Reader Function

readBarcodes(...) replaces both readBarcodesFromImageFile(...) and readBarcodesFromImageData(...). The new function can accept either a Blob or an ImageData as its input.

[!NOTE]

The v1 reader functions readBarcodesFromImageFile and readBarcodesFromImageData are still kept for a smooth migration experience, but marked as deprecated.

Updated Reader Options

A few reader options have changed their default values. This change is to align with the latest ZXing C++ library and provide a more consistent experience across different platforms:

  1. tryCode39ExtendedMode is now true by default. It was previously false.
  2. eanAddOnSymbol is now "Ignore" by default. It was previously "Read".
  3. textMode is now "HRI" by default. It was previously "Plain".

Some deprecated options have been removed, see zxing-cpp#704 for more details:

  1. validateCode39CheckSum is now removed. The Code39 symbol has a valid checksum if the third character of the symbologyIdentifier is an odd digit.
  2. validateITFCheckSum is now removed. The ITF symbol has a valid checksum if the third character of the symbologyIdentifier is a '1'.
  3. returnCodabarStartEnd is now removed. The detected results of Codabar symbols now always include the start and end characters.
eccLevel in Read Result Renamed to ecLevel

In ReadResult, the eccLevel field has been renamed to ecLevel. It now holds strings like "L", "M", "Q", or "H" or stringified numeric percentage values for error correction levels. An empty string indicates that the error correction level is not applicable.

[!NOTE]

The eccLevel field is still kept for a smooth migration experience, but marked as deprecated.

Renamed & Enhanced Writer Function

writeBarcode(...) replaces writeBarcodeToImageFile(...). This function is now powered by the new zint backend which supports all available formats that are currently supported by the reader. It accepts either a string text or an Uint8Array binary data as its input for barcode generation, and provides new output formats (e.g. SVG, UTF-8) in addition to an image file blob.

The WriterOptions object has also been updated completely.

[!NOTE]

The final shape of the writeBarcode function is still in review. The current implementation is subject to change.

.wasm Module Initialization / Caching Overhaul

prepareZXingModule(...) replaces both setZXingModuleOverrides(...) and getZXingModuleOverrides(...). The new function provides a more flexible way to initialize the ZXing module with custom options.

[!NOTE]

The v1 module initialization functions setZXingModuleOverrides and getZXingModuleOverrides are still kept for a smooth migration experience, but marked as deprecated.

purgeZXingModule now only clears the relevant module cache from where it is imported. It no longer resets the global module cache.

Redefined BarcodeFormat-Family Types

None is removed from the BarcodeFormat union type. New types like LinearBarcodeFormat, MatrixBarcodeFormat and LooseBarcodeFormat are introduced. See barcodeFormat.ts for more details.

New Features & Enhancements
More Barcode Formats Supported in Writer

The new writeBarcode function supports more barcode formats than the previous writeBarcodeToImageFile. All barcode formats supported by the reader are now supported by the writer.

New tryDenoise Option for Reading Barcodes

The new tryDenoise option in ReaderOptions allows you to enable or disable the denoising algorithm when reading barcodes. This is an experimental feature. By default, it is set to false.

Bug Fixes
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.

v1.3.5

Compare Source

Patch Changes
  • 2bcfd4b: Bump zxing-cpp to 0dfa36b to fix DataBarExpanded decoder error and ITF quiet zone detection heuristic

Configuration

📅 Schedule: Branch creation - "before 9am on monday" in timezone Asia/Shanghai, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link

changeset-bot bot commented Jan 5, 2025

⚠️ No Changeset found

Latest commit: e91283c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

coderabbitai bot commented Jan 5, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@renovate renovate bot force-pushed the renovate/zxing-wasm-2.x branch from 0ceac59 to e91283c Compare January 23, 2025 20:27
@renovate renovate bot changed the title fix(deps): update dependency zxing-wasm to v2 fix(deps): update dependency zxing-wasm to v2 - autoclosed Jan 29, 2025
@renovate renovate bot closed this Jan 29, 2025
@renovate renovate bot deleted the renovate/zxing-wasm-2.x branch January 29, 2025 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants