Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

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

Merged
merged 1 commit into from
Apr 1, 2022

Conversation

caleb-mabry
Copy link
Contributor

@caleb-mabry caleb-mabry commented Mar 28, 2022

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
Copy link

welcome bot commented Mar 28, 2022

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:

  • The context for this PR is clear, with relevant discussion, decisions
    and stakeholders linked/mentioned.

  • Your contribution itself is clear (code comments, self-review for the
    rest) and in its best form. Follow the code contribution
    guidelines

    if they apply.

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:

  • A maintainer will triage and assign priority to this PR, commenting on
    any missing things and potentially assigning a reviewer for high
    priority items.

  • The PR gets reviews, discussed and approvals as needed.

  • The PR is merged by maintainers when it has been approved and comments addressed.

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!

@lidel lidel merged commit 1a73160 into ipfs:master Apr 1, 2022
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.

ipfs.object.links result not match doc of ipfs.object.patch.rmLink argv
2 participants