Skip to content

Conversation

@EzraBrooks
Copy link
Collaborator

Public API Changes

64-bit integers will now properly be represented as BigInts.

Description

Closes #1095. I was hoping to leave this be, but it's being annoying while I'm testing pure-ESM use cases for roslibjs. At least it deletes a bunch of code and fixes the loss-of-precision issue we used to warn about when using CBOR.

@EzraBrooks EzraBrooks force-pushed the switch-from-cbor-js-to-cbor2 branch from 07b2ec5 to 1d6bfe4 Compare November 17, 2025 22:06
*/
private handleCborMessage(cbor: ArrayBuffer) {
const data: unknown = CBOR.decode(cbor, typedArrayTagger);
const data: unknown = decode(new Uint8Array(cbor));
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Uint8Arrays are views on ArrayBuffers, so this (thankfully) doesn't do any copying of potentially large data.

@drewhoener
Copy link
Contributor

drewhoener commented Nov 18, 2025

@EzraBrooks Feel free to pull from #926 for this if it'll make it easier, I had a commit in there to replace all the cbor stuff even though it didn't end up making it in.

19cc0d9

@EzraBrooks
Copy link
Collaborator Author

Thanks Drew! I think this is good to go already, I wished I'd remembered to look at where you'd done it

@EzraBrooks
Copy link
Collaborator Author

Hey @bjsowa @sea-bass could one of you take a look at this? I got a request internally to SoftServe to update the browser-based roslibjs examples (which I was going to wait on til after the release), and this and my following PR are causing compatibility issues

@EzraBrooks EzraBrooks merged commit 3a9f9f3 into develop Nov 18, 2025
14 checks passed
@EzraBrooks EzraBrooks deleted the switch-from-cbor-js-to-cbor2 branch November 18, 2025 18:30
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.

cbor-js is not ESM-compatible

4 participants