-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Conversation
if (typeof hash === 'string') { | ||
return multihash.fromB58String(hash) | ||
function cleanCid (cid) { | ||
if (cid.constructor.name === 'CID') { |
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.
please use require('cids').isCID
instead
7eb5dcc
to
1ab7c6f
Compare
PR Table from: ipld/js-ipld#60 (comment)
|
1ab7c6f
to
e28b028
Compare
f3ffa9c
to
301dbcf
Compare
Can I get some CR ? :) |
301dbcf
to
1b0b22d
Compare
Also added as a bonus, a refreshed readme :) |
@diasdavid why the red CI? |
@dignifiedquire it is that 'tmpdir' thing, I was grepping through to find where it was coming from, but with no luck, any idea? |
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.
Just two small things
@@ -22,7 +22,7 @@ function addBlock (buf) { | |||
throw err | |||
} | |||
|
|||
console.log(bs58.encode(block.key).toString()) | |||
console.log(bs58.encode(block.key()).toString()) |
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 doesn't this throw, shouldn't block.key()
be async?
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.
Not the released version apparently https://github.com/ipfs/js-ipfs-block
const link = new DAGLink(argv.name, size, multihash) | ||
|
||
ipfs.object.patch.addLink(argv.root, link, {enc: 'base58'}) | ||
.then((node) => { |
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.
let's not use promises mixed with callback
@@ -10,7 +10,7 @@ const createTempNode = require('../utils/temp-node') | |||
const repoPath = require('./index').repoPath | |||
const ipfs = require('../utils/ipfs-exec')(repoPath) | |||
|
|||
describe('bitswap', () => { | |||
describe.skip('bitswap', () => { |
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.
😿
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.
Just for a little bit :)
e9a5388
to
6f6b1e7
Compare
ce53361
to
ffdf640
Compare
ffdf640
to
689cfba
Compare
chore: upgrade dag-pb to the new, new api
This makes js-ipfs understand how to use IPLD.
As a compromise, had to turn off bitswap as its migration to IPLD is not trivial. We have a focused milestone for it (Bitswap complete).
The last thing to add to this PR is the new
dag
API.