Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Added opts to object stat command #1055

Merged
merged 4 commits into from Jul 26, 2019
Merged

Conversation

obo20
Copy link
Contributor

@obo20 obo20 commented Jul 18, 2019

The ipfs object stat command couldn't handle the {timeout: '1s'} option (or any other options). We're already checking for the opts parameter so it makes sense that we should be sending it as well.

Things work as desired now with this one line addition.

Depends on:

The ipfs object stat command couldn't handle the {timeout: '1s'} option (or any other options). We're already checking for the opts parameter so it makes sense that we should be sending it as well. 

Things work as desired now with this one line addition.
@obo20
Copy link
Contributor Author

obo20 commented Jul 23, 2019

@alanshaw Is there anything keeping this from going in? We can fork on our end if needed, but if we could stick to using the official API that would be great.

@alanshaw
Copy link
Contributor

My apologies for not responding. The code change LGTM, it just needs a test in https://github.com/ipfs/interface-js-ipfs-core/blob/master/src/object/stat.js and then we can get it merged. Any chance you can send a quick PR?

@obo20
Copy link
Contributor Author

obo20 commented Jul 24, 2019

@alanshaw No worries. I'd be happy to throw in a test, just not sure how the PR process works there considering they're two separate repositories?

@alanshaw
Copy link
Contributor

This repo depends on interface-ipfs-core. This file pulls them in and runs them.

To write a test and run locally:

  1. git clone git@github.com:ipfs/js-ipfs-http-client.git
  2. git clone git@github.com:ipfs/interface-js-ipfs-core.git
  3. cd interface-js-ipfs-core && npm i && npm link
  4. Write your test here
  5. cd ../js-ipfs-http-client && npm i && npm link interface-ipfs-core
  6. Run just the object.stat tests: npm test -- --grep object.stat

Next:

  1. Send a PR to ipfs/interface-js-ipfs-core (please also add to the documentation!)
  2. I'll review and do the same steps as above
  3. When merged I'll release a new version of interface-ipfs-core
  4. This PR needs to be updated to depend on the new version

HTH, shout if you have any issues.

@obo20
Copy link
Contributor Author

obo20 commented Jul 25, 2019

@alanshaw see: ipfs-inactive/interface-js-ipfs-core#506

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
@alanshaw alanshaw merged commit 92b0594 into ipfs-inactive:master Jul 26, 2019
@alanshaw
Copy link
Contributor

alanshaw commented Jul 26, 2019

Thanks @obo20 😘, released in v33.1.1

@obo20 obo20 deleted the patch-1 branch July 29, 2019 13:39
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.

None yet

2 participants