-
Notifications
You must be signed in to change notification settings - Fork 493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: change from deprecated ipfs-api to ipfs-http-client #1535
Conversation
Awesome! We've bee needing to do this for quite some time, thanks for taking care of it. |
@@ -1,4 +1,4 @@ | |||
const IpfsApi = require('ipfs-api'); | |||
const IPFS = require('ipfs-http-client'); |
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.
One small thing, not really a PR blocker. Usually in .js
and .ts
all caps is used for constants, so it might be a little confusing to have a "library variable" that looks like a constant later on in the code.
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.
I'm using all constants because IPFS
is an acronym, like HTTP
and TCP
. This is also, technically, a constant 😉
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.
I'd go with Michael here. I'd even rename it ipfsClient
so it's clear what it is.
aaa3155
to
7f58ccb
Compare
DO NOT MERGE. This version of |
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.
Nice job.
This will need changes in the website too probably.
@@ -1,4 +1,4 @@ | |||
const IpfsApi = require('ipfs-api'); | |||
const IPFS = require('ipfs-http-client'); |
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.
I'd go with Michael here. I'd even rename it ipfsClient
so it's clear what it is.
if (err) { | ||
this.logger.error(__('Error creating a symlink to IPFS API')); | ||
return this.logger.error(err.message || err); | ||
} | ||
|
||
this.events.emit('runcode:register', 'IpfsApi', require('ipfs-api'), () => { | ||
this.events.emit('runcode:register', 'IPFS', require('ipfs-http-client'), () => { |
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.
This breaks embarkjs-ipfs which relies on the variable IpfsAPI
PR was submitted to the ipfs team: ipfs-inactive/js-ipfs-http-client#996. |
The PR was merged and a new version of package |
No description provided.