Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Serialize Uint8Array as binary (like Buffer) #129

Merged
merged 1 commit into from
Jun 10, 2020
Merged

Conversation

Gozala
Copy link
Contributor

@Gozala Gozala commented Jun 9, 2020

As per #128 this change treats Uint8Array just as it treats Buffer, which also happens to match underlying borc implementation:

https://github.com/dignifiedquire/borc/blob/master/src/encoder.js#L406-L407

Copy link
Member

@vmx vmx left a comment

Choose a reason for hiding this comment

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

Sounds good to me. Any objections @rvagg or @mikeal?

@vmx vmx requested review from mikeal and rvagg June 9, 2020 10:57
@rvagg
Copy link
Member

rvagg commented Jun 11, 2020

belated +1, very nice

rvagg added a commit to ipld/js-dag-cbor that referenced this pull request Jun 11, 2020
Not strictly necessary but this test was added to ipld-dag-cbor and it's
nice for completeness and holds us strictly to the promise of Uint8Arrays
being the primary byte holder

Ref: ipld/js-ipld-dag-cbor#129
mikeal added a commit to ipld/js-dag-cbor that referenced this pull request Jun 13, 2020
BREAKING CHANGE!

* feat: migrate code

* wip: needs more coverage

* fix: make clean Uint8Array

* fix: 100% coverage, backing out error swallowing

* build: automated releases

* fix: linter fixes

* chore: pull in Uint8Array|Buffer test

Not strictly necessary but this test was added to ipld-dag-cbor and it's
nice for completeness and holds us strictly to the promise of Uint8Arrays
being the primary byte holder

Ref: ipld/js-ipld-dag-cbor#129

* fix: move constants to top

* fix: upgrade to latest ESM version

Co-authored-by: Rod Vagg <[email protected]>
mikeal pushed a commit to ipld/js-dag-cbor that referenced this pull request Jun 18, 2020
Not strictly necessary but this test was added to ipld-dag-cbor and it's
nice for completeness and holds us strictly to the promise of Uint8Arrays
being the primary byte holder

Ref: ipld/js-ipld-dag-cbor#129
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants