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

Releases: ipld/js-ipld-dag-pb

v0.18.3

12 Mar 08:43
@vmx vmx
Compare
Choose a tag to compare

Bug Fixes

  • remove use of assert module (497850d)

v0.18.2

13 Jan 12:16
@vmx vmx
Compare
Choose a tag to compare

Bug Fixes

  • package: update multicodec to version 1.0.0 (f0fee49)
  • package: update multihashing-async to version 0.8.0 (244665a)

v0.18.1

19 Aug 16:48
@vmx vmx
Compare
Choose a tag to compare

Bug Fixes

  • serialization and size portability problems (f348cb8)

v0.18.0

29 Jul 13:49
@vmx vmx
Compare
Choose a tag to compare

Bug Fixes

Features

Performance Improvements

  • remove manual enumerability modifications (37ffdd5), closes #152
  • remove named links from object (4dbe00d)

BREAKING CHANGES

  • addLink() and rmLink() are now instance methods.

Prior to this change:

DAGNode.addLink(node, link)
DAGNode.rmLink(node, name)

Now:

node.addLink(link)
node.rmLink(name)
  • It's no longer possible to pass a DAGNode into addLink().

Intead of passing in a DAGNode into addLink(), convert that node into
a DAGLink via toDAGLink().

Example:

Prior to this change:

const node = new DAGNode('some data')
const node2 = new DAGNode('use that as link')
await DAGNode.addLink(node, node2)

Now:

const node = new DAGNode('some data')
const node2 = new DAGNode('use that as link')
DAGNode.addLink(node, await node2.toDAGLink())
  • DAGNode.create() is removed

Instead of DAGNode.create(), please use new DAGNode() instead. It
takes the same parameters and is compatible to create().

Example:

Prior to this change:

const node = DAGNode.create('some data', links)

Now:

const node = new DAGNode('some data', links)
  • DAGNode.clone() is removed from public API without any replacement.

Also the API for rmLink() and addLink() changed. They no longer
return a new node, but just remove/add the links to/from the current
node.

Prior to this change:

const lessLinks = DAGNode.rmLink(node1, 'Link1')
node1 = lessLinks
const moreLinks = await DAGNode.addLink(node2, link)
node2 = moreLinks

Now:

DAGNode.rmLink(node, 'Link1')
await DAGNode.addLink(node2, link)
  • named links are no longer part of an object

Access to named links is only possible with calling resolve().
Hence they are also not part of tree() anymore.

Named links are a feature of IPFS and only supported for
backwards compatibility, they are not really part of IPLD.

v0.17.4

22 May 13:52
@vmx vmx
Compare
Choose a tag to compare

Bug Fixes

  • actually use object keys (a411eeb)

v0.17.3

20 May 20:30
@vmx vmx
Compare
Choose a tag to compare

Bug Fixes

  • named links should return the CID (ee96d28)

v0.17.2

20 May 11:05
@vmx vmx
Compare
Choose a tag to compare

Bug Fixes

v0.17.1

17 May 22:43
@vmx vmx
Compare
Choose a tag to compare

Bug Fixes

  • allow adding links from DAGNode.Links (a5d300f)

v0.17.0

10 May 11:27
@vmx vmx
Compare
Choose a tag to compare

Bug Fixes

  • package: update cids to version 0.7.0 (2afca2c)

BREAKING CHANGES

  • package: Returned v1 CIDs now default to base32 encoding

Previous versions returned a base58 encoded string when toString()/
toBaseEncodedString() was called on a CIDv1. It now returns a base32
encoded string.

v0.16.0

08 May 19:59
@vmx vmx
Compare
Choose a tag to compare

Bug Fixes

  • package: update multihashing-async to version 0.6.0 (63b7986)

Features

BREAKING CHANGES

  • The API is now async/await based

There are numerous changes, the most significant one is that the API
is no longer callback based, but it using async/await.

The properties of DAGNode and DAGLink are now in sync with the paths
that are used for resolving. This means that e.g. name is now called
Name and size is Tsize.

All return values from resolve() now conform to the IPLD Data Model,
this means that e.g. links are no longer represented as
{'/': "baseecodedcid"}, but as CID instances instead.

For the full new API please see the IPLD Formats spec.