-
Notifications
You must be signed in to change notification settings - Fork 296
Use ipfsd-ctl 0.19.0 and go-ipfs 0.4.5 #525
Conversation
Oh, and this PR will make js-ipfs-api work again with ipfsd-ctl (0.19.0) |
@haadcode I think ipfsd-ctl was released, can you update the PR so CI gets happy? |
I see you did that in #526. Can we put these two PRs together, or is there a reason for them being seperate? |
Sure! Added it to this PR. Now pulling in ipfsd-ctl@0.19.0 |
Change node factory to pass Multiaddr to the api instead of string Use ipfsd-ctl v0.19.0 which includes go-ipfs 0.4.5 Fix name tests
ee5fbe6
to
392437d
Compare
Squashed the commits and updated the commit message for changelog. |
Code lgtm, lets get travis happy |
I don't quite understand what/why the Travis errors are. There seems to be Syntax Errors coming from webpack, and I see an OOM at the end. @dignifiedquire can you take a quick look and see if you know what the problem is? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI is still not happy
|
||
script: | ||
- npm run test:node | ||
- npm run test:browser |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why separate?
"test:browser": "gulp test:browser", | ||
"test": "node --max_old_space_size=4096 node_modules/.bin/gulp test", | ||
"test:node": "node --max_old_space_size=4096 node_modules/.bin/gulp test:node", | ||
"test:browser": "node --max_old_space_size=4096 node_modules/.bin/gulp test:browser", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this? I believe we fixed the webpack hungryness when we migrated all the tests to use factory only
host: splitted[2], | ||
port: splitted[4], | ||
host: host, | ||
port: port, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
it('host, port', (done) => { | ||
const splitted = apiAddr.split('/') | ||
it('multiaddr (string), opts', (done) => { | ||
clientWorks(ipfsAPI(apiAddr.toString(), { protocol: 'http' }), done) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to specify the protocol now ?
This PR was originally made to update ipfsd-ctl to 0.19.0 (go-ipfs 0.4.5). We have since merged go-ipfs 0.4.7 to master with ipfsd-ctl 0.20.0. I believe this PR is not needed anymore. @diasdavid is there anything we need from this PR that is not already in master (eg. tests)? If not, let's go ahead and close this PR. |
Yeah, seems it is all good. Thank you either way :) |
This PR will comform with ipfsd-ctl@0.19.0 which changed the
.apiAddr
to be a Multiaddr instead of a string.We return that apiAddr from the node factory and due to
SocketIO
not handling objects and buffers successfully, we return a string. That string then gets converted back to Multiaddr in the client factory which attaches the Multiaddr to the ipfs api (like ipfsd-ctl does).I also added a test for the constructor to accept Multiaddr both as a string and as a proper Multiaddr type.