Skip to content

Fix: Use browser compatable Buffer #3057

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

Merged
merged 3 commits into from
Apr 17, 2025
Merged

Fix: Use browser compatable Buffer #3057

merged 3 commits into from
Apr 17, 2025

Conversation

dolanmiu
Copy link
Owner

Fixes #3056

@dolanmiu dolanmiu requested a review from Copilot April 17, 2025 22:53
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR ensures browser compatibility by replacing the Node.js Buffer with browser-friendly Uint8Array for encoding detection.

  • Replaces Buffer.from with new Uint8Array
  • Introduces a custom compareByteArrays function to compare byte arrays
Files not reviewed (1)
  • package.json: Language not supported

Copy link

codecov bot commented Apr 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (fe7a75b) to head (fd2c3ac).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #3057   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          291       291           
  Lines         8823      8834   +11     
  Branches      1426      1432    +6     
=========================================
+ Hits          8823      8834   +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dolanmiu dolanmiu merged commit 44ed2d6 into master Apr 17, 2025
10 checks passed
@dolanmiu dolanmiu deleted the fix/utf-16-fix branch April 17, 2025 23:02
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.

Usage of Buffer.from breaks browser support
1 participant