ipfs / js-ipfs

IPFS implementation in JavaScript
https://js.ipfs.tech
Other
7.44k stars 1.25k forks source link

fix(rmlink): fix rmlink to match docs #4073

Closed caleb-mabry closed 2 years ago

caleb-mabry commented 2 years ago

Resolves #3815 The test provided for rmlink has the object structured as: https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/src/object/patch/rm-link.js#L49-L55

const childAsDAGLink = {
   Name: 'my-link',
   Tsize: childBuf.length,
   Hash: CID.createV0(await sha256.digest(childBuf))
}

While the documentation has it defined as:

const cid = await ipfs.object.patch.rmLink(node, {
  name: 'some-link',
  size: 10,
  cid: CID.parse('QmPTkMuuL6PD8L2SwTwbcs1NPg14U8mRzerB1ZrrBrkSDD')
})

Method has been updated to match the variable names in the documentation and the example has been altered to match the example in the test case.

welcome[bot] commented 2 years ago

Thank you for submitting this PR! A maintainer will be here shortly to review it. We are super grateful, but we are also overloaded! Help us by making sure that:

Getting other community members to do a review would be great help too on complex PRs (you can ask in the chats/forums). If you are unsure about something, just leave us a comment. Next steps:

We currently aim to provide initial feedback/triaging within two business days. Please keep an eye on any labelling actions, as these will indicate priorities and status of your contribution. We are very grateful for your contribution!