From c53437572da0e1fd3f24c463347504ac2b8c49eb Mon Sep 17 00:00:00 2001 From: Volker Mische Date: Mon, 29 Oct 2018 17:38:30 +0100 Subject: [PATCH] chore: remove ipld formats re-export (#872) 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. BREAKING CHANGE: remove `types.dagCBOR` and `types.dagPB` from public API If you need the `ipld-dag-cbor` or `ipld-dag-pb` module in the Browser, you need to bundle them yourself. --- src/types.js | 4 ---- test/types.spec.js | 6 +----- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/types.js b/src/types.js index a6ae650c4..39c80c50b 100644 --- a/src/types.js +++ b/src/types.js @@ -1,8 +1,6 @@ 'use strict' const CID = require('cids') -const dagCBOR = require('ipld-dag-cbor') -const dagPB = require('ipld-dag-pb') const multiaddr = require('multiaddr') const multibase = require('multibase') const multihash = require('multihashes') @@ -12,8 +10,6 @@ const PeerInfo = require('peer-info') module.exports = () => ({ Buffer: Buffer, CID: CID, - dagPB: dagPB, - dagCBOR: dagCBOR, multiaddr: multiaddr, multibase: multibase, multihash: multihash, diff --git a/test/types.spec.js b/test/types.spec.js index 49b68a5ef..b27adf6da 100644 --- a/test/types.spec.js +++ b/test/types.spec.js @@ -3,8 +3,6 @@ const PeerId = require('peer-id') const PeerInfo = require('peer-info') -const dagCBOR = require('ipld-dag-cbor') -const dagPB = require('ipld-dag-pb') const multiaddr = require('multiaddr') const multibase = require('multibase') const multihash = require('multihashes') @@ -47,9 +45,7 @@ describe('.types', function () { multiaddr: multiaddr, multibase: multibase, multihash: multihash, - CID: CID, - dagPB: dagPB, - dagCBOR: dagCBOR + CID: CID }) }) })