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

Feat: Native support in browser and NodeJS #64

Merged
merged 9 commits into from
Apr 20, 2023
Merged

Feat: Native support in browser and NodeJS #64

merged 9 commits into from
Apr 20, 2023

Conversation

Akxe
Copy link
Contributor

@Akxe Akxe commented Apr 19, 2023

The browser tests are broken; not sure why (argos-ci/jest-puppeteer#551)

I made multiple changes:

  • Removed InlineWorker library, it is deprecated, and it was broken in 2 ways
  • I have made changes to the readBlock function
    • I unified the worker and normal into a single body
    • I remade the function to use streams which should be more performant and can be cancelled natively
      • The error of reading more than 100 will now be gone for good
    • Both worker and the normal call return a terminate function that will cancel the reading
  • I have moved the code from Buffer, which is not natively present in browsers, to UInt8Array, which is on both platforms
    • Should also provide support for Deno, but I ain't testing that and don't want to... 😄
    • I will move to the gopro-telemetry next to so that it will nicely support the UInt8Array too, but for quickly looking inside, it might be compatible even as is.

DO NOT MERGE (yet)

I will fix the test before and do some cleanup depending on how the testing goes.

Feel free to look through the code for the changes. There is more than anticipated.

@Akxe
Copy link
Contributor Author

Akxe commented Apr 20, 2023

@JuanIrache Did you see it yet?

@JuanIrache
Copy link
Owner

@JuanIrache Did you see it yet?

Not yet. I should find the time for this later today or tomorrow

@Akxe Akxe marked this pull request as ready for review April 20, 2023 16:28
@JuanIrache JuanIrache merged commit 1bd1d95 into JuanIrache:dev Apr 20, 2023
@JuanIrache
Copy link
Owner

Thanks. Great job!

@Akxe Akxe deleted the dev branch April 20, 2023 21:14
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.

2 participants