Closed Gozala closed 4 years ago
Wow, nice work. I just tested it also with js-ipld
and it just worked. If @achingbrain is happy with those changes, I don't see a reason for not making those changes.
Summary of few updates I've made:
chai
from aegir
.Uint8Array
to Buffer
casting in favor of doing it in protons (See https://github.com/ipfs/protons/pull/13)
ArrayBuffer
as Data
is no longer supported, it's just Uint8Array
now. Mostly to keep things simple on protons
side.sortLinks
with mutable version. Immutable version was not used anywhere else in this package.@achingbrain I believe I've addressed all your comments and comments from @rvagg. @vmx I hope you agree with my arguments to decouple this from switch to https://github.com/mapbox/pbf, I do not know what errors may arise from that change & I do not want to block my primary work on that.
Please let me know if there is anything else to be done, or if this can land.
Thanks
@vmx any chance you could get to this sometime this week ? I can't make any more progress on ipfs/js-ipfs#3081 without this.
@Gozala any objections if I release this as 0.19? It's been quite a big change and I don't want to have regressions sneaked it.
@vmx that sounds good to me. Thanks
This pull request attempts to add pure Data Model API interop (as per #173) in a backwards compatible way. High level overview of the changes are:
node.Data
.Only visible change is that
node.Links
no longer returns links mapped to pure data, but ratherDAGLink
instances. However it should not matter in practice because those were made to behave just like pure data would. Although tests had to be change to use.containSubset
instead of.eql
because later fails when prototype chain is different.