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

Commit 7a931c1

Browse files
vmxAlan Shaw
authored and
Alan Shaw
committed
chore: remove ipld formats re-export (#374)
Prior to this change the `ipld-dag-cbor` and `ipld-dag-pb` modules are re-exported so that can be accessed within the Browser bundle. Those modules normally don't need to be used directly, they are kind of implementation details of IPLD. Hence remove them. --- Re-exporting these types here effectively forces ipfs core implementation versions to follow versions of these packages. Their API is now our API. i.e. if dag-pb increments major, then ipfs has to also increment major even if the rest of the IPFS API has no breaking changes. Keeping these in sync is also problematic - if we try to use an old dag-pb module with ipfs whose ipld has a newer dag-pb things can break. If at all, they should be exported from ipld and re-exported here, so that ipfs doesn't have to keep them in sync. However considering they should not be used directly for day-to-day operation I'm in agreement with them being removed.
1 parent e6822aa commit 7a931c1

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

js/src/types.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
const PeerId = require('peer-id')
55
const PeerInfo = require('peer-info')
6-
const dagCBOR = require('ipld-dag-cbor')
7-
const dagPB = require('ipld-dag-pb')
86
const multiaddr = require('multiaddr')
97
const multibase = require('multibase')
108
const multihash = require('multihashes')
@@ -44,9 +42,7 @@ module.exports = (createCommon, options) => {
4442
multiaddr: multiaddr,
4543
multibase: multibase,
4644
multihash: multihash,
47-
CID: CID,
48-
dagPB: dagPB,
49-
dagCBOR: dagCBOR
45+
CID: CID
5046
})
5147
})
5248
})

0 commit comments

Comments
 (0)