This repository was archived by the owner on Mar 10, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +5
-6
lines changed Expand file tree Collapse file tree 4 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 6363 "ipfs-block" : " ~0.8.1" ,
6464 "ipfs-utils" : " ^0.4.0" ,
6565 "ipld-dag-cbor" : " ~0.15.0" ,
66- "ipld-dag-pb" : " ~0.17.3 " ,
66+ "ipld-dag-pb" : " ^0.18.1 " ,
6767 "ipld-raw" : " ^4.0.0" ,
6868 "is-ipfs" : " ~0.6.1" ,
6969 "is-pull-stream" : " 0.0.0" ,
109109 "cross-env" : " ^6.0.0" ,
110110 "dirty-chai" : " ^2.0.1" ,
111111 "go-ipfs-dep" : " ^0.4.22" ,
112- "interface-ipfs-core" : " ~0.114.0 " ,
112+ "interface-ipfs-core" : " ipfs/interface-js-ipfs-core#update-dag-pb " ,
113113 "ipfsd-ctl" : " ^0.47.1" ,
114114 "nock" : " ^11.3.2" ,
115115 "stream-equal" : " ^1.1.1"
Original file line number Diff line number Diff line change 11'use strict'
22
3- const dagPB = require ( 'ipld-dag-pb' )
43const dagCBOR = require ( 'ipld-dag-cbor' )
54const promisify = require ( 'promisify-es6' )
65const CID = require ( 'cids' )
@@ -56,7 +55,7 @@ module.exports = (send) => {
5655 if ( options . format === 'dag-cbor' ) {
5756 serialized = dagCBOR . util . serialize ( dagNode )
5857 } else if ( options . format === 'dag-pb' ) {
59- serialized = dagPB . util . serialize ( dagNode )
58+ serialized = dagNode . serialize ( )
6059 } else {
6160 // FIXME Hopefully already serialized...can we use IPLD to serialise instead?
6261 serialized = dagNode
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ module.exports = (send) => {
4848 }
4949
5050 const links = result . Links . map ( l => new DAGLink ( l . Name , l . Size , l . Hash ) )
51- const node = DAGNode . create ( Buffer . from ( result . Data , 'base64' ) , links )
51+ const node = new DAGNode ( Buffer . from ( result . Data , 'base64' ) , links )
5252
5353 cache . set ( cidB58Str , node )
5454 callback ( null , node )
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ describe('.dag', function () {
3737
3838 it ( 'should be able to put and get a DAG node with format dag-pb' , async ( ) => {
3939 const data = Buffer . from ( 'some data' )
40- const node = DAGNode . create ( data )
40+ const node = new DAGNode ( data )
4141
4242 let cid = await ipfs . dag . put ( node , { format : 'dag-pb' , hashAlg : 'sha2-256' } )
4343 cid = cid . toV0 ( )
You can’t perform that action at this time.
0 commit comments