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: buffer expected throws in bun environment #320

Merged
merged 3 commits into from
Jan 12, 2025

Conversation

mertushka
Copy link
Contributor

@mertushka mertushka commented Jan 8, 2025

solves #318, help needed with formatting.

@bangonkali
Copy link

Only saw about this project just now. Awesome! looking forward to trying this out with bun as soon as bun related stuff are merged.

@murat-dogan
Copy link
Owner

Hello and thank you for the PR.

Do we need to construct a Uint8Array first? Can we use like that?

Buffer.from((ab))

And we need to also change here

sendMessageBinary(buffer: Uint8Array): boolean;

to Uint8Array=>Buffer|Uint8Array

@mertushka
Copy link
Contributor Author

Do we need to construct a Uint8Array first? Can we use like that?

You are right, we don't have to construct a Uint8Array. Buffer.from(data) is correct.
image

Can you make the rest of the commit? Because i'm not able to format the code with project's prettier configuration.

@murat-dogan
Copy link
Owner

Format is not a problem. I can handle it.

Could you please make the required changes before merging?

Then I can merge and fix the format.

@mertushka
Copy link
Contributor Author

Done.

@murat-dogan murat-dogan merged commit 6f7856e into murat-dogan:master Jan 12, 2025
@mertushka mertushka deleted the patch-1 branch January 12, 2025 10:11
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.

3 participants